.shop-hero {
  background: linear-gradient(135deg, rgba(28, 41, 32, .96), rgba(92, 53, 26, .92));
  color: #fff8e8;
  padding: 52px 0 38px;
}

.shop-hero .lead { color: #f1dfba; max-width: 760px; }

.storefront-search-panel {
  position: sticky;
  top: 12px;
  z-index: 8;
  margin: 20px 0 24px;
  padding: 22px;
  border: 3px solid #1b1712;
  border-radius: 20px;
  background: rgba(255, 250, 236, .97);
  box-shadow: 0 9px 0 rgba(27, 23, 18, .14), 0 18px 40px rgba(62, 43, 18, .1);
  backdrop-filter: blur(10px);
}

.storefront-search-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.storefront-search-heading h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.storefront-search-heading p { margin: 0; }

.storefront-search-grid {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.storefront-search-grid .field { margin: 0; }

.storefront-search-main input {
  min-height: 52px;
  font-size: 1.04rem;
  font-weight: 750;
  border-width: 2px;
  background: #fff;
}

.storefront-search-grid select {
  min-height: 52px;
  background: #fff;
  font-weight: 750;
}

.storefront-result-count {
  margin: 14px 0 0;
  font-weight: 900;
  color: #1b1712;
}

.shop-search-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 26px 0 50px;
}

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

.shop-product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.shop-product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f1eadc;
  overflow: hidden;
}

.shop-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-product-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 800;
  color: #6a4a2c;
  background: radial-gradient(circle at 30% 20%, #fff4d7, #d9bd8a);
}

.shop-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(35, 28, 21, .88);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.shop-product-body h3 { margin: 0; }

.shop-product-sku {
  margin: 6px 0 0;
  color: #6f5f4c;
  font-size: .87rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.shop-price-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shop-price {
  border: 1px solid rgba(90, 67, 42, .15);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffaf0;
}

.shop-price span { display: block; font-size: 13px; color: #756653; }
.shop-price strong { display: block; margin-top: 3px; font-size: 20px; }
.shop-price-member { background: #eef7ed; border-color: rgba(52, 117, 62, .2); }
.shop-price-member strong { color: #2e6b3a; }

.shop-stock {
  font-size: 14px;
  font-weight: 700;
}

.shop-stock-in_stock { color: #2e6b3a; }
.shop-stock-preorder { color: #9a6312; }
.shop-stock-sold_out { color: #9b2e2e; }

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

.shop-buy-row .field { margin: 0; }
.shop-buy-row input { width: 100%; }

.product-dialog {
  width: min(900px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 0;
  border-radius: 18px;
  padding: 0;
  overflow: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.product-dialog::backdrop { background: rgba(15, 18, 15, .62); }

.product-dialog-close {
  position: sticky;
  top: 10px;
  float: right;
  margin: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 20, 20, .82);
  color: white;
  font-size: 26px;
  cursor: pointer;
}

.product-dialog-inner { padding: 26px; }
.product-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-gallery img { width: 100%; border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; background: #eee; }
.product-description { white-space: pre-line; line-height: 1.8; }

@media (max-width: 1080px) {
  .storefront-search-panel { position: static; }
  .storefront-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront-search-main { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .storefront-search-panel {
    padding: 17px;
    border-radius: 16px;
    box-shadow: 0 6px 0 rgba(27, 23, 18, .14);
  }

  .storefront-search-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .storefront-search-heading .btn {
    width: 100%;
  }

  .storefront-search-grid { grid-template-columns: 1fr; }
  .storefront-search-main { grid-column: auto; }
  .shop-product-grid { grid-template-columns: 1fr; }
  .shop-price-box { grid-template-columns: 1fr 1fr; }
  .product-gallery { grid-template-columns: 1fr; }
}