:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-secondary: #1e293b;
    --gray: #64748b;
    --gray-light: #f1f5f9;
    --gray-lighter: #f8fafc;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 8px;
}

/* Auth Pages */
.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
    font-size: 15px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

.auth-message {
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-top: 16px;
}

.auth-message.success {
    background: #d1fae5;
    color: #065f46;
}

.auth-message.error {
    background: #fee2e2;
    color: #991b1b;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-light);
}

.auth-footer p {
    color: var(--gray);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* User menu in header */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 500;
    color: var(--dark);
}

.logout-btn {
    padding: 8px 16px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
}

.logout-btn:hover {
    background: #dc2626;
}

/* Currency - Default Rupees */
.currency {
    font-family: 'Poppins', sans-serif;
}

.currency-symbol {
    font-size: 0.9em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-lighter);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    color: var(--gray);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
}

nav a:hover {
    color: var(--dark);
    background: var(--gray-light);
}

nav a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient);
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px;
}

.cart-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: var(--primary-hover) !important;
}

.cart-count {
    background: white;
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Hero */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: var(--gradient);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(100px);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-light);
}

/* Products */
.products-section {
    padding: 60px 0 100px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
}

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

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--danger);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.product-badge.new {
    background: var(--success);
}

.product-badge.sale {
    background: var(--warning);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-image-wrapper {
    overflow: hidden;
    position: relative;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 24px;
}

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

.product-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 8px 0 12px;
    color: var(--dark);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--warning);
    font-size: 0.9rem;
}

.product-rating span {
    color: var(--gray);
    font-size: 0.85rem;
    margin-left: 4px;
}

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

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.product-price-old {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 8px;
}

.product-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.product-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

/* Cart */
.cart-section {
    padding: 140px 0 80px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cart-empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray);
}

.cart-empty h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.cart-empty p {
    color: var(--gray);
    margin-bottom: 24px;
}

.cart-items {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--gray-light);
}

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

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    margin-right: 24px;
}

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

.cart-item-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.cart-item-info p {
    color: var(--gray);
    font-size: 0.95rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    margin-right: 24px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-light);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.qty-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

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

.cart-summary {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    margin-top: 32px;
    box-shadow: var(--shadow-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-light);
}

.summary-row.total {
    border-bottom: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.checkout-btn {
    width: 100%;
    padding: 20px;
    margin-top: 24px;
    font-size: 1.1rem;
}

/* Checkout */
.checkout-section {
    padding: 140px 0 80px;
}

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

.checkout-form {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.checkout-form h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

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

.payment-options {
    display: grid;
    gap: 16px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover {
    border-color: var(--primary);
}

.payment-option.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.payment-option input {
    width: auto;
}

.payment-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.upi-section {
    margin-top: 24px;
    padding: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    color: white;
    text-align: center;
}

.upi-section h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.upi-section p {
    opacity: 0.9;
    margin-bottom: 20px;
}

.qr-code {
    background: white;
    padding: 20px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin: 20px 0;
}

.upi-id-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.copy-btn {
    background: white;
    color: var(--primary);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-btn:hover {
    transform: scale(1.05);
}

.payment-steps {
    margin-top: 24px;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: var(--radius-sm);
}

.payment-steps h5 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.payment-steps ol {
    padding-left: 20px;
    font-size: 0.95rem;
    opacity: 0.95;
}

.payment-steps li {
    margin-bottom: 8px;
}

.checkout-summary {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 120px;
}

.checkout-summary h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.order-item-name {
    font-weight: 500;
}

.order-item-qty {
    color: var(--gray);
    font-size: 0.9rem;
}

.order-item-price {
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--dark-secondary);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
}

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

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 24px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

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

/* Responsive */
@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 16px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cart-item-image {
        margin: 0;
    }
    
    .cart-item-actions {
        flex-direction: column;
        width: 100%;
    }
}