:root {
    --bg-color: #333333;
    --bg-dark: #000000;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #a0aec0;
    --nav-bg: rgba(0, 0, 0, 0.5);
    --card-bg: #222222;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-lighter: rgba(255, 255, 255, 0.05);
    --accent: #cba276;
    --overlay: #333333;
    --overlay-transparent: rgba(0, 0, 0, 0);
    --hover-bg: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --bg-dark: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.7);
    --card-bg: #ffffff;
    --border-light: rgba(0, 0, 0, 0.1);
    --border-lighter: rgba(0, 0, 0, 0.05);
    --accent: #b5814c;
    --overlay: #f8fafc;
    --overlay-transparent: rgba(255, 255, 255, 0);
    --hover-bg: rgba(0, 0, 0, 0.05);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    padding-bottom: 80px;
    /* Space for bottom nav on mobile */
    -webkit-font-smoothing: antialiased;
    opacity: 1;
}

main.content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body.fade-out {
    animation: fadeOut 0.25s ease-in-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Top Header */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--nav-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    position: fixed;
    top: 15px;
    left: 0;
    width: calc(100% - 10px);
    margin: 0 5px;
    z-index: 1000;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    font-family: 'Text Me One', sans-serif;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Top Icons */
.top-icons {
    display: flex;
    gap: 18px;
    align-items: center;
}

.top-icons a {
    color: var(--text-primary);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.top-icons a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.desktop-profile {
    display: none !important;
    /* Hidden on mobile */
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    /* Hidden on mobile */
}

/* Main Content */
.content {
    padding: 24px 5px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.2s;
}

.nav-dropdown:hover .nav-dropdown-toggle {
    color: var(--text-primary);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 10px 0;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.nav-dropdown-menu a:hover {
    background: var(--hover-bg);
    color: var(--accent);
}

/* Slider Container */
.slider-container {
    position: relative;
    width: 100%;
}

.slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slide {
    min-width: 100%;
    scroll-snap-align: center;
    position: relative;
}

.slide img {
    width: 100%;
    height: 60vh;
    min-height: 500px;
    object-fit: cover;
    display: block;
}

.slide-content {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    padding: 60px 20px 20px;
    /* Increased top padding to make the gradient spread further up */
    background: linear-gradient(to top, var(--overlay) 30%, var(--overlay-transparent));
}

.slide-content h2 {
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-weight: 800;
}

.slide-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Categories */
.categories-section {
    margin-bottom: 24px;
}

.categories-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.categories-wrapper::-webkit-scrollbar {
    display: none;
}

.category-item {
    padding: 8px 16px;
    background: var(--border-lighter);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s;
}

.category-item.active,
.category-item:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
}

/* Products Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.section-header a {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 30px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-lighter);
}

.product-image {
    position: relative;
    height: 160px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--nav-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.wishlist-btn:hover {
    color: var(--accent);
    background: var(--border-light);
}

.product-info {
    padding: 14px;
}

.product-info h3 {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 600;
}

.price {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.add-to-cart {
    width: 100%;
    background-color: var(--border-light);
    color: var(--text-primary);
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-to-cart:hover {
    background-color: var(--text-primary);
    color: var(--bg-dark);
}

/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 15px;
    width: calc(100% - 30px);
    background: var(--nav-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    gap: 5px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    padding: 8px 0;
    border-radius: 20px;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 6px;
    transition: transform 0.2s ease;
}

.nav-item.active,
.nav-item:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-item.active i,
.nav-item:hover i {
    transform: scale(1.1);
}

/* Desktop Adjustments (Tablet and Desktop) */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
        /* Remove bottom padding */
    }

    .bottom-nav {
        display: none;
        /* Hide bottom nav on desktop */
    }

    .desktop-nav {
        display: flex;
        gap: 32px;
    }

    .desktop-nav a {
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 600;
        font-size: 15px;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .desktop-nav a:hover,
    .desktop-nav a.active {
        color: var(--text-primary);
    }

    .desktop-profile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background-color: var(--card-bg);
        color: var(--text-primary) !important;
        margin-left: 8px;
    }

    .desktop-profile:hover {
        background-color: #444444;
    }
}

