/* ============================================= */
/*          PRODUCTS PAGE LAYOUT                 */
/* ============================================= */

.products-page-main {
    padding-top: 180px;
    min-height: calc(100vh - 200px);
    padding-bottom: 100px;
}

.products-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.products-header {
    margin-bottom: 50px;
    text-align: center;
}

.products-header .breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--deep-teal);
    opacity: 0.7;
}

.products-header .breadcrumb a {
    color: var(--deep-teal);
    text-decoration: none;
    transition: opacity 0.3s;
}

.products-header .breadcrumb a:hover {
    opacity: 1;
}

.page-title {
    font-size: 3.5rem;
    font-family: var(--font-headline);
    color: var(--deep-teal);
    margin-bottom: 15px;
    font-weight: 500;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--deep-teal);
    font-weight: 400;
}

/* ============================================= */
/*          CONTROLS & FILTERS BAR               */
/* ============================================= */

.products-controls {
    display: flex;
    justify-content: right;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(2, 74, 88, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.controls-left {
    display: none;
    align-items: center;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--deep-teal);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
}

.filter-toggle-btn:hover {
    background: var(--mid-teal);
    transform: translateY(-2px);
}

.results-count {
    font-size: 0.95rem;
    color: var(--deep-teal);
    font-weight: 500;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-container label {
    font-size: 0.95rem;
    color: var(--deep-teal);
    font-weight: 500;
}

.sort-container select {
    padding: 10px 15px;
    border: 1px solid rgba(2, 74, 88, 0.2);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--deep-teal);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s;
    font-weight: 500;
    backdrop-filter: blur(15px);
}

.sort-container select:focus {
    outline: none;
    border-color: var(--deep-teal);
}

.view-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(2, 74, 88, 0.2);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    color: var(--deep-teal);
    cursor: pointer;
    transition: all 0.3s;
}

.view-toggle:hover {
    background: var(--sky-blue);
    border-color: var(--deep-teal);
}

.view-toggle.active {
    background: var(--deep-teal);
    color: white;
    border-color: var(--deep-teal);
}

/* ============================================= */
/*          PRODUCTS GRID & SIDEBAR              */
/* ============================================= */

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    position: relative;
}

.products-sidebar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    height: fit-content;
    position: relative;
    box-shadow: 0 4px 20px rgba(2, 74, 88, 0.08);
}

.products-sidebar::-webkit-scrollbar {
    width: 0px !important;
    height: 0px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(2, 74, 88, 0.1);
}

.sidebar-header h3 {
    font-size: 1.5rem;
    font-family: var(--font-headline);
    color: var(--deep-teal);
}

.close-filters {
    display: none;
    background: none;
    border: none;
    color: var(--deep-teal);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.filter-section {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(2, 74, 88, 0.1);
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    font-weight: 600;
    color: var(--deep-teal);
    margin-bottom: 5px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.search-filter {
    position: relative;
}

.search-filter input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid rgba(2, 74, 88, 0.2);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--deep-teal);
    transition: border-color 0.3s;
}

.search-filter input:focus {
    outline: none;
    border-color: var(--deep-teal);
}

.search-filter i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mid-teal);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.3s;
}

.filter-option:hover {
    color: var(--deep-teal);
}

.filter-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--deep-teal);
}

.filter-option span:first-of-type {
    flex: 1;
    font-size: 0.95rem;
    color: var(--deep-teal);
}

.filter-count {
    font-size: 0.85rem;
    color: var(--mid-teal);
    background: rgba(2, 74, 88, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.price-filter {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-inputs input {
    width: 102px;
    padding: 10px 12px;
    border: 1px solid rgba(2, 74, 88, 0.2);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--deep-teal);
}

.price-inputs input:focus {
    outline: none;
    border-color: var(--deep-teal);
}

.price-inputs span {
    color: var(--mid-teal);
    font-weight: 500;
}

.clear-filters-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(2, 74, 88, 0.3);
    border-radius: 6px;
    color: var(--deep-teal);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-filters-btn:hover {
    background: rgba(2, 74, 88, 0.05);
    border-color: var(--deep-teal);
}

/* ============================================= */
/*          PRODUCTS CONTENT & CARDS             */
/* ============================================= */

.products-content {
    min-height: 500px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 20px;
}

.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(2, 74, 88, 0.08);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(2, 74, 88, 0.15);
}

.products-grid.list-view .product-card {
    flex-direction: row;
    max-height: 300px;
}

.product-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: var(--off-white);
}

