:root {
    --cream: #FAF7F2;
    --cream-dark: #F0EBE1;
    --green: #2D4A3E;
    --green-light: #3D6355;
    --gold: #C9A84C;
    --gold-light: #E8C96A;
    --text: #1A1A1A;
    --text-muted: #6B6B6B;
    --text-light: #9A9A9A;
    --white: #FFFFFF;
    --red: #C0392B;
    --border: #E2D9CC;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Inter', sans-serif; background: var(--cream); color: var(--text); min-height: 100vh; }
  
  /* NAV */
  nav {
    background: var(--green);
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; height: 64px;
  }
  .nav-logo {
    font-family: 'Playfair Display', serif;
    color: var(--cream); font-size: 1.25rem; font-weight: 700;
    letter-spacing: 0.02em; cursor: pointer;
    display: flex; flex-direction: column; line-height: 1.1;
  }
  .nav-logo span { font-size: 0.65rem; font-weight: 300; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-light); font-family: 'Inter', sans-serif; }
  .nav-links { display: flex; gap: 2rem; }
  .nav-links a { color: rgba(250,247,242,0.8); text-decoration: none; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: color 0.2s; }
  .nav-links a:hover, .nav-links a.active { color: var(--gold-light); }
  .nav-cart {
    background: none; border: 1.5px solid rgba(250,247,242,0.3);
    border-radius: 6px; padding: 0.5rem 1rem;
    color: var(--cream); font-size: 0.85rem; cursor: pointer;
    display: flex; align-items: center; gap: 0.5rem;
    transition: all 0.2s; font-family: 'Inter', sans-serif;
  }
  .nav-cart:hover { border-color: var(--gold-light); color: var(--gold-light); }
  .cart-badge {
    background: var(--gold); color: var(--green);
    border-radius: 50%; width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
  }

  /* PAGES */
  .page { display: none; }
  .page.active { display: block; }

  /* HOME HERO */
  .hero {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative; overflow: hidden;
  }
  .hero::before {
    content: '✦ ✦ ✦';
    position: absolute; top: 2rem; left: 50%; transform: translateX(-50%);
    color: rgba(201,168,76,0.3); letter-spacing: 1rem; font-size: 0.7rem;
  }
  .hero h1 {
    font-family: 'Playfair Display', serif;
    color: var(--cream); font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700; line-height: 1.2; margin-bottom: 1rem;
  }
  .hero h1 em { color: var(--gold-light); font-style: italic; }
  .hero p { color: rgba(250,247,242,0.75); font-size: 1rem; max-width: 480px; margin: 0 auto 2rem; line-height: 1.7; font-weight: 300; }
  .btn-primary {
    background: var(--gold); color: var(--green);
    border: none; border-radius: 4px;
    padding: 0.85rem 2.2rem; font-size: 0.9rem;
    font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
  }
  .btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }

  .home-categories {
    padding: 3rem 2rem;
    max-width: 1100px; margin: 0 auto;
  }
  .section-label {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem;
  }
  .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; color: var(--text); margin-bottom: 2rem;
  }
  .cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
  .cat-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; padding: 2rem 1.5rem;
    cursor: pointer; transition: all 0.25s;
    display: flex; flex-direction: column; gap: 0.5rem;
  }
  .cat-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(45,74,62,0.1); }
  .cat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
  .cat-card h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
  .cat-card p { font-size: 0.8rem; color: var(--text-muted); }
  .cat-card .cat-count { font-size: 0.75rem; color: var(--gold); font-weight: 600; margin-top: auto; padding-top: 0.5rem; }

  .home-featured { padding: 1rem 2rem 4rem; max-width: 1100px; margin: 0 auto; }
  .products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }

  /* PRODUCT CARD */
  .product-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden; cursor: pointer;
    transition: all 0.25s; position: relative;
  }
  .product-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(45,74,62,0.12); }
  .product-card:hover .card-overlay { opacity: 1; }
  .product-img {
    height: 200px; background: var(--cream-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; position: relative;
  }
  .card-overlay {
    position: absolute; inset: 0; background: rgba(45,74,62,0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.25s;
  }
  .card-overlay span {
    color: var(--gold-light); font-family: 'Playfair Display', serif;
    font-style: italic; font-size: 0.9rem; text-align: center; padding: 1rem;
  }
  .badge-off {
    position: absolute; top: 0.75rem; right: 0.75rem;
    background: var(--green); color: var(--gold-light);
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem; border-radius: 3px; text-transform: uppercase;
  }
  .badge-low {
    position: absolute; top: 0.75rem; left: 0.75rem;
    background: #C0392B; color: white;
    font-size: 0.65rem; font-weight: 700;
    padding: 0.25rem 0.5rem; border-radius: 3px;
  }
  .product-info { padding: 1rem; }
  .product-info h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; line-height: 1.3; }
  .product-info .cat-tag { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
  .price-row { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.5rem; }
  .price-original { font-size: 0.75rem; color: var(--text-muted); text-decoration: line-through; }
  .price-main { font-size: 1.05rem; font-weight: 700; color: var(--text); }
  .price-off { color: var(--green); font-weight: 700; }
  .price-pix { font-size: 0.72rem; color: #2E7D32; font-weight: 500; }
  .price-parcel { font-size: 0.72rem; color: var(--text-muted); }
  .btn-add-card {
    width: 100%; margin-top: 0.75rem;
    background: var(--green); color: var(--cream);
    border: none; border-radius: 4px; padding: 0.6rem;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: background 0.2s; font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
  }
  .btn-add-card:hover { background: var(--green-light); }

  /* PRODUCTS PAGE */
  .products-page { max-width: 1200px; margin: 0 auto; padding: 2rem; display: flex; gap: 2rem; }
  .sidebar { width: 220px; flex-shrink: 0; }
  .sidebar h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
  .filter-section { margin-bottom: 1.5rem; }
  .filter-section h4 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
  .filter-option { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; cursor: pointer; }
  .filter-option input[type=checkbox] { accent-color: var(--green); cursor: pointer; }
  .filter-option label { font-size: 0.85rem; cursor: pointer; }
  .price-inputs { display: flex; gap: 0.5rem; align-items: center; }
  .price-input { width: 80px; border: 1px solid var(--border); border-radius: 4px; padding: 0.4rem 0.5rem; font-size: 0.8rem; font-family: 'Inter', sans-serif; background: var(--white); }
  .price-input:focus { outline: none; border-color: var(--green); }
  .btn-apply { background: var(--green); color: var(--cream); border: none; border-radius: 4px; padding: 0.4rem 0.75rem; font-size: 0.75rem; cursor: pointer; font-family: 'Inter', sans-serif; }
  .btn-clear { background: none; border: none; color: var(--text-muted); font-size: 0.75rem; cursor: pointer; text-decoration: underline; font-family: 'Inter', sans-serif; display: block; margin-top: 0.5rem; }

  .products-main { flex: 1; }
  .products-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
  .products-toolbar h1 { font-family: 'Playfair Display', serif; font-size: 1.6rem; }
  .toolbar-right { display: flex; align-items: center; gap: 1rem; }
  .result-count { font-size: 0.8rem; color: var(--text-muted); }
  .sort-select { border: 1px solid var(--border); border-radius: 4px; padding: 0.45rem 0.75rem; font-size: 0.82rem; font-family: 'Inter', sans-serif; background: var(--white); cursor: pointer; }
  .sort-select:focus { outline: none; border-color: var(--green); }
  .active-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
  .filter-tag {
    background: var(--cream-dark); border: 1px solid var(--border);
    border-radius: 20px; padding: 0.25rem 0.75rem;
    font-size: 0.75rem; display: flex; align-items: center; gap: 0.35rem; cursor: pointer;
  }
  .filter-tag:hover { border-color: var(--red); }
  .filter-tag .remove { color: var(--text-muted); font-size: 0.9rem; }

  /* DETAIL PAGE */
  .detail-page { max-width: 1100px; margin: 0 auto; padding: 2rem; }
  .breadcrumb { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1.5rem; display: flex; gap: 0.5rem; align-items: center; }
  .breadcrumb a { color: var(--text-muted); text-decoration: none; cursor: pointer; }
  .breadcrumb a:hover { color: var(--green); }
  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
  .detail-img-main {
    background: var(--cream-dark); border-radius: 8px;
    height: 420px; display: flex; align-items: center; justify-content: center;
    font-size: 8rem; border: 1px solid var(--border);
  }
  .detail-info { display: flex; flex-direction: column; gap: 1rem; }
  .detail-cat { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
  .detail-title { font-family: 'Playfair Display', serif; font-size: 2rem; line-height: 1.2; }
  .detail-prices { padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .detail-price-original { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; }
  .detail-price-main { font-size: 2rem; font-weight: 700; color: var(--text); }
  .detail-price-off { color: var(--green); font-size: 0.9rem; font-weight: 600; }
  .detail-pix { color: #2E7D32; font-size: 0.85rem; font-weight: 500; margin-top: 0.25rem; }
  .detail-parcel { color: var(--text-muted); font-size: 0.82rem; }
  .detail-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; }
  .qty-row { display: flex; align-items: center; gap: 1rem; }
  .qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .qty-btn { background: none; border: none; width: 36px; height: 36px; cursor: pointer; font-size: 1.1rem; font-family: 'Inter', sans-serif; transition: background 0.15s; }
  .qty-btn:hover { background: var(--cream-dark); }
  .qty-val { width: 40px; text-align: center; font-size: 0.9rem; font-weight: 600; }
  .btn-add-detail {
    flex: 1; background: var(--green); color: var(--cream);
    border: none; border-radius: 4px; padding: 0.85rem 1.5rem;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: background 0.2s; font-family: 'Inter', sans-serif;
  }
  .btn-add-detail:hover { background: var(--green-light); }
  .detail-note { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }

  /* CART DRAWER */
  .cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; display: none; }
  .cart-overlay.open { display: block; }
  .cart-drawer {
    position: fixed; right: 0; top: 0; bottom: 0; width: 420px; max-width: 100vw;
    background: var(--white); z-index: 201;
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.3s ease;
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  }
  .cart-drawer.open { transform: translateX(0); }
  .cart-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .cart-header h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; }
  .btn-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 0.25rem; }
  .btn-close:hover { color: var(--text); }
  .cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
  .cart-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
  .cart-empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
  .cart-item { display: flex; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
  .cart-item-img { width: 64px; height: 64px; background: var(--cream-dark); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0; }
  .cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
  .cart-item-name { font-size: 0.85rem; font-weight: 600; }
  .cart-item-cat { font-size: 0.72rem; color: var(--text-muted); }
  .cart-item-price { font-size: 0.9rem; font-weight: 700; }
  .cart-item-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; }
  .cart-qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .cart-qty-btn { background: none; border: none; width: 28px; height: 28px; cursor: pointer; font-size: 1rem; transition: background 0.15s; font-family: 'Inter', sans-serif; }
  .cart-qty-btn:hover { background: var(--cream-dark); }
  .cart-qty-val { width: 32px; text-align: center; font-size: 0.82rem; font-weight: 600; }
  .btn-remove { background: none; border: none; color: var(--text-light); font-size: 0.75rem; cursor: pointer; text-decoration: underline; font-family: 'Inter', sans-serif; }
  .btn-remove:hover { color: var(--red); }
  .cart-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
  .cart-total-row { display: flex; justify-content: space-between; margin-bottom: 1rem; }
  .cart-total-label { font-size: 0.9rem; color: var(--text-muted); }
  .cart-total-value { font-size: 1.2rem; font-weight: 700; }
  .btn-checkout {
    width: 100%; background: var(--green); color: var(--cream);
    border: none; border-radius: 4px; padding: 0.9rem;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    font-family: 'Inter', sans-serif; letter-spacing: 0.04em;
    transition: background 0.2s;
  }
  .btn-checkout:hover { background: var(--green-light); }

  /* CHECKOUT PAGE */
  .checkout-page { max-width: 900px; margin: 0 auto; padding: 2rem; }
  .checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .checkout-form { display: flex; flex-direction: column; gap: 1.25rem; }
  .form-group { display: flex; flex-direction: column; gap: 0.4rem; }
  .form-group label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
  .form-input, .form-select, .form-textarea {
    border: 1px solid var(--border); border-radius: 4px;
    padding: 0.65rem 0.85rem; font-size: 0.9rem;
    font-family: 'Inter', sans-serif; background: var(--white);
    transition: border-color 0.2s;
  }
  .form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--green); }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .payment-options { display: flex; flex-direction: column; gap: 0.5rem; }
  .payment-option { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: all 0.2s; }
  .payment-option:hover, .payment-option.selected { border-color: var(--green); background: rgba(45,74,62,0.04); }
  .payment-option input { accent-color: var(--green); }
  .payment-option .pay-label { font-size: 0.88rem; font-weight: 500; }
  .payment-option .pay-desc { font-size: 0.75rem; color: var(--text-muted); }

  .order-summary { background: var(--cream-dark); border-radius: 8px; padding: 1.5rem; height: fit-content; }
  .order-summary h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
  .order-item { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.6rem; gap: 1rem; }
  .order-item-name { flex: 1; }
  .order-divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
  .order-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; }
  .btn-send-whatsapp {
    width: 100%; margin-top: 1.25rem;
    background: #25D366; color: var(--white);
    border: none; border-radius: 4px; padding: 1rem;
    font-size: 0.95rem; font-weight: 700; cursor: pointer;
    font-family: 'Inter', sans-serif; letter-spacing: 0.03em;
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    transition: background 0.2s;
  }
  .btn-send-whatsapp:hover { background: #1ebe5a; }
  .whatsapp-icon { font-size: 1.2rem; }

  /* TOAST */
  .toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--green); color: var(--cream);
    border-radius: 6px; padding: 0.75rem 1.5rem;
    font-size: 0.88rem; font-weight: 500; z-index: 999;
    transition: transform 0.3s ease; white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  .toast.show { transform: translateX(-50%) translateY(0); }

  /* FOOTER */
  footer {
    background: var(--green); color: rgba(250,247,242,0.75);
    padding: 3rem 2rem 1.5rem; margin-top: 4rem;
  }
  .footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
  .footer-logo { font-family: 'Playfair Display', serif; color: var(--cream); font-size: 1.1rem; margin-bottom: 0.5rem; }
  .footer-tagline { font-size: 0.78rem; font-style: italic; margin-bottom: 1rem; }
  .footer-contact p { font-size: 0.82rem; margin-bottom: 0.3rem; }
  .footer-nav h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.75rem; }
  .footer-nav a { display: block; font-size: 0.82rem; color: rgba(250,247,242,0.75); text-decoration: none; margin-bottom: 0.4rem; cursor: pointer; }
  .footer-nav a:hover { color: var(--gold-light); }
  .footer-bottom { max-width: 1100px; margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid rgba(250,247,242,0.15); text-align: center; font-size: 0.75rem; }

  @media (max-width: 768px) {
    .products-page { flex-direction: column; padding: 1rem; }
    .sidebar { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .checkout-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .cart-drawer { width: 100%; }
    .nav-links { display: none; }
  }