/* =========================================================
   KIDS' BEDS — PAGE-SPECIFIC STYLESHEET
   ---------------------------------------------------------
   Only contains styles for kids-beds.html. Relies on style.css
   (loaded first) for design tokens and shared components
   (.btn, .product-card, .grid--products, .bb-toolbar__view-btn)
   — nothing there is duplicated or modified here.
   ========================================================= */

/* ---- Hero ---- */
.kb-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(360px, 48vh, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-forest-dark);
}

.kb-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {
  .kb-hero__image {
    object-fit: contain;
  }
}


.kb-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 40, 31, 0.52) 0%, rgba(18, 40, 31, 0.4) 45%, rgba(18, 40, 31, 0.6) 100%);
  z-index: 1;
}

.kb-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 3.5rem;
}

.kb-hero__content {
  max-width: 34rem;
  color: var(--color-ivory-soft);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kb-hero__heading {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.05;
  color: var(--color-ivory-soft);
}

@media (min-width: 768px) {
  .kb-hero__heading {
    font-size: 3.5rem;
  }
}

.kb-hero__body {
  margin-top: 1rem;
  max-width: 30rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(248, 244, 235, 0.9);
}

.kb-hero__content .btn {
  margin-top: 1.75rem;
}

/* ---- Breadcrumb ---- */
.kb-breadcrumb,
.kb-detail__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 1.1rem;
  font-size: 0.8rem;
  color: rgba(35, 35, 32, 0.55);
}

.kb-breadcrumb a,
.kb-detail__breadcrumb a {
  color: var(--color-forest);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.kb-breadcrumb a:hover,
.kb-detail__breadcrumb a:hover {
  color: var(--color-brass);
}

/* ---- Introduction ---- */
.kb-intro {
  padding-block: 2.5rem;
}

.kb-intro__inner {
  max-width: 42rem;
  text-align: center;
  margin-inline: auto;
}

.kb-intro__inner h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-forest-dark);
}

.kb-intro__inner p {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(35, 35, 32, 0.72);
}

/* ---- Toolbar ---- */
.kb-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.kb-toolbar-row__count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(35, 35, 32, 0.6);
}

.kb-toolbar-row__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kb-view-toggle {
  display: none;
}

@media (min-width: 640px) {
  .kb-view-toggle {
    display: flex;
  }
}

/* ---- Product grid: 1 col mobile, 2 col tablet, 3 col desktop ---- */
.kb-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .kb-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .kb-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.kb-grid.is-list-view {
  grid-template-columns: 1fr;
}

.kb-grid.is-list-view .product-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
}

@media (max-width: 639px) {
  .kb-grid.is-list-view .product-card {
    grid-template-columns: 120px 1fr;
  }
}

.kb-grid.is-list-view .product-card__image-wrap {
  aspect-ratio: 1 / 1;
}

.kb-product-card[hidden] {
  display: none;
}

.kb-product-card {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.kb-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.kb-product-card .product-card__image-wrap {
  overflow: hidden;
}

.kb-product-card .product-card__image-wrap img {
  transition: transform 0.5s var(--ease);
}

.kb-product-card:hover .product-card__image-wrap img {
  transform: scale(1.06);
}

.kb-product-card__cta {
  margin-top: 0.85rem;
  width: 100%;
  height: 42px;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- FAQ accordion ---- */
.kb-faq__inner {
  max-width: 42rem;
}

.kb-faq-list {
  margin-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.kb-faq-item {
  border-bottom: 1px solid var(--color-border);
}

.kb-faq-item__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-block: 1.1rem;
  text-align: left;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-forest-dark);
  background: none;
  border: none;
  cursor: pointer;
}

.kb-faq-item__toggle svg {
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

.kb-faq-item__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.kb-faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.3s ease;
}

.kb-faq-item.is-open .kb-faq-item__panel {
  grid-template-rows: 1fr;
}

.kb-faq-item__panel p {
  overflow: hidden;
  padding-bottom: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(35, 35, 32, 0.68);
}

/* ---- Detail view ---- */
.kb-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .kb-detail__grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
  }
}