/* Hide desktop footer on mobile */
@media (max-width: 1023px) {
    .desktop-footer {
        display: none;
    }
}

/* Desktop Layout (Split Screen) */
@media (min-width: 1024px) {
    .desktop-layout {
        display: flex;
        gap: 0;
        padding: 0;
        max-width: 100%;
        margin: 0;
    }

    /* Slider adjustments for desktop */
    .slider-container {
        flex: 0 0 50%;
        max-width: 50%;
        position: sticky;
        top: 0;
        height: 100vh;
        border-radius: 0;
        overflow: hidden;
    }

    .slide img {
        height: 100vh;
        min-height: auto;
        border-radius: 0;
    }

    .slider-wrapper {
        height: 100vh;
    }

    /* Content adjustments for desktop */
    .content {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 100px 40px 40px;
    }

    /* Desktop Footer */
    .desktop-footer {
        display: block;
        background: var(--bg-dark);
        padding: 60px 20px;
        border-top: 1px solid var(--border-light);
        text-align: center;
        margin-top: 0;
        width: 100%;
        margin-left: 0;
    }

    .footer-content {
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-brand {
        font-family: 'Text Me One', sans-serif;
        font-size: 28px;
        font-weight: 800;
        color: var(--text-primary);
        margin-bottom: 15px;
    }

    .desktop-footer p {
        color: var(--text-muted);
        font-size: 14px;
    }

    .footer-links {
        margin-top: 24px;
        display: flex;
        justify-content: center;
        gap: 30px;
    }

    .footer-links a {
        color: var(--text-muted);
        text-decoration: none;
        font-size: 15px;
        transition: color 0.3s;
    }

    .footer-links a:hover {
        color: var(--text-primary);
    }
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -25px;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    border: 2px solid var(--bg-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.bottom-nav .cart-badge {
    top: 4px;
    right: calc(50% - 18px);
    border-color: var(--nav-bg);
}

.cart-badge.bounce {
    animation: badgeBounce 0.4s ease;
}

@keyframes badgeBounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

/* Product Page Styles */
.product-page-layout {
    padding-bottom: 40px;
}

.product-slider {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background: #000;
}

.product-slider-wrapper {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.product-slide {
    min-width: 100%;
    scroll-snap-align: center;
}

.product-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.slider-dots .dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

.product-details {
    padding: 24px;
    background: var(--bg-color);
    border-radius: 30px 30px 0 0;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.product-title-row h2 {
    font-size: 26px;
    font-weight: 800;
}

.wishlist-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.product-price {
    font-size: 24px;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 24px;
}

.product-section {
    margin-bottom: 24px;
}

.product-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 600;
}

.product-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.color-options {
    display: flex;
    gap: 12px;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.color-circle.active {
    border: 2px solid var(--accent) !important;
}

.size-options {
    display: flex;
    gap: 10px;
}

.size-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.size-btn.active {
    background: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
}

.product-main-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 16px;
    background: var(--text-primary);
    color: var(--bg-dark);
    margin-top: 10px;
}

@media (min-width: 1024px) {
    .product-details {
        margin-top: 40px;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }

    .product-slider {
        height: 70vh;
    }
}

/* Cart Page Styles */
.cart-page-layout {
    padding-top: 80px;
    padding-bottom: 40px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.cart-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cart-item {
    display: flex;
    gap: 16px;
    background: var(--card-bg);
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    position: relative;
    border: 1px solid var(--border-light);
}

.cart-item-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    padding-right: 30px;
    /* Space for trash icon */
}

.cart-item-variant {
    font-size: 12px;
    color: var(--text-secondary);
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--border-lighter);
    padding: 6px 10px;
    border-radius: 30px;
    border: 1px solid var(--border-light);
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
}

.qty-val {
    font-size: 14px;
    font-weight: 600;
}

.cart-item-remove {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: var(--accent);
}

.cart-summary {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.cart-summary h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-divider {
    height: 1px;
    background: var(--border-light);
    margin: 16px 0;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.checkout-btn {
    width: 100%;
    padding: 18px;
    background: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
}

.secure-checkout {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.secure-checkout i {
    margin-right: 4px;
}

@media (min-width: 1024px) {
    .cart-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .cart-items {
        flex: 2;
    }

    .cart-summary {
        flex: 1;
        position: sticky;
        top: 100px;
    }
}

/* Favorites Page Styles */
.favorites-page-layout {
    padding-top: 80px;
    padding-bottom: 40px;
}

.remove-favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #ff4757;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    z-index: 2;
}

[data-theme="dark"] .remove-favorite-btn {
    background: rgba(0, 0, 0, 0.7);
}

.remove-favorite-btn:hover {
    transform: scale(1.1);
}

/* Legacy Account Styles Removed */

/* -------------------------------- */
/* Products Page & Filters Styles   */
/* -------------------------------- */

.products-page-layout {
    display: flex;
    gap: 30px;
    padding-top: 100px;
    padding-bottom: 80px;
    align-items: flex-start;
}

.mobile-filter-btn {
    display: none;
    width: calc(100% - 30px);
    margin: 80px 15px 0;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 15px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    z-index: 10;
}

.filter-sidebar {
    flex: 0 0 250px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 20px;
    position: sticky;
    top: 90px;
    height: max-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    scrollbar-width: thin;
}

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

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-lighter);
}
.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.filter-list li {
    margin-bottom: 10px;
}
.filter-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.filter-list label:hover {
    color: var(--text-primary);
}
.filter-list input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.filter-list input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.filter-list input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    font-size: 11px;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}
.price-range input {
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}
.filter-color.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--accent);
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-size {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-size.active, .filter-size:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 71, 87, 0.05);
}

