/* Shop Page Styles - Blinkit/Swiggy Style */

/* CSS Variables */
:root {
    --primary-color: #275559;
    --primary-dark: #1e3d40;
    --secondary-color: #6c5ce7;
    --accent-color: #fd79a8;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-light: #b2bec3;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f2f6;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --border-radius-large: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}


/* Shop Header */
.shop-header {
    background: #275559;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1001; /* Higher than navigation bar */
    border-bottom: 1px solid rgba(0, 212, 170, 0.1);
    transition: var(--transition);
}

/* Shop Navigation Bar - Fixed Position */
.shop-nav {
    background: rgba(240, 242, 245, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999; /* Lower than header but higher than content */
    transition: all 0.3s ease;
    will-change: transform;
}

/* Shop page specific: Navigation bar stays fixed, doesn't move with header */
.shop-page .shop-nav.hidden {
    transform: none; /* Stay in fixed position */
}

.shop-nav.scrolled {
    background: rgba(240, 242, 245, 0.98);
    backdrop-filter: blur(25px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(39, 85, 89, 0.08);
    color: #275559;
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(39, 85, 89, 0.12);
    color: #275559;
    font-weight: 600;
}

.nav-link svg {
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-link:hover svg {
    transform: scale(1.1);
}

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

.nav-dropdown::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0.5rem; /* Bridge between button and dropdown */
    background: transparent;
    z-index: 999;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.dropdown-toggle:hover {
    background: rgba(39, 85, 89, 0.08);
    color: #275559;
    transform: translateY(-1px);
}

.dropdown-toggle svg:last-child {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle svg:last-child {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%; /* Open downward on desktop */
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); /* Shadow below for downward opening */
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px); /* Start from above and move down */
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.2rem; /* Small gap below button */
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: rgba(39, 85, 89, 0.08);
    color: #275559;
    border-left-color: #00d4aa;
}

/* Offer Badge */
.offer-badge {
    background: #275559;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.3rem;
    border-radius: 8px;
    margin-left: 0.4rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}


.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo-section {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    transition: var(--transition);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15)) 
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #275559 0%, #BEFCAE 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)) 
            drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15)) 
            drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}

.search-section {
    flex: 1;
    max-width: 500px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    min-width: 450px;
    padding: 6px;
    height: 56px;
}

.search-container:focus-within {
    background: white;
    box-shadow: 
        0 12px 40px rgba(39, 85, 89, 0.15),
        0 4px 16px rgba(39, 85, 89, 0.1);
    transform: translateY(-1px) scale(1.02);
}

/* Search icon removed */

.search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    color: #1a1a1a;
    width: 100%;
    letter-spacing: 0.01em;
    /* Remove any search icons */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-input::placeholder {
    color: #6b7280;
    font-weight: 400;
    opacity: 0.8;
}

/* Ensure no search icons are displayed */
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

.search-btn {
    padding: 0;
    background: #275559;
    color: white;
    border: none;
    border-radius: 50%;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin: 0;
    box-shadow: 
        0 4px 12px rgba(39, 85, 89, 0.3),
        0 2px 4px rgba(39, 85, 89, 0.2);
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    background: #1e3d40;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(39, 85, 89, 0.4),
        0 3px 8px rgba(39, 85, 89, 0.3);
}

.search-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        0 2px 8px rgba(39, 85, 89, 0.3),
        0 1px 3px rgba(39, 85, 89, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(190, 252, 174, 0.2);
    border-radius: 12px;
    text-decoration: none;
    color: #BEFCAE;
    transition: var(--transition);
    border: 1px solid rgba(190, 252, 174, 0.3);
}

