@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

/* ==========================================================
   VARIABLES & RESET
   ========================================================== */
:root{
  --bg:#ffffff; 
  --bg-alt:#F8F6F3; 
  --text:#3A2E2A; 
  --muted:#7A6B66;
  --accent:#5C3A21; 
  --accent-dark:#3E2513; 
  --dark:#1A1A1A;
  --border:#E8E2DB; 
  --radius:12px; 
  --radius-sm:8px;
  --shadow:0 12px 40px rgba(0,0,0,.06);
}

*{box-sizing:border-box; margin:0; padding:0}
html{scroll-behavior:smooth; background:var(--bg);}
body{
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Push footer to bottom */
main { flex: 1 0 auto; display: block; }

img{max-width:100%; display:block; height:auto}
a{color:inherit; text-decoration:none}
button{font:inherit; cursor:pointer}

h1, h2, h3, .hero h1, .section-head h2 {
  font-family: 'Playfair Display', serif;
}

/* ==========================================================
   LAYOUT & UTILITIES
   ========================================================== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.center{text-align:center; margin-top:2rem}
.muted{color:var(--muted); font-size:.9rem}
.section{padding:4rem 0}
.section-alt{background:var(--bg-alt)}
.section-head{text-align:center; margin-bottom:3rem}
.section-head h2{font-size:clamp(1.8rem,3vw,2.6rem); font-weight:700; letter-spacing:-.5px; color:var(--text)}
.section-head p{color:var(--muted); margin-top:.5rem}

/* ==========================================================
   BUTTONS & INPUTS
   ========================================================== */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:.5rem; padding:.75rem 1.5rem; border-radius:50px; font-weight:600; font-size:.9rem; border:2px solid transparent; cursor:pointer; transition:.2s; white-space:nowrap; text-decoration:none; line-height:1.2}
