.shop-head { background: var(--surface); border-bottom: 1px solid var(--graphite-200); position: sticky; top: 0; z-index: 10; }
.shop-head-inner, .shop-main, .shop-foot-inner { max-width: 1760px; margin: 0 auto; padding-inline: 20px; }
.shop-head-inner { display: flex; align-items: center; gap: 24px; min-height: 66px; flex-wrap: wrap; }
.shop-head .brand { color: var(--graphite-900); font-size: 21px; }
.shop-head .brand b { color: var(--blue); }
.shop-search { flex: 1; min-width: 180px; max-width: 460px; }
.shop-nav { display: flex; gap: 4px; }
.shop-nav a { padding: 6px 11px; border-radius: var(--radius); color: var(--graphite-700); font-weight: 550; }
.shop-nav a:hover { background: var(--graphite-100); text-decoration: none; }
.shop-nav a.active { color: var(--blue); background: var(--blue-soft); }
.shop-actions { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.cart-count { min-width: 20px; padding: 0 5px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }

/* Футер завжди внизу екрана, навіть коли сторінка коротка. */
#app { display: flex; flex-direction: column; min-height: 100dvh; }
.shop-main { flex: 1 0 auto; width: 100%; padding-block: 28px 64px; }
.hero { background: var(--graphite-900); color: #fff; border-radius: 8px; padding: 34px 36px; margin-bottom: 28px; }
.hero h1 { font-size: 32px; max-width: 16em; }
.hero p { margin-top: 10px; color: var(--graphite-300); max-width: 40em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; }
.product { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--graphite-200); border-radius: 8px; overflow: hidden; color: inherit; transition: border-color .15s, box-shadow .15s; }
.product:hover { border-color: var(--graphite-300); box-shadow: 0 6px 18px rgb(30 35 41 / 8%); text-decoration: none; }
.photo { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; display: block; background: var(--graphite-100); }
.photo-empty { display: grid; place-items: center; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--graphite-100), var(--graphite-200)); color: var(--graphite-500); font-weight: 750; font-size: 40px; }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-title { font-weight: 600; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; }
.price { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price.big { font-size: 30px; }

.product-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.product-page .photo, .product-page .photo-empty { border-radius: 8px; }
.description { white-space: pre-line; color: var(--graphite-700); }
.breadcrumb { margin-bottom: 16px; font-size: 14px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cart-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--graphite-100); flex-wrap: wrap; }
.cart-line:last-child { border-bottom: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; }
.summary-total { font-size: 20px; font-weight: 700; border-top: 1px solid var(--graphite-200); padding-top: 12px; }
.auth-box { max-width: 420px; margin: 24px auto; }
.order { padding: 0; }
.order summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; flex-wrap: wrap; }
.order-lines { padding: 0 18px 14px; }

.shop-foot { background: var(--graphite-900); color: var(--graphite-300); font-size: 14px; }
.shop-foot-inner { padding-block: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 800px) {
  .product-page, .two-col { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 25px; }
  .shop-head { position: static; }
  .shop-head-inner { padding-block: 10px; gap: 10px; }
  .shop-search { order: 5; flex-basis: 100%; max-width: none; }
  .shop-head-inner, .shop-main, .shop-foot-inner { padding-inline: 16px; }
}

