html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #02060c;
  color: #fff;
  overflow-x: hidden;
}

.subcategory-hero {
  padding: 120px 40px 80px;
  background:
    radial-gradient(circle at 20% 30%, #0b1c2c, transparent 60%),
    radial-gradient(circle at 80% 70%, #0f2436, transparent 60%),
    #02060c;
}

.subcategory-hero-container,
.product-listing-container {
  max-width: 1320px;
  margin: 0 auto;
}

.subcategory-hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.subcategory-eyebrow,
.listing-eyebrow,
.panel-tag,
.product-badge,
.meta-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,122,0,0.14);
  border: 1px solid rgba(255,122,0,0.28);
  color: #ffb26a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.subcategory-hero-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.subcategory-lead {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255,255,255,0.76);
}

.subcategory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.meta-pill {
  min-width: 170px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

.meta-pill span {
  margin-bottom: 10px;
}

.meta-pill strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  color: #fff;
}

.subcategory-hero-panel {
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 30px 90px rgba(0,0,0,0.30),
    0 10px 30px rgba(255,122,0,0.08);
}

.subcategory-hero-panel h2 {
  margin: 16px 0 12px;
  font-size: 30px;
  line-height: 1.1;
}

.subcategory-hero-panel p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255,255,255,0.76);
}

.subcategory-hero-panel code {
  color: #ffb26a;
}

.product-listing {
  padding: 0 40px 120px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,122,0,0.06), transparent 24%),
    linear-gradient(180deg, #07111d 0%, #04080f 100%);
}

.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}

.listing-head h2 {
  margin: 14px 0 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.listing-count {
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: right;
}

.listing-count span {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.58);
}

.listing-count strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255,122,0,0.26);
  box-shadow: 0 28px 70px rgba(0,0,0,0.30);
}

.product-media {
  min-height: 240px;
  padding: 22px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    radial-gradient(circle at top right, rgba(255,122,0,0.14), transparent 30%);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name-large {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 18px 0 0;
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

.product-body {
  padding: 18px 4px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-body h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.product-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.76);
}

.product-description {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
}

.product-footer {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.product-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-price {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}

.qty-btn {
  width: 42px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qty-btn:hover {
  background: rgba(255,255,255,0.08);
}

.qty-value {
  min-width: 40px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.cart-btn,
.product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
}

.cart-btn {
  border: 0;
  background: linear-gradient(135deg, #ff7a00, #ff9500);
  color: #fff;
  box-shadow: 0 10px 30px rgba(255,122,0,0.25);
  cursor: pointer;
}

.cart-btn:hover {
  transform: translateY(-1px);
}

.product-link {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.product-link:hover {
  background: rgba(255,255,255,0.06);
}

.empty-state {
  padding: 30px 24px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.68);
}

.cart-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4000;
  display: grid;
  gap: 10px;
}

.cart-toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(9, 18, 30, 0.96);
  border: 1px solid rgba(255,122,0,0.24);
  box-shadow: 0 18px 50px rgba(0,0,0,0.30);
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .subcategory-hero-container {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  html {
    scroll-padding-top: 92px;
  }

  .subcategory-hero,
  .product-listing {
    padding-left: 20px;
    padding-right: 20px;
  }

  .subcategory-hero {
    padding-top: 96px;
  }

  .listing-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .subcategory-hero-panel,
  .product-card {
    padding: 18px;
    border-radius: 20px;
  }

  .product-name-large {
    font-size: 24px;
  }

  .product-body h3 {
    font-size: 22px;
  }

  .product-footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .cart-btn {
    width: 100%;
  }

  .cart-toast-stack {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .cart-toast {
    min-width: 0;
    max-width: none;
  }
}


.product-link-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-link,
.cart-inline-link {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.product-link {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.cart-inline-link {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.product-link:hover,
.cart-inline-link:hover {
  background: rgba(255,255,255,0.06);
}

@media (max-width: 768px) {
  .product-link-row {
    grid-template-columns: 1fr;
  }
}
}

/* === 2026-04-09 card density + bigger image area override === */
.product-name-large {
  display: none;
}

.product-media {
  min-height: 300px;
  padding: 18px;
  justify-content: flex-start;
  gap: 14px;
}

.photo-placeholder {
  min-height: 210px;
  flex: 1 1 auto;
}

.product-body {
  padding: 14px 2px 0;
}

.product-body h3 {
  margin: 0 0 8px;
}

.product-meta {
  margin-bottom: 8px;
}

.product-description {
  margin: 0 0 10px;
  line-height: 1.6;
}

.product-footer {
  margin-top: auto;
}

@media (max-width: 768px) {
  .product-media {
    min-height: 260px;
  }

  .photo-placeholder {
    min-height: 180px;
  }
}

/* === 2026-04-09 more image weight on subcategory cards === */
.product-card {
  min-height: 760px;
}

.product-media {
  min-height: 340px;
}

.photo-placeholder {
  min-height: 250px;
}

@media (max-width: 768px) {
  .product-card {
    min-height: 680px;
  }

  .product-media {
    min-height: 300px;
  }

  .photo-placeholder {
    min-height: 220px;
  }
}

/* === 2026-04-09 shift empty space from text area to image area === */
.product-card {
  min-height: 780px;
}

.product-media {
  min-height: 400px;
}

.photo-placeholder {
  min-height: 310px;
}

.product-body {
  flex: 0 0 auto;
  padding: 12px 2px 0;
}

.product-meta {
  margin-bottom: 10px;
}

.product-footer {
  margin-top: 14px;
}

@media (max-width: 768px) {
  .product-card {
    min-height: 700px;
  }

  .product-media {
    min-height: 340px;
  }

  .photo-placeholder {
    min-height: 250px;
  }

  .product-footer {
    margin-top: 12px;
  }
}

/* === 2026-04-09 restore bottom anchoring while keeping bigger image === */
.product-card {
  min-height: 820px;
}

.product-media {
  min-height: 430px;
}

.photo-placeholder {
  min-height: 340px;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 12px 2px 0;
}

.product-body h3 {
  margin: 0 0 8px;
}

.product-meta {
  margin-bottom: 8px;
}

.product-footer {
  margin-top: auto;
}

@media (max-width: 768px) {
  .product-card {
    min-height: 740px;
  }

  .product-media {
    min-height: 360px;
  }

  .photo-placeholder {
    min-height: 280px;
  }
}

/* === 2026-04-09 move spare height into image area, keep text+CTA together at bottom === */
.product-card {
  display: flex;
  flex-direction: column;
  min-height: 820px;
}

.product-media {
  flex: 1 1 auto;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

.photo-placeholder {
  flex: 1 1 auto;
  min-height: 360px;
}

.product-body {
  flex: 0 0 auto;
  padding: 12px 2px 0;
}

.product-body h3 {
  margin: 0 0 8px;
}

.product-meta {
  margin-bottom: 10px;
}

.product-footer {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .product-card {
    min-height: 740px;
  }

  .product-media {
    min-height: 380px;
  }

  .photo-placeholder {
    min-height: 290px;
  }
}
