[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shop main { min-height: 70vh; }
.site-header nav a.is-current { color: var(--ink); }
.cart-btn {
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); background: transparent; border: 1px solid var(--ink);
  padding: 7px 8px 7px 16px; border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.cart-btn:hover { background: var(--ink); color: var(--bg); }
.cart-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: 13px; display: inline-grid; place-items: center;
}
.cart-btn.bump .cart-count { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.25); } }

/* Listing */
.view-list { padding: 56px 0 96px; }
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding-bottom: 28px; }
.shop-head h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1; letter-spacing: -0.04em; }
.shop-sub { margin: 14px 0 0; color: var(--muted); font-size: 16px; max-width: 36em; }
.shop-tools { display: flex; gap: 12px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--rule);
  border-radius: 999px; padding: 0 18px; min-width: 320px; color: var(--muted);
  transition: border-color .2s var(--ease);
}
.search:focus-within { border-color: var(--ink); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; padding: 13px 0; width: 100%; color: var(--ink); }
.sort select {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--rule);
  border-radius: 999px; padding: 13px 40px 13px 18px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141414' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.cats {
  display: flex; gap: 8px; overflow-x: auto; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink);
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.cat:hover { border-color: var(--ink); }
.cat[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cat small { color: inherit; opacity: .55; margin-left: 4px; font-size: 12px; }
.results-line { margin: 20px 0 24px; font-size: 14px; color: var(--muted); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; }
.item a { display: block; color: var(--ink); text-decoration: none; }
.item .ph {
  position: relative; aspect-ratio: 1 / 1; background: #fff; border-radius: 4px; overflow: hidden;
  display: grid; place-items: center;
}
.item .ph img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform .5s var(--ease); }
.item a:hover .ph img { transform: scale(1.04); }
.item .meta { padding-top: 14px; }
.item .cat-label { font-size: 13px; color: var(--muted); }
.item h3 { font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.35; letter-spacing: 0; margin: 4px 0 6px; }
.item a:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.item .price { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.item .price small { font-family: var(--font); font-weight: 400; font-size: 13px; color: var(--muted); margin-right: 4px; }
.badge { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; }
.more { display: flex; justify-content: center; margin-top: 56px; }
.button-outline {
  font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; color: var(--ink);
  background: transparent; border: 1px solid var(--ink); border-radius: 999px; padding: 14px 28px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.button-outline:hover { background: var(--ink); color: var(--bg); }
.empty { text-align: center; color: var(--muted); padding: 64px 0; }

/* Detail */
.view-detail { padding: 32px 0 112px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.gallery { position: sticky; top: 92px; }
.g-main { position: relative; background: #fff; border-radius: 6px; overflow: hidden; }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / 1; display: grid; place-items: center; cursor: zoom-in; border: 0; background: #fff; padding: 0; }
.g-slide img { width: 100%; height: 100%; object-fit: contain; padding: 5%; }
.g-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--rule); background: rgba(255,255,255,.92); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: background .2s var(--ease), border-color .2s var(--ease);
}
.g-arrow:hover { border-color: var(--ink); }
.g-prev { left: 14px; } .g-next { right: 14px; }
.g-count { position: absolute; bottom: 12px; right: 14px; font-size: 13px; color: var(--muted); background: rgba(255,255,255,.9); padding: 2px 10px; border-radius: 999px; }
.g-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.g-thumbs button { flex: 0 0 76px; height: 76px; padding: 0; border: 1px solid var(--rule); border-radius: 4px; background: #fff; cursor: pointer; overflow: hidden; transition: border-color .2s var(--ease); }
.g-thumbs button[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.g-thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.info .cat-label { font-size: 14px; color: var(--muted); }
.info h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.03em; margin: 8px 0 18px; }
.info .price-big { font-family: var(--display); font-weight: 600; font-size: 34px; letter-spacing: -0.02em; margin: 0 0 4px; }
.info .price-note { font-size: 14px; color: var(--muted); margin: 0 0 28px; }
.opt-label { font-size: 14px; font-weight: 500; margin: 0 0 10px; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.variant {
  font: inherit; font-size: 15px; cursor: pointer; padding: 10px 16px; border-radius: 6px; border: 1px solid var(--rule); background: #fff; color: var(--ink);
  transition: border-color .2s var(--ease);
}
.variant:hover { border-color: var(--ink); }
.variant[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.variant:disabled { color: #a6a29a; text-decoration: line-through; cursor: not-allowed; background: transparent; }
.buy { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; margin-bottom: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 999px; background: #fff; }
.qty button { font: inherit; font-size: 18px; width: 44px; height: 48px; border: 0; background: transparent; cursor: pointer; color: var(--ink); border-radius: 999px; }
.qty button:hover { background: var(--sand); }
.qty span, .qty input { min-width: 28px; text-align: center; font-weight: 500; }
.buy .button { flex: 1; justify-content: center; border: 0; cursor: pointer; font-family: inherit; }
.button[disabled] { background: #a6a29a; cursor: not-allowed; transform: none; }
.button-wa { display: flex; justify-content: center; width: 100%; background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.button-wa:hover { background: var(--ink); color: #fff; }
.specs { margin: 40px 0 0; border-top: 1px solid var(--rule); }
.specs h2 { font-size: 18px; letter-spacing: -0.01em; margin: 24px 0 12px; }
.specs ul { margin: 0; padding: 0; list-style: none; }
.specs li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.specs .ref { color: var(--muted); font-size: 14px; margin-top: 16px; }
.related { margin-top: 96px; }
.related h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 28px; }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(20,20,20,.4); animation: fade .25s var(--ease); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg);
  display: flex; flex-direction: column; animation: slide .3s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--rule); }
.drawer-head h2 { font-size: 24px; }
.icon-btn { font-size: 28px; line-height: 1; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; border-radius: 999px; color: var(--ink); }
.icon-btn:hover { background: var(--sand); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.line img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 4px; padding: 4px; }
.line h3 { font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1.35; margin: 0 0 2px; }
.line h3 a { color: var(--ink); text-decoration: none; }
.line .sub { font-size: 13px; color: var(--muted); }
.line .qty { margin-top: 8px; }
.line .qty button { width: 34px; height: 34px; font-size: 16px; }
.line .right { text-align: right; font-weight: 500; font-size: 15px; }
.remove { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; margin-top: 8px; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--rule); background: #fff; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.total-row strong { font-family: var(--display); font-size: 26px; letter-spacing: -0.02em; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.fields label { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.fields input { font: inherit; font-size: 15px; color: var(--ink); padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); }
.fields input:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: transparent; }
.button-wide { width: 100%; justify-content: center; border: 0; cursor: pointer; font-family: inherit; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.cart-empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12,12,12,.94); display: grid; place-items: center; animation: fade .2s var(--ease); }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; background: #fff; border-radius: 4px; }
.lb-close { position: absolute; top: 16px; right: 20px; font-size: 36px; color: #fff; background: none; border: 0; cursor: pointer; width: 48px; height: 48px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 44px; color: #fff; background: rgba(255,255,255,.08); border: 0; width: 56px; height: 56px; border-radius: 999px; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.18); }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-size: 14px; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 95;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 15px; transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; gap: 32px; }
  .gallery { position: static; }
  .search { min-width: 0; flex: 1; }
  .shop-tools { width: 100%; }
}
@media (max-width: 640px) {
  .view-list { padding-top: 36px; }
  .shop-head { gap: 20px; padding-bottom: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
  .item h3 { font-size: 14.5px; }
  .item .price { font-size: 17px; }
  .sort, .sort select { width: 100%; }
  .search { width: 100%; flex: none; }
  .g-arrow { display: none; }
  .g-main { margin: 0 -20px; border-radius: 0; }
  .view-detail { padding-top: 20px; }
  .lb-nav { display: none; }
  .fields { grid-template-columns: 1fr; }
  .cart-btn { padding-left: 12px; }
}
.fields label, .fields input { min-width: 0; width: 100%; }
@media (min-width: 861px) { .cats { flex-wrap: wrap; overflow: visible; } }