.cart-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.cart-count {
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(190, 252, 174, 0.2);
    color: #BEFCAE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    text-transform: uppercase;
    border: 1px solid rgba(190, 252, 174, 0.3);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
    position: relative;
    overflow: hidden;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.user-avatar:hover::before {
    left: 100%;
}

.user-avatar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

.user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.user-btn:hover {
    background: var(--primary-color);
    color: white;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.user-dropdown .dropdown-item:hover {
    background: rgba(39, 85, 89, 0.08);
    color: #275559;
    border-left-color: #00d4aa;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.login-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(190, 252, 174, 0.2);
    color: #BEFCAE;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(190, 252, 174, 0.3);
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}


/* Main Content */
.shop-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.shop-content {
    display: flex;
    gap: 2rem;
}

.products-section {
    flex: 1;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.product-image {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.product-badge.discount {
    background: var(--accent-color);
}

.product-badge.organic {
    background: var(--primary-color);
}

.product-badge.fresh {
    background: #275559;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 2px;
    color: #fdcb6e;
}

.rating-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.price-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.original-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-unit {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
}

/* Add Button */
.add-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 20px;
    background: #275559; /* Solid color matching Login button */
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 85, 89, 0.3);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 85, 89, 0.4);
    background: #1a3d40; /* Darker shade on hover */
}

.add-btn:active {
    transform: translateY(0);
}

.add-btn svg {
    width: 18px;
    height: 18px;
}

/* Quantity Controls */
.quantity-controls {
    display: none;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.quantity-controls.show {
    display: flex !important;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    color: #275559;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qty-btn:hover {
    background: #275559;
    color: white;
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity {
    min-width: 40px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    padding: 0 8px;
}

/* Wishlist Button */
.wishlist-container {
    margin-left: auto;
}

.wishlist-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    color: #e74c3c;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wishlist-btn:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: #e74c3c;
    color: white;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.add-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success States */
.add-btn.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wishlist-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6c757d;
}

.wishlist-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.wishlist-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.wishlist-btn i {
    font-size: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 0.2rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.quantity {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.add-to-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #275559 0%, #BEFCAE 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #1e3d40 0%, #a8e68a 100%);
    transform: translateY(-1px);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Empty State */
.empty-state,
.error-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state svg,
.error-message svg {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.empty-state h3,
.error-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p,
.error-message p {
    margin-bottom: 2rem;
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-large);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-medium);
    display: none;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    transition: var(--transition);
}

.floating-cart.show {
    display: flex;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-items-count {
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-total {
    font-size: 0.875rem;
    opacity: 0.9;
}

.view-cart-btn {
    background: #275559; /* Match theme color */
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-cart-btn:hover {
    background: #1a3d40; /* Darker shade on hover */
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .search-section {
        order: 2;
        width: 100%;
        max-width: none;
    }
    
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .floating-cart {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .product-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 0.9rem;
    }
    
    .product-original-price {
        font-size: 0.8rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .add-to-cart-btn {
        width: 100%;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Focus States */
.btn:focus,
.search-input:focus,
.qty-btn:focus,
.add-to-cart-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .logo-section {
        order: 1;
    }
    
    .search-section {
        order: 2;
        width: 100%;
        max-width: none;
    }
    
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    .search-container {
        min-width: auto;
        width: 100%;
    }
    
    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .cart-btn {
        flex: 1;
        justify-content: center;
    }
    
    .user-menu {
        flex: 1;
        justify-content: center;
    }
    
    /* Navigation Bar Mobile */
    .shop-nav {
        position: sticky;
        top: 0;
    }
    
    .nav-content {
        padding: 0.4rem 0;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        padding: 0.3rem 0;
        gap: 0.2rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
        flex-shrink: 0;
        flex-direction: column;
        gap: 0.2rem;
        text-align: center;
        min-width: 60px;
    }
    
    .nav-link span {
        display: block;
        font-size: 0.7rem;
        line-height: 1;
        margin-top: 0.1rem;
    }
    
    .nav-link svg {
        width: 18px;
        height: 18px;
        margin: 0 auto;
    }
    
    .dropdown-toggle {
        flex-direction: column;
        gap: 0.2rem;
        text-align: center;
        min-width: 60px;
    }
    
    .dropdown-toggle span {
        display: block;
        font-size: 0.7rem;
        line-height: 1;
        margin-top: 0.1rem;
    }
    
    .dropdown-toggle svg:first-child {
        width: 18px;
        height: 18px;
        margin: 0 auto;
    }
    
    /* Mobile dropdown behavior - centered modal style */
    .dropdown-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        margin: 0;
        width: 90%;
        max-width: 300px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        z-index: 10000;
    }
    
    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.active .dropdown-menu {
        transform: translate(-50%, -50%) scale(1);
    }
    
    .dropdown-toggle svg:last-child {
        display: none;
    }
    
    .dropdown-menu {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
        margin: 0;
    }
    
}

@media (max-width: 480px) {
    .search-container {
        min-width: auto;
        width: 100%;
    }
    
    .search-input {
        padding: 0.75rem;
        font-size: 16px;
    }
    
    .search-btn {
        padding: 0.75rem 1rem;
        min-width: 50px;
    }
    
    /* Extra small mobile navigation */
    .nav-link {
        padding: 0.3rem 0.4rem;
        min-width: 50px;
        font-size: 0.8rem;
    }
    
    .nav-link span {
        font-size: 0.65rem;
    }
    
    .nav-link svg {
        width: 16px;
        height: 16px;
    }
    
    .dropdown-toggle {
        padding: 0.3rem 0.4rem;
        min-width: 50px;
        font-size: 0.8rem;
    }
    
    .dropdown-toggle span {
        font-size: 0.65rem;
    }
    
    .dropdown-toggle svg:first-child {
        width: 16px;
        height: 16px;
    }
}

/* Checkout Page Styles */
.checkout-container {
    padding: 2rem 0;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.checkout-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkout-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.checkout-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.checkout-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.checkout-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-light);
}

/* Address Styles */
.address-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.address-card {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.address-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.address-card.selected {
    border-color: var(--primary-color);
    background: rgba(39, 85, 89, 0.05);
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.address-type {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.type-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.default-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.address-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-edit:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.address-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.address-details p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.address-select {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.address-select input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.address-select label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-card {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.payment-card.selected {
    border-color: var(--primary-color);
    background: rgba(39, 85, 89, 0.05);
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.payment-info input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.payment-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.payment-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.payment-icon {
    color: var(--text-light);
}

/* Order Notes */
textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 85, 89, 0.1);
}

/* Order Summary Sidebar */
.checkout-sidebar {
    position: sticky;
    top: 100px;
}

.order-summary {
    background: var(--bg-primary);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.order-summary h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-details {
    flex: 1;
}

.item-details h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.item-details p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.price {
    font-weight: 600;
    color: var(--text-primary);
}

.order-totals {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.total-row.total-final {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.btn-checkout {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-large);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-medium);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.address-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 85, 89, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-error {
    background: #fee;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-info {
    background: #ebf8ff;
    color: #2a69ac;
    border: 1px solid #90cdf4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .checkout-sidebar {
        position: static;
        order: -1;
    }
    
    .checkout-header h1 {
        font-size: 2rem;
    }
    
    .checkout-section {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header,
    .address-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        padding: 1rem 0;
    }
    
    .checkout-section {
        padding: 1rem;
    }
    
    .address-card,
    .payment-card {
        padding: 1rem;
    }
    
    .order-summary {
        padding: 1.5rem;
    }
}