.kb-detail__main-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-sage);
}

.kb-detail__main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Back navigation link ---- */
.kb-detail__back {
  padding-top: 0.5rem;
}

.kb-detail__back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-forest);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.kb-detail__back-link:hover {
  color: var(--color-brass);
  transform: translateX(-2px);
}

/* ---- Gallery thumbnails (only render when more than one image
   is available for a product; single-image products show none) ---- */
.kb-detail__thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.kb-detail__thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: none;
}

.kb-detail__thumbs button.is-active {
  border-color: var(--color-brass);
}

.kb-detail__thumbs img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}

/* ---- Purchase buttons row (Add to Basket / Buy Now / Wishlist) ---- */
.kb-detail__purchase-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.kb-detail__add-basket,
.kb-detail__buy-now {
  flex: 1 1 auto;
  min-width: 140px;
}

.kb-detail__wishlist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-forest-dark);
  background-color: var(--color-white);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.kb-detail__wishlist-btn:hover {
  border-color: var(--color-brass-light);
  background-color: var(--color-ivory-soft);
}

.kb-detail__wishlist-btn[aria-pressed="true"] {
  color: var(--color-clay);
  border-color: var(--color-clay);
}

.kb-detail__wishlist-btn[aria-pressed="true"] svg path {
  fill: currentColor;
}

.kb-detail__title {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-forest-dark);
}

.kb-detail__rating {
  margin-top: 0.6rem;
}

.kb-detail__price-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.kb-detail__price {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--color-forest-dark);
}

.kb-detail__description {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(35, 35, 32, 0.72);
}

.kb-detail__section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(35, 35, 32, 0.55);
  margin-bottom: 0.6rem;
}

.kb-detail__option-block {
  margin-top: 1.5rem;
}

.kb-option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.kb-option-pill {
  height: 42px;
  padding-inline: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-forest-dark);
  background-color: var(--color-white);
  cursor: pointer;
}

.kb-option-pill[aria-pressed="true"] {
  background-color: var(--color-forest);
  border-color: var(--color-forest);
  color: var(--color-ivory-soft);
}

.kb-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.kb-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(35, 35, 32, 0.75);
}

.kb-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: var(--color-brass);
}

/* ---- Purchase panel ---- */
.kb-detail__purchase {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.kb-detail__qty {
  margin-bottom: 1rem;
}

.kb-detail__qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.kb-detail__qty-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--color-forest-dark);
  background: none;
  border: none;
  cursor: pointer;
}

.kb-detail__qty-value {
  width: 44px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.kb-detail__add-basket {
  width: 100%;
}

@media (min-width: 480px) {
  .kb-detail__add-basket {
    width: auto;
  }
}

.kb-detail__message {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--color-forest);
  min-height: 1.2em;
}

.kb-detail__message.is-error {
  color: var(--color-clay);
}

.kb-detail__delivery-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding-left: 0;
}

.kb-detail__delivery-info li {
  font-size: 0.8125rem;
  color: rgba(35, 35, 32, 0.7);
}

.kb-detail__related {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ---- Dimensions table ---- */
.kb-dimensions__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.kb-dimensions__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.kb-dimensions__table th,
.kb-dimensions__table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.kb-dimensions__table thead th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(35, 35, 32, 0.55);
  background-color: var(--color-ivory-soft);
}

.kb-dimensions__table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Not found ---- */
.kb-not-found {
  padding-block: 6rem;
}

.kb-not-found__inner {
  max-width: 30rem;
  text-align: center;
  margin-inline: auto;
}

.kb-not-found__inner h1 {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--color-forest-dark);
}

.kb-not-found__inner p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(35, 35, 32, 0.68);
}

.kb-not-found__inner .btn {
  margin-top: 2rem;
}

.bb-modal__fabric-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.bb-modal__fabric-grid .fabric-swatch__ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
}

