/**
 * Maestro Parents store - premium shell overrides (RTL-safe).
 * Loads after styles.css; does not change cart/checkout JS behavior.
 */
body.maestro-store-v2 {
  --primary: #3a342c;
  --accent: #8a7a62;
  --off-white: #faf7f2;
  --cream: #fffdf9;
  --text: #2c2620;
  --text-muted: #6b5e54;
  --border: rgba(44, 38, 32, 0.1);
  background: linear-gradient(180deg, #faf7f2 0%, #f3ebe4 55%, #faf7f2 100%);
}

body.maestro-store-v2 .promo-bar {
  background: linear-gradient(90deg, #3a342c, #4d4438);
  letter-spacing: 0.02em;
}

body.maestro-store-v2 .store-header {
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(44, 38, 32, 0.06);
}

body.maestro-store-v2 .hero-banner {
  background-color: #faf7f2;
  min-height: 280px;
  border-radius: 0 0 32px 32px;
  margin-bottom: 8px;
  padding: 0;
  color: inherit;
}

body.maestro-store-v2 .hero-banner .banner-content {
  display: none;
}

body.maestro-store-v2 .product-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(44, 38, 32, 0.07);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--cream);
}

body.maestro-store-v2 .product-card:hover,
body.maestro-store-v2 .product-card--navigable:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(44, 38, 32, 0.1);
}

body.maestro-store-v2 .product-card--navigable:active {
  transform: translateY(-2px);
}

body.maestro-store-v2 .cart-sidebar {
  background: var(--cream);
  box-shadow: -12px 0 48px rgba(44, 38, 32, 0.12);
}

body.maestro-store-v2 .store-footer {
  background: #2c2620;
  color: rgba(255, 253, 249, 0.85);
  margin-top: 48px;
}

body.maestro-store-v2 .store-footer a {
  color: rgba(255, 253, 249, 0.9);
}

body.maestro-store-v2 .maestro-home-slot--footer {
  display: none;
}

