/* ==================================================
   LUXURY CATALOG STYLING - catalogo.css
   ================================================== */

/* HERO SECTION */
.catalog-hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: 120px;
    background: radial-gradient(circle at 80% 20%, rgba(254, 252, 249, 0.9) 0%, rgba(245, 238, 226, 0.9) 100%), 
                url('https://images.unsplash.com/photo-1592945403244-b3fbafd7f539?q=80&w=1974&auto=format&fit=crop') center/cover no-repeat;
    border-bottom: 1px solid rgba(244, 154, 31, 0.1);
    border-radius: 0 0 50px 50px;
    margin-bottom: 40px;
    overflow: hidden;
}

/* Floating Scent Particles */
.particle-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(244, 154, 31, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatParticle 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.2; }
    50% { transform: translateY(-40px) translateX(20px) scale(1.2); opacity: 0.6; }
}

/* SEARCH COMPONENT (Amazon Style) */
.search-container {
    position: relative;
    max-width: 650px;
    margin: 2rem auto 0;
    z-index: 100;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i.search-icon {
    position: absolute;
    left: 1.5rem;
    color: #999;
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.2rem;
    border: 1px solid rgba(234, 226, 213, 0.8);
    border-radius: 50px;
    background: #ffffff;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    box-shadow: 0 10px 30px rgba(20, 15, 10, 0.05);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 15px 40px rgba(244, 154, 31, 0.12);
}

/* Floating autocomplete results */
.search-dropdown {
    position: absolute;
    top: 105%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(234, 226, 213, 0.7);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.search-dropdown.active {
    display: block;
    animation: slideUpFade 0.3s ease-out;
}

.search-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    padding: 1rem 1.5rem 0.5rem;
    border-bottom: 1px solid #f5f2eb;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #faf8f5;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item.selected, .search-item:hover {
    background: rgba(244, 154, 31, 0.05);
}

.search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.search-item-info {
    flex: 1;
}

.search-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.search-item-brand {
    font-size: 0.75rem;
    color: #888;
}

.search-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* SIDEBAR ACCORDIONS */
.filter-section {
    border-bottom: 1px solid #f5f2eb;
    padding: 1.2rem 0;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dark);
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem 0;
}

.filter-header i {
    transition: transform 0.3s ease;
}

.filter-header.active i {
    transform: rotate(180deg);
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0.5rem;
}

.filter-content.open {
    max-height: 350px;
    overflow-y: auto;
    opacity: 1;
}

/* Custom interactive checkboxes/buttons for filters */
.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.filter-checkbox-label:hover {
    color: var(--text-dark);
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    border-radius: 4px;
    cursor: pointer;
}

.filter-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #bbb;
    background: #fdfcf9;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #f2edd5;
}

/* Category Chips */
.filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0.5rem 0;
}

.filter-chip {
    padding: 6px 14px;
    background: #ffffff;
    border: 1.5px solid #eae2d5;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--text-dark);
    color: #fff;
    border-color: var(--text-dark);
}

/* LUXURY PRODUCT CARDS */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

.product-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(234, 226, 213, 0.6);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(20, 15, 10, 0.02);
    backdrop-filter: blur(5px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(20, 15, 10, 0.08);
    border-color: rgba(244, 154, 31, 0.25);
}

/* Card badges */
.card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 4px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    color: #fff;
}

.badge.badge-new { background: #2ec4b6; }
.badge.badge-best { background: var(--accent-primary); }
.badge.badge-exclusive { background: #9370db; }
.badge.badge-sale { background: #e63946; }
.badge.badge-low-stock { background: #ffa500; }

/* Card actions overlay */
.card-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
}

.card-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.card-action-btn:hover {
    background: var(--text-dark);
    color: #ffffff;
    transform: scale(1.1);
}

.card-action-btn.fav-btn.active i {
    color: #e63946;
    animation: heartBeat 0.4s ease-in-out;
}

.card-action-btn.compare-btn.active {
    background: var(--accent-primary);
    color: #ffffff;
}

/* Image Container */
.card-img-box {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s ease;
}

.product-card:hover .card-img-box {
    transform: scale(1.05);
}

/* Body Info */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #ffffff;
}

.card-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffa500;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.card-rating span {
    color: #888;
    font-size: 0.75rem;
    margin-left: 4px;
}

.card-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 1.2rem;
}

.card-meta-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #faf6f0;
    color: #8b7355;
    border: 1px solid #eae2d5;
}

.card-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 1.2rem;
}

.card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-old-price {
    font-size: 0.95rem;
    text-decoration: line-through;
    color: #bbb;
}