.apply-filters-btn {
    width: 100%;
    padding: 12px;
    background: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    margin-top: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}
.apply-filters-btn:hover {
    transform: translateY(-2px);
}

.products-area {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.products-header h2 {
    font-size: 22px;
    font-weight: 800;
}
.sort-dropdown select {
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn.active, .page-btn:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1005;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Adjustments for Filter */
@media (max-width: 1024px) {
    .products-page-layout {
        flex-direction: column;
        padding-top: 20px;
        padding-bottom: 100px; /* space for bottom nav */
    }
    .mobile-filter-btn {
        display: block;
    }
    .filter-sidebar {
        position: fixed;
        top: auto !important;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85vh;
        z-index: 1010;
        border-radius: 30px 30px 0 0;
        transform: translateY(100%);
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.4s;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    }
    .filter-sidebar.active {
        transform: translateY(0);
        visibility: visible;
    }
    .filter-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--border-light);
    }
    .filter-header-mobile h3 {
        font-size: 20px;
        font-weight: 800;
    }
    .close-filter-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 24px;
        cursor: pointer;
    }
    .products-header h2 {
        font-size: 18px;
    }
    .products-area {
        width: 100%;
    }
}

/* -------------------------------- */
/* Global Search Modal Styles       */
/* -------------------------------- */
.global-search-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 100px 20px 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.global-search-modal.active {
    opacity: 1;
    visibility: visible;
}
.search-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.2s;
}
.search-modal-close:hover {
    transform: scale(1.1);
}
.search-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}
.search-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}
.search-input-wrapper i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}
.search-input-wrapper input {
    width: 100%;
    padding: 20px 20px 20px 55px;
    border-radius: 30px;
    border: 2px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    outline: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: border-color 0.3s;
}
.search-input-wrapper input:focus {
    border-color: var(--accent);
}
.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}
.search-tag {
    padding: 8px 16px;
    background: var(--hover-bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.search-tag:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.search-tag i {
    margin-right: 5px;
    font-size: 12px;
}

/* -------------------------------- */
/* Notifications & Messages UI      */
/* -------------------------------- */
.list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}
.list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.list-item.unread {
    background: rgba(203, 162, 118, 0.05); /* very light accent bg */
    border-left: 4px solid var(--accent);
}
.list-item-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    flex-shrink: 0;
}
.list-item-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.list-item-content {
    flex: 1;
}
.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.list-item-header h4 {
    font-size: 15px;
    font-weight: 700;
}
.list-item-time {
    font-size: 12px;
    color: var(--text-muted);
}
.list-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.unread-badge {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

/* -------------------------------- */
/* WooCommerce Style Account Dashboard */
/* -------------------------------- */

.account-dashboard-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start;
}