.products-grid.list-view .product-card-image {
    padding-top: 0;
    width: 300px;
    height: 300px;
    flex-shrink: 0;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--deep-teal);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-card-badge.new {
    background: #10b981;
}

.product-card-badge.bestseller {
    background: #f59e0b;
}

.product-card-badge.limited {
    background: #ef4444;
}

.product-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-card-actions {
    opacity: 1;
}

.product-card-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--deep-teal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    pointer-events: all;
}

.product-card-action-btn:hover {
    background: var(--deep-teal);
    color: white;
    transform: scale(1.1);
}

.product-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.products-grid.list-view .product-card-info {
    padding: 30px;
    justify-content: center;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-teal);
    margin-bottom: 8px;
    font-family: var(--font-body);
}

.product-card-subtitle {
    font-size: 0.9rem;
    color: var(--mid-teal);
    margin-bottom: 12px;
    height: 40px !important;
    overflow: hidden;
}

.product-card-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--deep-teal);
    font-family: var(--font-headline);
}

.no-results-products {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.no-results-products.show {
    display: block;
}

.no-results-products i {
    font-size: 4rem;
    color: var(--mid-teal);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results-products h3 {
    font-size: 1.5rem;
    color: var(--deep-teal);
    margin-bottom: 10px;
}

.no-results-products p {
    color: var(--mid-teal);
    margin-bottom: 30px;
}

/* ============================================= */
/*          UTILITIES & MODALS                   */
/* ============================================= */

.active-nav {
    color: var(--deep-teal) !important;
    font-weight: 600 !important;
    position: relative;
    background: rgba(2, 74, 88, 0.15) !important;
}

.active-nav::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: var(--deep-teal);
}

#productModal.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#productModal.modal-overlay.active {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

 .modal-close {
    position: sticky;
    top:0;
    margin-bottom: -35px;
    left: 100%;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--deep-teal);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 110;
}

@media (max-width: 768px) {
    .modal-close {
        margin-top: -15px;
    }
}

@media (max-width: 1024px) {
    .modal-close {
        right: 10px;
        top: 10px;
    }
}

.modal-close:hover {
    background: var(--deep-teal);
    color: white;
    transform: rotate(90deg);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--off-white);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================= */
/*          FOOTER STYLES                        */
/* ============================================= */

.site-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 260px;
}

.footer-logo {
    height: 48px;
    display: block;
    margin-bottom: 8px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 6px;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

/* ============================================= */
/*          RESPONSIVE STYLES                    */
/* ============================================= */

@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 2000;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }

    .products-sidebar.open {
        left: 0;
    }

    .close-filters {
        display: block;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .products-grid.list-view .product-card {
        flex-direction: column;
        max-height: none;
    }

    .products-grid.list-view .product-card-image {
        width: 100%;
        height: 300px;
    }

    .price-inputs {
        gap: 10px;
    }

    .price-inputs input {
        width: 115px;
    }
}

@media (max-width: 768px) {
    .products-page-main {
        padding-top: 140px;
    }

    .products-container {
        padding: 0 20px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .products-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .controls-left {
        display: flex;
        gap: 10px;
    }

    .controls-right {
        width: 100%;
        justify-content: space-between;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-card-info {
        padding: 15px;
    }

    .product-card-title {
        font-size: 1rem;
    }

    .product-card-price {
        font-size: 1.1rem;
    }
    
    .site-footer .footer-inner {
        flex-direction: column;
        gap: 18px;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (min-width: 1025px) {
    .sidebar-overlay {
        display: none !important;
    }
}
