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

/* Light Mode Variables (Default) */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --secondary-hover: #7c3aed;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --text-tertiary: #6c757d;
    --border-color: #2d3748;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Navigation */
.navbar {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.nav-brand h1:hover {
    transform: scale(1.05);
}

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

.nav-link {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
}

.badge {
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.25rem;
    animation: pulse 2s infinite;
}

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

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* Dark Mode Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: rotate(180deg);
    border-color: var(--primary-color);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
    transition: transform var(--transition-base);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn > * {
    position: relative;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn:hover::before {
    width: 150px;
    height: 150px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    animation: fadeInDown 0.8s ease;
}

.hero p {
    font-size: 1.5rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Filters Section */
.filters {
    background: var(--bg-primary);
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input,
.filter-select,
.price-input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.search-input:focus,
.filter-select:focus,
.price-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.filter-select {
    min-width: 150px;
    cursor: pointer;
}

.price-filter {
    display: flex;
    gap: 0.5rem;
}

.price-input {
    width: 120px;
}

/* Products Grid */
.products {
    padding: 2rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition-slow);
    cursor: pointer;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    z-index: 0;
}

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

.product-card:hover::before {
    opacity: 0.05;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

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

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

.product-info {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stock-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.in-stock {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.out-of-stock {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
}

/* Wishlist Heart Button */
.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
    backdrop-filter: blur(10px);
}

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

.wishlist-btn.active {
    background: var(--danger-color);
}

.wishlist-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--text-secondary);
    transition: fill var(--transition-base);
}

.wishlist-btn.active svg {
    fill: white;
    animation: heartbeat 0.3s ease;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

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

.skeleton-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.skeleton-image {
    height: 220px;
}

.skeleton-text {
    height: 20px;
    margin: 10px 20px;
    border-radius: var(--radius-sm);
}

.skeleton-title {
    height: 30px;
    margin: 20px 20px 10px;
    border-radius: var(--radius-sm);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 3rem 0;
}

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

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

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

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.25rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--danger-color); }
.toast.warning { border-left-color: var(--warning-color); }
.toast.info { border-left-color: var(--info-color); }

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    animation: slideInDown 0.4s ease;
    position: relative;
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-large {
    max-width: 900px;
}

.close {
    color: var(--text-secondary);
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: rotate(90deg);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

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

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger-color);
}

/* Password Strength Indicator */
.password-strength-container {
    margin-top: 0.5rem;
}

.password-strength-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.password-strength-fill.weak {
    width: 25%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.password-strength-fill.fair {
    width: 50%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.password-strength-fill.good {
    width: 75%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.password-strength-fill.strong {
    width: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
}

.password-strength-text {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
}

.password-strength-text.weak {
    color: #ef4444;
}

.password-strength-text.fair {
    color: #f59e0b;
}

.password-strength-text.good {
    color: #3b82f6;
}

.password-strength-text.strong {
    color: #10b981;
}

.password-requirements {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.req-item {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.req-item.met {
    color: #10b981;
    font-weight: 600;
}

.req-item.met::before {
    content: '✓ ';
    margin-right: 0.25rem;
}

.req-item:not(.met)::before {
    content: '✗ ';
    margin-right: 0.25rem;
    color: #ef4444;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.product-detail-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 6rem;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.product-detail-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-detail-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Rating Stars */
.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 1rem 0;
}

.star {
    color: #fbbf24;
    font-size: 1.5rem;
}

.star.empty {
    color: var(--border-color);
}

/* Cart */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-base);
}

.cart-item:hover {
    background: var(--bg-secondary);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    flex-shrink: 0;
}

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

.cart-item-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.125rem;
}

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

.cart-total {
    text-align: right;
    padding: 2rem;
    font-size: 2rem;
    font-weight: 800;
}

.cart-total > div:first-child {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.cart-total .btn {
    font-size: 1rem;
    padding: 0.875rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-base);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.5);
}

/* Quick View Badge */
.quick-view-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transition: all var(--transition-base);
    pointer-events: none;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    z-index: 5;
}

.product-card:hover .quick-view-badge {
    opacity: 1;
}

/* Fade stock badge on hover to prevent visual clash with quick-view */
.product-card:hover .stock-badge {
    opacity: 0.4;
    transform: scale(0.95);
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.payment-method-card {
    background: var(--bg-secondary);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.payment-method-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-tertiary);
}

.payment-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.payment-method-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.payment-method-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .navbar .container {
        flex-wrap: wrap;
        padding: 0.75rem 15px;
    }

    .nav-brand h1 {
        font-size: 1.5rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        margin-top: 0.75rem;
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
    }

    .username {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    /* Hero */
    .hero {
        padding: 2.5rem 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.125rem;
    }

    /* Filters */
    .filters {
        padding: 1.5rem 0;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input,
    .filter-select,
    .price-input {
        width: 100%;
        min-width: auto;
    }

    .price-filter {
        flex-direction: row;
    }

    .price-input {
        flex: 1;
    }

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

    .product-card {
        font-size: 0.9rem;
    }

    /* Password Strength on Mobile */
    .password-requirements {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .req-item {
        font-size: 0.75rem;
    }

    .product-name {
        font-size: 1.125rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    /* Product Detail */
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail-image {
        height: 350px;
        font-size: 5rem;
    }

    .product-detail-info h2 {
        font-size: 2rem;
    }

    /* Modals */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
    }

    .modal-large {
        max-width: 95%;
    }

    /* Cart */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .cart-item > div:last-child {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-total {
        font-size: 1.5rem;
        padding: 1.5rem;
    }

    /* FAB */
    .fab {
        width: 55px;
        height: 55px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1.75rem;
    }

    /* Toast */
    .toast-container {
        right: 0.5rem;
        top: 0.5rem;
    }

    .toast {
        min-width: 280px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    /* Navigation */
    .nav-brand h1 {
        font-size: 1.25rem;
    }

    .nav-menu {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-sm {
        padding: 0.375rem 0.625rem;
        font-size: 0.7rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .username {
        display: none; /* Hide username text on very small screens */
    }

    /* Hero */
    .hero {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-image {
        height: 200px;
        font-size: 3.5rem;
    }

    .product-info {
        padding: 1rem;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.25rem;
    }

    .wishlist-btn {
        width: 40px;
        height: 40px;
        top: 0.75rem;
        right: 0.75rem;
    }

    .wishlist-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Product Detail */
    .product-detail-image {
        height: 280px;
        font-size: 4rem;
    }

    .product-detail-info h2 {
        font-size: 1.5rem;
    }

    .product-detail-info p {
        font-size: 0.875rem;
    }

    /* Modals */
    .modal-content {
        margin: 2% auto;
        padding: 1rem;
    }

    .close {
        right: 1rem;
        top: 1rem;
        font-size: 1.5rem;
        width: 30px;
        height: 30px;
    }

    /* Forms */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.625rem;
        font-size: 0.875rem;
    }

    .form-group label {
        font-size: 0.875rem;
    }

    /* Cart */
    .cart-item-image {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .cart-item-name {
        font-size: 1rem;
    }

    .cart-item-price {
        font-size: 1.125rem;
    }

    .cart-total {
        font-size: 1.25rem;
        padding: 1rem;
    }

    /* FAB */
    .fab {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1.5rem;
    }

    /* Toast */
    .toast {
        min-width: 250px;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .toast-icon {
        font-size: 1.25rem;
    }

    /* Filters */
    .filter-group {
        gap: 0.75rem;
    }

    /* Empty State */
    .empty-state-icon {
        font-size: 3.5rem;
    }

    .empty-state p {
        font-size: 1rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .nav-brand h1 {
        font-size: 1.125rem;
    }

    .hero h2 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.7rem;
    }

    .product-price {
        font-size: 1.125rem;
    }

    .cart-total {
        font-size: 1.125rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 1.5rem 0;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Print styles */
@media print {
    .navbar,
    .filters,
    .fab,
    .toast-container,
    .modal {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .product-card {
        break-inside: avoid;
    }
}

/* Smooth Transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}