body{
  min-width:320px;
  overflow-x:hidden;
  background:var(--bg);
  color:var(--fg);
}

.shop-line-page .brand-title,
.catalog-line-title,
.shop-cart-head .page-title{
  font-family:"Lucida Console","Courier New","Courier",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  letter-spacing:0;
  text-transform:none;
}

.shop-hero{ padding:34px 0 20px; }

.shop-hero-grid{
  display:grid;
  grid-template-columns:1fr .92fr;
  gap:14px;
  align-items:start;
}

.shop-panel,
.shop-product,
.shop-cart{
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--bg-elevated);
  box-shadow:var(--shadow);
  overflow:hidden;
  color:var(--fg);
}

.shop-hero-copy{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.shop-line-lead{
  max-width:54ch;
  margin:0;
  opacity:.86;
}

.shop-hero-media{
  height:clamp(320px, 40vw, 520px);
  background:var(--bg-surface);
}

.shop-hero-media img,
.shop-product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:none !important;
}

.shop-catalog{ padding:10px 0 44px; }

.catalog-line{ scroll-margin-top:130px; }

.catalog-line-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:end;
  border-bottom:1px solid var(--border);
  padding-bottom:10px;
  margin-bottom:14px;
}

.catalog-line-title{
  margin:0;
  font-size:clamp(1.7rem, 4vw, 2.6rem);
  line-height:1;
}

.catalog-line-note{
  margin:6px 0 0;
  max-width:60ch;
  opacity:.78;
}

.catalog-line-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

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

.shop-product{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.shop-product-media{
  border:0;
  padding:0;
  width:100%;
  height:clamp(300px, 30vw, 430px);
  background:var(--bg-surface);
  border-bottom:1px solid var(--border);
  overflow:hidden;
  cursor:zoom-in;
}

.shop-product-media img{
  transform:scale(1);
  transition:transform .28s ease;
}

.shop-product:hover .shop-product-media img{ transform:scale(1.025); }

.shop-product-body{
  padding:14px;
  display:flex;
  flex:1;
  flex-direction:column;
  gap:10px;
}

.shop-product-line{
  margin:0;
  font-size:.82rem;
  opacity:.72;
}

.shop-product h3{
  margin:0;
  font-size:1.12rem;
  text-transform:lowercase;
}

.shop-product-desc{
  margin:0;
  opacity:.88;
}

.shop-product-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:auto;
}

.shop-product-meta span{
  border:1px solid var(--border);
  border-radius:999px;
  padding:5px 8px;
  font-family:var(--mono, ui-monospace, monospace);
  font-size:.78rem;
}

.shop-buy-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}

.shop-size{
  min-height:44px;
  width:100%;
  border:1px solid var(--border-strong);
  border-radius:12px;
  background:var(--bg-elevated);
  color:var(--fg);
  padding:0 12px;
  font:900 .88rem/1 var(--mono, ui-monospace, monospace);
  text-transform:lowercase;
}

.shop-size.is-missing{
  border-color:var(--brand);
  box-shadow:0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent);
}

.shop-cart{
  margin-top:18px;
  padding:16px;
  scroll-margin-top:130px;
}

.shop-cart-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  border-bottom:1px solid var(--border);
  padding-bottom:12px;
}

.shop-cart-head .page-title{ margin-bottom:0; }

.shop-cart-empty{
  padding:14px 0 2px;
  opacity:.82;
}

.shop-cart-list{
  display:grid;
  gap:10px;
  margin:12px 0 0;
}

.shop-cart-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--border);
  background:var(--bg-muted);
  padding:10px;
  border-radius:8px;
}

.shop-cart-name{
  margin:0 0 2px;
  font-weight:900;
  text-transform:lowercase;
}

.shop-cart-meta{
  margin:0;
  font-family:var(--mono, ui-monospace, monospace);
  font-size:.8rem;
  opacity:.72;
}

.shop-cart-controls{
  display:flex;
  align-items:center;
  gap:6px;
}

.shop-cart-qty{
  min-width:2.2rem;
  text-align:center;
  font-family:var(--mono, ui-monospace, monospace);
  font-weight:900;
}

.shop-cart-icon{
  width:36px;
  height:36px;
  border:1px solid var(--border-strong);
  background:var(--bg-elevated);
  color:var(--fg);
  border-radius:999px;
  cursor:pointer;
  font:900 1rem/1 var(--mono, ui-monospace, monospace);
  transition:background-color .18s ease, color .18s ease, transform .18s ease;
}

.shop-cart-icon:hover{
  background:var(--invert-bg);
  color:var(--invert-fg);
  transform:translateY(-1px);
}

.shop-cart-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:14px;
  border-top:1px solid var(--border);
  padding-top:14px;
}

.shop-cart-status{
  min-height:1.4em;
  margin:10px 0 0;
  font-family:var(--mono, ui-monospace, monospace);
  font-size:.82rem;
  opacity:.72;
}

.shop-lightbox{
  position:fixed;
  inset:0;
  z-index:2400;
  display:none;
  align-items:center;
  justify-content:center;
  padding:clamp(14px, 3vw, 34px);
  background:rgba(0,0,0,.82);
}

.shop-lightbox.is-open{ display:flex; }

.shop-lightbox-inner{
  position:relative;
  width:min(1100px, 100%);
  max-height:calc(100dvh - 2 * clamp(14px, 3vw, 34px));
  background:var(--bg-elevated);
  border:1px solid var(--border-strong);
  border-radius:10px;
  overflow:hidden;
}

.shop-lightbox-img{
  width:100%;
  max-height:calc(100dvh - 120px);
  object-fit:contain;
  background:var(--bg-surface);
}

.shop-lightbox-caption{
  margin:0;
  padding:12px 14px;
  border-top:1px solid var(--border);
  font-family:var(--mono, ui-monospace, monospace);
  font-size:.86rem;
  color:var(--fg);
}

.shop-lightbox-close{
  position:absolute;
  top:10px;
  right:10px;
  width:40px;
  height:40px;
  border:1px solid var(--border-strong);
  border-radius:999px;
  background:var(--bg-elevated);
  color:var(--fg);
  cursor:pointer;
  font:900 1.2rem/1 var(--mono, ui-monospace, monospace);
}

@media (max-width:980px){
  .shop-hero-grid,
  .shop-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .shop-hero{ padding-top:24px; }

  .shop-hero-copy,
  .shop-product-body,
  .shop-cart{ padding:12px; }

  .shop-hero-media{ height:220px; }
  .shop-product-media{ height:clamp(280px, 92vw, 430px); }

  .catalog-line-head,
  .shop-cart-head,
  .shop-cart-actions,
  .shop-cart-item{
    grid-template-columns:1fr;
    flex-direction:column;
    align-items:stretch;
  }

  .catalog-line-actions,
  .shop-buy-row{
    grid-template-columns:1fr;
    justify-content:stretch;
  }

  .catalog-line-actions .btn,
  .shop-buy-row .btn,
  .shop-cart-actions .btn,
  .shop-cart-head .btn{
    width:100%;
  }

  .shop-cart-controls{ justify-content:flex-start; }
}
