:root {
    --primary: #d4af37;
    --secondary: #cd7f32;
    --accent: #facc15;
    --dark: #0b1121;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(212, 175, 55, 0.15);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Dynamic Background Elements */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.4;
    border-radius: 50%;
    animation: float 15s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 20s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.2;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 10%) scale(1.05); }
    100% { transform: translate(-5%, 5%) scale(0.95); }
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease;
}

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

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
    letter-spacing: -1px;
}

header p {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

main {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 3rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-title::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

/* Glassmorphism Card */
.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.75rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.product-card.selected {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2) inset;
}

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

.product-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.product-price::before {
    content: '₹';
    font-size: 1rem;
    color: var(--primary);
    margin-right: 2px;
}

.add-btn {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.product-card.selected .add-btn {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.product-card:hover .add-btn:not(.selected .add-btn) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.add-btn.free {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

.product-card:hover .add-btn.free:not(.selected .add-btn) {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
}

/* Sidebar Cart */
.cart-section {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.cart-glass {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.cart-glass h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.cart-items {
    min-height: 150px;
    max-height: calc(100vh - 350px);
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}
.cart-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.cart-item-info {
    flex: 1;
    padding-right: 1rem;
}

.cart-item-title {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.cart-item-price {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

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

.cart-summary {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.total-row span:first-child {
    font-size: 1.1rem;
    color: var(--text-muted);
}

#total-price {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #128C7E, #25D366);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
}

.email-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.email-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(212, 175, 55, 0.4);
}

.checkout-btn:active:not(:disabled) {
    transform: translateY(0);
}

.checkout-btn:disabled {
    background: var(--glass-bg);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    border: 1px solid var(--glass-border);
}

/* Locked Product Card */
.product-card.locked {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(80%);
    background: rgba(255, 255, 255, 0.01);
}

.product-card.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
}

.product-card.locked .add-btn {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--glass-border);
    cursor: not-allowed;
}

.product-card.locked:hover::before {
    opacity: 0;
}

/* Icons */
.item-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .item-icon {
    transform: scale(1.1) translateY(-3px);
}

.cart-item {
    gap: 1rem;
}

.cart-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--primary);
    flex-shrink: 0;
}

.cart-item-icon span {
    font-size: 1.2rem;
}

/* Dropdown */
.card-select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.card-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-select option {
    background: var(--dark);
    color: var(--text-main);
}

@media (max-width: 992px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .cart-section {
        position: static;
        margin-top: 2rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
}

/* Auth Layer Styles */
.auth-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 17, 33, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.auth-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: fadeInDown 0.6s ease;
}

.auth-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.auth-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.4;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-input-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s ease;
}

.auth-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.auth-input-group button {
    background: var(--primary);
    color: var(--dark);
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-input-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.auth-error {
    color: #f43f5e !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    font-size: 0.9rem;
    min-height: 1.2rem;
}
