/* Homepage-specific styles modeled after the structure of esant.shop
   Keep these rules modular and rely on css/base.css for header/footer and typography
*/

:root{
  --site-max:1200px;
  --accent:#111;
  --muted:#666;
}

/* Header layout for homepage: centered brand with two nav groups */

.home-header{width:100%;padding:20px 36px;border-bottom:1px solid #eee}
.site-header.home-header{/* stronger selector to ensure header padding applies */
  position:relative; /* establish positioning context for absolutely-positioned children (brand) */
  padding:28px 36px !important;
  min-height:96px; /* increased min-height so the brand can be vertically centered visually */
}
.home-header .header-inner{max-width:var(--site-max);margin:0 auto;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:64px;padding:0 80px}
.header-desktop .nav-left{gap:48px;justify-self:start}
.header-desktop .nav-right{gap:48px;padding-right:0;justify-self:end}
.header-desktop{display:block}
.header-mobile{display:none}
.home-header .nav-left{justify-self:start;display:flex;gap:28px;align-items:center;max-width:40%}
.home-header .nav-right{justify-self:end;display:flex;gap:30px;align-items:center;padding-right:0;max-width:40%}
.home-header .nav{flex-wrap:nowrap}
.home-header .brand.desktop-brand{grid-column:2;position:absolute;left:50%;transform:translateX(-50%);margin:0;font-size:50px;white-space:nowrap;display:block;z-index:85}
.home-header .brand.desktop-brand a{text-decoration:none;color:var(--accent);font-family:'DIN Condensed', 'Arial Narrow', serif;white-space:nowrap;font-weight:700;letter-spacing:0em;display:block;line-height:1;padding:0;margin:0}
/* Cart in desktop header: placed in the right nav area */
.header-desktop .header-cart{position:static;display:inline-flex;align-items:center;margin-left:20px}
.header-desktop .header-cart .cart-icon{display:inline-flex;align-items:center;padding:12px}
/* Cart in mobile header: absolute positioned */
.header-mobile .header-cart{position:absolute;right:24px;top:50%;transform:translateY(-50%);display:flex;align-items:center;z-index:80}
.header-cart .cart-icon{display:inline-flex;align-items:center;padding:12px}

/* Increase clickable area for nav links */
.home-header .nav-left a, .home-header .nav-right a{padding:10px 14px;display:inline-block;white-space:nowrap;font-family:'DIN Condensed', 'Arial Narrow', var(--font-sans);font-weight:700}
.header-desktop .nav-left a, .header-desktop .nav-right a{padding:10px 18px}

/* mobile toggle */
.mobile-toggle{display:none;background:transparent;border:0;padding:16px;cursor:pointer}
.mobile-toggle svg{display:block}

/* mobile menu: larger container padding and bigger touch targets */
.mobile-menu{display:none;position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid #eee;padding:28px 36px;box-shadow:0 6px 18px rgba(0,0,0,0.06);z-index:60}
.mobile-menu a{display:block;padding:18px 0;color:var(--accent);text-decoration:none;border-top:1px solid rgba(0,0,0,0.02);font-size:17px}
.mobile-menu a:first-child{border-top:0}

/* when open */
.home-header.menu-open .mobile-menu{display:block}
.home-header.menu-open .mobile-toggle{opacity:0.85}


.home-root{
  max-width:var(--site-max);
  margin:0 auto;
  padding:0 28px 80px;
}

/* HERO */
.hero{
  position:relative;
  width:100vw; /* span full viewport width */
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  min-height:calc(100vh - 72px); /* fill viewport under header (header min-height is 72px) */
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000; /* full-width black banner */
  margin-bottom:0;
}
.hero-image{display:none} /* hide previous full-bleed background; center a square image instead */
.hero-overlay{
  position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;height:100%;color:#fff;padding:18px;width:100%
}
.hero-image-wrap{position:relative;display:inline-block}
.hero-center-img{display:block;width:min(560px,52vmin);height:min(660px,62vmin);object-fit:cover;margin-bottom:20px}
.hero-pin{position:absolute;left:50%;top:0;transform:translate(-50%,-53%);width:min(220px,24vmin);height:auto;z-index:4;pointer-events:none;filter:drop-shadow(0 10px 24px rgba(0,0,0,0.6))}
.hero-title{font-family:serif;font-size:40px;margin:0 0 12px;font-weight:400;letter-spacing:0.02em;color:#fff}
.hero-sub{margin:0 0 22px;color:rgba(255,255,255,0.85);font-style:italic}
.hero-cta{display:inline-block;padding:10px 16px;border:1px solid #fff;text-decoration:none;color:#fff;font-size:13px}

/* collections nav (quick links below hero) */
.collections-nav{display:flex;gap:20px;justify-content:center;margin:36px 0 48px;flex-wrap:wrap}
.collections-nav a{color:var(--accent);text-decoration:none;font-size:14px;padding:6px 4px}

/* BESTSELLERS grid */
.bestsellers{margin:120px 0;padding:0 120px}
.section-heading{font-family:serif;font-size:20px;margin:8px 0 18px;text-align:center}
.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;margin:0 auto}
.product-card{background:transparent}
.product-card a{color:inherit;text-decoration:none;display:block}
.product-card img{width:100%;height:400px;object-fit:cover;display:block;background:#e8e6e1}

/* Script banner section */
.script-banner{
  background:#5B8FA3;
  padding:120px 80px;
  margin:120px 0 0 0;
  text-align:center;
  position:relative;
  width:100vw;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
}
.script-text{
  font-family:'Brush Script MT', cursive, serif;
  font-size:120px;
  color:#F4E8C1;
  margin:0;
  font-weight:400;
  line-height:1.2;
  font-style:italic;
}

/* Video banner section */
.video-banner{
  position:relative;
  width:100vw;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  margin-top:0;
  margin-bottom:120px;
  overflow:hidden;
}
.banner-video{
  width:100%;
  height:auto;
  display:block;
  object-fit:cover;
}

/* Dual image section */
.dual-image-section{
  margin:120px 0;
  padding:0 160px;
}
.dual-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  max-width:100%;
}
.dual-card{
  display:block;
}
.dual-card a{
  display:block;
  text-decoration:none;
  color:inherit;
}
.dual-card img{
  width:100%;
  height:700px;
  object-fit:cover;
  display:block;
  margin-bottom:20px;
}
.dual-title{
  font-family:serif;
  font-size:16px;
  font-weight:400;
  color:#000;
  text-align:center;
  margin:0;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:4px;
}

/* about square section - black background with centered white square */
.about-square-section{
  background:#000;
  padding:120px 0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.about-square-wrapper{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:24px;
}

.about-square{
  background:#f5f5f0;
  width:450px;
  height:450px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:60px 40px;
  box-sizing:border-box;
}

.about-arrow{
  display:block;
  opacity:0.8;
  transform:rotate(-90deg);
}

.about-square-title{
  font-family:'DIN Condensed', 'Arial Narrow', var(--font-sans);
  font-size:24px;
  font-weight:700;
  color:#8b8b82;
  letter-spacing:0.1em;
  margin:0 0 48px 0;
  text-align:center;
}

.about-square-text{
  text-align:center;
  color:#8b8b82;
  font-size:16px;
  line-height:1.8;
}

.about-square-text p{
  margin:0 0 8px 0;
}

.about-square-text p:last-child{
  margin-bottom:0;
}

/* carousel section */
.carousel-section{
  background:#fff;
  padding:80px 0 60px 0;
  position:relative;
}

.carousel-container{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  max-width:1400px;
  margin:0 auto;
  padding:0 60px;
}

.carousel-track-container{
  overflow:hidden;
  width:100%;
  max-width:1200px;
}

.carousel-track{
  display:flex;
  gap:20px;
  transition:transform 0.4s ease-in-out;
}

.carousel-item{
  min-width:calc(25% - 15px);
  flex-shrink:0;
}

.carousel-item img{
  width:100%;
  height:400px;
  object-fit:cover;
  display:block;
}

.carousel-caption{
  text-align:center;
  margin-top:16px;
}

.carousel-caption h3{
  font-family:'DIN Condensed', 'Arial Narrow', var(--font-sans);
  font-size:14px;
  font-weight:700;
  letter-spacing:0.08em;
  margin:0 0 6px 0;
  text-transform:uppercase;
}

.carousel-caption p{
  font-size:13px;
  color:#666;
  margin:0;
}

.carousel-nav{
  background:transparent;
  border:none;
  cursor:pointer;
  padding:12px;
  color:#333;
  transition:opacity 0.2s;
  flex-shrink:0;
}

.carousel-nav:hover{
  opacity:0.6;
}

.carousel-nav:disabled{
  opacity:0.3;
  cursor:not-allowed;
}

.carousel-prev{
  margin-right:20px;
}

.carousel-next{
  margin-left:20px;
}

.carousel-counter{
  text-align:center;
  margin-top:30px;
  font-size:14px;
  color:#666;
}

/* about blurb */
.about-blurb{max-width:760px;margin:48px auto;color:var(--muted);text-align:center}

/* newsletter */
.newsletter{margin:48px auto 0;text-align:center}
.subscribe-form{display:flex;gap:12px;justify-content:center;align-items:center;flex-wrap:wrap}
.subscribe-form input[type="email"]{padding:12px 14px;border:1px solid #ccc;min-width:240px}
.subscribe-form button{padding:12px 16px;border:1px solid #000;background:#000;color:#fff}

/* responsive */
@media (max-width:1140px){
  .product-grid{grid-template-columns:repeat(3,1fr)}
  .product-card img{height:260px}
}
@media (max-width:1140px){
  .hero{height:50vh}
  .product-grid{grid-template-columns:repeat(2,1fr)}
  .product-card img{height:220px}
  .hero-title{font-size:28px}
  /* Responsive header: hide desktop header and show mobile header */
  .home-header{padding:20px 20px}
  .site-header.home-header{padding:20px 36px !important; min-height:72px}
  /* Hide the desktop header completely when mobile header is active */
  .header-desktop{display:none !important}
  /* Also hide any legacy .header-inner to be safe */
  .home-header .header-inner{display:none !important}
  .header-mobile{display:flex !important;align-items:center;justify-content:center;position:relative;z-index:95;min-height:66px}
  /* position hamburger symmetrically with the cart and give matching touch area */
  .header-mobile .mobile-toggle{display:block;position:absolute;left:24px;top:50%;transform:translateY(-50%);z-index:95;padding:12px}
  /* mobile brand: match desktop size (50px) and center in the flex container */
  .header-mobile .brand.mobile-brand{font-size:50px;position:relative;transform:translateY(12%);z-index:90;letter-spacing:-0.02em;line-height:1;display:block;text-align:center;margin:0}
  .header-mobile .brand.mobile-brand a{display:block;line-height:1}
  /* give the collapsed mobile menu a bit more breathing room and ensure specificity */
  /* ensure mobile menu container matches header gutter for consistent visuals */
  /* slightly increase mobile menu padding for more breathing room */
  .site-header.home-header .mobile-menu{padding:36px 48px;top:calc(100% + 12px)}
  .site-header.home-header .mobile-menu a{padding:22px 0;font-size:17px}
}
@media (max-width:420px){
  .product-grid{grid-template-columns:1fr}
  .hero{min-height:340px}
  .hero-center-img{width:min(360px,80vw);height:auto}
  .hero-title{font-size:22px}
}