.bb-modal__fabric-grid .fabric-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  width: 68px;
}

.bb-modal__fabric-collections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
}

.bb-modal__fabric-collection-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-forest-dark);
  margin-bottom: 0.75rem;
}


/* ---- New bed configuration option cards ---- */
.kb-option-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-forest-dark);
  margin-bottom: 0.5rem;
}

.kb-option-image {
  display: block;
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  border: 1px solid var(--color-border);
}

.kb-option-sub {
  font-weight: 400;
  font-size: 0.78rem;
  color: rgba(35, 35, 32, 0.55);
}

.kb-option-message {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--color-clay);
  min-height: 1.2em;
}

.kb-custom-request {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--color-ink);
  background-color: var(--color-white);
  resize: vertical;
  min-height: 90px;
}

.kb-custom-request:focus {
  outline: none;
  border-color: var(--color-brass);
}

.kb-delay-date-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.kb-delay-date-wrap label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(35, 35, 32, 0.6);
}

.kb-delay-date-wrap input[type="date"] {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--color-ink);
  background-color: var(--color-white);
  max-width: 220px;
  box-sizing: border-box;
}

.bb-modal__fabric-grid .fabric-swatch__name {
  font-size: 0.66rem;
  line-height: 1.25;
}

.bb-modal__fabric-grid .fabric-swatch__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.bb-modal__fabric-grid .fabric-swatch[aria-pressed="true"] .fabric-swatch__ring {
  border-color: var(--color-brass);
  box-shadow: 0 0 0 2px rgba(164, 123, 76, 0.2);
}

.bb-modal__fabric-grid .fabric-swatch__check {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background-color: rgba(18, 40, 31, 0.72);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.bb-modal__fabric-grid .fabric-swatch[aria-pressed="true"] .fabric-swatch__check {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.fabric-swatch__ring--fallback {
  background-color: var(--color-sage);
}



.kb-info .bb-info__inner {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}

.kb-info .bb-info__inner p {
  text-align: justify;
}

/* ---- Gallery Prev/Next arrows, zoom button, fullscreen lightbox
   (exact copy of the Slatted Ottoman Beds gallery system) ---- */
.tv-detail__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-forest-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.tv-detail__nav--prev {
  left: 0.75rem;
}

.tv-detail__nav--next {
  right: 0.75rem;
}

.bb-modal__zoom {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-forest-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--dur-fast) var(--ease);
}

.bb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background-color: rgba(18, 40, 31, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.bb-lightbox[hidden] {
  display: none;
}

.bb-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.bb-lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-ivory-soft);
  transition: background-color var(--dur-fast) var(--ease);
}

.bb-lightbox__close:hover {
  background-color: rgba(255, 255, 255, 0.28);
}
/* =====================================================================
   PASTE THIS AT THE VERY END OF kids-beds.css
   Mobile hero fix (768px and below ONLY — desktop is untouched).
   - Photo fills the whole hero edge to edge (cover): no dark green
     bands/block above or below it, even if an earlier mobile rule set
     object-fit: contain.
   - Slow zoom animation off on phones (scaling the photo up made it soft).
   - No opacity / filter / transform on the photo.
   - Lighter overlay so the photo reads clearly; text stays readable
     through its existing text-shadow.
   - Hero height follows its content instead of a tall fixed minimum.
   Placed at the end of the file so it wins over the earlier hero rules.
   ===================================================================== */
@media (max-width: 768px) {
  .kb-hero {
    min-height: 0;
    height: auto;
  }

  .kb-hero__image {
    object-fit: cover;
    object-position: center center;
    animation: none;
    transform: none;
    opacity: 1;
    filter: none;
  }

  .kb-hero__overlay {
    background: linear-gradient(180deg, rgba(18, 40, 31, 0.32) 0%, rgba(18, 40, 31, 0.2) 45%, rgba(18, 40, 31, 0.4) 100%);
  }
}