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

:root{
  --cream: #FBF2DE;
  --cream-soft: #FFFBF2;
  --brown-dark: #3E2A1B;
  --brown: #6B4A31;
  --brown-light: #A87F5A;
  --green: #7C9A5C;
  --green-dark: #5C7A40;
  --gold: #C9A66B;
  --white: #FFFFFF;
  --shadow: 0 4px 16px rgba(62,42,27,0.12);
  --radius: 14px;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--brown-dark);
  padding-bottom: 60px;
}

h1,h2,h3{
  font-family: 'Playfair Display', serif;
  margin:0;
}

/* Header */
.site-header{
  background: var(--brown-dark);
  color: var(--cream-soft);
  padding: 18px 16px;
}
.header-inner{
  max-width: 900px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  gap:14px;
}
.logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: var(--cream-soft);
  border-radius: 50%;
  padding: 4px;
}
.header-text h1{
  font-size: 1.6rem;
  color: var(--cream-soft);
  letter-spacing: 0.5px;
}
.header-text p{
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Sticky bar (search + category nav) */
.sticky-bar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream-soft);
  box-shadow: var(--shadow);
}

/* Search bar */
.search-bar{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #EFE1C4;
}
.search-icon{
  flex: 0 0 auto;
  color: var(--brown-light);
}
#searchInput{
  flex-grow: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--brown-dark);
  min-width: 0;
}
#searchInput::placeholder{ color: var(--brown-light); }
#searchInput::-webkit-search-cancel-button{ cursor: pointer; }

.no-results{
  max-width: 900px;
  margin: 24px auto 0;
  padding: 0 16px;
  color: var(--brown);
  text-align: center;
  font-style: italic;
}

/* Category nav */
.category-nav{
  display:flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar{ display:none; }
.cat-btn{
  flex: 0 0 auto;
  border: 1px solid var(--brown-light);
  background: var(--white);
  color: var(--brown);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.cat-btn:hover{ background: var(--cream); }
.cat-btn.active{
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* Main */
main{
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 16px 40px;
}

.category-section{
  margin-top: 34px;
  scroll-margin-top: 110px;
}
.category-section h2{
  color: var(--brown-dark);
  font-size: 1.4rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.category-desc{
  color: var(--brown);
  font-size: 0.85rem;
  margin: 6px 0 16px;
  font-style: italic;
}

.product-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.product-card{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.product-card h3{
  font-size: 1.05rem;
  color: var(--brown-dark);
  line-height: 1.3;
}
.product-card p.desc{
  font-size: 0.82rem;
  color: var(--brown);
  margin: 0;
  flex-grow: 1;
  line-height: 1.4;
}
.product-price{
  font-weight: 600;
  color: var(--green-dark);
  font-size: 1.05rem;
}
.product-footer{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 8px;
}

.qty-stepper{
  display:flex;
  align-items:center;
  border: 1px solid var(--brown-light);
  border-radius: 999px;
  overflow:hidden;
}
.qty-stepper button{
  background: var(--cream);
  border: none;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  color: var(--brown-dark);
  cursor: pointer;
}
.qty-stepper span{
  min-width: 24px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.add-btn{
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.add-btn:hover{ background: var(--green-dark); }

.price-note{
  font-size: 0.72rem;
  color: var(--brown-light);
}

/* Traditional list (no cover) simple list style */
.simple-list{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 16px;
}
.simple-list .simple-item{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream);
  gap: 10px;
}
.simple-list .simple-item:last-child{ border-bottom:none; }
.simple-item .name{ font-weight: 500; flex-grow:1; }

/* Cart FAB */
.cart-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brown-dark);
  color: var(--cream-soft);
  border: none;
  box-shadow: var(--shadow);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index: 30;
}
.cart-count{
  position:absolute;
  top: -4px;
  right: -4px;
  background: var(--green);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 0 4px;
}

/* Overlay */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.overlay.visible{
  opacity: 1;
  pointer-events: auto;
}

/* Cart drawer */
.cart-drawer{
  position: fixed;
  top: 0;
  right: -100%;
  width: min(400px, 100%);
  height: 100%;
  background: var(--cream-soft);
  z-index: 50;
  display:flex;
  flex-direction: column;
  transition: right .25s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
}
.cart-drawer.open{ right: 0; }

.cart-header, .checkout-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 16px 20px;
  background: var(--brown-dark);
  color: var(--cream-soft);
}
.cart-header h2, .checkout-header h2{ color: var(--cream-soft); font-size: 1.2rem; }

.icon-btn{
  background: none;
  border: none;
  color: inherit;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.cart-items{
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px 20px;
}
.empty-cart{
  color: var(--brown-light);
  text-align: center;
  margin-top: 40px;
}

.cart-item{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #EFE1C4;
}
.cart-item-info{ flex-grow:1; }
.cart-item-info .name{ font-weight: 600; font-size: 0.9rem; }
.cart-item-info .price{ font-size: 0.8rem; color: var(--brown); }
.cart-item-actions{
  display:flex;
  align-items:center;
  gap: 8px;
}
.remove-btn{
  background: none;
  border: none;
  color: #B5533C;
  font-size: 1.1rem;
  cursor: pointer;
}

.cart-footer{
  padding: 16px 20px 24px;
  border-top: 1px solid #EFE1C4;
  background: var(--cream-soft);
}
.cart-total-row{
  display:flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 14px;
}

.btn-primary{
  width: 100%;
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 13px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  transition: background .15s ease;
}
.btn-primary:hover:not(:disabled){ background: var(--green-dark); }
.btn-primary:disabled{
  background: #C9C2B0;
  cursor: not-allowed;
}
.btn-whatsapp{
  background: #25D366;
}
.btn-whatsapp:hover{ background: #1DA851; }

/* Checkout modal */
.checkout-modal{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%) scale(0.95);
  width: min(460px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--cream-soft);
  border-radius: var(--radius);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow);
}
.checkout-modal.open{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,-50%) scale(1);
}
.checkout-header{ border-radius: var(--radius) var(--radius) 0 0; }

#checkoutForm{
  padding: 18px 20px 24px;
  display:flex;
  flex-direction: column;
  gap: 6px;
}
#checkoutForm label{
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-top: 10px;
}
#checkoutForm input, #checkoutForm textarea{
  border: 1px solid var(--brown-light);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--brown-dark);
  resize: vertical;
}
#checkoutForm textarea{ min-height: 64px; }

.checkout-summary{
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed var(--brown-light);
}

.checkout-summary .cart-total-row{ margin-bottom: 8px; }

#checkoutForm .btn-whatsapp{ margin-top: 14px; }

/* Footer */
.site-footer{
  text-align:center;
  padding: 30px 16px 10px;
  color: var(--brown);
  font-size: 0.85rem;
}
.footer-note{ font-size: 0.75rem; color: var(--brown-light); }

@media (max-width: 480px){
  .header-text h1{ font-size: 1.3rem; }
  .checkout-modal{ width: 94vw; }
}
