:root{
  --bg:#eef3f9;
  --bg-accent:#e0ecfb;
  --surface:#ffffff;
  --surface-strong:#fbfdff;
  --surface-muted:#f4f7fb;
  --text:#10203a;
  --muted:#607089;
  --line:#d8e1ef;
  --brand:#0f62fe;
  --brand-strong:#084cc7;
  --brand-soft:#e8f0ff;
  --success:#198754;
  --danger:#dc3545;
  --radius-lg:24px;
  --radius-md:18px;
  --radius-sm:12px;
  --shadow-lg:0 24px 60px rgba(15, 34, 66, .12);
  --shadow-md:0 14px 32px rgba(15, 34, 66, .09);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  min-height:100vh;
  font-family:"Bahnschrift","Segoe UI Variable","Trebuchet MS",sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(15,98,254,.06), transparent 22%),
    radial-gradient(circle at right 10%, rgba(111,198,255,.08), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
  display:block;
}

button,
input,
textarea,
select{
  font:inherit;
}

.site-topbar{
  border-bottom:1px solid rgba(216,225,239,.7);
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(8px);
}

.site-topbar__inner,
.site-header__inner,
.page-shell,
.site-footer__inner{
  width:min(1200px, calc(100% - 32px));
  margin:0 auto;
}

.site-topbar__inner{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  color:var(--muted);
  font-size:14px;
}

.site-topbar__links,
.inline-links{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}

.site-header{
  position:sticky;
  top:0;
  z-index:40;
  border-bottom:1px solid rgba(216,225,239,.8);
  background:rgba(248,251,255,.92);
  backdrop-filter:blur(14px);
}

.site-header__inner{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:18px;
  padding:16px 0;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  font-weight:900;
  font-size:30px;
  letter-spacing:-0.03em;
}

.brand__mark{
  position:relative;
  width:20px;
  height:20px;
  border-radius:999px;
  background:linear-gradient(135deg, #1ed29b 0%, #0f62fe 100%);
  box-shadow:0 0 0 6px rgba(15,98,254,.14);
}

.brand__mark::after{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:999px;
  background:#f5f8fd;
}

.searchbar{
  display:flex;
  align-items:center;
  overflow:hidden;
  min-height:56px;
  padding-left:18px;
  border:1px solid rgba(15,98,254,.18);
  border-radius:999px;
  background:#fff;
  box-shadow:var(--shadow-md);
}

.searchbar input{
  flex:1;
  min-width:0;
  border:0;
  background:transparent;
  outline:0;
  color:var(--text);
  font-size:15px;
}

.searchbar button{
  border:0;
  min-width:132px;
  min-height:56px;
  padding:0 20px;
  font-weight:800;
  color:#fff;
  background:linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  cursor:pointer;
}

.site-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.nav-link,
.chip-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:0 14px;
  border-radius:999px;
  font-weight:700;
  color:var(--text);
  transition:.18s ease;
}

.nav-link:hover,
.chip-link:hover{
  background:rgba(15,98,254,.08);
}

.badge-counter{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 7px;
  border-radius:999px;
  background:var(--brand);
  color:#fff;
  font-size:11px;
  font-weight:800;
}

.page-shell{
  padding:24px 0 72px;
}

.page-stack{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.hero-panel,
.panel,
.empty-panel{
  border:1px solid rgba(216,225,239,.92);
  border-radius:var(--radius-lg);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,253,255,.96));
  box-shadow:var(--shadow-lg);
}

.hero-panel{
  padding:28px;
}

.hero-panel--split{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(260px, .9fr);
  gap:18px;
  align-items:end;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:var(--brand-soft);
  color:var(--brand);
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.page-title{
  margin:14px 0 10px;
  font-size:clamp(32px, 5vw, 54px);
  line-height:1.02;
  letter-spacing:-0.05em;
}

.page-subtitle{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
}

.hero-actions,
.cluster{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.metric-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.metric-card{
  padding:16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(244,247,251,.85);
}

.metric-card strong{
  display:block;
  margin-top:6px;
  font-size:28px;
  line-height:1;
}

.section-heading{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:16px;
}

.section-heading h2,
.panel h2,
.panel h1{
  margin:0;
  font-size:28px;
  line-height:1.08;
  letter-spacing:-0.04em;
}

.section-heading p,
.muted{
  margin:0;
  color:var(--muted);
  line-height:1.65;
}

.panel{
  padding:22px;
}

.card{
  padding:22px;
  border:1px solid rgba(216,225,239,.92);
  border-radius:var(--radius-lg);
  background:#fff;
  box-shadow:var(--shadow-md);
}

.panel--soft{
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(244,247,251,.96));
}

.category-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.category-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border:1px solid var(--line);
  border-radius:999px;
  font-weight:700;
  background:#fff;
  transition:.16s ease;
}

