/* ============================================================

   FY Bedding — Page Components (appended for pure PHP)

   Mason & Fifth v4 Design Tokens

   ============================================================ */



/* ── Category Grid ─────────────────────────── */

.home-cats { padding: 100px 80px; max-width: 1440px; margin: 0 auto; }

.home-cats-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 56px; flex-wrap: wrap; gap: 20px; }

.home-cats-header h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(32px, 3.5vw, 48px); font-weight: 400; color: #59240C; }

.home-cats-header h2 em { font-weight: 300; color: #9D6238; }

.home-cats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.home-cat { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; display: flex; align-items: flex-end; text-decoration: none; }

.home-cat-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .6s; }

.home-cat:hover .home-cat-bg { transform: scale(1.05); }

.home-cat-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%); }

.home-cat-tag { position: absolute; top: 16px; left: 16px; background: rgba(255,255,255,0.9); color: #59240C; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; z-index: 2; }

.home-cat-body { position: relative; z-index: 1; padding: 28px; transition: opacity .3s, transform .3s; }

.home-cat-name { font-size: 24px; font-weight: 600; color: white; line-height: 1.05; margin-bottom: 6px; letter-spacing: -0.01em; }

.home-cat-count { font-size: 11.5px; letter-spacing: 0.04em; opacity: 0.75; color: white; display: flex; align-items: center; gap: 6px; }

.home-cat-count .arr { transition: transform .25s; display: inline-block; }

.home-cat:hover .home-cat-count .arr { transform: translateX(4px); }

.home-cat-types { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; opacity: 0; transform: translateY(20px); transition: opacity .3s, transform .3s; pointer-events: none; }

/* Only swap body↔types when the card actually has sub-categories */
.home-cat:has(.home-cat-types):hover .home-cat-types { opacity: 1; transform: translateY(0); }

.home-cat:has(.home-cat-types):hover .home-cat-body { opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .25s; }
/* Cards without sub-categories: keep body visible, add subtle lift */
.home-cat:not(:has(.home-cat-types)):hover .home-cat-body { transform: translateY(-4px); }

.ct-name { font-size: 22px; font-weight: 600; color: white; margin-bottom: 12px; letter-spacing: -0.01em; }

.ct-list { display: flex; flex-direction: column; gap: 6px; }

.ct-item { font-size: 12.5px; color: rgba(255,255,255,0.88); padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; }

.ct-item::after { content: '→'; opacity: 0.5; font-size: 11px; }



/* ── Product Showcase ─────────────────────────── */

.products-showcase { background: white; padding: 120px 80px; }

.showcase-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 56px; flex-wrap: wrap; gap: 20px; }

.showcase-header h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(32px, 3.5vw, 48px); font-weight: 400; color: #59240C; }

.showcase-header h2 em { font-weight: 300; color: #9D6238; }

.showcase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.product-card { background: #FDFCFA; border-radius: 12px; overflow: hidden; border: 1px solid #E8E0D6; text-decoration: none; transition: transform .3s, box-shadow .3s; display: block; }

.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.08); }