.btn-primary{background:var(--accent); color:#fff; border-color:var(--accent)}
.btn-primary:hover{background:var(--accent-dark); border-color:var(--accent-dark)}
.btn-outline{background:transparent; border-color:var(--dark); color:var(--dark)}
.btn-outline:hover{background:var(--dark); color:#fff}
.btn-block{width:100%}
.btn-sm{padding:.5rem 1rem; font-size:.82rem}
.btn-lg{padding:1rem 2rem; font-size:1rem}

.input{width:100%; padding:.75rem 1rem; border:1.5px solid var(--border); border-radius:var(--radius-sm); font:inherit; font-size:.95rem; background:#fff; margin-bottom:1rem; transition:border-color .2s; color:var(--text)}
.input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(92,58,33,.15)}
label{display:block; font-weight:600; font-size:.85rem; margin-bottom:.4rem; margin-top:.5rem}
textarea.input{resize:vertical; min-height:80px; font-family:inherit}

/* ==========================================================
   HEADER
   ========================================================== */
.site-header{position:sticky; top:0; z-index:50; background:rgba(255,255,255,.95); backdrop-filter:blur(10px); border-bottom:1px solid var(--border)}
.header-inner{display:flex; align-items:center; justify-content:space-between; height:72px; gap:1rem; max-width:1200px; margin:0 auto; width:100%}
.logo{display:flex; align-items:center; gap:.5rem; font-weight:800; font-size:1.2rem; text-decoration:none; color:var(--text)}
.logo-mark{width:38px; height:38px; border-radius:10px; background:linear-gradient(135deg,var(--accent),var(--accent-dark)); color:#fff; display:grid; place-items:center; font-size:.9rem; letter-spacing:.5px; font-weight:800}
.main-nav{display:flex; gap:1.75rem}
.main-nav a{font-weight:500; font-size:.92rem; position:relative; color:var(--text); text-decoration:none}
.main-nav a::after{content:''; position:absolute; bottom:-6px; left:0; width:0; height:2px; background:var(--accent); transition:.3s}
.main-nav a:hover::after{width:100%}
.header-actions{display:flex; align-items:center; gap:.75rem}
.icon-btn{position:relative; width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:var(--bg-alt); transition:.2s; color:var(--text); text-decoration:none}
.icon-btn:hover{background:var(--accent); color:#fff}
.cart-badge{position:absolute; top:-2px; right:-2px; background:var(--accent); color:#fff; font-size:.65rem; font-weight:700; width:18px; height:18px; border-radius:50%; display:grid; place-items:center}
.hamburger{display:none; flex-direction:column; gap:5px; background:none; border:0; padding:8px; cursor:pointer}
.hamburger span{width:24px; height:2px; background:var(--text); border-radius:2px; display:block}

/* ==========================================================
   ALERTS
   ========================================================== */
.alert{padding:1rem 1.25rem; border-radius:var(--radius-sm); margin:1rem 0; font-size:.9rem; font-weight:500}
.alert-success{background:#e7f6ec; color:#1a7a3f; border-left:4px solid #1a7a3f}
.alert-error{background:#fdecec; color:#c0392b; border-left:4px solid #c0392b}

/* ==========================================================
   HERO (DESKTOP)
   ========================================================== */
.hero {
  background-color: #F1EBE3;
  padding: 5rem 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.hero-content {
  padding-right: 2rem;
  max-width: 500px;
}
.hero .eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: block;
}
.hero h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero-divider {
  width: 80px;
  height: 1px;
  background-color: var(--accent);
  margin-bottom: 2rem;
}
.hero p {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 450px;
  margin-bottom: 2.5rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
}
.hero .btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 1.1rem 2.5rem;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 50px;
  font-weight: 500;
  transition: background 0.3s ease;
}
.hero .btn-primary:hover {
  background: var(--accent-dark);
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.hero-img-container {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================
   CATEGORIES
   ========================================================== */
.cat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1.25rem}
.cat-card{padding:2rem 1.5rem; border-radius:var(--radius); background:#fff; border:1px solid var(--border); transition:.3s; display:flex; flex-direction:column; gap:.4rem; text-decoration:none; color:inherit}
.cat-card:hover{transform:translateY(-4px); box-shadow:var(--shadow); border-color:var(--accent)}
.cat-card-title{font-weight:700; font-size:1.05rem}
.cat-card-desc{font-size:.85rem; color:var(--muted)}

/* ==========================================================
   PRODUCT GRID
   ========================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 100%;
}
.product-card{background:#fff; border-radius:var(--radius); overflow:hidden; border:1px solid var(--border); transition:.3s; display:flex; flex-direction:column}
.product-card:hover{transform:translateY(-5px); box-shadow:var(--shadow)}
.product-img{position:relative; aspect-ratio:1; background:var(--bg-alt); display:grid; place-items:center; overflow:hidden; text-decoration:none}
.product-img img{width:100%; height:100%; object-fit:cover}
.badge-sale{position:absolute; top:12px; left:12px; background:#c0392b; color:#fff; font-size:.7rem; font-weight:700; padding:.25rem .6rem; border-radius:50px; text-transform:uppercase; letter-spacing:.5px}
.product-body{padding:1.1rem; display:flex; flex-direction:column; gap:.5rem; flex:1}
.product-cat{font-size:.7rem; text-transform:uppercase; letter-spacing:1px; color:var(--accent); font-weight:700}
.product-title{font-size:1rem; font-weight:600; line-height:1.3; margin:0}
.product-title a{color:inherit; text-decoration:none}
.product-price{display:flex; align-items:baseline; gap:.5rem; margin-top:auto}
.price{font-size:1.15rem; font-weight:800}
.price-old{font-size:.85rem; color:var(--muted); text-decoration:line-through}

/* ==========================================================
   FEATURES
   ========================================================== */
.features-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1.5rem; text-align:center}
.feature{padding:2rem 1rem; background:var(--bg-alt); border-radius:var(--radius)}
.feature-icon{font-size:2rem; margin-bottom:.75rem}
.feature h3{font-size:1rem; font-weight:700; margin-bottom:.25rem}
.feature p{font-size:.85rem; color:var(--muted)}

/* ==========================================================
   PAGE HERO & SHOP
   ========================================================== */
.page-hero{padding:3rem 0; background:var(--bg-alt); text-align:center}
.page-hero h1{font-size:clamp(1.8rem,3.5vw,2.8rem); font-weight:800; margin:0}
.page-hero p{color:var(--muted); margin-top:.5rem}
.shop-layout{display:grid; grid-template-columns:220px 1fr; gap:2.5rem; align-items:start}
.filters h3{margin-bottom:1rem; font-size:1rem}
.filter-link{display:block; padding:.5rem 0; font-size:.9rem; color:var(--muted); transition:.2s; text-decoration:none}
.filter-link:hover,.filter-link.active{color:var(--accent); font-weight:600}

/* ==========================================================
   PRODUCT DETAIL
   ========================================================== */
.product-detail{display:grid; grid-template-columns:1fr 1fr; gap:3rem; align-items:start}
.product-detail-img{border-radius:var(--radius); overflow:hidden; background:var(--bg-alt); aspect-ratio:1; display:grid; place-items:center}
.product-detail-img img{width:100%; height:100%; object-fit:cover}
.product-detail-info h1{font-size:clamp(1.5rem,3vw,2.2rem); font-weight:800; margin:.5rem 0 1rem}
.product-detail-info .product-price{margin-bottom:1rem}
.product-detail-info .price{font-size:1.6rem}
.product-desc{color:var(--muted); margin-bottom:1.5rem}
.product-form{margin-top:1rem}
.size-options{display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1rem}
.size-opt{cursor:pointer}
.size-opt input{display:none}
.size-opt span{display:grid; place-items:center; min-width:48px; height:44px; padding:0 1rem; border:1.5px solid var(--border); border-radius:var(--radius-sm); font-size:.85rem; font-weight:600; transition:.2s}
.size-opt input:checked + span{border-color:var(--dark); background:var(--dark); color:#fff}

/* ==========================================================
   CART & CHECKOUT
   ========================================================== */
.cart-layout{display:grid; grid-template-columns:1fr 340px; gap:2rem; align-items:start; margin-top:2rem}
.cart-item{display:grid; grid-template-columns:1fr 100px 100px 40px; gap:1rem; align-items:center; padding:1rem 0; border-bottom:1px solid var(--border)}
.cart-item-info h3{font-size:.95rem; font-weight:600; margin-bottom:.2rem}
.cart-item-qty .input{margin-bottom:0}
.cart-item-total{font-weight:700; text-align:right}
.btn-remove{background:none; border:none; font-size:1.5rem; color:var(--muted); cursor:pointer; line-height:1; padding:0 8px}
.btn-remove:hover{color:#c0392b}
.cart-summary{background:var(--bg-alt); padding:1.75rem; border-radius:var(--radius)}
.cart-summary h3{margin-bottom:1rem; font-size:1.1rem}
.summary-row{display:flex; justify-content:space-between; gap:1rem; padding:.5rem 0; font-size:.9rem; color:var(--muted)}
.summary-row.total{font-size:1.1rem; font-weight:800; color:var(--text); border-top:1.5px solid var(--border); margin-top:.5rem; padding-top:1rem; margin-bottom:1rem}
.checkout-layout{display:grid; grid-template-columns:1fr 360px; gap:2.5rem; align-items:start}
.checkout-form h1{margin-bottom:1.5rem}

/* ==========================================================
   AUTH & ACCOUNT
   ========================================================== */
.auth-section{padding:5rem 0; display:grid; place-items:center; background:var(--bg-alt); min-height:70vh}
.auth-card{background:#fff; padding:2.5rem; border-radius:var(--radius); box-shadow:var(--shadow); width:100%; max-width:440px}
.auth-card h1{font-size:1.8rem; font-weight:800; margin-bottom:.25rem}
.auth-card form{margin:1.5rem 0}
.account-head{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; margin-bottom:2rem}
.account-head h1{margin:0}
.account-grid{display:grid; grid-template-columns:1fr 1.5fr; gap:1.5rem}
.account-card{background:var(--bg-alt); padding:1.75rem; border-radius:var(--radius)}
.account-card h3{margin-bottom:1rem; font-size:1.1rem}
.table{width:100%; border-collapse:collapse; font-size:.88rem}
.table th,.table td{padding:.65rem .5rem; text-align:left; border-bottom:1px solid var(--border)}
.table th{font-weight:700; font-size:.78rem; text-transform:uppercase; letter-spacing:.5px; color:var(--muted)}
.status{display:inline-block; padding:.2rem .7rem; border-radius:50px; font-size:.72rem; font-weight:700; text-transform:uppercase}
.status-pending{background:#fff3cd; color:#856404}
.status-processing{background:#cfe2ff; color:#084298}
.status-shipped{background:#d1e7dd; color:#0f5132}
.status-delivered{background:#d1e7dd; color:#0f5132}
.status-cancelled{background:#f8d7da; color:#842029}

/* ==========================================================
   STATS
   ========================================================== */
.stats-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:1.25rem}
.stat-card{background:var(--bg-alt); padding:1.75rem; border-radius:var(--radius); display:flex; flex-direction:column; gap:.25rem}
.stat-card span{font-size:.85rem; color:var(--muted); font-weight:500}
.stat-card strong{font-size:1.8rem; font-weight:800}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer{background:var(--dark); color:#e6e6e6; padding:4rem 0 0; margin-top:auto}
.footer-grid{display:grid; grid-template-columns:2fr 1fr 1fr 1.2fr; gap:2.5rem; padding-bottom:3rem}
.footer-grid h4{font-size:1.2rem; font-weight:800; margin-bottom:.75rem; color:#fff}
.footer-grid h5{font-size:.85rem; font-weight:700; text-transform:uppercase; letter-spacing:1px; margin-bottom:1rem; color:#E8E2DB}
.footer-grid a{display:block; font-size:.88rem; color:#b9b9b9; padding:.2rem 0; transition:.2s; text-decoration:none}
.footer-grid a:hover{color:#fff}
.footer-grid p{font-size:.88rem; color:#b9b9b9; line-height:1.7}
.footer-bottom{border-top:1px solid #2a2a2a; padding:1.5rem 0; font-size:.82rem; color:#888; margin-bottom:0 !important}

/* ==========================================================
   MOBILE RESPONSIVE
   ========================================================== */
@media (max-width: 960px) {
  .shop-layout{grid-template-columns:1fr}
  .filters{display:flex; flex-wrap:wrap; gap:.5rem; align-items:center}
  .filters h3{width:100%; margin-bottom:.25rem}
  .filter-link{border:1px solid var(--border); border-radius:50px; padding:.35rem .9rem}
  .filter-link.active{background:var(--dark); color:#fff; border-color:var(--dark)}
  .product-detail{grid-template-columns:1fr; gap:1.5rem}
  .cart-layout,.checkout-layout{grid-template-columns:1fr}
  .account-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}

  /* --- MOBILE HERO OVERLAY --- */
  .hero { 
    padding: 0 !important; 
    background: #111 !important; 
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
  .hero-grid { 
    display: flex !important; /* Force flex instead of block to prevent gaps */
    flex-direction: column;
    position: relative; 
    min-height: 100vh; /* Full screen height */
    min-height: 100dvh; /* Modern mobile viewport fix */
    width: 100%;
  }
  
  /* The Image Container */
  .hero-visual { 
    position: absolute !important; 
    inset: 0 !important; 
    width: 100% !important;
    height: 100% !important;
    z-index: 1; 
  }
  .hero-img-container { 
    width: 100% !important; 
    height: 100% !important; 
    max-width: none !important; 
    border-radius: 0 !important; 
    box-shadow: none !important; 
    aspect-ratio: auto !important; 
  }
  .hero-img-container img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
    object-position: center top !important; /* Keeps the face in frame */
  }
  
  /* The Gradient Overlay */
  .hero-visual::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.95) 100%); 
    z-index: 2; 
  }
  
  /* The Text Content */
  .hero-content {
    position: relative; 
    z-index: 3; 
    padding: 2rem 1.5rem 4rem 1.5rem; /* Bottom padding pushes it up */
    min-height: 100vh;
    min-height: 100vh;
    display: flex !important; 
    flex-direction: column; 
    justify-content: flex-end; /* Pushes text to bottom */
    align-items: flex-start; 
    text-align: left;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100%;
  }
  
  /* Text Styling */
  .hero .eyebrow { 
    color: rgba(255,255,255,0.9); 
    margin-bottom: 0.5rem; 
    letter-spacing: 4px;
  }
  .hero h1 { 
    color: #fff; 
    font-size: clamp(2.8rem, 12vw, 4.5rem); /* Scales cleanly */
    margin-bottom: 1rem; 
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .hero-divider { 
    background-color: #fff; 
    margin: 0 0 1.5rem 0; 
  }
  .hero p { 
    color: #f0f0f0; 
    font-size: 1rem; 
    line-height: 1.6;
    margin: 0 0 2rem 0; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.6); 
  }
  
  /* Button */
  .hero-cta { 
    width: 100%; 
  }
  .hero .btn-primary { 
    width: 100%; 
    text-align: center; 
    background: #fff; 
    color: var(--accent); 
    border: none;
    padding: 1.2rem;
    font-weight: 700;
  }
  .hero .btn-primary:hover { 
    background: #f0f0f0; 
  }
}
/* ==========================================================
   UNIVERSAL MOBILE HEADER FIX (up to 768px)
   ========================================================== */
@media (max-width: 768px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px; /* Slightly shorter header for mobile */
    padding: 0 15px;
    gap: 10px;
  }

  /* 1. Logo */
  .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1; /* Allows logo to shrink if needed */
    min-width: 0;
  }
  
  .logo-text {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if screen is too small */
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    flex-shrink: 0; /* Prevents "BB" from squishing */
  }

  /* 2. Actions Container */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Prevents icons from wrapping to next line */
  }

  /* 3. Cart Icon */
  .icon-btn {
    width: 36px;
    height: 36px;
    background: transparent; /* Removes the gray circle background for a cleaner look */
  }
  
  .icon-btn svg {
    width: 20px;
    height: 20px;
  }

  .cart-badge {
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }

  /* 4. Login Button */
  .header-actions .btn-sm {
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
  }

  /* 5. Hamburger Menu */
  .hamburger {
    display: flex;
    padding: 4px;
    margin-left: 4px;
  }
  
  .hamburger span {
    width: 20px; /* Slightly smaller bars */
    height: 2px;
  }
}

/* Extra small devices (e.g., iPhone SE - 320px wide) */
@media (max-width: 380px) {
  .logo-text {
    display: none; /* Hide the "BodyBoss" text on tiny screens */
  }
  
  .header-inner {
    padding: 0 10px;
  }
  
  .header-actions {
    gap: 5px;
  }
}
