:root {
    --primary: #141414;
    --surface: #1f1f1f;
    --surface-elevated: #2a2a2a;
    --accent: #c5a059;
    --accent-hover: #d8b570;
    --light: #f4f4f4;
    --muted: #b0b0b0;
    --white: #ffffff;
    --danger: #d9534f;
    --success: #4caf50;
    --border: rgba(197, 160, 89, 0.25);
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--primary);
    color: var(--light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.hidden {
    display: none !important;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 40px 20px 30px;
    background: radial-gradient(circle at center, #2c261d 0%, #141414 75%);
    border-bottom: 1px solid var(--accent);
}

.main-logo {
    max-width: 110px;
    height: auto;
    border-radius: 50%;
    border: 2px solid var(--accent);
    filter: drop-shadow(0 0 14px rgba(197, 160, 89, 0.35));
}

.fallback-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--accent);
    background: rgba(197, 160, 89, 0.08);
    margin-bottom: 10px;
}

.brand-title {
    font-size: 2.4rem;
    color: var(--white);
    letter-spacing: 1px;
    margin-top: 8px;
}

.tagline {
    color: var(--accent);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    margin: 4px 0 20px;
    font-size: 1.05rem;
}

/* --- Header Utilities --- */
.header-utils {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.utility-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 9px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.utility-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

.ai-highlight-btn {
    background: rgba(197, 160, 89, 0.14);
}

/* --- Navigation Tabs --- */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    flex-wrap: wrap;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--light);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    font-weight: 600;
}

.ai-tab-btn {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Sections & Grids --- */
.tab-content {
    display: none;
    max-width: 1200px;
    margin: 24px auto 60px;
    padding: 0 20px;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

.section-header {
    margin-bottom: 24px;
}

.section-title {
    color: var(--accent);
    font-size: 1.9rem;
}

.section-subtitle {
    color: var(--muted);
    margin: 4px 0 0;
    font-size: 0.95rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* --- Product Cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card-image {
    height: 185px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2d261e, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-emoji-fallback {
    font-size: 3.4rem;
    user-select: none;
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: var(--primary);
    padding: 4px 11px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.brand-pill {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    margin-bottom: 4px;
    font-weight: 600;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.card-info h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.price-tag {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.card-desc {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 12px;
    flex: 1;
}

.nutritional-info {
    display: none;
    font-size: 0.8rem;
    color: #f0ad4e;
    background: rgba(240, 173, 78, 0.1);
    border: 1px solid rgba(240, 173, 78, 0.25);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-weight: 500;
}

body.show-nutrition .nutritional-info {
    display: block;
}

.flavor-select {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: var(--surface-elevated);
    color: var(--light);
    border: 1px solid var(--border);
    font-size: 0.88rem;
}

.add-btn {
    width: 100%;
    padding: 11px;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.92rem;
}

.add-btn:hover {
    background: var(--accent-hover);
}

/* --- Experience List --- */
.list-layout {
    display: grid;
    gap: 16px;
}

.list-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.list-item h3 {
    color: var(--white);
    margin-bottom: 4px;
}

.list-item p {
    color: var(--muted);
    margin: 0;
}

/* --- Feature Blocks & Forms --- */
.feature-block {
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.input-field {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-elevated);
    color: var(--light);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
}

.action-btn {
    background: var(--accent);
    color: var(--primary);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.98rem;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    background: var(--accent-hover);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.secondary-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: rgba(197, 160, 89, 0.15);
}

.danger-btn {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.danger-btn:hover {
    background: rgba(217, 83, 79, 0.15);
}

.full-width {
    width: 100%;
}

/* --- AI Mood Studio --- */
.ai-badge {
    display: inline-block;
    background: rgba(197, 160, 89, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.mood-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.mood-chip {
    background: var(--surface-elevated);
    color: var(--light);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.mood-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.ai-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.dairy-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.api-settings {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    color: var(--muted);
    font-size: 0.85rem;
}

.api-settings summary {
    cursor: pointer;
    color: var(--accent);
}

.api-settings-body {
    margin-top: 10px;
}

.ai-result {
    margin-top: 24px;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.12), rgba(25, 25, 25, 0.95));
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 24px;
    animation: fadeIn 0.4s ease;
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.match-pill {
    background: var(--accent);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.ai-pairing-tip {
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    margin: 14px 0 18px;
    font-size: 0.92rem;
    color: var(--light);
}

/* --- Shopping Cart --- */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.empty-cart-msg {
    text-align: center;
    color: var(--muted);
    padding: 36px 10px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.cart-item-details h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.cart-item-details span {
    color: var(--muted);
    font-size: 0.88rem;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--light);
    cursor: pointer;
    font-weight: 700;
}

.qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cart-summary {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.promo-box {
    display: flex;
    gap: 10px;
    max-width: 380px;
}

.promo-feedback {
    font-size: 0.85rem;
    margin: 6px 0 16px;
    min-height: 18px;
}

.totals-breakdown {
    max-width: 380px;
    margin-left: auto;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--muted);
}

.discount-row {
    color: var(--success);
}

.grand-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 10px;
}

.cart-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* --- Checkout Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 14px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--white);
}

.modal-title {
    color: var(--accent);
    margin-bottom: 6px;
}

.checkout-amount-banner {
    background: rgba(197, 160, 89, 0.12);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0 0 18px;
    color: var(--light);
}

.method-label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 12px 0 8px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.pay-method-btn {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--light);
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.pay-method-btn.active {
    border-color: var(--accent);
    background: rgba(197, 160, 89, 0.18);
    color: var(--accent);
    font-weight: 600;
}

.upi-box {
    text-align: center;
}

.qr-placeholder {
    background: var(--white);
    color: var(--primary);
    width: 150px;
    height: 150px;
    margin: 0 auto 14px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qr-placeholder i {
    font-size: 4.5rem;
}

.qr-placeholder span {
    font-size: 0.72rem;
    font-weight: 700;
}

.cod-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 8px 0 16px;
}

/* --- Receipt --- */
.receipt-card {
    text-align: center;
}

.receipt-icon {
    font-size: 3.5rem;
    color: var(--success);
    margin-bottom: 10px;
}

.receipt-sub {
    color: var(--muted);
    margin-bottom: 18px;
}

.receipt-details {
    text-align: left;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.receipt-details p {
    margin: 6px 0;
}

/* --- Brand Showcase Footer --- */
.brand-strip {
    text-align: center;
    padding: 28px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.brand-strip-title {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 14px;
}

.brand-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.brand-logos a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.brand-logos a:hover {
    transform: translateY(-2px);
}

.brand-logos img {
    height: 36px;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.3);
    transition: filter 0.25s ease;
}

.brand-logos a:hover img {
    filter: none;
}

.brand-fallback {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--accent);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--surface-elevated);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.brand-logos a:hover .brand-fallback {
    border-color: var(--accent);
    background: rgba(197, 160, 89, 0.14);
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 300;
}

.toast {
    background: var(--surface-elevated);
    color: var(--white);
    border-left: 4px solid var(--accent);
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

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

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