:root {
    --primary: #D4A574;
    --primary-dark: #B8956A;
    --secondary: #2C3E50;
    --accent: #E8C4A0;
    --dark: #1A1A1A;
    --light: #FAFAFA;
    --gray: #6B7280;
    --gradient-1: linear-gradient(135deg, #D4A574 0%, #E8C4A0 100%);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Poppins', sans-serif; background: var(--light); color: var(--dark); }
h1,h2,h3,h4 { font-family:'Playfair Display', serif; }
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* Header */
.header { position:fixed; top:0; left:0; right:0; z-index:1000; background:rgba(255,255,255,0.96); backdrop-filter:blur(16px); padding:1rem 5%; display:flex; justify-content:space-between; align-items:center; box-shadow:0 2px 20px rgba(0,0,0,0.05); }
.logo { font-family:'Playfair Display', serif; font-size:1.8rem; font-weight:700; color:var(--primary); text-decoration:none; display:flex; align-items:center; gap:0.6rem; white-space:nowrap; max-width:70%; overflow:hidden; }
.logo-icon{width:44px;height:44px;min-width:44px;aspect-ratio:1;background:white;border:2px solid rgba(212,165,116,0.15);border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--primary);font-size:1.2rem;overflow:hidden;flex-shrink:0;box-shadow:0 2px 8px rgba(0,0,0,0.06)}
.logo-icon img{width:100%;height:100%;object-fit:cover;object-position:center;display:block}
.logo-icon i{font-size:1.1rem}
.logo-text{overflow:hidden;text-overflow:ellipsis;line-height:1}
@media (max-width:480px){ .logo{font-size:1.15rem;gap:0.45rem;max-width:62%} .logo-icon{width:36px;height:36px;min-width:36px} }
.nav-menu{display:flex;gap:2rem;list-style:none}
.nav-menu a{color:var(--dark);text-decoration:none;font-weight:500;position:relative;padding:.2rem 0}
.nav-menu a::after{content:'';position:absolute;bottom:-4px;left:0;width:0;height:2px;background:var(--primary);transition:width .3s}
.nav-menu a:hover::after,.nav-menu a.active::after{width:100%}
.header-actions{display:flex;gap:1rem;align-items:center}
.cart-btn{position:relative;background:none;border:none;font-size:1.3rem;color:var(--dark);cursor:pointer}
.cart-count{position:absolute;top:-6px;right:-6px;background:var(--primary);color:white;font-size:.7rem;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.mobile-toggle{display:none;background:none;border:none;font-size:1.5rem;cursor:pointer}

/* Page header — con logo */
.page-header{padding:8rem 5% 3rem;background:linear-gradient(135deg,#FFF8F3 0%,#FEF6F0 100%);text-align:center}
.shop-logo-wrap{display:flex;justify-content:center;margin-bottom:1rem}
.shop-header-logo{width:88px;height:88px;border-radius:50%;object-fit:cover;object-position:center;border:3px solid white;box-shadow:0 8px 24px rgba(212,165,116,0.25), 0 2px 8px rgba(0,0,0,0.06);background:white}
.page-header h1{font-size:clamp(2rem,5vw,2.8rem);margin-bottom:.6rem}
.breadcrumb{display:flex;justify-content:center;gap:.5rem;font-size:.9rem;color:var(--gray)}
.breadcrumb a{color:var(--primary);text-decoration:none}
@media (max-width:768px){ .shop-header-logo{width:72px;height:72px} .page-header{padding:6.5rem 4% 2rem} }
@media (max-width:480px){ .shop-header-logo{width:64px;height:64px} }

/* Topbar */
.shop-topbar{padding:1.2rem 5%;background:white;border-bottom:1px solid #eee;position:sticky;top:72px;z-index:900}
.topbar-form{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;justify-content:space-between}
.topbar-left{display:flex;gap:.7rem;align-items:center;flex:1;min-width:280px}
.topbar-right{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap}
.search-box-top{position:relative;flex:1;max-width:520px;min-width:220px;display:flex;align-items:center}
.search-box-top .search-icon{position:absolute;left:.9rem;color:var(--gray);font-size:.9rem;pointer-events:none}
.search-box-top input{width:100%;padding:.85rem 2.4rem .85rem 2.2rem;border:2px solid #eee;border-radius:50px;font-size:.95rem;outline:none;transition:border-color .2s;background:#FAFAFA}
.search-box-top input:focus{border-color:var(--primary);background:white}
.clear-search{position:absolute;right:.5rem;width:30px;height:30px;border:none;background:#eee;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--gray)}
.clear-search:hover{background:var(--primary);color:white}
.filter-toggle-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.1rem;border:2px solid var(--primary);background:white;color:var(--primary);border-radius:50px;font-weight:600;cursor:pointer;transition:all .2s;white-space:nowrap}
.filter-toggle-btn:hover{background:var(--primary);color:white}
.filter-badge-count{background:var(--primary);color:white;font-size:.7rem;min-width:18px;height:18px;border-radius:99px;display:inline-flex;align-items:center;justify-content:center;padding:0 .35rem}
.filter-toggle-btn:hover .filter-badge-count{background:white;color:var(--primary)}
.products-count-pill{font-size:.9rem;color:var(--gray);background:#FAFAFA;padding:.5rem .9rem;border-radius:50px;border:1px solid #eee}
.products-count-pill strong{color:var(--dark)}
.sort-select-wrap{position:relative;display:flex;align-items:center}
.sort-select-wrap select{appearance:none;padding:.7rem 2rem .7rem 1rem;border:2px solid #eee;border-radius:50px;background:white;font-size:.9rem;cursor:pointer;outline:none;min-width:170px}
.sort-select-wrap select:focus{border-color:var(--primary)}
.sort-select-wrap i{position:absolute;right:.8rem;pointer-events:none;color:var(--gray);font-size:.75rem}

/* Active chips */
.active-filters-bar{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.8rem 5%;background:#FFF8F3;border-bottom:1px solid #FDE68A;flex-wrap:wrap}
.active-filters-bar .chips{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.chip{display:inline-flex;align-items:center;gap:.4rem;background:white;border:1px solid #E5E7EB;padding:.35rem .7rem;border-radius:50px;font-size:.8rem;color:var(--secondary);box-shadow:0 1px 4px rgba(0,0,0,.04)}
.chip a{color:var(--gray);text-decoration:none;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#F3F4F6;font-size:.65rem}
.chip a:hover{background:var(--primary);color:white}
.clear-filters-link{font-size:.85rem;color:var(--primary);text-decoration:none;font-weight:600;display:inline-flex;align-items:center;gap:.3rem;white-space:nowrap}
.clear-filters-link:hover{color:var(--primary-dark)}

/* Shop layout */
.shop-container{padding:2rem 5% 4rem;display:grid;grid-template-columns:280px 1fr;gap:2rem;align-items:start}
.shop-sidebar{background:white;padding:1.5rem;border-radius:20px;height:fit-content;position:sticky;top:155px;box-shadow:0 4px 20px rgba(0,0,0,.04);border:1px solid #f3f4f6;max-height:calc(100vh - 170px);overflow-y:auto}
.shop-sidebar::-webkit-scrollbar{width:6px}
.shop-sidebar::-webkit-scrollbar-thumb{background:#E5E7EB;border-radius:99px}
.sidebar-header-mobile{display:none;justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #eee}
.sidebar-header-mobile h3{font-size:1.1rem;display:flex;align-items:center;gap:.5rem}
.close-filters{background:none;border:none;font-size:1.3rem;cursor:pointer;color:var(--gray);width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.close-filters:hover{background:#F3F4F6}
.sidebar-section{margin-bottom:1.6rem;padding-bottom:1.4rem;border-bottom:1px solid #f3f4f6}
.sidebar-section:last-of-type{border-bottom:none}
.sidebar-section h4{font-size:.95rem;margin-bottom:.9rem;padding-bottom:.4rem;border-bottom:2px solid var(--primary);display:flex;align-items:center;gap:.4rem}
.filter-checkbox-list{display:flex;flex-direction:column;gap:.45rem;max-height:220px;overflow-y:auto}
.filter-checkbox{display:flex;align-items:center;gap:.6rem;padding:.45rem .5rem;border-radius:10px;cursor:pointer;transition:background .15s;font-size:.9rem}
.filter-checkbox:hover{background:#FFF8F3}
.filter-checkbox.checked{background:rgba(212,165,116,.12)}
.filter-checkbox input{accent-color:var(--primary);width:16px;height:16px}
.filter-checkbox .label-text{flex:1}
.price-inputs{display:flex;align-items:flex-end;gap:.5rem}
.price-field{flex:1;display:flex;flex-direction:column;gap:.25rem}
.price-field label{font-size:.7rem;text-transform:uppercase;letter-spacing:.5px;color:var(--gray);font-weight:600}
.price-field input{padding:.6rem .7rem;border:2px solid #eee;border-radius:10px;font-size:.9rem;outline:none;width:100%}
.price-field input:focus{border-color:var(--primary)}
.price-sep{padding-bottom:.7rem;color:var(--gray)}
.range-slider-wrap{margin-top:.8rem;position:relative;height:18px}
.range-slider-wrap input[type="range"]{position:absolute;left:0;right:0;width:100%;appearance:none;background:transparent;pointer-events:none}
.range-slider-wrap input[type="range"]::-webkit-slider-runnable-track{height:4px;background:#E5E7EB;border-radius:99px}
.range-slider-wrap input[type="range"]::-webkit-slider-thumb{appearance:none;width:16px;height:16px;background:var(--primary);border-radius:50%;cursor:pointer;pointer-events:auto;margin-top:-6px;box-shadow:0 1px 6px rgba(0,0,0,.15)}
.toggle-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;font-size:.9rem}
.switch{position:relative;display:inline-block;width:44px;height:24px;flex-shrink:0}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;inset:0;background:#E5E7EB;border-radius:99px;transition:.2s}
.slider:before{content:"";position:absolute;height:18px;width:18px;left:3px;bottom:3px;background:white;border-radius:50%;transition:.2s;box-shadow:0 1px 4px rgba(0,0,0,.15)}
.switch input:checked + .slider{background:var(--primary)}
.switch input:checked + .slider:before{transform:translateX(20px)}
.sidebar-actions{margin-top:1rem}
.btn{padding:.7rem 1.2rem;border-radius:50px;border:none;font-weight:600;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:.4rem;transition:all .2s;font-size:.9rem}
.btn-primary{background:var(--gradient-1);color:white;box-shadow:0 4px 12px rgba(212,165,116,.25)}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(212,165,116,.3)}
.btn-secondary{background:white;color:var(--dark);border:2px solid #eee}
.btn-secondary:hover{border-color:var(--primary);color:var(--primary)}

/* Overlay */
.filter-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:all .25s;z-index:1200}
.filter-overlay.open{opacity:1;visibility:visible}

/* Main */
.shop-main{min-width:0}
.products-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.2rem;font-size:.9rem;color:var(--gray);flex-wrap:wrap;gap:.5rem}
.products-page{font-size:.8rem;background:white;padding:.3rem .7rem;border-radius:50px;border:1px solid #eee}
.products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1.2rem}
.product-card{background:white;border-radius:20px;overflow:hidden;transition:all .3s;box-shadow:0 5px 20px rgba(0,0,0,.04);border:1px solid #f3f4f6;display:flex;flex-direction:column}
.product-card:hover{transform:translateY(-6px);box-shadow:0 16px 32px rgba(0,0,0,.08)}
.product-image{position:relative;height:260px;overflow:hidden;background:#fafafa}
.product-image img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.product-card:hover .product-image img{transform:scale(1.06)}
.product-badge{position:absolute;top:.8rem;left:.8rem;background:var(--primary);color:white;padding:.3rem .7rem;border-radius:50px;font-size:.7rem;font-weight:700;letter-spacing:.3px}
.product-actions{position:absolute;top:.8rem;right:.8rem;display:flex;flex-direction:column;gap:.4rem;opacity:0;transform:translateX(10px);transition:all .25s}
.product-card:hover .product-actions{opacity:1;transform:translateX(0)}
.product-action-btn{width:36px;height:36px;background:white;border:none;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.1);color:var(--dark);transition:all .2s;font-size:.85rem}
.product-action-btn:hover{background:var(--primary);color:white}
.product-info{padding:1rem 1.1rem 1.2rem;flex:1;display:flex;flex-direction:column;gap:.3rem}
.product-category{font-size:.7rem;color:var(--primary);font-weight:600;text-transform:uppercase;letter-spacing:.6px}
.product-name{font-size:.98rem;margin:0;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.product-name a{color:var(--dark);text-decoration:none}
.product-name a:hover{color:var(--primary)}
.product-price{display:flex;align-items:center;gap:.6rem;margin-top:.2rem}
.current-price{font-size:1.1rem;font-weight:700;color:var(--primary)}
.old-price{font-size:.85rem;color:var(--gray);text-decoration:line-through}

/* Pagination */
.pagination{display:flex;justify-content:center;gap:.4rem;margin-top:2.5rem;flex-wrap:wrap}
.pagination a,.pagination span{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:50%;text-decoration:none;color:var(--dark);font-size:.9rem;transition:all .2s;background:white;border:1px solid #eee}
.pagination a:hover,.pagination a.active{background:var(--primary);color:white;border-color:var(--primary)}
.pagination span{background:transparent;border:none;width:auto;padding:0 .3rem}

/* Empty */
.empty-state{text-align:center;padding:3.5rem 1.5rem;background:white;border-radius:20px;border:1px dashed #E5E7EB}
.empty-state i{font-size:3rem;color:#E5E7EB;margin-bottom:1rem;display:block}
.empty-state h3{font-size:1.4rem;margin-bottom:.4rem}
.empty-state p{color:var(--gray);margin-bottom:1.2rem}

/* Responsive */
@media (max-width: 1024px){
    .filter-toggle-btn{display:inline-flex} /* show filter button only on mobile */
    .shop-container{grid-template-columns:1fr}
    .shop-sidebar{position:fixed;top:0;right:0;bottom:0;width:min(360px, 90vw);z-index:1300;border-radius:0;max-height:100vh;transform:translateX(100%);transition:transform .28s ease;overflow-y:auto;padding-top:1.2rem}
    .shop-sidebar.open{transform:translateX(0)}
    .sidebar-header-mobile{display:flex}
    .shop-topbar{top:68px;padding:.9rem 4%}
}
@media (min-width:1025px){
    .filter-toggle-btn{display:none} /* sidebar is always visible in grid on desktop */
    .shop-sidebar .sidebar-header-mobile{display:none}
}
@media (max-width: 768px){
    .page-header{padding:6.5rem 4% 2rem}
    .shop-topbar{padding:.8rem 4%}
    .topbar-left{flex-wrap:wrap}
    .search-box-top{max-width:none}
    .sort-select-wrap select{min-width:150px}
    .active-filters-bar{padding:.7rem 4%}
    .shop-container{padding:1.2rem 4% 3rem;gap:1rem}
    .products-grid{grid-template-columns:repeat(2,1fr);gap:.7rem}
    .product-image{height:170px}
    .product-info{padding:.7rem .8rem .9rem}
    .product-name{font-size:.88rem;min-height:2.4em}
    .current-price{font-size:1rem}
    .product-badge{font-size:.65rem;padding:.25rem .55rem}
    .product-actions{opacity:1;transform:none;flex-direction:row;top:auto;bottom:.6rem;right:.6rem}
    .product-action-btn{width:32px;height:32px;font-size:.8rem}
}
@media (max-width: 480px){
    .products-grid{grid-template-columns:repeat(2,1fr);gap:.6rem}
    .product-image{height:150px}
    .topbar-form{gap:.6rem}
}
@media (max-width: 360px){
    .products-grid{grid-template-columns:1fr}
    .product-image{height:200px}
}

/* legacy mobile menu keep compat */
.category-chips{display:none}
.mobile-menu{display:none}
