/* ======================================================
   ROOT VARIABLES
====================================================== */
:root{
  /* Light mode */
  --bg:#f7f7f8;
  --card:#ffffff;
  --muted:#6b7280;
  --accent:#2b2b2b;
  --accent-2:#8b5e3c;
}

/* ======================================================
   RESET & BASE
====================================================== */
*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  background:var(--bg);
  color:var(--accent);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.container{
  max-width:1100px;
  margin:36px auto;
  padding:0 20px;
}

.small{font-size:13px;color:var(--muted)}

/* ======================================================
   NAVIGATION
====================================================== */
.nav{
  position:sticky;
  top:0;
  z-index:50;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding:12px 16px;
  background:var(--bg);
  backdrop-filter:saturate(180%) blur(6px);
  border-bottom:1px solid rgba(0,0,0,0.05);
}

.brand{
  font-weight:700;
  font-size:18px;
  margin-right:auto;
}

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

.navlink{
  text-decoration:none;
  padding:8px 10px;
  border-radius:8px;
  font-size:15px;
  font-weight:600;
  color:var(--accent);
}

.navlinks a.active::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-6px;
  width:100%;
  height:2px;
  background:var(--accent);
}

/* Hamburger */
.nav-toggle{
  display:none;
  background:none;
  border:none;
  padding:8px;
  cursor:pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after{
  display:block;
  width:22px;
  height:2px;
  background:currentColor;
  border-radius:2px;
  position:relative;
  transition:transform 200ms ease, opacity 200ms ease;
}

.hamburger::before,
.hamburger::after{
  content:"";
  position:absolute;
  left:0;
}
.hamburger::before{top:-7px}
.hamburger::after{top:7px}

/* ======================================================
   HERO
====================================================== */
.hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;

  background:linear-gradient(180deg,#fff 0%, #fafafa 100%);
  padding:28px;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(11,15,20,0.03);
}

.hero .lead{max-width:640px}
.hero h1{font-size:28px;margin:0 0 8px}
.hero p{color:var(--muted)}

.hero-logo{
  max-width:180px;
  width:100%;
  height:auto;
  opacity:.95;
}

/* ======================================================
   GRID & CARD
====================================================== */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:20px;
  margin-top:20px;
  justify-content:center;
}

.grid.grid--center{
  grid-template-columns:repeat(auto-fit,minmax(240px,280px));
}

.card{
  background:var(--card);
  padding:16px;
  border-radius:10px;
  box-shadow:0 6px 18px rgba(11,15,20,0.04);
  display:flex;
  flex-direction:column;
}

.grid .card{
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
}

@media (hover:hover){
  .grid .card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 28px rgba(11,15,20,0.12);
  }
}

.product-info p{
  white-space:pre-line;
}

.grid .card{max-width:300px}

.card img{
  width:100%;
  height:150px;
  object-fit:cover;
  border-radius:8px;
  margin-bottom:10px;
}

.card .title{
  font-weight:700;
  margin-bottom:6px;
}

.card .price{
  font-weight:700;
  color:var(--accent-2);
  margin-top:auto;
}

/* ======================================================
   BUTTONS & INPUT
====================================================== */
.btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:8px;
  background:var(--accent);
  color:#fff;
  font-weight:600;
  border:none;
  cursor:pointer;
  text-decoration:none;
}

.input{
  padding:10px;
  border-radius:8px;
  border:1px solid #e5e7eb;
}

/* ======================================================
   PRODUCT PAGE
====================================================== */
.product-wrap{
  display:flex;
  gap:28px;
  margin-top:24px;
}

.product-wrap .card{
  max-width:none;
  width:100%;
  justify-content:center;
}

.product-info h2{margin:0 0 6px}
.product-info p{color:var(--muted);line-height:1.5}

.qty{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:12px;
}

.qty input{
  width:90px;
  padding:10px;
  border-radius:8px;
  border:1px solid #e5e7eb;
}

/* Carousel */
.carousel{
  width:100%;
  overflow:hidden;
  border-radius:12px;
}

.carousel-track{
  display:flex;
  transition:transform 400ms ease;
}

.carousel-slide{
  min-width:100%;
}

.carousel-slide img{
  width:100%;
  height:320px;
  object-fit:cover;
  border-radius:12px;
}

/* ======================================================
   CART & TABLE
====================================================== */
.table{
  width:100%;
  border-collapse:collapse;
  margin-top:12px;
}

.table th,
.table td{
  padding:12px 8px;
  text-align:left;
}

.table tr{
  background:var(--card);
  border-radius:8px;
}

.total-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:12px;
  padding:14px;
  background:var(--card);
  border-radius:10px;
}

.form-row{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media(max-width:800px){
  .product-wrap{flex-direction:column}
  .hero{flex-direction:column;align-items:flex-start}
}

/* ======================================================
   DARK MODE (WARM BROWN)
====================================================== */
@media (prefers-color-scheme: dark){
  :root{
    --bg:#14110f;
    --card:#1c1815;
    --muted:#a8a29e;
    --accent:#e7e5e4;
    --accent-2:#c08a5a;
  }

  body{
    background:var(--bg);
    color:var(--accent);
  }

  .hero{
    background:linear-gradient(180deg,#1c1815 0%, #151210 100%);
    box-shadow:0 6px 20px rgba(0,0,0,0.45);
  }

  .card,
  .total-row,
  .table tr{
    background:var(--card);
    box-shadow:0 6px 18px rgba(0,0,0,0.4);
  }

  .btn{
    background:var(--accent);
    color:#14110f;
  }

  .input,
  .qty input{
    background:#14110f;
    border-color:#3a3029;
    color:var(--accent);
  }

  .nav{
    border-bottom:1px solid rgba(255,255,255,0.06);
  }
}

/* ======================================================
   MOBILE NAV DRAWER
====================================================== */
@media (max-width:768px){
  .nav-toggle{display:block; color: #e7e5e4; z-index: 10000;}

  .navlinks{
    position:fixed;
    top:0;
    right:0;
    height:100vh;
    width:260px;
    padding:80px 16px 16px;

    background:var(--card);
    box-shadow:-6px 0 18px rgba(0,0,0,0.12);

    transform:translateX(100%);
    transition:transform 260ms ease;
    z-index:1000;
  }

  .nav.open .navlinks{
    transform:translateX(0);
  }

  .nav-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.35);
    opacity:0;
    pointer-events:none;
    transition:opacity 200ms ease;
    z-index:999;
  }

  .nav.open .nav-overlay{
    opacity:1;
    pointer-events:auto;
  }

  html,body{overflow-x:hidden}
}
@media (max-width:768px){
  .navlinks{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
  }

  .navlink{
    width:100%;
  }
}

