:root{--bg:#f4f7fb;--surface:#fff;--text:#101828;--muted:#667085;--border:#e4e7ec;--accent:#2563eb;--accent-weak:#dbeafe;--danger:#dc2626;--shadow:0 10px 28px rgba(16,24,40,.08)}
*{box-sizing:border-box}
body{font-family:Inter,Arial,sans-serif;margin:0;background:radial-gradient(circle at top left,#eef4ff 0,#f6f8fc 36%,#f4f7fb 100%);color:var(--text);line-height:1.5}
a{color:inherit}

.site-header{position:sticky;top:0;z-index:20;background:#ffffffdf;backdrop-filter:blur(10px);display:flex;justify-content:space-between;align-items:center;padding:12px 20px;border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:12px;font-weight:600;text-decoration:none;font-size:1.12rem;line-height:1.2}
.brand-logo{width:34px;height:34px;object-fit:contain;display:block}
.brand-text{letter-spacing:.01em}
.top-nav{display:flex;gap:8px}
.cart-button{padding:8px 12px;border:1px solid var(--border);border-radius:12px;text-decoration:none;background:var(--surface)}
.main-shell{max-width:1160px;margin:0 auto;padding:22px 20px 30px}

.hero{background:linear-gradient(130deg,#eaf2ff,#fff);border:1px solid var(--border);padding:28px;border-radius:18px;margin-bottom:18px;box-shadow:var(--shadow)}
.hero h1{margin-top:0;margin-bottom:10px}

.grid{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:16px}
@media (min-width:720px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:960px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:18px;text-decoration:none;color:inherit;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:10px}
.card h3,.card p{margin:0}
.card img{width:100%;height:170px;object-fit:cover;border-radius:12px}
.product-card{justify-content:flex-start}

.card-centered{align-items:center;text-align:center;justify-content:center;min-height:170px}
.price-line{font-weight:700}
.muted{color:var(--muted)}

.chip-row{display:flex;overflow:auto;gap:10px;padding:4px 0 10px}
.chip{background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:8px 14px;white-space:nowrap;text-decoration:none;color:inherit}

.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.toolbar a{padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);text-decoration:none}
.toolbar-surface{padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:14px}
.toolbar-compact{margin-top:10px}
.pager{display:flex;justify-content:space-between;margin:18px 0}

.gallery{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:10px}
@media (min-width:700px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:980px){.gallery{grid-template-columns:repeat(4,minmax(0,1fr))}}
.gallery img{width:100%;border-radius:12px}

button,.btn{background:var(--accent);color:#fff;border:none;border-radius:12px;padding:10px 12px;cursor:pointer}.danger{background:var(--danger)}
.card-image-placeholder,.empty-state{min-height:150px;display:flex;align-items:center;justify-content:center;text-align:center;border:1px dashed var(--border);border-radius:12px;color:var(--muted);padding:14px;background:#fff}
input,textarea,select{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;margin:6px 0 10px;background:#fff}
.admin-card{max-width:480px;margin:60px auto;background:#fff;border:1px solid var(--border);border-radius:16px;padding:20px;box-shadow:var(--shadow)}
.error{color:var(--danger)}

.table-wrap{overflow:auto;background:#fff;border:1px solid var(--border);border-radius:12px;margin-top:14px}
table{width:100%;border-collapse:collapse}
th,td{padding:12px 14px;border-bottom:1px solid var(--border);text-align:left;font-size:.92rem;vertical-align:top}

pre{white-space:pre-wrap;background:#fff;border:1px solid var(--border);padding:12px;border-radius:12px;max-height:320px;overflow:auto}
.toolbar form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
details{margin:8px 0}

.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:4px 0 12px}
.section-head h1,.section-head h2{margin:0}
.stack{display:grid;gap:8px}

.notice{border:1px solid var(--border);background:#fff;padding:12px 14px;border-radius:12px;margin:12px 0}
.notice-success{border-color:#86efac;background:#f0fdf4}
.notice-error{border-color:#fca5a5;background:#fef2f2}
.notice-info{border-color:#bfdbfe;background:#eff6ff}
.notice ul{margin:8px 0 0 18px}

.admin-grid{grid-template-columns:repeat(1,minmax(0,1fr))}
@media (min-width:900px){.admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.product-layout{background:var(--surface);border:1px solid var(--border);padding:20px;border-radius:16px;box-shadow:var(--shadow)}
.product-layout h1,.product-layout p{margin:8px 0}
.status-pill{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:.8rem;font-weight:600}
.status-on{background:#ecfdf3;color:#027a48;border:1px solid #a6f4c5}
.status-off{background:#fef2f2;color:#b42318;border:1px solid #fecaca}
.actions-inline{display:flex;gap:8px;flex-wrap:wrap}
.divider{border:none;height:1px;background:var(--border);margin:12px 0}
.btn-secondary{background:#fff;color:var(--text);border:1px solid var(--border)}
.json-example-box{border:1px solid var(--border);background:#f8fbff;border-radius:12px;padding:12px}
.json-example-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.json-example-box pre{margin:8px 0 0;max-height:240px}


button:hover,.btn:hover,.cart-button:hover,.toolbar a:hover,.chip:hover,.card:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
button:focus-visible,.btn:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #93c5fd;outline-offset:2px}
.card,.chip,.toolbar a,.cart-button,button,.btn{transition:all .18s ease}

@media (max-width:980px){
  .product-gallery-main{height:320px}
  .product-thumbs{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (max-width:780px){
  .site-header{padding:10px 12px}
  .brand-logo{width:30px;height:30px}
  .main-shell{padding:14px 12px 24px}
  .hero{padding:20px}
  .toolbar{overflow:auto;white-space:nowrap}
  .table-wrap table{font-size:.84rem}
  .section-head{align-items:flex-start;flex-direction:column}
  th,td{padding:10px}
}


.image-slider,.product-gallery{position:relative}
.image-slider img,.product-gallery-main{width:100%;height:190px;object-fit:cover;border-radius:12px;background:#f2f4f7}
.product-gallery-main{height:420px}
.gallery-nav{position:absolute;top:50%;transform:translateY(-50%);width:32px;height:32px;border-radius:999px;border:1px solid var(--border);background:#ffffffd9;color:var(--text);display:flex;align-items:center;justify-content:center;padding:0;font-size:1.2rem;line-height:1}
.gallery-nav.prev{left:10px}.gallery-nav.next{right:10px}
.product-thumbs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:10px}
.thumb-btn{border:1px solid var(--border);background:#fff;border-radius:10px;padding:2px;cursor:pointer}
.thumb-btn img{width:100%;height:72px;object-fit:cover;border-radius:8px}
.thumb-btn.is-active{border-color:#93c5fd;box-shadow:0 0 0 2px #dbeafe inset}
.pager-pages{align-items:center;gap:6px;flex-wrap:wrap}
.pager-pages a{padding:7px 10px;border:1px solid var(--border);border-radius:10px;background:#fff;text-decoration:none}
.pager-pages a.is-current{background:#eff6ff;border-color:#93c5fd;font-weight:600}