/* Buy Button */
.btn-buy-card {
    width: 100%;
    padding: 0.9rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-buy-card:hover {
    background: var(--accent-primary);
    box-shadow: 0 8px 20px rgba(244,154,31,0.2);
}

/* FLOATING COMPARATOR BAR */
.comparator-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    width: 90%;
    max-width: 800px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem 1.8rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.comparator-bar.active {
    transform: translateX(-50%) translateY(0);
}

.comparator-slots {
    display: flex;
    gap: 15px;
}

.comparator-slot {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    position: relative;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparator-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.comparator-slot .remove-slot {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e63946;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LUXURY QUICK VIEW MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 8, 5, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10500;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Sidebar Overlay defined globally to prevent desktop blocking issues */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 10550;
    display: none;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.quickview-modal {
    background: #fdfcf9;
    width: 90%;
    max-width: 900px;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    overflow: hidden;
    position: relative;
    transform: translateY(40px);
    transition: transform 0.4s ease;
    border: 1px solid rgba(244, 154, 31, 0.15);
}

.modal-overlay.active .quickview-modal {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-dark);
    z-index: 100;
    transition: transform 0.3s;
}

.modal-close-btn:hover {
    transform: rotate(90deg);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    min-height: 500px;
}

.modal-left {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border-right: 1px solid #f2edd5;
    position: relative;
}

.modal-right {
    padding: 3rem;
    overflow-y: auto;
    max-height: 600px;
}

/* OLFACTORY PYRAMID VISUAL */
.olfactory-pyramid {
    margin: 2rem 0;
    position: relative;
}

.pyramid-level {
    position: relative;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.pyramid-top {
    background: linear-gradient(135deg, #e0a96d 0%, #b8860b 100%);
    width: 60%;
    margin-left: 20%;
    text-align: center;
}

.pyramid-middle {
    background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
    width: 80%;
    margin-left: 10%;
}

.pyramid-bottom {
    background: linear-gradient(135deg, #5c4033 0%, #2f1d11 100%);
    width: 100%;
}

.level-name {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.level-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.level-chip {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* SKELETON LOADING */
.skeleton-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid #f2edd5;
}

.skeleton-box {
    background: linear-gradient(90deg, #f5f2eb 25%, #e9e2d3 50%, #f5f2eb 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 10px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* MOBILE BOTTOM BAR */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -5px 25px rgba(0,0,0,0.05);
    z-index: 9999;
    border-top: 1px solid #f0eae1;
    grid-template-columns: repeat(4, 1fr);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--accent-primary);
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 992px) {
    .catalog-main-layout {
        flex-direction: column;
    }
    
    .catalog-sidebar {
        display: none; /* Hidden on tablet/mobile by default - opened via Drawer */
    }
    
    .catalog-sidebar.active {
        display: block;
        position: fixed;
        top: 0; left: 0;
        width: 320px;
        height: 100vh;
        z-index: 10600;
        background: #ffffff;
        box-shadow: 20px 0 50px rgba(0,0,0,0.15);
        animation: slideInLeft 0.4s ease-out;
        overflow-y: auto;
    }



    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-left {
        border-right: none;
        border-bottom: 1px solid #f2edd5;
        padding: 2rem;
    }
    
    .modal-right {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: grid;
    }
    
    body {
        padding-bottom: 60px; /* Spacer for bottom nav */
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .comparator-bar {
        width: 95%;
        bottom: 75px; /* Offset for mobile bottom nav */
    }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

/* MOBILE SIDEBAR DRAWERS & BACKDROP */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 10550;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.mobile-close-sidebar-btn {
    display: none;
}

.mobile-filter-footer {
    display: none;
}

@media (max-width: 992px) {
    .mobile-close-sidebar-btn {
        display: block !important;
    }
    
    .mobile-filter-footer {
        display: block !important;
        position: sticky;
        bottom: -1.5rem;
        left: 0; right: 0;
        background: #ffffff;
        padding: 1rem 0;
        border-top: 1px solid #f5f2eb;
        margin-top: 1.5rem;
        z-index: 10;
    }
    
    .apply-filters-btn {
        width: 100%;
        padding: 12px;
        background: var(--accent-primary, #d4af37);
        color: #ffffff;
        border: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(212,175,55,0.2);
    }
    
    .apply-filters-btn:active {
        transform: scale(0.98);
    }
}

/* QUICKVIEW MOBILE OPTIMIZATIONS & SECONDARY BUTTON */
.btn-secondary-card:hover {
    background: var(--accent-primary);
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-start !important;
        padding: 10px !important;
        overflow-y: auto !important;
        display: none;
    }
    
    .modal-overlay.active {
        display: block !important;
    }
    
    .quickview-modal {
        width: 100% !important;
        margin: 40px auto !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        border-radius: 20px !important;
    }
    
    .modal-grid {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }
    
    .modal-left {
        padding: 1.5rem !important;
    }
    
    .modal-left img {
        max-height: 280px !important;
    }
    
    .modal-right {
        padding: 1.5rem !important;
    }
    
    /* Floating close button on mobile so it stays on screen */
    .modal-close-btn {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(5px) !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
        border: 1px solid #eae2d5 !important;
        font-size: 1.5rem !important;
        z-index: 10600 !important;
        padding: 0 !important;
        line-height: 1 !important;
        color: #111 !important;
    }
}