.category-pill:hover,
.category-pill.is-active{
  color:var(--brand);
  border-color:rgba(15,98,254,.3);
  background:var(--brand-soft);
}

.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
  justify-content:start;
  align-items:start;
}

.product-card{
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(216,225,239,.92);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow-md);
  width:100%;
  max-width:320px;
  justify-self:start;
}

.product-card__media{
  position:relative;
  aspect-ratio:1 / 1;
  background:
    linear-gradient(180deg, rgba(16,32,58,.02), rgba(16,32,58,.07)),
    #f3f6fb;
  overflow:hidden;
}

.product-card__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .22s ease;
}

.product-card:hover .product-card__media img{
  transform:scale(1.04);
}

.media-placeholder{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
  background:
    radial-gradient(circle at top, rgba(15,98,254,.18), transparent 30%),
    repeating-linear-gradient(135deg, #e3eaf6 0, #e3eaf6 16px, #d5dfef 16px, #d5dfef 32px);
}

.icon-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(96,112,137,.28);
  background:rgba(255,255,255,.96);
  color:#6a7890;
  cursor:pointer;
  transition:.15s ease;
}

.icon-button:hover{
  color:var(--brand);
  border-color:rgba(15,98,254,.3);
}

.icon-button.is-active{
  color:#fff;
  background:linear-gradient(135deg, #ff5b6a 0%, #ff3366 100%);
  border-color:transparent;
}

.product-card__favorite{
  position:absolute;
  top:14px;
  right:14px;
  z-index:2;
}

.product-card__body{
  display:flex;
  flex:1;
  flex-direction:column;
  gap:10px;
  padding:16px;
}

.product-card__title{
  margin:0;
  font-size:20px;
  line-height:1.2;
  letter-spacing:-0.03em;
}

.product-card__title a{
  color:inherit;
}

.product-card__meta{
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

.price{
  font-size:30px;
  font-weight:900;
  line-height:1;
  letter-spacing:-0.05em;
}

.price small{
  font-size:16px;
}

.stock{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:#eefcf5;
  color:var(--success);
}

.stock.is-off{
  background:#fff1f3;
  color:var(--danger);
}

.stock-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:#eefcf5;
  color:var(--success);
}

.stock-badge.out{
  background:#fff1f3;
  color:var(--danger);
}

.product-card__actions,
.button-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:0 18px;
  border-radius:14px;
  border:1px solid var(--brand);
  background:linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:.16s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(15,98,254,.18);
}

.btn.secondary,
.btn--ghost{
  background:#fff;
  border-color:var(--line);
  color:var(--text);
  box-shadow:none;
}

.btn.secondary:hover,
.btn--ghost:hover{
  background:var(--surface-muted);
}

.btn--danger{
  border-color:#f4b4b9;
  background:#fff5f6;
  color:#b42318;
}

.btn--full{
  width:100%;
}

.btn.disabled,
.btn[disabled],
.btn.is-disabled{
  opacity:.55;
  pointer-events:none;
}

.detail-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(320px, .8fr);
  gap:18px;
}

.detail-media,
.detail-sidebar{
  padding:18px;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:#fff;
  box-shadow:var(--shadow-md);
}

.detail-image-shell{
  border-radius:20px;
  overflow:hidden;
  background:#f3f6fb;
}

.detail-sidebar{
  position:sticky;
  top:104px;
  align-self:start;
}

.info-list{
  display:grid;
  gap:10px;
}

.info-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:15px;
}

.info-row strong{
  color:var(--text);
}

.detail-description{
  margin-top:18px;
}

.auth-layout,
.dashboard-grid,
.settings-grid{
  display:grid;
  gap:18px;
}