body.maestro-store-v2 .btn-primary,
body.maestro-store-v2 .btn-checkout {
  background: linear-gradient(135deg, #3a342c, #2c2620);
  border-radius: 999px;
}

body.maestro-store-v2 .btn-quick-add,
body.maestro-store-v2 .btn-buy-now-sm {
  border-radius: 999px;
}

body.maestro-store-v2 .store-flow-card {
  background: var(--cream);
  border-color: var(--border);
}

body.maestro-store-v2 .card-image {
  background: transparent;
}

body.maestro-store-v2 .card-image img {
  padding: 0.2rem;
  background: transparent;
  object-fit: contain;
  object-position: center;
}

body.maestro-store-v2 .product-main-image {
  background: transparent;
  box-shadow: none;
}

body.maestro-store-v2 .product-page.refill-page .product-main-image img {
  background: transparent;
  padding: 0;
}

body.maestro-store-v2 .store-product-carousel__frame,
body.maestro-store-v2 .refill-product-carousel__frame,
body.maestro-store-v2 .store-product-carousel__slide img,
body.maestro-store-v2 .refill-product-carousel__slide img {
  background: transparent;
  box-shadow: none;
}

body.maestro-store-v2 .badge,
body.maestro-store-v2 .refill-badge {
  background: var(--accent);
  color: #fff;
}

/* Minimal shell — home button + cart only */
body.maestro-store-v2 .store-header--minimal {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.maestro-store-v2 .header-container--minimal {
  position: relative;
  min-height: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
}

/* Cart — top-right in RTL (inline-start) */
body.maestro-store-v2 .store-header--minimal .cart-toggle--header-end {
  position: fixed;
  z-index: 130;
  top: clamp(12px, 2.5vw, 18px);
  inset-inline-start: clamp(12px, 3vw, 20px);
  inset-inline-end: auto;
  left: auto;
  right: auto;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(62, 54, 48, 0.1);
  box-shadow: 0 6px 20px rgba(44, 38, 32, 0.12);
}

body.maestro-store-v2 .store-header--minimal .cart-toggle--header-end:hover {
  background: #fff;
}

/* Home — top-left in RTL (inline-end), opposite corner from cart */
body.maestro-store-v2 .maestro-btn-home--slot-fixed {
  inset-inline-start: auto;
  inset-inline-end: clamp(12px, 3vw, 20px);
  left: auto;
  right: auto;
}

/* Store index — kits / divider / refills layout */
body.maestro-store-index {
  --store-image-bg: #f3ebe0;
  --store-card-bg: #fffdf9;
  --store-divider-bg: #f0e6d8;
}

body.maestro-store-index .store-products-layout {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin-top: 1.75rem;
}

body.maestro-store-index .store-section__heading {
  font-family: var(--font-display, "Rubik", sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 0 0 1.25rem;
}

body.maestro-store-index .store-section__heading--visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.maestro-store-index .store-refill-divider {
  text-align: center;
  padding: clamp(1.35rem, 3vw, 1.85rem) clamp(1.25rem, 4vw, 2.5rem);
  background: var(--store-divider-bg);
  border: 1px solid rgba(44, 38, 32, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(44, 38, 32, 0.07);
}

body.maestro-store-index .store-refill-divider__title {
  font-family: var(--font-display, "Rubik", sans-serif);
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

body.maestro-store-index .store-refill-divider__text {
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  max-width: 36em;
  margin-inline: auto;
}

body.maestro-store-index .product-grid {
  margin-top: 0;
  align-items: stretch;
}

body.maestro-store-index .product-grid--kits {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

body.maestro-store-index .product-grid--refills {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.15rem, 2vw, 1.65rem);
}

/* Flat beige image panels — no radial / white circles */
body.maestro-store-index .card-image--beige,
body.maestro-store-index .card-image--beige.card-image--carousel-wrap {
  background: var(--store-image-bg);
}

body.maestro-store-index .card-image--beige .store-product-carousel__viewport,
body.maestro-store-index .card-image--beige .refill-product-carousel__viewport,
body.maestro-store-index .card-image--beige .store-product-carousel__frame,
body.maestro-store-index .card-image--beige .refill-product-carousel__frame,
body.maestro-store-index .card-image--beige .store-product-carousel__slide,
body.maestro-store-index .card-image--beige .refill-product-carousel__slide,
body.maestro-store-index .card-image--beige img {
  background: transparent;
  box-shadow: none;
}

/* Store grid — image / content split, aligned prices */
body.maestro-store-v2 .product-grid {
  align-items: stretch;
}

body.maestro-store-v2 .product-card {
  display: grid;
  grid-template-rows: 3fr 2fr;
  min-height: 540px;
  align-content: stretch;
}

/* Full kits — premium large cards */
body.maestro-store-index .product-card--kit {
  grid-template-rows: 7fr 3fr;
  min-height: clamp(560px, 52vw, 680px);
}

body.maestro-store-index .product-card--kit .card-body {
  padding: 1.15rem 1.4rem 1.25rem;
}

body.maestro-store-index .product-card--kit .card-body > h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
}

body.maestro-store-index .product-card--kit .card-price {
  font-size: clamp(1.3rem, 2vw, 1.45rem);
}

body.maestro-store-index .product-card--kit .store-product-carousel--card .store-product-carousel__viewport {
  min-height: clamp(260px, 28vw, 380px);
}

body.maestro-store-index .product-card--refill .refill-product-carousel--card .refill-product-carousel__viewport,
body.maestro-store-index .product-card--refill .card-image--beige:not(.card-image--carousel-wrap) {
  min-height: clamp(200px, 22vw, 280px);
}

/* Refill cards — larger unified grid */
body.maestro-store-index .product-card--refill {
  grid-template-rows: 13fr 10fr;
  min-height: clamp(480px, 42vw, 560px);
}

body.maestro-store-index .product-card--refill .card-body {
  padding: 1.05rem 1.2rem 1.15rem;
}

body.maestro-store-index .product-card--refill .card-body > h3 {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
}

body.maestro-store-index .product-card--refill .card-body > p:not(.card-price) {
  font-size: 0.92rem;
  line-height: 1.5;
}

body.maestro-store-v2 .card-image,
body.maestro-store-v2 .card-image--carousel-wrap {
  grid-row: 1;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  height: 100%;
  aspect-ratio: unset;
  flex-shrink: 0;
}

body.maestro-store-v2 .card-image--carousel-wrap .store-product-carousel,
body.maestro-store-v2 .card-image--carousel-wrap .refill-product-carousel {
  height: 100%;
  min-height: 0;
}

body.maestro-store-v2 .card-image--carousel-wrap .store-product-carousel__viewport,
body.maestro-store-v2 .card-image--carousel-wrap .refill-product-carousel__viewport {
  height: 100%;
  min-height: 0;
}

body.maestro-store-v2 .product-card .card-body {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.05rem 1.25rem 1.15rem;
}

body.maestro-store-v2 .product-card .card-body > h3 {
  flex: 0 0 auto;
  margin-bottom: 0.4rem;
}

body.maestro-store-v2 .product-card .card-body > h3.card-title-two-line {
  min-height: 3.1em;
}

body.maestro-store-v2 .product-card .card-body > p:not(.card-price) {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
}

body.maestro-store-v2 .product-card .card-body:not(:has(> p:not(.card-price))) > h3 {
  flex: 1 1 auto;
  min-height: 3.1em;
  margin-bottom: 0;
}

body.maestro-store-v2 .card-price {
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0.55rem 0 0.65rem;
}

body.maestro-store-v2 .product-card .quantity-selector {
  flex: 0 0 auto;
  margin: 0 0 0.65rem;
}

body.maestro-store-v2 .product-card .card-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

/* Store index only — PHOTOS/hero banner.png */
body.maestro-store-index .hero-banner--index {
  background-image: url("assets/images/store-hero-banner.jpg?v=1");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: clamp(220px, 34vw, 380px);
}

@media (max-width: 1024px) {
  body.maestro-store-index .product-grid--refills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.maestro-store-v2 .product-grid {
    gap: 1.25rem;
  }

  body.maestro-store-index .product-grid--kits,
  body.maestro-store-index .product-grid--refills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.maestro-store-index .product-card--kit {
    min-height: 520px;
  }

  body.maestro-store-index .product-card--refill {
    min-height: 480px;
  }
}

@media (max-width: 600px) {
  body.maestro-store-index .store-products-layout {
    gap: 1.75rem;
  }

  body.maestro-store-index .product-grid--kits,
  body.maestro-store-index .product-grid--refills {
    grid-template-columns: 1fr;
  }

  body.maestro-store-index .product-card--kit {
    min-height: clamp(480px, 125vw, 580px);
    grid-template-rows: 7fr 3fr;
  }

  body.maestro-store-index .product-card--refill {
    min-height: clamp(460px, 118vw, 540px);
  }

  body.maestro-store-v2 .product-card .card-body {
    padding: 1.05rem 1.1rem 1.1rem;
  }

  body.maestro-store-index .product-card .card-actions {
    flex-direction: column;
    gap: 0.55rem;
  }

  body.maestro-store-index .product-card .card-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    font-size: 1rem;
  }

  body.maestro-store-index .product-card .card-body > h3,
  body.maestro-store-index .product-card .card-body > p:not(.card-price) {
    font-size: 1rem;
    line-height: 1.45;
  }

  body.maestro-store-index .card-price {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  body.maestro-store-v2 .store-header--minimal .cart-toggle--header-end {
    inset-inline-start: 10px;
    width: 40px;
    height: 40px;
  }

  body.maestro-store-v2 .maestro-btn-home--slot-fixed {
    inset-inline-start: auto;
    inset-inline-end: 10px;
  }
}
