body,h1,h2,h3,h4,h5,h6 {font-family: "Raleway", sans-serif}
body, html {height: 100%; line-height: 1.8; scroll-behavior:smooth;}

:root{
  --scent-brown:#3f2d22;
  --scent-cream:#f7f2ea;
  --scent-soft:#efe6dc;
}

/* HERO */
.bgimg-1{
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  background-image: url("home.png");
  min-height:100vh;
}
.overlay{ background: rgba(255,255,255,0.06); min-height:100%; }

/* NAVBAR */
#myNavbar{
  background: transparent;
  position: fixed;
  width: 100%;
  z-index: 999;
  padding: 10px 0;
}
#myNavbar a{
  color: var(--scent-brown);
  font-weight: 700;
  letter-spacing: 1px;
}
.w3-bar .w3-button {padding: 16px;}

.section-title{ color: var(--scent-brown); letter-spacing: 1px; }

/* HERO BUTTON */
.hero-cta-wrap{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:120px;
}
.hero-shop{
  background: rgba(63,45,34,0.50);
  color:white;
  padding:18px 56px;
  font-size:20px;
  font-weight:900;
  border-radius:999px;
  text-decoration:none;
}
.hero-shop:hover{ background: rgba(63,45,34,0.78); }

/* CATALOG */
.catalog-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width:1100px){
  .catalog-grid{ grid-template-columns: repeat(2, 1fr); }
}

.cat-card{
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  cursor:pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}
.cat-img{
  width:100%;
  height:260px;
  object-fit:cover;
}
.cat-body{ padding:14px; text-align:center; }
.cat-name{ font-weight:900; color:var(--scent-brown); }
.cat-price{ font-weight:900; }

/* PRODUCT MODAL */
.product-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  backdrop-filter: blur(6px);
}
.product-modal.open{ display:flex; }

.product-sheet{
  width:1100px;
  max-width:96vw;
  background:#fff;
  border-radius:22px;
  overflow:hidden;
}

.product-layout{
  display:grid;
  grid-template-columns:1.2fr 1fr;
}
@media (max-width:900px){
  .product-layout{ grid-template-columns:1fr; }
}

.product-media{
  background:#f4efe8;
  min-height:520px;
}
.product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.product-info{
  padding:26px;
  background:#fbfaf8;
}

.pd-title{
  font-size:48px;
  color:var(--scent-brown);
}

.pd-price{
  margin-top:10px;
  font-weight:900;
}

.pd-desc{
  margin-top:14px;
}

/* ROW */
.pd-row{
  margin-top:16px;
  display:flex;
  gap:10px;
  align-items:center;
}

/* QTY */
.pd-qty{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,0.1);
}
.pd-qtybtn{
  border:none;
  background:none;
  font-size:16px;
  cursor:pointer;
}
.pd-qtynum{
  font-weight:900;
}

/* BUTTON */
.pd-add{
  flex:1;
  border:none;
  border-radius:14px;
  padding:14px;
  background:rgba(63,45,34,0.9);
  color:#fff;
  font-weight:900;
}