.auth-layout{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.form-panel{
  padding:24px;
}

.form-stack{
  display:grid;
  gap:14px;
}

.form-grid{
  display:grid;
  gap:14px;
}

.field-group{
  display:grid;
  gap:6px;
}

.field{
  display:grid;
  gap:6px;
}

.field.checkbox{
  display:flex;
  align-items:center;
  gap:10px;
}

.field-group label{
  font-size:14px;
  font-weight:700;
}

.field label{
  font-size:14px;
  font-weight:700;
}

.input,
.field-group textarea,
.field-group select{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  outline:0;
}

.field-group textarea{
  min-height:140px;
  resize:vertical;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus,
.input:focus{
  border-color:rgba(15,98,254,.45);
  box-shadow:0 0 0 4px rgba(15,98,254,.1);
}

.errorlist{
  list-style:none;
  margin:0;
  padding:0;
  color:#b42318;
  font-size:13px;
}

.message-list{
  display:grid;
  gap:10px;
}

.message{
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

.message.success{
  border-color:#b9ebcb;
  background:#f1fff6;
}

.message.info{
  border-color:#c8d9ff;
  background:#f3f7ff;
}

.message.error{
  border-color:#f5b7bd;
  background:#fff4f6;
}

.empty-panel{
  padding:28px;
  text-align:center;
}

.account-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.account-stat{
  padding:18px;
  border-radius:20px;
  border:1px solid var(--line);
  background:var(--surface-muted);
}

.account-stat strong{
  display:block;
  margin-top:10px;
  font-size:32px;
  letter-spacing:-0.05em;
}

.cart-list{
  display:grid;
  gap:14px;
}

.cart-row{
  display:grid;
  grid-template-columns:120px minmax(0, 1fr) auto;
  gap:16px;
  align-items:center;
}

.cart-row__image{
  border-radius:18px;
  overflow:hidden;
  background:#f3f6fb;
  aspect-ratio:1 / 1;
}

.quantity-box{
  display:flex;
  align-items:center;
  gap:8px;
}

.quantity-box span{
  min-width:28px;
  text-align:center;
  font-weight:800;
}

.summary-panel{
  display:grid;
  gap:12px;
}

.summary-price{
  font-size:40px;
  font-weight:900;
  letter-spacing:-0.05em;
}

.table-wrap{
  overflow:auto;
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:14px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}

.table th{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
}

.footer-note{
  margin-top:20px;
  font-size:14px;
  color:var(--muted);
}

.site-footer{
  border-top:1px solid rgba(216,225,239,.8);
  background:rgba(255,255,255,.88);
}

.site-footer__inner{
  padding:24px 0 38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:var(--muted);
  font-size:14px;
}

.hidden{
  display:none !important;
}

@media (max-width:1080px){
  .site-header__inner{
    grid-template-columns:1fr;
  }

  .site-nav{
    justify-content:flex-start;
  }

  .hero-panel--split,
  .detail-layout,
  .auth-layout{
    grid-template-columns:1fr;
  }

  .detail-sidebar{
    position:static;
  }
}

@media (max-width:780px){
  .site-topbar__inner,
  .site-header__inner,
  .page-shell,
  .site-footer__inner{
    width:min(100% - 20px, 1200px);
  }

  .site-topbar{
    display:none;
  }

  .brand{
    font-size:26px;
  }

  .searchbar{
    min-height:52px;
  }

  .searchbar button{
    min-height:52px;
    min-width:104px;
  }

  .page-shell{
    padding-top:16px;
  }

  .hero-panel,
  .panel,
  .detail-media,
  .detail-sidebar{
    padding:18px;
    border-radius:20px;
  }

  .page-title{
    font-size:36px;
  }

  .metric-grid,
  .account-stats{
    grid-template-columns:1fr;
  }

  .card-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
  }

  .product-card__body{
    padding:14px;
  }

  .product-card__title{
    font-size:17px;
  }

  .product-card__actions{
    flex-direction:column;
  }

  .cart-row{
    grid-template-columns:1fr;
  }

  .site-footer__inner{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width:560px){
  .site-nav{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    width:100%;
  }

  .nav-link,
  .chip-link{
    width:100%;
    justify-content:flex-start;
  }

  .card-grid{
    grid-template-columns:1fr;
  }

  .page-title{
    font-size:30px;
  }

  .section-heading{
    flex-direction:column;
    align-items:flex-start;
  }
}
