/* Drawer and Overlay Styles */
body {
    transition: background-color 0.3s, color 0.3s;
}

.product-card {
    background: var(--bg-secondary);
}

.cart-drawer, .drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background-color: var(--bg-main);
    z-index: 105;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.drawer.right {
    right: 0;
}

.drawer.active {
    transform: translateX(0);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.drawer-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background-color: var(--primary-color);
    color: var(--bg-main);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(100%);
    opacity: 0;
    transition: 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
}

.icon-link {
    position: relative;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-main);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters {
    display: flex;
    gap: 1rem;
}

.search-input, .category-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-main);
    color: var(--text-main);
}

.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-secondary);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    box-shadow: var(--shadow-md);
    z-index: 2;
    cursor: pointer;
    transition: var(--transition);
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.product-img-wrapper {
    position: relative;
    display: block;
}


/* Pricing Styles */
.price-section {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.95rem;
}

.discount-price {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.3rem;
}

.discount-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 1;
}

/* Product Card Enhancements */
.product-card {
    position: relative;
}

.product-card .product-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.product-card .product-img-wrapper img {
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

/* Mobile Menu Styles */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translateY(12px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-12px);
}

.mobile-menu {
    position: fixed;
    left: 0;
    top: 60px;
    width: 250px;
    max-width: 80vw;
    height: calc(100vh - 60px);
    background-color: var(--bg-main);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-menu-link {
    padding: 1rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: 0.3s ease;
}

.mobile-menu-link:hover {
    background-color: var(--bg-secondary);
    padding-left: 2rem;
    color: var(--accent-color);
}

/* Dark Mode Mobile Menu */
body.dark-mode .hamburger-menu span {
    background-color: #f1f5f9;
}

body.dark-mode .mobile-menu-header h3 {
    color: #f1f5f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .header-content {
        gap: 1rem;
    }

    .logo {
        flex: 1;
        text-align: center;
    }

    .cart-drawer, .drawer {
        width: 90vw;
        max-width: 350px;
    }

    .shop-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filters {
        flex-direction: column;
    }

    .search-input, .category-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        max-width: 100vw;
    }

    .header-actions {
        gap: 0.75rem;
    }

    .icon-link {
        font-size: 1.1rem;
    }

    .cart-drawer, .drawer {
        width: 100%;
    }

    .product-card {
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}