/* =========================
   📱 MOBILE (CLEAN FIX)
========================= */
@media (max-width:600px){

  #myNavbar a{
    font-size:13px;
    padding:12px;
  }

  .hero-cta-wrap{ bottom:60px; }
  .hero-shop{
    padding:12px 28px;
    font-size:15px;
  }

  /* GRID 3 */
  .catalog-grid{
    grid-template-columns: repeat(3, 1fr);
    gap:10px;
    padding:0 10px;
  }

  .cat-img{ height:110px; }
  .cat-name{ font-size:11px; }
  .cat-price{ font-size:11px; }

  /* POPUP */
  .product-modal{
    align-items:flex-end;
    padding:0;
  }

  .product-sheet{
    width:100%;
    height:80vh;
    border-radius:18px 18px 0 0;
    display:flex;
    flex-direction:column;
  }

  .product-media{
    min-height:150px;
    max-height:170px;
  }

  .product-info{
    flex:1;
    overflow-y:auto;
    padding:12px;
  }

  .pd-title{ font-size:18px; }
  .pd-price{ font-size:13px; }
  .pd-desc{
    font-size:11.5px;
    line-height:1.4;
  }

  .pd-row{
    gap:6px;
    margin-top:8px;
    position:sticky;
    bottom:0;
    background:#fbfaf8;
    padding-top:6px;
  }

  .pd-qty{
    padding:4px 6px;
  }

  .pd-qtybtn{
    font-size:13px;
  }

  .pd-qtynum{
    font-size:12px;
  }

  .pd-add{
    padding:8px 12px;
    font-size:12px;
    border-radius:10px;
    font-weight:700;
  }

  /* INPUTS */
  .field input,
  .field textarea,
  .field select{
    padding:10px;
    font-size:13px;
    border-radius:10px;
  }

}
.cart-fab{
      position: fixed; right: 18px; bottom: 18px;
      z-index: 3000;
      border: none;
      border-radius: 999px;
      padding: 14px 18px;
      font-weight: 900;
      cursor: pointer;
      background: rgba(63,45,34,0.92);
      color: #fff;
      box-shadow: 0 16px 40px rgba(0,0,0,0.18);
      display:flex; align-items:center; gap: 10px;
    }
    .cart-badge{
      background:#fff;
      color: var(--scent-brown);
      font-weight: 900;
      border-radius: 999px;
      padding: 2px 10px;
      min-width: 32px;
      text-align:center;
    }

    .cart-drawer{
      position: fixed; top: 0; right: -420px;
      width: 420px; max-width: 92vw; height: 100vh;
      background: #fff; z-index: 4000;
      box-shadow: -20px 0 60px rgba(0,0,0,0.18);
      transition: right 0.25s ease;
      display:flex; flex-direction:column;
    }
    .cart-drawer.open{ right: 0; }

    .cart-header{
      padding: 18px 18px 12px;
      border-bottom: 1px solid rgba(0,0,0,0.08);
      display:flex; justify-content:space-between; align-items:center;
    }
    .cart-title{ font-weight: 900; letter-spacing:1px; color: var(--scent-brown); }
    .cart-close{
      border:none; background: transparent;
      font-size: 22px; font-weight: 900;
      cursor:pointer; color: var(--scent-brown);
    }

    .cart-body{ padding: 12px 18px; overflow:auto; flex:1; }

    .cart-item{
      border-bottom: 1px solid rgba(0,0,0,0.07);
      padding: 12px 0;
      display:flex; gap: 12px;
    }
    .cart-item strong{ color: var(--scent-brown); }
    .cart-item-meta{ flex:1; }

    .cart-item-actions{
      display:flex; gap: 8px;
      align-items:center;
      margin-top: 8px;
      flex-wrap: wrap;
    }

    .mini-btn{
      border: 1px solid rgba(0,0,0,0.12);
      background:#fff;
      border-radius: 999px;
      padding: 6px 10px;
      cursor:pointer;
      font-weight: 900;
      color: var(--scent-brown);
    }
    .mini-btn:hover{ background: rgba(63,45,34,0.06); border-color: rgba(63,45,34,0.25); }

    .cart-footer{
      padding: 14px 18px 18px;
      border-top: 1px solid rgba(0,0,0,0.08);
    }
    .cart-row{
      display:flex; justify-content:space-between;
      align-items:center;
      margin-bottom: 10px;
      font-weight: 900;
      color: var(--scent-brown);
    }

    .checkout-btn{
      width:100%;
      border:none;
      border-radius: 14px;
      padding: 14px 16px;
      background: rgba(63,45,34,0.92);
      color:#fff;
      font-weight: 900;
      cursor:pointer;
      transition: 0.2s ease;
    }
    .checkout-btn:hover{ transform: translateY(-1px); background: rgba(63,45,34,1); }

    /* Checkout modal */
    .checkout-modal{
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.45);
      z-index: 4600;
      display: none;
      align-items:center;
      justify-content:center;
      padding: 18px;
    }
    .checkout-modal.open{ display:flex; }
    .checkout-sheet{
      width: 620px;
      max-width: 96vw;
      background:#fff;
      border-radius: 18px;
      overflow:hidden;
      box-shadow: 0 18px 60px rgba(0,0,0,0.20);
    }
    .checkout-head{
      padding: 16px 18px;
      border-bottom: 1px solid rgba(0,0,0,0.07);
      display:flex;
      justify-content:space-between;
      align-items:center;
    }
    .checkout-title{
      font-weight: 900;
      letter-spacing: 1px;
      color: var(--scent-brown);
    }
    .checkout-close{
      border:none;
      background: transparent;
      font-size: 22px;
      font-weight: 900;
      cursor:pointer;
      color: var(--scent-brown);
    }
    .checkout-body{ padding: 16px 18px 18px; }
    .field{
      margin-top: 12px;
    }
    .field label{
      display:block;
      font-weight: 900;
      color: var(--scent-brown);
      margin-bottom: 8px;
    }
    .field input, .field textarea, .field select{
      width: 100%;
      padding: 12px 12px;
      border-radius: 12px;
      border: 1px solid rgba(0,0,0,0.14);
      outline: none;
      font-size: 14px;
    }
    .field textarea{ min-height: 88px; resize: vertical; }
    .hint{ font-size: 12px; opacity: 0.8; margin-top: 6px; }
    .two-col{
      display:grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    @media (max-width: 640px){ .two-col{ grid-template-columns: 1fr; } }

    .checkout-pay{
      margin-top: 14px;
      width: 100%;
      border: none;
      border-radius: 14px;
      padding: 14px 16px;
      background: rgba(63,45,34,0.92);
      color: #fff;
      font-weight: 900;
      cursor:pointer;
      transition: 0.2s ease;
    }
    .checkout-pay:hover{ transform: translateY(-1px); background: rgba(63,45,34,1); }

   /* CLOSE BUTTON (TOP RIGHT FIX) */
.product-close{
  position:absolute;
  top:10px;
  right:12px;  /* move to right */
  left:auto;   /* cancel any left alignment */
  border:none;
  background: rgba(255,255,255,0.9);
  border-radius:999px;
  width:32px;
  height:32px;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
  color: var(--scent-brown);
  display:flex;
  align-items:center;
  justify-content:center;
}

/* SMALLER QUANTITY BOX */
.pd-qty{
  padding:4px 6px;
  border-radius:10px;
  gap:6px;
}

.pd-qtybtn{
  font-size:12px;
}

.pd-qtynum{
  font-size:12px;
}