.gallery { display: grid; gap: 10px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery-thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; overflow: hidden; }
.gallery-thumb.active { border-color: var(--graphite-500); }
.gallery-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.suggest-box { position: relative; }
.suggest { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--graphite-200); border-radius: 6px; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }
.suggest-item { display: block; width: 100%; padding: 9px 12px; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.suggest-item:hover, .suggest-item:focus { background: var(--graphite-100); }
.suggest-note { padding: 9px 12px; color: var(--graphite-500); font-size: 14px; }

.catalog-title { margin-bottom: 12px; }
.chips { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border: 1px solid var(--graphite-300); border-radius: 99px; background: var(--surface); color: var(--graphite-700); font-weight: 550; white-space: nowrap; }
.chip:hover { text-decoration: none; background: var(--graphite-100); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.gallery-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 8px; }
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip .photo { flex: 0 0 100%; scroll-snap-align: start; border-radius: 0; }
.buy-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.specs { margin-top: 28px; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--blue); box-shadow: 0 10px 28px rgb(18 58 134 / 12%); }
.specs-title { padding: 14px 22px; background: var(--blue); color: #fff; font-size: 18px; letter-spacing: 0.01em; }
.specs-list { margin: 0; padding: 6px 22px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.specs-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--graphite-300); }
.specs-row dt { color: var(--graphite-500); }
.specs-row dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }

.mobile-nav { display: none; }

@media (max-width: 800px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .shop-head-inner { padding-block: 8px 0; gap: 8px; min-height: 0; }
  .shop-head .brand { font-size: 19px; }
  .shop-actions a.btn { display: none; }
  .shop-actions .menu summary { min-height: 40px; }
  .shop-search { order: 2; flex: 1 1 100%; max-width: none; font-size: 16px; }
  .shop-nav { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
  .shop-nav::-webkit-scrollbar { display: none; }
  .shop-nav a { flex: none; padding: 8px 12px; white-space: nowrap; }
  #app { min-height: calc(100dvh - 60px - env(safe-area-inset-bottom)); }
  .shop-main { padding-block: 14px 28px; }
  .shop-head-inner, .shop-main, .shop-foot-inner { padding-inline: 12px; }
  .shop-nav { width: calc(100% + 24px); margin: 0 -12px; }
  .hero { padding: 18px 16px; margin-bottom: 14px; }
  .hero h1 { font-size: 21px; }
  .hero p { margin-top: 6px; font-size: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-body { padding: 10px; gap: 6px; }
  .product-title { font-size: 14px; line-height: 1.3; }
  .product-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .price { font-size: 17px; }
  .price.big { font-size: 26px; }
  .product-page { gap: 14px; padding-bottom: 72px; }
  .gallery-thumbs { gap: 6px; }
  .breadcrumb { margin-bottom: 10px; }
  .buy-bar { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 15; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--graphite-200); flex-wrap: nowrap; }
  .buy-bar .btn { flex: 1; min-width: 0; min-height: 46px; padding-inline: 8px; font-size: 16px; white-space: normal; }
  .specs { margin-top: 0; }
  .specs-title { padding: 12px 16px; }
  .specs-list { grid-template-columns: minmax(0, 1fr); padding: 2px 16px 6px; }
  .specs-row:last-child { border-bottom: 0; }
  .cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 0; }
  .cart-line .grow { grid-column: 1 / -1; }
  .cart-line .price { align-self: center; }
  .cart-line .stepper { justify-self: start; }
  .shop-main > h1 { margin-bottom: 12px; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .cart-line > .btn { grid-column: 1 / -1; justify-self: start; padding-inline: 0; }
  .cart-summary { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: var(--shadow); padding: 12px; gap: 8px; }
  .two-col { gap: 12px; }
  .panel { padding: 14px; }
  .suggest { max-height: 40dvh; }
  .suggest-item { min-height: 46px; padding: 11px 12px; }
  .order summary { padding: 12px 14px; gap: 8px; }
  .order-lines { padding: 0 14px 12px; }
  .auth-box { margin: 8px auto; }
  .shop-foot-inner { padding-block: 14px; font-size: 13px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--graphite-200); }
  .mobile-nav a { display: flex; align-items: center; justify-content: center; min-height: 60px; color: var(--graphite-700); font-size: 15px; font-weight: 600; }
  .mobile-nav a:hover { text-decoration: none; }
  .mobile-nav a.active { color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
  .mobile-nav-label { display: inline-flex; align-items: center; gap: 6px; }
}