/* Sidebar */
.account-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
}
.account-sidebar .account-profile {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}
.account-sidebar .profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(203, 162, 118, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 15px;
}
.account-sidebar .profile-info h2 {
    font-size: 18px;
    margin-bottom: 5px;
}
.account-sidebar .profile-info p {
    font-size: 13px;
    color: var(--text-muted);
}
.account-nav {
    display: flex;
    flex-direction: column;
}
.account-nav a {
    display: flex;
    align-items: center;
    padding: 30px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s;
}
.account-nav a:last-child {
    border-bottom: none;
}
.account-nav a i {
    width: 24px;
    font-size: 16px;
    color: var(--text-muted);
    margin-right: 10px;
    transition: color 0.2s;
}
.account-nav a:hover, .account-nav a.active {
    background: transparent;
    color: var(--accent);
}
.account-nav a:hover i, .account-nav a.active i {
    color: var(--accent);
}
.account-nav a.logout {
    color: #ff4757;
}
.account-nav a.logout i {
    color: #ff4757;
}

/* Main Content Area */
.account-content {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 30px;
}

/* Tabs Logic */
.account-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    width: 100%;
}
.account-tab-content.active {
    display: block;
}

/* Dashboard Tab */
.dashboard-welcome {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}
.dashboard-welcome strong {
    color: var(--text-primary);
}
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.dashboard-stat-card {
    padding: 20px;
    background: var(--hover-bg);
    border-radius: 12px;
    text-align: center;
}
.dashboard-stat-card .stat-icon {
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 10px;
}
.dashboard-stat-card .stat-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 5px;
}
.dashboard-stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Orders Tab */
.orders-table-wrapper {
    overflow-x: auto;
}
.orders-table {
    width: 100%;
    border-collapse: collapse;
}
.orders-table th, .orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}
.orders-table th {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.order-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}
.order-status.processing { background: rgba(203, 162, 118, 0.1); color: var(--accent); }
.order-status.completed { background: rgba(46, 213, 115, 0.1); color: #2ed573; }
.order-status.cancelled { background: rgba(255, 71, 87, 0.1); color: #ff4757; }
.btn-view-order {
    padding: 6px 15px;
    background: var(--nav-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-view-order:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Addresses Tab */
.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.address-card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 25px;
    position: relative;
}
.address-card h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.address-card h3 i {
    color: var(--accent);
}
.address-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.edit-address-btn {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.edit-address-btn:hover {
    text-decoration: underline;
}
.address-card.add-new {
    border: 2px dashed var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    text-decoration: none;
    min-height: 200px;
}
.address-card.add-new:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(203, 162, 118, 0.05);
}
.address-card.add-new i {
    font-size: 32px;
    margin-bottom: 10px;
}
.address-card.add-new span {
    font-size: 15px;
    font-weight: 600;
}

/* Settings Tab (Form) */
.account-form {
    width: 100%;
}
.form-row {
    display: flex;
    gap: 20px;
}
.form-row .form-group {
    flex: 1;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}
.account-form h3 {
    margin: 30px 0 20px;
    font-size: 18px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}
.btn-save {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-save:hover {
    background: #b5814c;
}

.mobile-back-btn {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .account-dashboard-wrapper {
        flex-direction: column;
    }
    .account-sidebar {
        width: 100%;
        animation: fadeIn 0.3s ease;
    }
    .address-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Mobile Transition Logic */
    .account-content {
        display: none;
        padding: 20px 0;
        border: none;
        background: transparent;
    }
    .account-dashboard-wrapper.mobile-view-active .account-sidebar {
        display: none;
    }
    .account-dashboard-wrapper.mobile-view-active .account-content {
        display: block;
        width: 100%;
        animation: fadeIn 0.3s ease;
    }
    .mobile-back-btn {
        display: flex;
    }

    /* Responsive Orders Table (Card View) */
    .orders-table, .orders-table tbody, .orders-table tr, .orders-table td {
        display: block;
        width: 100%;
    }
    .orders-table thead {
        display: none;
    }
    .orders-table tr {
        background: var(--card-bg);
        border: 1px solid var(--border-light);
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
    }
    .orders-table td {
        border-bottom: none;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }
    .orders-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 13px;
        text-align: left;
    }
}