.product-card-img { aspect-ratio: 1/1; background-size: cover; background-position: center; background-color: #F4F1EA; transition: transform .5s; }
.product-card:hover .product-card-img { transform: scale(1.06); }

.product-card-info { padding: 20px; }

.product-card-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #9D6238; margin-bottom: 6px; }

.product-card-name { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 400; color: #59240C; margin-bottom: 8px; line-height: 1.2; }

.product-card-price { font-size: 13px; color: #7D4A29; font-weight: 500; }



/* ── Testimonials ─────────────────────────── */

.testimonials-section { padding: 100px 80px; background: #F4F1EA; }

.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; max-width: 1280px; margin: 48px auto 0; }

.testimonial-card { background: white; padding: 32px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }

.t-stars { color: #C9A84C; font-size: 14px; letter-spacing: 0.1em; margin-bottom: 16px; }

.t-quote { font-family: 'Cormorant Garamond', serif; font-size: 18px; line-height: 1.6; color: #59240C; margin-bottom: 24px; font-style: italic; }

.t-author { display: flex; align-items: center; gap: 12px; }

.t-avatar { width: 40px; height: 40px; border-radius: 50%; background: #C8BEAC; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #59240C; font-size: 16px; }

.t-name { font-weight: 600; font-size: 14px; color: #59240C; }

.t-role { font-size: 12px; color: #9D6238; margin-top: 2px; }

.t-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #9D6238; margin-bottom: 12px; }

.t-h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(32px, 3.5vw, 48px); font-weight: 400; color: #59240C; }

.t-h2 em { font-weight: 300; color: #9D6238; }



/* ── FAQ ─────────────────────────── */

.faq-section { padding: 100px 80px; max-width: 900px; margin: 0 auto; }

.faq-inner h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(32px, 3.5vw, 48px); font-weight: 400; color: #59240C; margin-bottom: 48px; text-align: center; }

.faq-grid { display: flex; flex-direction: column; gap: 12px; }

.faq-item { background: white; border-radius: 10px; padding: 0; border: 1px solid #E8E0D6; overflow: hidden; }

.faq-item summary { padding: 20px 28px; font-size: 16px; font-weight: 500; color: #59240C; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }

.faq-item summary::after { content: '+'; font-size: 20px; color: #9D6238; font-weight: 300; }

.faq-item[open] summary::after { content: '−'; }

.faq-item[open] summary { border-bottom: 1px solid #F4F1EA; }

.faq-item p { padding: 20px 28px; font-size: 14px; line-height: 1.7; color: #7D4A29; }



/* ── Final CTA ─────────────────────────── */

.final-cta { padding: 120px 80px; background: #3D2A1C; text-align: center; }

.cta-inner { max-width: 700px; margin: 0 auto; }

.cta-h { font-family: 'Cormorant Garamond', serif; font-size: clamp(36px, 4vw, 56px); font-weight: 400; color: white; margin-bottom: 20px; line-height: 1.15; }

.cta-h em { font-weight: 300; color: #E8D5A8; }

.cta-p { font-size: 16px; color: rgba(255,255,255,0.6); margin-bottom: 40px; line-height: 1.7; }

.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }



/* ── Hero Title Center ─────────────────────────── */

.hero-title-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 5; }

.hero-title-center__eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 20px; }

.hero-title-center__headline { font-family: 'Cormorant Garamond', serif; font-size: clamp(48px, 7vw, 96px); font-weight: 400; color: white; line-height: 1.05; }

.hero-title-center__headline em { font-weight: 300; font-style: italic; color: #E8D5A8; }



/* ── Mobile Nav Overlay ─────────────────────────── */

.mobile-nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; display: none; align-items: center; justify-content: center; }

.mobile-nav-overlay.open { display: flex; }

.mobile-nav-inner { background: white; border-radius: 12px; padding: 48px 40px; min-width: 280px; display: flex; flex-direction: column; gap: 8px; position: relative; }

.mobile-nav-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; color: #9D6238; cursor: pointer; padding: 4px 8px; }

.mobile-nav-inner a { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: #59240C; text-decoration: none; padding: 10px 0; border-bottom: 1px solid #F4F1EA; text-align: center; transition: color .2s; }

.mobile-nav-inner a:hover { color: #9D6238; }

.mobile-nav-dealer { font-family: 'Inter', sans-serif !important; font-size: 14px !important; font-weight: 600 !important; background: #59240C; color: white !important; border-radius: 8px; padding: 12px !important; margin-top: 8px; border: none !important; text-align: center; }

.mobile-nav-dealer:hover { background: #7D4A29 !important; color: white !important; }



/* ── Responsive ─────────────────────────── */

@media (max-width: 1024px) {

  .home-cats { padding: 60px 32px; }

  .home-cats-grid { grid-template-columns: repeat(2, 1fr); }

  .products-showcase { padding: 60px 32px; }

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

  .testimonials-section { padding: 60px 32px; }

  .faq-section { padding: 60px 32px; }

  .final-cta { padding: 80px 32px; }

}

@media (max-width: 640px) {

  .home-cats { padding: 48px 20px; }

  

  .home-cats-header { flex-direction: column; align-items: flex-start; }

  .products-showcase { padding: 48px 20px; }

  .showcase-header { flex-direction: column; align-items: flex-start; }

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

  .testimonials-section { padding: 48px 20px; }

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

  .faq-section { padding: 48px 20px; }

  .final-cta { padding: 60px 20px; }

}


/* Mobile Nav Collapsible Groups */
.mobile-nav-group { }
.mobile-nav-parent { 
  cursor: pointer; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: #59240C;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid #F4F1EA;
  transition: color .2s;
}
.mobile-nav-parent::after {
  content: '+';
  font-size: 18px;
  color: #9D6238;
  font-weight: 300;
  transition: transform .2s;
}
.mobile-nav-group.open .mobile-nav-parent::after {
  content: '\2212';
}
.mobile-nav-children {
  display: none;
  padding: 4px 0;
}
.mobile-nav-group.open .mobile-nav-children {
  display: block;
}
.mobile-nav-child {
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  color: #7D4A29 !important;
  text-decoration: none;
  padding: 6px 0 6px 24px !important;
  border-bottom: none !important;
  text-align: left !important;
  display: block;
  transition: color .2s;
}
.mobile-nav-child:hover {
  color: #9D6238 !important;
}
.mobile-nav-viewall {
  font-weight: 600;
  color: #59240C !important;
  margin-top: 4px;
}

/* Remove old mobile nav styles that conflict */
.mobile-nav-section { }
.mobile-nav-section-title { 
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9D6238;
  padding: 8px 0;
  border-bottom: 1px solid #E8E0D6;
  margin-bottom: 4px;
  display: block;
}
