/* ============================================================
   Rincón del Bosque — TIENDA (Cinematic Nature Premium)
   Depende de styles.css + cinematic.css (tokens forest)
   ============================================================ */

.shop-header { position: fixed; }
body { padding-top: 0; }

/* Botón carrito */
.btn-cart {
    position: relative;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(124,174,114,.3);
    background: rgba(255,255,255,.7);
    color: var(--forest-800, #0c3a27);
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition, all .3s ease);
}
.btn-cart:hover { background: var(--green-600,#16a34a); color:#fff; transform: translateY(-2px); }
.cart-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px;
    background: var(--gold, #d8b572); color: #07251a;
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    transform: scale(0); transition: transform .25s var(--ease-cine, cubic-bezier(.16,1,.3,1));
}
.cart-count.show { transform: scale(1); }

/* ===== HERO ===== */
.shop-hero {
    min-height: 62vh;
    display: flex; align-items: center;
    background-size: cover; background-position: center;
    position: relative; text-align: center;
    overflow: hidden;
}
.shop-hero-overlay {
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(4,20,11,0) 30%, rgba(4,20,11,.6) 100%),
        linear-gradient(180deg, rgba(4,20,11,.55), rgba(4,20,11,.35) 50%, rgba(4,20,11,.8));
}
.shop-hero-content {
    position: relative; z-index: 2;
    max-width: 760px; margin: 0 auto; padding: 120px 24px 70px; color: #fff;
}
.shop-hero h1 {
    font-family: var(--font-display, 'Fraunces', serif);
    font-weight: 500; line-height: 1.04;
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    text-shadow: 0 8px 40px rgba(0,0,0,.45);
    margin-bottom: 18px;
}
.shop-hero h1 span {
    font-style: italic;
    background: linear-gradient(100deg, var(--moss,#7cae72), var(--gold-soft,#efe0c2) 50%, var(--moss,#7cae72));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.shop-hero p { font-weight: 300; font-size: 1.1rem; color: rgba(255,255,255,.92); max-width: 600px; margin: 0 auto; }

/* ===== BARRA DE CONFIANZA ===== */
.trust-bar {
    background: linear-gradient(135deg, var(--forest-900,#07251a), var(--forest-800,#0c3a27));
    color: #cfe3c4;
    border-bottom: 1px solid rgba(124,174,114,.18);
}
.trust-bar-inner {
    max-width: 1200px; margin: 0 auto; padding: 16px 24px;
    display: flex; flex-wrap: wrap; gap: 14px 34px; justify-content: center;
    font-size: 13.5px; font-weight: 500;
}
.trust-bar-inner span { display: inline-flex; align-items: center; gap: 8px; }
.trust-bar-inner i { color: var(--gold,#d8b572); font-size: 16px; }

/* ===== FILTROS ===== */
.shop-filters {
    position: sticky; top: 70px; z-index: 80;
    background: rgba(251,253,251,.82);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(124,174,114,.16);
    padding: 14px 0;
}
.shop-filters .container { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(124,174,114,.32);
    background: #fff; color: var(--forest-800,#0c3a27);
    font-family: inherit; font-size: 13.5px; font-weight: 600;
    transition: var(--transition, all .3s ease);
}
.filter-chip:hover { border-color: var(--green-600,#16a34a); transform: translateY(-2px); }
.filter-chip.active {
    background: linear-gradient(135deg, var(--green-600,#16a34a), var(--forest-800,#0c3a27));
    color: #fff; border-color: transparent;
    box-shadow: 0 10px 24px -12px rgba(22,163,74,.7);
}

/* ===== GRID ===== */
.shop-main { padding: 56px 0 90px; background: linear-gradient(180deg, #fbfdfb, #f1f6f0); }
.shop-cat-block { margin-bottom: 64px; }
.shop-cat-block.hide { display: none; }
.shop-cat-head h2 {
    font-family: var(--font-display,'Fraunces',serif); font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--forest-950,#04140b);
    margin-bottom: 26px; display: flex; align-items: center; gap: 12px;
}
.shop-cat-head h2 i {
    color: var(--green-600,#16a34a);
    background: linear-gradient(135deg, rgba(124,174,114,.18), rgba(216,181,114,.18));
    width: 48px; height: 48px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 22px;
}
.products-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
}

/* Tarjeta producto */
.product-card {
    background: #fff; border-radius: 24px; overflow: hidden;
    border: 1px solid rgba(124,174,114,.16);
    box-shadow: 0 10px 30px -14px rgba(7,37,26,.25);
    display: flex; flex-direction: column;
    transition: transform .5s var(--ease-cine, cubic-bezier(.16,1,.3,1)), box-shadow .5s var(--ease-cine, cubic-bezier(.16,1,.3,1));
}
.product-card.hide { display: none; }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 28px 60px -28px rgba(7,37,26,.45); }
.product-img { position: relative; height: 200px; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-cine, cubic-bezier(.16,1,.3,1)); }
.product-card:hover .product-img img { transform: scale(1.08); }
.product-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    background: rgba(8,28,20,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    color: var(--gold-soft,#efe0c2); border: 1px solid rgba(216,181,114,.4);
    padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .4px;
}
.product-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--moss,#7cae72); margin-bottom: 6px; }
.product-body h3 { font-family: var(--font-display,'Fraunces',serif); font-weight: 500; font-size: 1.18rem; color: var(--forest-950,#04140b); margin-bottom: 8px; line-height: 1.25; }
.product-body p { font-size: .88rem; line-height: 1.6; color: #5a6b60; margin-bottom: 18px; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-price { font-family: var(--font-display,'Fraunces',serif); font-size: 1.35rem; font-weight: 600; color: var(--forest-800,#0c3a27); }
.product-price small { font-size: .65rem; color: #8aa; font-weight: 600; }
.btn-add {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--green-600,#16a34a), var(--forest-800,#0c3a27));
    color: #fff; border: none; cursor: pointer;
    padding: 10px 16px; border-radius: 999px; font-family: inherit; font-size: 13.5px; font-weight: 600;
    box-shadow: 0 10px 22px -12px rgba(22,163,74,.7); transition: var(--transition, all .3s ease);
}
.btn-add:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(22,163,74,.85); }
.btn-add.added { background: var(--gold,#d8b572); color: #07251a; }

/* ===== CARRITO DRAWER ===== */
.cart-overlay {
    position: fixed; inset: 0; z-index: 1100;
    background: rgba(4,20,11,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden; transition: opacity .35s ease;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
    position: fixed; top: 0; right: -440px; z-index: 1101;
    width: 410px; max-width: 92vw; height: 100vh;
    background: #fbfdfb; box-shadow: -20px 0 60px -20px rgba(7,37,26,.5);
    display: flex; flex-direction: column;
    transition: right .42s var(--ease-cine, cubic-bezier(.16,1,.3,1));
}
.cart-drawer.open { right: 0; }
.cart-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 24px; border-bottom: 1px solid rgba(124,174,114,.18);
    background: linear-gradient(135deg, var(--forest-900,#07251a), var(--forest-800,#0c3a27)); color: #fff;
}
.cart-head h3 { font-family: var(--font-display,'Fraunces',serif); font-weight: 500; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.cart-head h3 i { color: var(--gold,#d8b572); }
.cart-close { background: rgba(255,255,255,.12); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 16px; transition: background .2s; }
.cart-close:hover { background: rgba(255,255,255,.25); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 18px; }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(124,174,114,.14); }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: .95rem; color: var(--forest-900,#07251a); margin-bottom: 4px; }
.cart-item-price { font-size: .82rem; color: #6a7c70; }
.cart-item-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(124,174,114,.35); background: #fff; cursor: pointer; font-size: 15px; color: var(--forest-800,#0c3a27); display: flex; align-items: center; justify-content: center; transition: var(--transition, all .2s); }
.qty-btn:hover { border-color: var(--green-600,#16a34a); color: var(--green-600,#16a34a); }
.cart-item-qty { font-weight: 700; min-width: 20px; text-align: center; }
.cart-item-sub { font-family: var(--font-display,'Fraunces',serif); font-weight: 600; color: var(--forest-800,#0c3a27); white-space: nowrap; }
.cart-item-remove { background: none; border: none; color: #b04a3a; cursor: pointer; font-size: 13px; margin-left: 4px; }

.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #8aa; text-align: center; padding: 30px; }
.cart-empty i { font-size: 52px; color: rgba(124,174,114,.5); }
.cart-empty p { font-weight: 600; color: var(--forest-800,#0c3a27); font-size: 1.05rem; }
.cart-empty span { font-size: .85rem; }

.cart-foot { padding: 20px 22px 24px; border-top: 1px solid rgba(124,174,114,.18); background: #fff; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cart-total span { font-size: .9rem; color: #6a7c70; }
.cart-total strong { font-family: var(--font-display,'Fraunces',serif); font-size: 1.6rem; color: var(--forest-900,#07251a); }
.btn-checkout {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: #25d366; color: #fff; border: none; cursor: pointer;
    padding: 15px; border-radius: 14px; font-family: inherit; font-size: 15px; font-weight: 700;
    box-shadow: 0 12px 28px -12px rgba(37,211,102,.6); transition: var(--transition, all .3s);
}
.btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(37,211,102,.75); }
.cart-note { text-align: center; font-size: .76rem; color: #8aa; margin-top: 10px; }

/* Estados vacío/lleno */
.cart-drawer.has-items .cart-empty { display: none; }
.cart-drawer:not(.has-items) .cart-foot { display: none; }
.cart-drawer:not(.has-items) .cart-items { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .shop-filters { top: 60px; }
    #main-nav { display: none; }
    .trust-bar-inner { gap: 10px 18px; font-size: 12px; }
    .shop-hero { min-height: 52vh; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-body { padding: 14px; }
    .product-body p { display: none; }
    .product-foot { flex-direction: column; align-items: stretch; gap: 8px; }
    .btn-add { justify-content: center; }
}
