/* Global Design System & Variables */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.8);
    --bg-sidebar: rgba(241, 245, 249, 0.9);
    --glass-bg: rgba(15, 23, 42, 0.02);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-border-focus: rgba(15, 23, 42, 0.2);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent: #4f46e5;
    --accent-hover: #3730a3;
    --accent-glow: rgba(79, 70, 229, 0.15);
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --chain-hemkop: #e11d48;
    --chain-willys: #15803d;
    --chain-ica: #e11b22;
    --chain-lidl: #0050aa;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* Dark Theme Variables overrides */
[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: rgba(17, 24, 39, 0.7);
    --bg-sidebar: rgba(13, 18, 30, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-focus: rgba(255, 255, 255, 0.2);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Interactive Ambient Glows */
.bg-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.25;
    transition: opacity 0.5s ease;
    max-width: 100%;
    overflow: hidden;
}

.circle-1 {
    top: -80px;
    right: 0px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 80%);
}

.circle-2 {
    bottom: -100px;
    left: 0px;
    background: radial-gradient(circle, var(--success) 0%, transparent 80%);
}

/* App Container Layout */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Sidebar Styling */
.sidebar {
    width: 330px;
    min-width: 330px;
    flex-shrink: 0;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Sheet Drag Handle */
.sheet-drag-handle {
    display: none;
    width: 40px;
    height: 5px;
    background: var(--glass-border-focus);
    border-radius: var(--radius-full);
    margin: -4px auto 16px auto;
    flex-shrink: 0;
}

/* User Account Card Placeholder */
.user-account-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.user-account-card:hover {
    border-color: var(--glass-border-focus);
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.user-avatar-placeholder i {
    width: 18px;
    height: 18px;
}

.user-account-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    overflow: hidden;
}

.user-account-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-account-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-account-login {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-account-login:hover {
    background: var(--accent);
    color: #fff;
}

.sidebar > * {
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.store-selector-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.store-selector-container label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "▼";
    font-size: 10px;
    color: var(--text-secondary);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

select {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

select option {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

select:focus {
    border-color: var(--glass-border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    text-align: left;
}

.nav-btn i {
    width: 18px;
    height: 18px;
}

.nav-btn:hover {
    color: var(--text-primary);
    background-color: var(--glass-bg);
    border-color: var(--glass-border);
}

.nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, rgba(99, 102, 241, 0.7) 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.action-btn {
    margin-top: 16px;
    color: var(--accent);
    border: 1px dashed var(--accent);
    background-color: rgba(99, 102, 241, 0.05);
}

.action-btn:hover {
    color: #fff;
    background-color: var(--accent);
    border-color: transparent;
}

/* Sidebar About Link Button */
.sidebar-about-wrap {
    margin-top: 14px;
    margin-bottom: 6px;
}

.btn-sidebar-about {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md, 10px);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
    text-align: left;
}

.btn-sidebar-about:hover {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--accent);
}

.btn-sidebar-about i,
.btn-sidebar-about svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.sidebar-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-footer p {
    font-size: 11px;
    color: var(--text-muted);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator .dot.green {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Store Disclaimer Typography & Containers */
.store-disclaimer-text {
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0;
    letter-spacing: 0.01em;
}

.sidebar-footer .store-disclaimer-text {
    padding-top: 8px;
    border-top: 1px dashed var(--glass-border);
}

.feed-footer-disclaimer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    margin-top: 24px;
    margin-bottom: 12px;
    text-align: center;
}

.footer-seo-section {
    width: calc(100% - 32px);
    max-width: 680px;
    margin: 28px auto 0 auto;
    padding: 18px 22px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.footer-seo-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.footer-seo-desc {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

.feed-footer-disclaimer .store-disclaimer-text {
    max-width: 520px;
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Accordion Styles for Chain Filters & Deal Types */
.chain-accordion-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.chain-accordion-btn:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.chain-accordion-btn i {
    width: 16px;
    height: 16px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chain-accordion-btn.expanded i {
    transform: rotate(180deg);
}

.deal-types-accordion {
    margin-top: 12px;
    margin-bottom: 16px;
}

.deal-types-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.deal-types-header:hover {
    border-color: var(--glass-border-focus);
    color: var(--text-primary);
}

.deal-types-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deal-types-header-title i {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.deal-types-header .accordion-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.deal-types-header.open .accordion-chevron {
    transform: rotate(180deg);
}

/* On desktop, hide accordion header and display deal nav list normally */
@media (min-width: 993px) {
    .deal-types-header {
        display: none;
    }
    .deal-types-accordion .side-nav {
        display: flex !important;
    }
}

/* On mobile, collapse deal nav list by default until toggled open */
@media (max-width: 992px) {
    .deal-types-header {
        display: flex;
    }
    .deal-types-accordion .side-nav {
        display: none;
        margin-top: 8px;
    }
    .deal-types-accordion .side-nav.open {
        display: flex !important;
    }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 900;
    padding: 0 12px env(safe-area-inset-bottom, 0px) 12px;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    transition: var(--transition);
    border-radius: var(--radius-md);
}

.mobile-nav-item i {
    width: 20px;
    height: 20px;
}

.mobile-nav-item.active {
    color: var(--accent);
    font-weight: 600;
}

.mobile-nav-item:active {
    transform: scale(0.94);
}

/* Top Bar Styling */
.top-bar {
    height: 80px;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    background-color: var(--bg-primary);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 20;
    transition: all 0.2s ease;
}

.top-bar-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    width: 100%;
}

.header-city-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full, 9999px);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    height: 40px;
}

.header-city-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow, rgba(46, 204, 113, 0.2));
    transform: translateY(-1px);
}

.header-city-btn:active {
    transform: scale(0.98);
}

.header-city-icon {
    width: 16px;
    height: 16px;
    color: var(--accent, #2ecc71);
    flex-shrink: 0;
}

.header-city-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-city-arrow {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.header-city-btn:hover .header-city-arrow {
    color: var(--text-primary);
}

.search-sub-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-container {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 480px;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 12px 16px 12px 48px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

#searchInput:focus {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#searchInput:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.clear-search-btn {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    color: var(--text-primary);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.header-action-btn,
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.header-action-btn:hover,
.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-focus);
    transform: translateY(-1px);
}

.header-action-btn:active,
.theme-toggle:active {
    transform: scale(0.95);
}

.header-action-btn i,
.header-action-btn svg,
.theme-toggle i,
.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Theme Toggle Sun/Moon Icon Switching */
[data-theme="dark"] .theme-toggle .sun-icon {
    display: block !important;
}
[data-theme="dark"] .theme-toggle .moon-icon {
    display: none !important;
}

[data-theme="light"] .theme-toggle .sun-icon,
:root:not([data-theme="dark"]) .theme-toggle .sun-icon {
    display: none !important;
}
[data-theme="light"] .theme-toggle .moon-icon,
:root:not([data-theme="dark"]) .theme-toggle .moon-icon {
    display: block !important;
}

.header-action-btn.copied {
    background-color: var(--success);
    border-color: var(--success);
    color: #fff;
}

/* Header Alerts Quick Filter Toggle & Badge */
.header-alerts-toggle {
    position: relative;
    border-radius: var(--radius-full, 9999px) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary, #94a3b8);
}

.header-alerts-toggle:hover {
    color: var(--text-primary);
    border-color: rgba(139, 92, 246, 0.45);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.header-alerts-toggle.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.32) 100%) !important;
    border-color: #8b5cf6 !important;
    color: #c4b5fd !important;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.4), inset 0 0 8px rgba(139, 92, 246, 0.2) !important;
}

.header-alerts-toggle.active .header-alerts-icon {
    color: #a78bfa !important;
    transform: rotate(12deg);
    transition: transform 0.2s ease;
}

.header-alerts-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main, #0f172a);
    box-sizing: content-box;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    animation: popIn 0.2s ease-out;
}

.header-alerts-toggle.active .header-alerts-badge {
    background: #8b5cf6;
    border-color: var(--bg-main, #1e1b4b);
}

/* Alerts Filter Active Reset Banner */
.alerts-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    margin: 0 0 24px 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(139, 92, 246, 0.12) 100%);
    border: 1px solid rgba(139, 92, 246, 0.38);
    border-radius: var(--radius-lg, 14px);
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.12);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    animation: fadeInDown 0.25s ease-out;
}

.alerts-filter-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.4;
}

.alerts-filter-bell {
    font-size: 17px;
    display: inline-block;
}

.btn-reset-alerts-filter {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full, 9999px);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-reset-alerts-filter:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-reset-alerts-filter:active {
    transform: scale(0.97);
}

/* Dashboard Body Scrollable Area */
.dashboard-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Status Warning/Info Banner */
.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.status-banner i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.status-banner.warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #b45309;
}

[data-theme="dark"] .status-banner.warning {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.status-banner.info {
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.35);
    color: #4338ca;
}

[data-theme="dark"] .status-banner.info {
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

/* Sort Options Toggle (Top Bar Integration) */
.sort-options {
    margin: 0;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}

.sort-options:hover {
    border-color: var(--glass-border-focus);
}

[data-theme="dark"] .sort-options {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

.sort-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}

.sort-toggle-text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.sort-toggle-text i {
    width: 15px;
    height: 15px;
    color: var(--accent-primary);
}

/* Chain Header Quick Actions & Endast Store Button */
.chain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.chain-header label {
    margin-bottom: 0;
}

.chain-quick-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.chain-action-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 1px 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.chain-action-btn:hover {
    background: rgba(99, 102, 241, 0.15);
}

.chain-filter-item-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
    min-height: 34px;
}

.chain-filter-item-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chain-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.chain-filter-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-only-store {
    margin-left: auto;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.28);
    color: var(--accent-primary);
    font-size: 10.5px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0.85;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.chain-filter-item-wrapper:hover .btn-only-store,
.btn-only-store:focus {
    opacity: 1;
    border-color: var(--accent-primary);
}

.btn-only-store:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    opacity: 1;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--glass-border);
    border-radius: 20px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

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


/* Store Header Card */
.store-header-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.store-info-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chain-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.75px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    color: #fff;
    align-self: flex-start;
}

.chain-badge.hemkop {
    background-color: var(--chain-hemkop);
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.3);
}

.chain-badge.ica {
    background-color: var(--chain-ica);
    box-shadow: 0 0 10px rgba(225, 27, 34, 0.3);
}

.chain-badge.willys {
    background-color: var(--chain-willys);
    box-shadow: 0 0 10px rgba(21, 128, 61, 0.3);
}

.chain-badge.citygross {
    background-color: #0072BB;
    box-shadow: 0 0 10px rgba(0, 114, 187, 0.3);
}

.chain-badge.coop {
    background-color: #006a38;
    box-shadow: 0 0 10px rgba(0, 106, 56, 0.3);
}

.chain-badge.lidl {
    background-color: var(--chain-lidl);
    box-shadow: 0 0 10px rgba(0, 80, 170, 0.35);
}

.chain-badge.all-stores-badge {
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

#storeHeaderTitle {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.store-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-stats {
    display: flex;
    gap: 24px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
}

.stat-lbl {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Deals Cards Grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    align-content: start;
    flex-grow: 1;
}

/* Grid Placeholder / Empty States */
.grid-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px;
    text-align: center;
    background-color: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    gap: 16px;
}

.grid-placeholder .large-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    stroke-width: 1.5;
}

.grid-placeholder h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.grid-placeholder p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
}

/* Premium Deal Card Component */
.deal-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.deal-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.deal-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    color: #fff;
}

.deal-card-badge.club {
    background-color: var(--warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.deal-card-badge.multibuy {
    background-color: var(--accent);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.deal-card-badge.normal {
    background-color: var(--text-muted);
}

/* Deal Share Button (Top Right of Card) */
.deal-share-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    outline: none;
}

.deal-share-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
}

.deal-share-btn:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--accent);
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

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

.deal-share-btn.copied {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #059669 !important;
}

/* Dark Theme overrides for Share Button */
[data-theme="dark"] .deal-share-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .deal-share-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .deal-share-btn.copied {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    color: #34d399 !important;
}

/* Highlighted Shared Deal Card */
.deal-card.highlighted-deal {
    border: 1.5px solid var(--accent);
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.35), 0 12px 40px rgba(0, 0, 0, 0.4);
    animation: sharedPulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes sharedPulse {
    0%, 100% {
        border-color: var(--accent);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
    50% {
        border-color: rgba(129, 140, 248, 0.8);
        box-shadow: 0 0 32px rgba(99, 102, 241, 0.55);
    }
}

.shared-deal-banner {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.validity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    text-transform: uppercase;
}

.deal-store-section {
    margin-bottom: 8px;
}

.store-badge-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    color: #fff;
    backdrop-filter: blur(8px);
}

.store-badge-tag.hemkop {
    background-color: rgba(225, 29, 72, 0.85);
    border: 1px solid rgba(225, 29, 72, 0.3);
}

.store-badge-tag.ica {
    background-color: rgba(225, 27, 34, 0.85);
    border: 1px solid rgba(225, 27, 34, 0.3);
}

.store-badge-tag.willys {
    background-color: rgba(21, 128, 61, 0.85);
    border: 1px solid rgba(21, 128, 61, 0.3);
}

.store-badge-tag.citygross {
    background-color: rgba(0, 114, 187, 0.85);
    border: 1px solid rgba(0, 114, 187, 0.3);
}

.store-badge-tag.coop {
    background-color: rgba(0, 106, 56, 0.85);
    border: 1px solid rgba(0, 106, 56, 0.3);
}

.store-badge-tag.lidl {
    background-color: rgba(0, 80, 170, 0.85);
    border: 1px solid rgba(0, 80, 170, 0.3);
}

.multi-store-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.multi-store-label {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.multi-store-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.store-badge-tag.inline-badge {
    font-size: 9px;
    padding: 2px 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.store-unique-indicator-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.store-unique-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

[data-theme="dark"] .store-unique-tag {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

.store-unique-tag i {
    width: 11px;
    height: 11px;
    stroke-width: 2.2;
}

.image-container {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    background-color: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

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

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

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.image-placeholder i {
    width: 40px;
    height: 40px;
    stroke-width: 1.25;
}

.image-placeholder span {
    font-size: 11px;
}

.deal-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 42px;
}

.product-sub {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.25px;
    margin-top: -2px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deal-details-text {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.details-highlight-line {
    color: var(--danger);
    font-weight: 600;
}

.promo-tag {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--danger) 0%, #db2777 100%);
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
    letter-spacing: -0.25px;
}

.price-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.prices {
    display: flex;
    flex-direction: column;
}

.normal-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.promo-price {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.compare-price {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.save-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.1);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Modal Windows Styling */
.modal-backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: fadeIn 0.25s ease-out;
}

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

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--glass-border-focus);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    max-height: 85dvh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    z-index: 2001;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 16px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--glass-border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-help {
    font-size: 11px;
    color: var(--text-muted);
}

.chain-radio-group {
    display: flex;
    gap: 16px;
}

.chain-radio-card {
    flex: 1;
    border: 1px solid var(--glass-border);
    background-color: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    transition: var(--transition);
}

.chain-radio-card input {
    position: absolute;
    opacity: 0;
}

.chain-radio-card .radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.logo-dot.red { background-color: var(--chain-hemkop); }
.logo-dot.green { background-color: var(--chain-willys); }
.logo-dot.blue { background-color: var(--chain-lidl); }

.chain-radio-card:hover {
    border-color: var(--glass-border-focus);
}

.chain-radio-card:has(input:checked) {
    border-color: var(--accent);
    background-color: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 12px var(--accent-glow);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* Button UI Components */
.btn {
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn.primary {
    background-color: var(--accent);
    border: 1px solid transparent;
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

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

.btn.primary:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn.secondary {
    background-color: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn.secondary:hover {
    border-color: var(--glass-border-focus);
    color: var(--text-primary);
}

/* Loader Spinner Component */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast System Styling */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--glass-border-focus);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 450px;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.toast-message {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.toast-action-btn {
    margin-left: auto;
    background: var(--accent);
    color: #ffffff;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.18s;
}

.toast-action-btn:hover {
    filter: brightness(1.2);
}

/* Custom Scrollbar for sleek UI look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border-focus);
}

.active-city-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.change-city-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.change-city-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.chain-filters-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.chain-filters-container label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

#chainFilters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chain-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.chain-filter-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chain-filter-item:hover {
    background: var(--glass-bg);
}

.chain-filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

/* Mobile Responsive Controls */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background-color: var(--glass-border);
}

.mobile-menu-btn i {
    width: 20px;
    height: 20px;
}

/* Prevent background scrolling when mobile menu is open */
body.menu-open {
    overflow: hidden !important;
    touch-action: none;
}

body.menu-open .dashboard-body {
    overflow: hidden !important;
    touch-action: none;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    overscroll-behavior: contain;
}

.sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Media Queries */
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .sheet-drag-handle {
        display: block;
    }

    .sidebar-backdrop {
        display: block;
    }

    .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        height: auto !important;
        max-height: 88dvh !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: unset !important;
        z-index: 1002 !important;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
        background-color: var(--bg-primary);
        border-radius: 24px 24px 0 0;
        border-top: 1px solid var(--glass-border);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 16px 20px calc(96px + env(safe-area-inset-bottom, 20px)) 20px !important;
    }

    .sidebar.open {
        transform: translateY(0);
    }

    .top-bar {
        padding: 8px 12px 10px 12px;
        height: auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .top-bar-main {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
        width: 100%;
    }

    .mobile-menu-btn {
        order: 1;
        flex-shrink: 0;
        width: 38px;
        height: 38px;
    }

    .header-city-btn {
        order: 2;
        flex: 0 1 auto;
        max-width: calc(100% - 146px);
        min-width: 0;
        height: 38px;
        padding: 6px 12px;
        font-size: 13.5px;
        gap: 6px;
        display: inline-flex;
        align-items: center;
        box-sizing: border-box;
    }

    .header-alerts-toggle {
        order: 2;
        width: 38px !important;
        height: 38px !important;
        display: inline-flex !important;
        margin-left: 2px;
        flex-shrink: 0;
    }

    .header-city-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .header-city-name {
        flex: 0 1 auto;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .header-city-arrow {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        margin-left: 2px;
        display: inline-block !important;
    }

    .user-controls {
        order: 3;
        margin-left: auto;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* Hide desktop buttons on mobile screens: they are already in the sticky bottom navigation */
    #btnRecipesDesktop,
    #btnShoppingListDesktop,
    #btnMealPlannerDesktop,
    #btnShareSite {
        display: none !important;
    }

    .user-controls .theme-toggle {
        width: 38px;
        height: 38px;
        border-radius: var(--radius-md);
    }

    /* Row 2: Full-width search bar */
    .search-container {
        order: 4;
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        margin-top: 2px;
        position: relative;
    }

    .search-sub-bar {
        order: 5;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
        padding-top: 2px;
    }

    .sort-options {
        padding: 6px 10px;
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    .sort-toggle-text {
        font-size: 11.5px;
    }

    .btn-watch-search {
        font-size: 11.5px;
        padding: 6px 12px;
        flex-shrink: 0;
    }

    #searchInput {
        padding: 10px 16px 10px 36px;
        font-size: 13px;
    }

    .search-icon {
        left: 10px;
        width: 16px;
        height: 16px;
    }

    .dashboard-body {
        padding: 16px 16px 84px 16px;
        gap: 20px;
    }

    .footer-seo-section {
        width: 100%;
        padding: 14px 16px;
        margin-top: 20px;
    }

    .feed-footer-disclaimer {
        padding: 16px 12px 24px 12px;
        margin-top: 12px;
        margin-bottom: 0;
    }

    .store-header-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }

    .store-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .stat-box {
        align-items: flex-start;
    }

    #storeHeaderTitle {
        font-size: 20px;
    }

    .stat-val {
        font-size: 24px;
    }

    .deals-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .deal-card {
        padding: 12px;
        gap: 10px;
        border-radius: var(--radius-md);
    }

    .image-container {
        height: 120px;
    }

    .product-name {
        font-size: 13px;
        height: 34px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .product-sub {
        font-size: 10px;
    }

    .deal-details-text {
        font-size: 10px;
    }

    .promo-price {
        font-size: 16px;
    }

    .normal-price {
        font-size: 11px;
    }

    .compare-price {
        font-size: 9px;
    }

    .save-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .deal-card-badge {
        top: 8px;
        left: 8px;
        font-size: 8px;
        padding: 2px 6px;
    }

    .store-badge-tag {
        font-size: 8px;
        padding: 2px 6px;
    }

    .modal-card {
        width: 100%;
        max-width: 440px;
        max-height: 85vh;
        max-height: 85dvh;
        padding: 18px 16px;
        gap: 14px;
        margin: auto;
    }

    .watch-thresholds-grid {
        gap: 8px;
    }

    .watch-thresholds-grid label {
        font-size: 11.5px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .watch-thresholds-grid input,
    .watch-thresholds-grid select {
        font-size: 14px !important;
        height: 38px !important;
        padding: 4px 8px !important;
    }

    .toast {
        min-width: calc(100vw - 32px);
        margin: 0 16px;
    }

    .toast-container {
        right: 0;
        left: 0;
        bottom: 76px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 290px;
        min-width: 290px;
        padding: 16px 14px;
    }

    .top-bar {
        padding: 0 24px;
    }

    .dashboard-body {
        padding: 24px;
    }

    .deals-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

/* Authentication & User Login Modal Styles */
.btn-oauth-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    user-select: none;
}

.btn-oauth-google:hover {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.btn-oauth-google:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-oauth-google .google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
    opacity: 0.8;
}

.auth-divider span {
    padding: 0 12px;
}

.login-code-input {
    width: 100%;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 8px;
    padding: 12px;
    font-family: monospace;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition);
}

.login-code-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-account-logout {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-account-logout:hover {
    background: #ef4444;
    color: #ffffff;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 6px;
    transition: var(--transition);
}

.btn-text-link:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* Membership Checkbox Grid Items */
.membership-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.membership-checkbox-item:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.membership-checkbox-item input[type="checkbox"] {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Email Preferences */
.email-checkbox-item {
    transition: var(--transition);
    user-select: none;
}

.email-checkbox-item input[type="checkbox"] {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.email-master-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    padding-right: 8px;
}

.email-master-toggle input[type="checkbox"] {
    accent-color: #6366f1;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Store Star / Favorite Buttons */
.btn-store-fav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--text-muted);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-store-fav:hover {
    color: #eab308;
    background: rgba(234, 179, 8, 0.12);
}

.btn-store-fav.active {
    color: #eab308;
}

.btn-store-fav.active svg {
    fill: #eab308;
}

.fav-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-sm);
    font-size: 12.5px;
}

.fav-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: var(--transition);
}

.fav-item-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.chain-action-btn.active {
    background: #6366f1;
    color: #ffffff !important;
}

/* ----------------- Phase 3: Watches & Alerts ----------------- */

.deal-watch-btn {
    position: absolute;
    top: 14px;
    right: 52px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    outline: none;
}

.deal-watch-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
}

.deal-watch-btn:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    color: #6366f1;
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

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

.deal-watch-btn.active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #059669 !important;
}

.deal-watch-btn.active svg {
    fill: #059669;
    stroke: #059669;
}

.deal-watch-btn.active:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.8) !important;
    color: #047857 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .deal-watch-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .deal-watch-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .deal-watch-btn.active {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #10b981 !important;
}

[data-theme="dark"] .deal-watch-btn.active svg {
    fill: #10b981;
    stroke: #10b981;
}

[data-theme="dark"] .deal-watch-btn.active:hover {
    background: rgba(16, 185, 129, 0.35) !important;
    border-color: rgba(16, 185, 129, 0.8) !important;
    color: #34d399 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* Watch Search Quick Button */
.btn-watch-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #6366f1;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-watch-search:hover {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-watch-search svg {
    width: 14px;
    height: 14px;
}

/* Watch Modal Tabs & Chips */
.watch-tab-btn {
    color: var(--text-secondary);
    background: transparent;
    transition: var(--transition);
}

.watch-tab-btn.active {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

[data-theme="dark"] .watch-tab-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.chain-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color, rgba(0,0,0,0.1));
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

[data-theme="dark"] .chain-chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.chain-chip input:checked + span {
    font-weight: 600;
    color: #6366f1;
}

/* Watch List Item Card in Account Modal */
.watch-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    transition: var(--transition);
}

.watch-item-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.watch-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    cursor: pointer;
}

.watch-match-badge.has-deals {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.watch-match-badge.no-deals {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
    border: 1px solid rgba(156, 163, 175, 0.25);
}

/* ==========================================================================
   Phase 5: Price Insights & Badges (F10)
   ========================================================================== */

/* Deal Quality Badges (Deal Card & Modal) */
.deal-quality-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.3px;
    line-height: 1.3;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.quality-badge .badge-dot {
    font-size: 11px;
    line-height: 1;
}

/* 🟢 Best Price */
.quality-badge.best-price {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .quality-badge.best-price {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
}

/* 🟡 Recurring Deal */
.quality-badge.recurring {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #d97706;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .quality-badge.recurring {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

/* 🔴 Not a Bargain */
.quality-badge.not-a-bargain {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #dc2626;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .quality-badge.not-a-bargain {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;
}

/* Deal Detail Modal (Phase 5) */
.detail-header-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

[data-theme="light"] .detail-header-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

.detail-img-box {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.detail-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
}

.detail-product-sub {
    font-size: 13px;
    color: var(--text-muted);
}

/* Price Box */
.detail-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: var(--radius-md);
}

.detail-price-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-promo-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.detail-compare-price {
    font-size: 12px;
    color: var(--text-muted);
}

.deal-modal-validity {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-price-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.detail-normal-price {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.detail-save-badge {
    background: var(--success);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
}

/* Store Unique Local Banner */
.detail-store-unique-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
}

[data-theme="dark"] .detail-store-unique-banner {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fef3c7;
}

/* Quality Callout Banner */
.quality-callout-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.45;
}

.quality-callout-banner.best-price {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

[data-theme="dark"] .quality-callout-banner.best-price {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.quality-callout-banner.recurring {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #b45309;
}

[data-theme="dark"] .quality-callout-banner.recurring {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.quality-callout-banner.not-a-bargain {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

[data-theme="dark"] .quality-callout-banner.not-a-bargain {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Sparkline Card & SVG */
.sparkline-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

[data-theme="light"] .sparkline-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sparkline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sparkline-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sparkline-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.sparkline-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sparkline-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.sparkline-legend-dot.promo {
    background: #10b981;
}

.sparkline-legend-dot.normal {
    background: #94a3b8;
}

.deal-sparkline-container {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.price-sparkline-svg {
    width: 100%;
    height: 180px;
    overflow: visible;
    display: block;
}

.price-sparkline-svg text {
    font-family: inherit;
    user-select: none;
}

.sparkline-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 10px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* ==========================================================================
   Shopping List (Inköpslista) & Freemium Components
   ========================================================================== */

/* Badges on Desktop Header & Mobile Bottom Nav */
.nav-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    text-align: center;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-shopping-list {
    position: relative;
}

/* Deal Card List Button */
.deal-list-btn {
    position: absolute;
    top: 14px;
    right: 90px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    outline: none;
}

.deal-list-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
}

.deal-list-btn:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--accent);
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

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

.deal-list-btn.active {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    color: #059669 !important;
}

[data-theme="dark"] .deal-list-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .deal-list-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .deal-list-btn.active {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    color: #34d399 !important;
}

/* Backdrop */
.shopping-list-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1650;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.shopping-list-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer / Slide-out Panel (Desktop default: Right Slide-over) */
.shopping-list-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 440px;
    max-width: 100vw;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 1700;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.shopping-list-drawer.open {
    transform: translateX(0);
}

/* Header */
.shopping-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.shopping-list-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shopping-list-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
    border: 1px solid var(--glass-border-focus);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.shopping-list-header h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.shopping-list-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Input Section */
.shopping-list-input-section {
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.shopping-list-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 4px 6px 4px 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.shopping-list-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.shopping-list-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    min-width: 0;
}

.shopping-list-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.btn-input-header-toggle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-input-header-toggle:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.btn-input-header-toggle.active {
    color: #ffffff;
    background: var(--accent);
}

.btn-input-add-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s, background 0.18s;
    flex-shrink: 0;
}

.btn-input-add-item:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.btn-input-add-item:active {
    transform: scale(0.95);
}

/* Hybrid Header Suggestion Chip */
.header-suggestion-chip {
    margin-top: 10px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #f59e0b;
    animation: fadeInSlide 0.22s ease-out;
}

.header-suggestion-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.header-suggestion-chip span {
    flex: 1;
}

.chip-btn-confirm {
    background: #f59e0b;
    color: #000000;
    border: none;
    font-weight: 700;
    font-size: 11px;
    border-radius: 10px;
    padding: 3px 8px;
    cursor: pointer;
}

.chip-btn-dismiss {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 0 4px;
}

/* View Toolbar (Gruppera per butik toggle & Clear action pills) */
.shopping-list-view-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 2px;
    width: 100%;
    box-sizing: border-box;
}

.shopping-toolbar-pill {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    border: none;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full, 9999px);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition, all 0.2s cubic-bezier(0.16, 1, 0.3, 1));
}

.shopping-toolbar-pill svg,
.shopping-toolbar-pill i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke-width: 2px;
    color: currentColor;
    display: block;
}

.shopping-toolbar-pill:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

.shopping-toolbar-pill.btn-toggle-view.active {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.35);
    color: var(--accent);
    font-weight: 600;
}

.shopping-toolbar-pill.btn-toggle-view.active:hover {
    background: rgba(79, 70, 229, 0.18);
    border-color: var(--accent);
    color: var(--accent);
}

.shopping-toolbar-pill.btn-clear-checked:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.shopping-toolbar-pill.btn-clear-all {
    margin-left: auto;
}

.shopping-toolbar-pill.btn-clear-all:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Dark Theme overrides for shopping-toolbar-pill */
[data-theme="dark"] .shopping-toolbar-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

[data-theme="dark"] .shopping-toolbar-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

[data-theme="dark"] .shopping-toolbar-pill.btn-toggle-view.active {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
    color: var(--accent);
    font-weight: 600;
}

[data-theme="dark"] .shopping-toolbar-pill.btn-toggle-view.active:hover {
    background: rgba(99, 102, 241, 0.26);
    border-color: var(--accent);
    color: var(--accent);
}

/* Scrollable Content */
.shopping-list-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Empty State */
.shopping-list-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.shopping-list-empty .empty-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.shopping-list-empty h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.shopping-list-empty p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    max-width: 260px;
}

/* Item Rows */
.shopping-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.shopping-item-row:hover {
    border-color: var(--glass-border-focus);
    background: rgba(255, 255, 255, 0.05);
}

.shopping-item-row.is-header-row {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent);
    border-radius: 0;
    padding: 14px 6px 6px 6px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shopping-item-row.is-header-row:hover {
    background: rgba(99, 102, 241, 0.08);
}

.shopping-item-row.is-header-row.is-active-section {
    border-bottom: 2px solid #a5b4fc;
    background: rgba(99, 102, 241, 0.16);
    border-radius: 6px 6px 0 0;
}

.shopping-item-row.is-header-row .header-title-text {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-active-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent);
    color: #ffffff;
}

.shopping-item-row.is-header-row.is-store-group-header {
    background: rgba(99, 102, 241, 0.08);
    border: none;
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    margin-top: 14px;
    margin-bottom: 4px;
    cursor: default;
}

[data-theme="light"] .shopping-item-row.is-header-row.is-store-group-header {
    background: rgba(79, 70, 229, 0.08);
    border-left: 3px solid var(--accent);
}

.shopping-item-row.is-header-row.is-store-group-header .header-title-text {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.shopping-item-row.is-header-row.is-store-group-header .header-title-text svg,
.shopping-item-row.is-header-row.is-store-group-header .header-title-text i {
    width: 14px;
    height: 14px;
}

.header-count-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    margin-left: 6px;
}

/* Checkbox */
.item-checkbox-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.item-custom-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #475569;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

[data-theme="dark"] .item-custom-checkbox {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
}

.item-custom-checkbox:hover {
    border-color: var(--accent);
}

.item-custom-checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.item-custom-checkbox svg {
    width: 13px;
    height: 13px;
    stroke-width: 3;
}

/* Item Details */
.item-text-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

.shopping-item-row.is-checked .item-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.item-quantity {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
}

/* Deal Snapshot details */
.item-deal-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.item-deal-badge {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
}

.item-deal-title {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-secondary, #475569);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .item-deal-title {
    color: var(--text-muted, #94a3b8);
}

.item-deal-price {
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
}

.item-deal-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 2px;
}

.item-deal-actions .btn-change-deal {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 1.5px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--accent, #6366f1);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
}

.item-deal-actions .btn-change-deal:hover {
    background: rgba(99, 102, 241, 0.16);
    border-color: var(--accent, #6366f1);
}

.item-deal-actions .btn-change-deal svg,
.item-deal-actions .btn-change-deal i {
    width: 11px;
    height: 11px;
    stroke-width: 2.2px;
}

.item-deal-actions .btn-unlink-deal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 4px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: all 0.15s ease;
}

.item-deal-actions .btn-unlink-deal:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.item-deal-actions .btn-unlink-deal svg,
.item-deal-actions .btn-unlink-deal i {
    width: 12px;
    height: 12px;
    stroke-width: 2.2px;
}

.item-deal-price-expired {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 1.5px 7px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.28);
    line-height: 1.3;
}

[data-theme="dark"] .item-deal-price-expired {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

.item-deal-price-expired i,
.item-deal-price-expired svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    stroke-width: 2.2px;
    color: currentColor;
}

.item-deal-expired {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-weight: 600;
}

/* Row Action Buttons */
.item-row-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-move-item,
.btn-move-section,
.btn-delete-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    opacity: 0.65;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
}

.shopping-item-row:hover .btn-move-item,
.shopping-item-row:hover .btn-move-section,
.shopping-item-row:hover .btn-delete-item {
    opacity: 1;
}

.btn-move-item:hover,
.btn-move-section:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.14);
}

.btn-move-item:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.btn-delete-item:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.btn-move-item svg,
.btn-move-section svg,
.btn-delete-item svg {
    width: 14px;
    height: 14px;
}

@media (hover: none) {
    .btn-move-item,
    .btn-move-section,
    .btn-delete-item {
        opacity: 0.85;
    }
}

/* Section Move Quick Modal */
.section-move-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.18s ease;
}

.section-move-modal-card {
    background: var(--bg-card, #1e1e2d);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 360px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-move-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-move-modal-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-move-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.btn-section-move-target {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.btn-section-move-target:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: var(--accent);
    color: #ffffff;
}

.btn-section-move-target i {
    width: 15px;
    height: 15px;
    color: var(--accent);
}

/* Completed Section */
.shopping-completed-section {
    margin-top: 14px;
    border-top: 1px dashed var(--glass-border);
    padding-top: 10px;
}

.completed-section-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 8px 4px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
}

.completed-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.completed-section-title svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.completed-section-header.open .completed-section-title svg {
    transform: rotate(180deg);
}

.shopping-items-list.completed-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

/* Footer Section (Clean status & freemium meter) */
.shopping-list-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shopping-list-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Freemium Meter Bar */
.shopping-list-meter {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.meter-bar-track {
    width: 110px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.meter-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.meter-bar-fill.warning {
    background: #f59e0b;
}

.meter-bar-fill.full {
    background: #ef4444;
}

/* Upsell Bar */
.shopping-list-premium-upsell-bar {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.14), rgba(168, 85, 247, 0.14));
    border: 1px solid var(--glass-border-focus);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-primary);
}

.shopping-list-premium-upsell-bar svg {
    width: 15px;
    height: 15px;
    color: #f59e0b;
    margin-right: 6px;
}

.btn-upsell-link {
    background: var(--accent);
    color: #ffffff;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.18s;
}

.btn-upsell-link:hover {
    filter: brightness(1.15);
}

/* Premium Modal Aesthetics & Hierarchy */
#premiumModal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2200 !important;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.premium-modal-card {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border-focus);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(99, 102, 241, 0.25);
    position: relative;
    z-index: 2001 !important;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    margin: auto;
    overflow: hidden;
}

.premium-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px 20px 20px;
}

@media (max-width: 600px) {
    #premiumModal {
        padding: 10px 8px;
    }

    .premium-modal-card {
        max-height: 90vh;
        max-height: 90dvh;
        border-radius: 18px;
    }

    .premium-modal-body {
        padding: 12px 14px 16px 14px;
        gap: 10px;
    }

    .premium-perks-list {
        gap: 8px !important;
        margin: 2px 0 6px 0 !important;
    }

    .premium-perk-item strong {
        font-size: 12.5px !important;
    }

    .premium-perk-item p {
        font-size: 11px !important;
    }

    .premium-info-banner {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    .swish-payment-card {
        padding: 10px 12px !important;
        gap: 6px !important;
    }
}

.premium-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}

.premium-limit-alert {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 12.5px;
    color: #fca5a5;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.premium-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(168, 85, 247, 0.14));
    border: 1px solid rgba(99, 102, 241, 0.32);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--text-primary);
}

.premium-info-banner svg {
    width: 16px;
    height: 16px;
    color: #818cf8;
    flex-shrink: 0;
    margin-top: 1px;
}

[data-theme="light"] .premium-info-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
    border-color: rgba(99, 102, 241, 0.25);
    color: #1e1b4b;
}

[data-theme="light"] .premium-info-banner svg {
    color: #6366f1;
}

.premium-perks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 8px 0;
}

.premium-perk-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.premium-perk-item .perk-icon {
    width: 18px;
    height: 18px;
    color: #10b981;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-perk-item .perk-icon svg {
    width: 15px;
    height: 15px;
}

.premium-perk-item strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    line-height: 1.3;
}

.premium-perk-item p {
    margin: 2px 0 0 0;
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.35;
}

.premium-price-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

[data-theme="light"] .premium-price-box {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.18);
}

.premium-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.premium-price span.price-period {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.premium-price-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.premium-badge-pill {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-guarantee {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Swish Payment Card Aesthetics */
.swish-payment-card {
    background: linear-gradient(135deg, rgba(235, 91, 60, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(235, 91, 60, 0.28);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.swish-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

.swish-logo-badge {
    background: #eb5b3c;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

.swish-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.45;
}

.swish-step-num {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

[data-theme="dark"] .swish-step-num {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.swish-copy-value {
    background: rgba(245, 158, 11, 0.12);
    padding: 2px 7px;
    border-radius: 5px;
    font-family: monospace;
    font-weight: 700;
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.35);
    word-break: break-all;
}

[data-theme="dark"] .swish-copy-value {
    background: rgba(0, 0, 0, 0.3);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.swish-btn-copy {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.15s;
}

.swish-btn-copy:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] .swish-btn-copy {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

[data-theme="dark"] .swish-btn-copy:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

.swish-notice {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed var(--glass-border);
}

/* Account Modal Tabs & Admin Section */
.account-modal-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
    margin-bottom: 6px;
}

.account-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s;
}

.account-tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.account-tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.account-plan-card {
    transition: all 0.2s;
}

.account-plan-card.premium-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(99, 102, 241, 0.12)) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.admin-search-bar {
    display: flex;
    gap: 8px;
}

.admin-search-bar input {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.admin-search-bar input:focus {
    outline: none;
    border-color: #6366f1;
}

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-user-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s;
}

.admin-user-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
}

.admin-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-user-email {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.admin-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.admin-badge-free {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.admin-badge-premium {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-badge-is-admin {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-user-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.btn-admin-activate {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: filter 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-admin-activate:hover {
    filter: brightness(1.15);
}

.btn-admin-revoke {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-admin-revoke:hover {
    background: rgba(239, 68, 68, 0.22);
}


/* Mobile Media Queries for Shopping List Drawer */
@media (max-width: 992px) {
    .shopping-list-drawer {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 88dvh !important;
        border-radius: 20px 20px 0 0 !important;
        border-left: none !important;
        border-top: 1px solid var(--glass-border) !important;
        transform: translateY(100%) !important;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45) !important;
        z-index: 1700 !important;
    }

    .shopping-list-drawer.open {
        transform: translateY(0) !important;
    }

    .shopping-list-drawer .sheet-drag-handle {
        display: block;
        margin: 10px auto 4px auto;
    }

    .shopping-list-header {
        padding: 8px 20px 14px 20px;
    }
}

/* ==========================================================================
   Recipes Drawer, Cards, Detail View, and Import Modal
   ========================================================================== */

/* Header Action Button for Recipes */
.header-action-btn.btn-recipes {
    position: relative;
}

/* Backdrop */
.recipes-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1650;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.recipes-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Recipes Drawer (Desktop Default) */
.recipes-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px;
    max-width: 100vw;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 1700;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.recipes-drawer.open {
    transform: translateX(0);
}

/* Header */
.recipes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.recipes-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipes-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
}

.recipes-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.recipes-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* View Containers */
.recipes-view-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Action Bar */
.recipes-action-bar {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    flex-shrink: 0;
}

.recipes-action-bar .btn-primary-action {
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    box-sizing: border-box;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.recipes-action-bar .btn-primary-action svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.recipes-action-bar .btn-import-recipe-pill {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.recipes-action-bar .btn-import-recipe-pill:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.recipes-action-bar .btn-plan-week-pill {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .recipes-action-bar .btn-plan-week-pill {
    background: rgba(99, 102, 241, 0.22);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.45);
}

.recipes-action-bar .btn-plan-week-pill:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.55);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary-action {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: var(--transition);
}

.btn-primary-action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary-action {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .btn-secondary-action {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary-action:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger-action {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transition: var(--transition);
}

.btn-danger-action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.recipes-count-pill {
    height: 38px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Recipe Cards List */
.recipes-cards-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-card,
.recipe-card-item,
.recipe-item {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
    height: auto;
    min-height: auto;
    user-select: none;
}

.recipe-card:hover,
.recipe-card-item:hover,
.recipe-item:hover {
    border-color: var(--glass-border-focus);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.recipe-card-img,
.recipe-card-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    max-width: 72px;
    min-height: 72px;
    max-height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    align-self: flex-start;
    background: var(--glass-bg);
    display: block;
}

.recipe-card-thumb-fallback {
    width: 72px;
    height: 72px;
    min-width: 72px;
    max-width: 72px;
    min-height: 72px;
    max-height: 72px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    flex-shrink: 0;
    align-self: flex-start;
}

.recipe-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-left: auto;
    align-self: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.recipe-card:hover .recipe-card-arrow,
.recipe-card-item:hover .recipe-card-arrow,
.recipe-item:hover .recipe-card-arrow {
    color: var(--text-primary);
    transform: translateX(2px);
}

.recipe-card-body,
.recipe-card-content,
.recipe-info {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    height: auto;
    min-height: auto;
}

.recipe-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 2px 0;
    padding: 0;
}

.recipe-card-deals,
.recipe-deal-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    margin: 2px 0;
}

.recipe-card-deals .recipe-deal-badge,
.recipe-deal-row .recipe-deal-badge {
    margin: 0;
    flex-shrink: 0;
}

.recipe-card-deals .recipe-deal-summary-text,
.recipe-deal-row .recipe-deal-summary-text {
    text-overflow: ellipsis;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    flex: 1;
    min-width: 0;
}

.recipe-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 0;
    min-width: 0;
}

.recipe-card-meta .meta-pill {
    font-size: 0.72rem;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text-muted);
}

.recipe-card-meta .meta-pill > span {
    padding: 0;
    background: transparent;
    border: none;
    line-height: inherit;
    font-size: inherit;
    color: inherit;
}

.recipe-card-meta .meta-pill svg,
.recipe-card-meta .meta-pill i {
    width: 12px;
    height: 12px;
    min-width: 12px;
    flex-shrink: 0;
    stroke-width: 2.2;
}

.recipe-card-meta .recipe-domain-badge {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-weight: 600;
    text-transform: lowercase;
}

.recipe-card-meta .recipe-ingredients-badge {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.22);
    font-weight: 500;
}

.recipe-card-meta .recipe-servings-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-weight: 600;
}

@media (max-width: 480px) {
    .recipe-card,
    .recipe-card-item,
    .recipe-item {
        padding: 12px 10px;
        gap: 10px;
        height: auto;
        min-height: auto;
    }
}

/* Empty State */
.recipes-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.recipes-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    margin-bottom: 16px;
}

.recipes-empty-state h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.recipes-empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.45;
    margin: 0 0 20px 0;
}

.btn-import-first {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: var(--transition);
}

.btn-import-first:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Detail View */
.recipe-detail-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    background: var(--glass-bg);
}

.btn-back-to-list {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-back-to-list:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.btn-delete-recipe-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-delete-recipe-icon:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.recipe-detail-scroll-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.recipe-hero-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.recipe-hero-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.recipe-hero-img-fallback {
    width: 100%;
    height: 110px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
}

.recipe-hero-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipe-meta-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipe-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.recipe-source-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    width: fit-content;
    transition: var(--transition);
}

.recipe-source-link:hover {
    text-decoration: underline;
}

/* Ingredients Section */
.recipe-ingredients-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

/* Interactive Servings Stepper */
.recipe-servings-stepper {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 2px 6px;
    transition: var(--transition);
}

.recipe-servings-stepper .btn-stepper {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #10b981;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.recipe-servings-stepper .btn-stepper:hover:not(:disabled) {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    transform: scale(1.08);
}

.recipe-servings-stepper .btn-stepper:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.04);
}

.recipe-servings-stepper .btn-stepper svg {
    width: 12px;
    height: 12px;
}

.servings-stepper-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: #10b981;
    padding: 0 4px;
    user-select: none;
    white-space: nowrap;
}

.servings-stepper-label svg {
    width: 13px;
    height: 13px;
}

/* Light theme overrides for Servings Stepper & Selection Chips */
[data-theme="light"] .recipe-servings-stepper {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .recipe-servings-stepper .btn-stepper {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.25);
    color: #047857;
}

[data-theme="light"] .recipe-servings-stepper .btn-stepper:hover:not(:disabled) {
    background: #10b981;
    color: #ffffff;
}

[data-theme="light"] .servings-stepper-label {
    color: #047857;
}

[data-theme="light"] .recipe-select-chip,
[data-theme="light"] .btn-text-action {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .recipe-select-chip svg,
[data-theme="light"] .btn-text-action svg {
    color: #475569;
}

[data-theme="light"] .recipe-select-chip:hover,
[data-theme="light"] .btn-text-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.recipe-ingredients-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.recipe-ingredients-header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recipe-selection-hint {
    font-size: 11.5px;
    color: var(--text-muted);
}

.recipe-selection-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.recipe-select-chip,
.btn-text-action {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
    min-height: 32px;
}

.recipe-select-chip svg,
.btn-text-action svg {
    width: 13px;
    height: 13px;
    color: var(--text-secondary);
}

.recipe-select-chip:hover,
.btn-text-action:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.recipe-select-chip:hover svg,
.btn-text-action:hover svg {
    color: #ffffff;
}

.recipe-select-chip:active,
.btn-text-action:active {
    transform: scale(0.97);
}

.recipe-ingredients-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recipe-ingredient-row {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.recipe-ingredient-row:hover {
    border-color: var(--glass-border-focus);
}

.recipe-ingredient-row.unchecked {
    opacity: 0.55;
    background: transparent;
}

.recipe-ingredient-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--glass-border-focus);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: white;
    flex-shrink: 0;
    transition: var(--transition);
}

.recipe-ingredient-row.checked .recipe-ingredient-checkbox {
    background: #10b981;
    border-color: #10b981;
}

.recipe-ingredient-text {
    font-size: 13.5px;
    color: var(--text-primary);
    line-height: 1.35;
    flex: 1;
}

.recipe-ingredient-row.unchecked .recipe-ingredient-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Detail Footer */
.recipe-detail-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-sidebar);
    flex-shrink: 0;
}

.btn-add-to-list-primary {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 14.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    transition: all 0.2s ease;
}

.btn-add-to-list-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-add-to-list-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Import Modal Aesthetics */
.recipe-import-modal-card {
    max-width: 480px;
}

.recipe-import-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(99, 102, 241, 0.2));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-url-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.recipe-url-input-wrap input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.recipe-url-input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-fetch-recipe {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

.recipe-import-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.recipe-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.recipe-import-error {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #fca5a5;
    padding: 12px;
    background: rgba(239, 68, 68, 0.12);
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Preview Box in Modal */
.recipe-import-preview-box {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-hero {
    display: flex;
    gap: 12px;
    align-items: center;
}

.preview-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.preview-img-fallback {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
}

.preview-info {
    flex: 1;
    min-width: 0;
}

.preview-domain-tag {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

.preview-info h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2px 0 3px 0;
    line-height: 1.3;
}

.preview-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.preview-ingredients-box {
    border-top: 1px solid var(--glass-border);
    padding-top: 10px;
}

.preview-ingredients-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.preview-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-ingredients-list li {
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--glass-bg);
}

/* Mobile Media Queries for Recipes Drawer */
@media (max-width: 992px) {
    .recipes-drawer {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 88dvh !important;
        border-radius: 20px 20px 0 0 !important;
        border-left: none !important;
        border-top: 1px solid var(--glass-border) !important;
        transform: translateY(100%) !important;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45) !important;
        z-index: 1700 !important;
    }

    .recipes-drawer.open {
        transform: translateY(0) !important;
    }

    .recipes-drawer .sheet-drag-handle {
        display: block;
        margin: 10px auto 4px auto;
    }

    .recipes-header {
        padding: 8px 20px 14px 20px;
    }

    .recipe-hero-card {
        flex-shrink: 0 !important;
    }

    .recipe-hero-img {
        height: 160px;
    }
}

/* Shopping List Share & Export Styles */
.btn-shopping-header-share,
.btn-shopping-header-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-shopping-header-share i,
.btn-shopping-header-action i {
    width: 14px;
    height: 14px;
}

.btn-shopping-header-share:hover,
.btn-shopping-header-action:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-hover, rgba(255, 255, 255, 0.2));
}

[data-theme="light"] .btn-shopping-header-share,
[data-theme="light"] .btn-shopping-header-action {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

[data-theme="light"] .btn-shopping-header-share:hover,
[data-theme="light"] .btn-shopping-header-action:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.2);
}

.share-option-card {
    background: var(--surface-card, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.share-option-card:hover {
    border-color: var(--glass-border-hover, rgba(255, 255, 255, 0.16));
}

.share-option-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.share-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-glow, rgba(16, 185, 129, 0.15));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-option-icon i {
    width: 18px;
    height: 18px;
}

.share-icon-premium {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #f59e0b !important;
}

[data-theme="dark"] .share-icon-premium {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
}

.share-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.share-option-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
    line-height: 1.2;
}

[data-theme="dark"] .badge-premium {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.share-option-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Price History Truncation Banner */
.price-history-upgrade-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 9px 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, rgba(99, 102, 241, 0.06) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.price-history-upgrade-banner:hover {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(99, 102, 241, 0.1) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}

.price-history-upgrade-banner .banner-text {
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.price-history-upgrade-banner .banner-action {
    color: #f59e0b;
    font-weight: 700;
    font-size: 11.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 6px;
    transition: background 0.15s ease;
}

.price-history-upgrade-banner:hover .banner-action {
    background: rgba(245, 158, 11, 0.22);
}

/* ==========================================================================
   Cookie Banner, Recipe Quicklinks, Footer Links & About Modal Enhancements
   ========================================================================== */

/* 1. Feed Footer Links */
.footer-links-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.btn-footer-link {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 13px;
    font-family: var(--font-sans);
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.btn-footer-link svg,
.btn-footer-link i {
    width: 13px;
    height: 13px;
}

.btn-footer-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-dot {
    color: var(--text-muted);
    opacity: 0.6;
}

/* 2. Account Modal: About Xtrapris Link Card */
.account-about-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: var(--radius-md, 12px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-about-link-card:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.account-about-link-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-about-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-about-icon-badge svg,
.account-about-icon-badge i {
    width: 17px;
    height: 17px;
}

/* 3. Non-blocking Cookie Consent Banner */
.cookie-banner-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    pointer-events: none;
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cookie-banner-card {
    pointer-events: auto;
    width: 100%;
    max-width: 860px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border-focus);
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.45;
    flex: 1;
    min-width: 0;
}

.cookie-banner-text p {
    margin: 0;
}

.cookie-banner-icon {
    width: 22px;
    height: 22px;
    color: #f59e0b;
    flex-shrink: 0;
}

.btn-cookie-learn-more {
    color: var(--accent);
    background: transparent;
    border: none;
    padding: 0;
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
    display: inline;
}

.btn-cookie-learn-more:hover {
    color: var(--accent-hover);
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-cookie-essential {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-sans);
}

.btn-cookie-essential:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-cookie-accept {
    background: var(--accent);
    border: 1px solid transparent;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-sans);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-cookie-accept:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

/* Mobile cookie positioning above bottom nav */
@media (max-width: 992px) {
    .cookie-banner-wrapper {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 8px);
        padding: 8px 12px;
    }

    .cookie-banner-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
    }

    .cookie-banner-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .btn-cookie-essential,
    .btn-cookie-accept {
        flex: 1;
        text-align: center;
        padding: 9px 12px;
        justify-content: center;
    }
}

/* Hide cookie banner when full-screen drawers or modals are active */
body:has(#recipesDrawer.open) .cookie-banner-wrapper,
body:has(#shoppingListDrawer.open) .cookie-banner-wrapper,
body:has(.modal-backdrop[style*="display: flex"]) .cookie-banner-wrapper {
    opacity: 0;
    pointer-events: none;
}

/* 4. Popular Recipe Sites Quicklinks */
.recipe-sites-quicklinks {
    margin-top: 18px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md, 12px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.quicklinks-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.quicklinks-label svg,
.quicklinks-label i {
    width: 15px;
    height: 15px;
    color: #f59e0b;
}

.quicklinks-chips-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-site-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--radius-full, 9999px);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.recipe-site-chip svg,
.recipe-site-chip i {
    width: 12px;
    height: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.recipe-site-chip.site-ica .site-dot { background: #e11b22; }
.recipe-site-chip.site-koket .site-dot { background: #ea580c; }
.recipe-site-chip.site-arla .site-dot { background: #16a34a; }
.recipe-site-chip.site-recept .site-dot { background: #2563eb; }
.recipe-site-chip.site-tasteline .site-dot { background: #f59e0b; }

.recipe-site-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: var(--text-primary);
}

.recipe-site-chip:hover svg,
.recipe-site-chip:hover i {
    opacity: 1;
    transform: translate(1px, -1px);
}

.recipe-site-chip.site-ica:hover { border-color: rgba(225, 27, 34, 0.4); }
.recipe-site-chip.site-koket:hover { border-color: rgba(234, 88, 12, 0.4); }
.recipe-site-chip.site-arla:hover { border-color: rgba(22, 163, 74, 0.4); }
.recipe-site-chip.site-recept:hover { border-color: rgba(37, 99, 235, 0.4); }
.recipe-site-chip.site-tasteline:hover { border-color: rgba(245, 158, 11, 0.4); }

.quicklinks-help-text {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 2px 0 0 0;
    line-height: 1.4;
}

/* 5. About Xtrapris Modal */
.about-modal-card {
    max-width: 540px;
    width: 100%;
}

.about-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.about-icon-badge svg,
.about-icon-badge i {
    width: 20px;
    height: 20px;
}

.about-modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px 20px;
}

.about-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 7px;
}

.about-section-title svg,
.about-section-title i {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.about-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.about-text-muted {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.about-chains-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 4px;
}

.about-chain-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full, 9999px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.chain-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.chain-ica .chain-dot { background: #e11b22; }
.chain-willys .chain-dot { background: #15803d; }
.chain-hemkop .chain-dot { background: #e11d48; }
.chain-citygross .chain-dot { background: #2563eb; }
.chain-lidl .chain-dot { background: #0050aa; }
.chain-coop .chain-dot { background: #16a34a; }

.about-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin-top: 4px;
}

.about-privacy-note svg,
.about-privacy-note i {
    width: 15px;
    height: 15px;
    color: #10b981;
    flex-shrink: 0;
    margin-top: 2px;
}

.about-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 8px 16px;
    background: var(--accent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm, 8px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    margin-top: 4px;
}

.about-email-btn svg,
.about-email-btn i {
    width: 14px;
    height: 14px;
}

.about-email-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
    color: #ffffff;
}

/* ==========================================================================
   Ersätt med extrapris (Find / Replace Deal Modal & Chip)
   ========================================================================== */

/* Meta row chip on unlinked/generic items */
.btn-find-deal-chip {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    border: none;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full, 9999px);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    transition: var(--transition, all 0.2s cubic-bezier(0.16, 1, 0.3, 1));
}

.btn-find-deal-chip:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: var(--accent);
    transform: translateY(-1px);
    color: var(--accent);
}

.btn-find-deal-chip i,
.btn-find-deal-chip svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.2px;
    color: currentColor;
    display: block;
}

[data-theme="dark"] .btn-find-deal-chip {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

[data-theme="dark"] .btn-find-deal-chip:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: #818cf8;
    color: #ffffff;
}

/* Highlighted variant for expired deals */
.btn-find-deal-chip.chip-highlight-expired {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #d97706;
}

.btn-find-deal-chip.chip-highlight-expired:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #f59e0b;
    color: #b45309;
}

[data-theme="dark"] .btn-find-deal-chip.chip-highlight-expired {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

[data-theme="dark"] .btn-find-deal-chip.chip-highlight-expired:hover {
    background: rgba(245, 158, 11, 0.28);
    border-color: #fbbf24;
    color: #ffffff;
}

/* Modal Backdrop & Card */
.replace-deal-modal-backdrop {
    z-index: 2100 !important;
}

.replace-deal-modal-card {
    max-width: 520px;
    width: 100%;
    border-radius: var(--radius-lg, 16px);
    background: #ffffff;
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

#replaceDealModalTitle {
    color: var(--text-primary);
}

.replace-deal-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

/* Search Bar in Modal */
.replace-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.replace-search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.replace-search-input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13.5px;
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition);
}

.replace-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-clear-replace-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
}

.btn-clear-replace-search:hover {
    color: var(--text-primary);
}

/* Filter Chips in Modal */
.replace-deal-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.replace-filter-pill.active {
    background: rgba(79, 70, 229, 0.18) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    font-weight: 600;
}

/* Fallback Notice */
.replace-fallback-notice {
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-sm, 8px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-secondary);
}

/* Results Container */
.replace-deal-results {
    min-height: 200px;
    max-height: 50vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}

/* Compact Deal Card in Modal */
.replace-deal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md, 12px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: var(--transition, all 0.2s ease);
}

.replace-deal-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.35);
}

.replace-deal-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm, 8px);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.replace-deal-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.replace-deal-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.replace-deal-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11.5px;
}

.replace-deal-store-badge {
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    font-weight: 600;
    font-size: 11px;
}

.replace-deal-discount-badge {
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    font-weight: 700;
    font-size: 11px;
}

.replace-deal-compare {
    color: var(--text-muted);
    font-size: 11px;
}

.replace-deal-action-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.replace-deal-price-val {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    white-space: nowrap;
}

.btn-replace-choose {
    appearance: none;
    outline: none;
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius-sm, 6px);
    background: var(--accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
}

.btn-replace-choose:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Empty & Loading states in results */
.replace-deal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
    gap: 8px;
}

.replace-deal-empty i,
.replace-deal-empty svg {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    opacity: 0.6;
}

.replace-deal-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
    color: var(--text-muted);
    font-size: 13px;
    gap: 10px;
}

/* Mobile Bottom Sheet Media Query for Replace Deal Modal */
@media (max-width: 992px) {
    .replace-deal-modal-backdrop {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .replace-deal-modal-card {
        max-width: 100vw !important;
        width: 100% !important;
        max-height: 88dvh !important;
        border-radius: 20px 20px 0 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        animation: slideUpBottom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .replace-deal-modal-card .sheet-drag-handle {
        display: block;
        margin: 10px auto 4px auto;
    }

    .replace-deal-results {
        max-height: calc(88dvh - 220px);
    }
}

/* Dark theme overrides for Replace Deal Modal */
[data-theme="dark"] .replace-deal-modal-card {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] #replaceDealModalTitle,
[data-theme="dark"] .replace-deal-title {
    color: var(--text-color, #f8fafc) !important;
}

[data-theme="dark"] #replaceDealModalSubtitle {
    color: var(--text-muted, #94a3b8) !important;
}

[data-theme="dark"] .replace-search-input {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .replace-search-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

[data-theme="dark"] .replace-deal-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .replace-deal-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .replace-deal-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .replace-fallback-notice {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
    color: #cbd5e1;
}

[data-theme="dark"] .replace-deal-empty {
    color: #94a3b8;
}

[data-theme="dark"] .replace-deal-compare {
    color: #94a3b8;
}

/* ==========================================================================
   Veckoplanering (Meal Planner View & Modals)
   ========================================================================== */

.meal-planner-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 40px auto;
    padding: 0 4px;
    animation: fadeIn 0.25s ease-out;
}

/* Header */
.meal-planner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-radius: var(--radius-lg, 16px);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.meal-planner-header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-meal-planner-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 0;
    transition: var(--transition);
}

.btn-meal-planner-back:hover {
    color: var(--accent);
    transform: translateX(-2px);
}

.btn-meal-planner-back svg,
.btn-meal-planner-back i {
    width: 14px;
    height: 14px;
}

.meal-planner-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.meal-planner-title {
    margin: 0;
    font-size: 22px;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.meal-planner-title .accent-icon {
    color: var(--accent);
    width: 24px;
    height: 24px;
}

.meal-planner-week-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px;
    border-radius: var(--radius-full, 9999px);
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .meal-planner-week-pills {
    background: rgba(255, 255, 255, 0.04);
}

.meal-week-pill {
    appearance: none;
    outline: none;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-sans);
    padding: 6px 14px;
    border-radius: var(--radius-full, 9999px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.meal-week-pill.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.meal-week-pill .pill-prem-star {
    font-size: 11px;
}

.meal-planner-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-meal-share {
    appearance: none;
    outline: none;
    border: 1px solid var(--glass-border);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-sans);
    padding: 8px 14px;
    border-radius: var(--radius-md, 10px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    min-height: 40px;
}

.btn-meal-share:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.btn-meal-share svg,
.btn-meal-share i {
    width: 15px;
    height: 15px;
}

/* Tabs */
.meal-planner-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.meal-tab-btn,
.meal-planner-tab-btn {
    appearance: none;
    outline: none;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition);
    position: relative;
    bottom: -2px;
    min-height: 44px;
}

.meal-tab-btn:hover,
.meal-planner-tab-btn:hover {
    color: var(--text-primary);
}

.meal-tab-btn.active,
.meal-planner-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.meal-tab-btn i,
.meal-tab-btn svg,
.meal-planner-tab-btn i,
.meal-planner-tab-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.meal-tab-badge,
.meal-planner-tab-badge {
    padding: 2px 7px;
    border-radius: var(--radius-full, 9999px);
    background: rgba(0, 0, 0, 0.06);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .meal-tab-badge,
[data-theme="dark"] .meal-planner-tab-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.meal-tab-btn.active .meal-tab-badge,
.meal-planner-tab-btn.active .meal-planner-tab-badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
}

.meal-tab-badge.savings-badge,
.meal-planner-tab-badge.savings-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-label-short {
    display: none;
}

.tab-label-full {
    display: inline;
}

/* Tab 1: Days Grid */
.meal-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.meal-day-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    min-height: 220px;
}

[data-theme="dark"] .meal-day-card {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.meal-day-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.meal-day-card.is-past {
    opacity: 0.55;
    filter: grayscale(20%);
}

.meal-day-card.is-past:hover {
    border-color: var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.meal-day-card.is-past .meal-card-image-wrap img {
    filter: grayscale(25%);
}

.meal-day-card.is-past:hover .meal-card-image-wrap img {
    transform: none;
}

.meal-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="dark"] .meal-day-header {
    background: rgba(255, 255, 255, 0.02);
}

.meal-day-name-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.meal-day-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.meal-day-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Image Wrap for filled meal card */
.meal-card-image-wrap {
    width: 100%;
    height: 140px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .meal-card-image-wrap {
    background: rgba(255, 255, 255, 0.04);
}

.meal-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.meal-day-card:hover .meal-card-image-wrap img {
    transform: scale(1.03);
}

.meal-card-image-wrap.placeholder {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
}

.meal-card-placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.meal-card-placeholder-content svg,
.meal-card-placeholder-content i {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.meal-card-domain-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    letter-spacing: 0.2px;
}

.meal-card-domain-badge.custom {
    background: rgba(99, 102, 241, 0.85);
}

/* Card content below image */
.meal-card-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.meal-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    cursor: pointer;
    transition: color 0.15s ease;
}

.meal-card-title:hover {
    color: var(--accent);
}

.meal-card-stepper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.meal-card-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 3px 8px;
}

[data-theme="dark"] .meal-card-stepper {
    background: rgba(255, 255, 255, 0.04);
}

.btn-card-stepper {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-card-stepper:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.15);
}

.meal-card-servings-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 44px;
    text-align: center;
}

.meal-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
}

.btn-meal-action {
    padding: 6px 10px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    gap: 5px !important;
    flex: 1;
    justify-content: center;
    min-height: 32px !important;
}

.btn-meal-action.delete {
    flex: 0 0 34px;
    padding: 6px 0 !important;
    color: var(--text-muted);
}

.btn-meal-action.delete:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.1);
}

/* Empty day wrap */
.meal-day-empty-wrap {
    padding: 30px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
    text-align: center;
}

.meal-day-empty-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.meal-day-empty-icon svg,
.meal-day-empty-icon i {
    width: 22px;
    height: 22px;
}

.meal-day-empty-text {
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-meal-day-add {
    padding: 7px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ------------------------------------------------------------- */
/* Tab 2: Ingredienser & Extrapriser */
/* ------------------------------------------------------------- */
.ingredients-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 80px;
}

.ingredients-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ingredients-intro-text {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
    max-width: 700px;
    line-height: 1.45;
}

.meal-ingredients-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 140px;
}

.ingredient-group-section {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .ingredient-group-section {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.ingredient-group-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.ingredient-group-title svg,
.ingredient-group-title i {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.pantry-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: auto;
}

.ingredient-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual ingredient row */
.meal-ingredient-row,
.ingredient-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    box-sizing: border-box;
    width: 100%;
}

[data-theme="dark"] .meal-ingredient-row,
[data-theme="dark"] .ingredient-item-row {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.07);
}

.meal-ingredient-row:hover,
.ingredient-item-row:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.04);
}

.meal-ingredient-row.selected {
    border-color: rgba(99, 102, 241, 0.4);
}

.ingredient-left-col {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.ingredient-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 6px;
    border: 2px solid #475569;
    background: var(--bg-card, #ffffff);
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    transition: all 0.18s ease;
    margin: 0;
    position: relative;
    outline: none;
    flex-shrink: 0;
}

[data-theme="dark"] .ingredient-checkbox {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
}

.ingredient-checkbox:hover {
    border-color: var(--accent);
}

.ingredient-checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.ingredient-checkbox:checked::before {
    content: "";
    width: 10px;
    height: 5px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.ingredient-text-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.ingredient-term-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ingredient-multi-tag-row {
    margin-top: 2px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

.ingredient-multi-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

[data-theme="dark"] .ingredient-multi-tag {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.2);
}

.ingredient-origins-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.ingredient-recipe-origin-chip {
    font-size: 11.5px;
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .ingredient-recipe-origin-chip {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
}

.ingredient-deal-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.btn-ingredient-find-deal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    background: rgba(99, 102, 241, 0.12) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: var(--accent) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-ingredient-find-deal:hover {
    background: rgba(99, 102, 241, 0.22) !important;
    border-color: var(--accent) !important;
    transform: translateY(-1px);
}

.btn-ingredient-find-deal svg,
.btn-ingredient-find-deal i {
    width: 14px;
    height: 14px;
}

.ingredient-linked-deal-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
    box-sizing: border-box;
    max-width: 100%;
}

.linked-deal-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.linked-deal-store {
    font-weight: 700;
    font-size: 11.5px;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.linked-deal-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.linked-deal-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.linked-deal-row-bottom-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.linked-deal-price {
    font-size: 12.5px;
    font-weight: 700;
    color: #10b981;
}

.linked-deal-savings-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.18);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.linked-deal-row-bottom-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-unlink-deal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-unlink-deal:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.btn-unlink-deal svg,
.btn-unlink-deal i {
    width: 13px;
    height: 13px;
}

/* Bottom Transfer Bar */
.meal-transfer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card, #ffffff);
    border-top: 1px solid var(--glass-border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 1200;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .meal-transfer-bar {
    background: #111827;
}

.transfer-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.transfer-bar-info #transferItemCountText {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.transfer-bar-info .savings-highlight {
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
}

.btn-transfer-action {
    min-height: 44px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-md, 10px);
}

/* ------------------------------------------------------------- */
/* Tab 3: Besparing & Statistik */
/* ------------------------------------------------------------- */
.savings-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.savings-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.stat-card,
.savings-stat-card,
.savings-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .savings-stat-card,
[data-theme="dark"] .savings-metric-card {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.savings-stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.savings-stat-icon,
.savings-metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.savings-stat-icon svg,
.savings-stat-icon i,
.savings-metric-icon svg,
.savings-metric-icon i {
    width: 20px;
    height: 20px;
}

.savings-stat-icon.green,
.savings-metric-card.primary .savings-metric-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.savings-stat-icon.indigo,
.savings-metric-card.accent .savings-metric-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
}

.savings-stat-icon.amber {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.savings-stat-label,
.savings-metric-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.savings-stat-val,
.savings-metric-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading, var(--font-sans));
    line-height: 1.1;
}

.savings-stat-sub,
.savings-metric-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.text-green { color: #10b981 !important; }
.text-indigo { color: var(--accent) !important; }
.text-amber { color: #f59e0b !important; }

/* Savings Deals Section */
.savings-deals-section {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

[data-theme="dark"] .savings-deals-section {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.savings-deals-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.savings-deals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.savings-deal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .savings-deal-item {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.07);
}

.savings-deal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.savings-deal-store {
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
}

.savings-deal-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.savings-deal-for {
    font-size: 12px;
    color: var(--text-muted);
}

.savings-deal-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.savings-deal-promo {
    font-size: 13px;
    font-weight: 700;
    color: #10b981;
}

.savings-deal-saved {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.savings-no-deals {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
}

/* ------------------------------------------------------------- */
/* Modal styles for Meal Planner */
/* ------------------------------------------------------------- */
.meal-plan-modal-card {
    max-width: 520px;
    width: 100%;
}

.meal-plan-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 80vh;
    overflow-y: auto;
}

.meal-add-type-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px;
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .meal-add-type-toggle {
    background: rgba(255, 255, 255, 0.04);
}

.meal-type-pill {
    flex: 1;
    appearance: none;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.meal-type-pill.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .meal-type-pill.active {
    background: #1f2937;
    color: #ffffff;
}

.meal-recipe-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.meal-search-icon {
    position: absolute;
    left: 12px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
}

.meal-search-input,
.meal-text-input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--glass-border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    font-family: var(--font-sans);
}

.meal-text-input {
    padding-left: 12px;
}

/* Modal Recipe Picker Items */
.meal-recipes-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 2px;
}

.meal-recipe-picker-item,
.meal-recipe-pick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--glass-border);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="dark"] .meal-recipe-picker-item,
[data-theme="dark"] .meal-recipe-pick-item {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.07);
}

.meal-recipe-picker-item:hover,
.meal-recipe-pick-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.05);
}

.meal-recipe-picker-item.selected,
.meal-recipe-pick-item.selected {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 0 0 1px var(--accent);
}

.meal-picker-thumb,
.meal-recipe-pick-thumb {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    background: rgba(0, 0, 0, 0.06);
}

.meal-picker-thumb.placeholder,
.meal-recipe-pick-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.meal-picker-info,
.meal-recipe-pick-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.meal-picker-title,
.meal-recipe-pick-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meal-picker-meta,
.meal-recipe-pick-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meal-picker-source-badge {
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
}

.meal-picker-radio,
.meal-recipe-pick-check {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.meal-picker-radio.checked,
.meal-recipe-pick-item.selected .meal-recipe-pick-check {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.meal-picker-radio svg,
.meal-recipe-pick-check svg {
    width: 13px;
    height: 13px;
}

.meal-servings-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.servings-picker-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.servings-stepper-control {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 4px 10px;
}

[data-theme="dark"] .servings-stepper-control {
    background: rgba(255, 255, 255, 0.05);
}

.servings-stepper-control .btn-stepper {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0 4px;
}

.servings-stepper-control .stepper-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 18px;
    text-align: center;
}

.meal-move-days-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meal-move-day-btn,
.btn-move-day-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.meal-move-day-btn:hover:not(:disabled),
.btn-move-day-option:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.meal-move-day-btn:disabled,
.meal-move-day-btn.disabled,
.btn-move-day-option:disabled,
.btn-move-day-option.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--glass-border);
    background: rgba(0, 0, 0, 0.02);
}

.meal-move-day-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.meal-move-day-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.meal-move-day-date {
    font-size: 11.5px;
    color: var(--text-muted);
}

.meal-move-swap-label {
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
}

.meal-move-empty-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* ------------------------------------------------------------- */
/* Mobile responsive adjustments */
/* ------------------------------------------------------------- */
@media (max-width: 992px) {
    .meal-planner-view {
        margin-bottom: 90px;
    }

    .meal-days-grid {
        grid-template-columns: 1fr;
    }

    .meal-plan-floating-bar,
    .meal-transfer-bar {
        bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important; /* Above mobile bottom navigation with clearance */
        z-index: 90 !important;
        padding: 10px 16px;
    }

    .meal-plan-modal-backdrop {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .meal-plan-modal-card {
        max-width: 100vw !important;
        width: 100% !important;
        max-height: 85dvh !important;
        border-radius: 20px 20px 0 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        animation: slideUpBottom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .meal-plan-modal-card .sheet-drag-handle {
        display: block;
        margin: 10px auto 4px auto;
    }
}

@media (max-width: 768px) {
    .meal-planner-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .meal-planner-header-left {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .meal-planner-title-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }

    .meal-planner-week-pills {
        flex-wrap: wrap;
    }

    .btn-meal-share {
        width: 100%;
        justify-content: center;
    }

    .meal-planner-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding-bottom: 4px;
    }

    .meal-planner-tabs::-webkit-scrollbar {
        display: none;
    }

    .meal-tab-btn,
    .meal-planner-tab-btn {
        flex-shrink: 0;
        padding: 9px 12px;
        font-size: 13px;
    }

    .meal-ingredient-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        box-sizing: border-box;
        max-width: 100%;
    }

    .ingredient-left-col {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .ingredient-deal-col {
        align-self: stretch;
        width: 100%;
        padding-left: 0;
        margin-left: 0;
        box-sizing: border-box;
    }

    .ingredient-linked-deal-card {
        width: 100%;
        max-width: 100%;
        padding: 8px 10px;
        box-sizing: border-box;
    }

    .linked-deal-row-top {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    .linked-deal-row-top .linked-deal-title {
        flex: 1;
        min-width: 0;
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .linked-deal-row-bottom {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .linked-deal-row-bottom-left {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    .linked-deal-row-bottom-left .linked-deal-savings-tag {
        font-size: 11px;
        white-space: nowrap;
    }

    .linked-deal-row-bottom-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
}

/* Specific mobile layout (< 600px) ensuring all 3 tabs fit in a single row without horizontal scroll */
@media (max-width: 600px) {
    .meal-planner-tabs {
        display: flex !important;
        width: 100% !important;
        gap: 4px !important;
        padding: 0 4px !important;
        overflow-x: visible !important; /* Ingen scroll behövs när alla ryms */
        box-sizing: border-box !important;
    }

    .meal-tab-btn,
    .meal-planner-tab-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 8px 4px !important;
        font-size: 0.78rem !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 4px !important;
        min-height: 40px !important;
        white-space: nowrap !important;
    }

    .meal-tab-btn i,
    .meal-tab-btn svg,
    .meal-planner-tab-btn i,
    .meal-planner-tab-btn svg {
        width: 13px !important;
        height: 13px !important;
        flex-shrink: 0 !important;
    }

    .meal-tab-badge,
    .meal-planner-tab-badge {
        font-size: 0.7rem !important;
        padding: 2px 5px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
    }

    .tab-label-full {
        display: none !important;
    }

    .tab-label-short {
        display: inline !important;
        white-space: nowrap !important;
    }
}

/* ==========================================================================
   Modern City Selector Modal & Quick City Switcher
   ========================================================================== */
.city-selector-card {
    max-width: 580px;
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    border: 1px solid var(--glass-border-focus);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.city-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header-title-group h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.modal-title-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.modal-header-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.city-selector-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Sökfält */
.city-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.city-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

#citySearchInput {
    width: 100%;
    padding: 12px 40px 12px 42px;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

#citySearchInput:focus {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.city-search-clear {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s ease;
}

.city-search-clear:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.city-search-clear svg,
.city-search-clear i {
    width: 16px;
    height: 16px;
}

/* Quick chips */
.quick-cities-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-cities-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.quick-cities-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.city-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full, 9999px);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.city-chip:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.city-chip.active {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.city-chip-nationwide {
    border-color: rgba(46, 204, 113, 0.4);
    background: rgba(46, 204, 113, 0.12);
    font-weight: 600;
    color: var(--text-primary);
}

.city-chip-nationwide:hover {
    background: rgba(46, 204, 113, 0.22);
    border-color: var(--accent);
}

.city-chip-flag {
    font-size: 14px;
    line-height: 1;
}

/* Results section (capped to max 30 for 60 FPS DOM performance) */
.city-results-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 140px;
}

.city-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-results-count {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.city-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 7px;
    max-height: 230px;
    overflow-y: auto;
    padding: 2px 2px 2px 0;
}

.city-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    box-sizing: border-box;
}

.city-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.city-result-item.active {
    border-color: var(--accent);
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.city-item-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.city-result-item:hover .city-item-icon,
.city-result-item.active .city-item-icon {
    color: var(--accent);
}

.city-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-item-name mark {
    background: transparent;
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
}

.city-results-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 3px 0;
    font-style: italic;
}

.city-results-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
}

.city-results-empty .empty-icon {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Reassuring disclaimer */
.city-modal-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    margin-top: 2px;
}

.city-disclaimer-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
}

.city-modal-disclaimer p {
    margin: 0;
}

.city-modal-disclaimer strong {
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .city-selector-card {
        padding: 18px 16px;
        gap: 12px;
    }
    .city-results-grid {
        grid-template-columns: 1fr;
        max-height: 200px;
    }
    .header-city-btn {
        padding: 6px 10px;
        gap: 6px;
    }
    .header-city-name {
        max-width: 140px;
    }
    .header-city-arrow {
        display: inline-block !important;
        margin-left: 2px;
    }
}

/* ==========================================================================
   Kockens klipp - Recept- & Kampanjmatchning Badges & Tags
   ========================================================================== */
.recipe-deal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2.5px 8.5px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.32);
    width: fit-content;
    line-height: 1.25;
    letter-spacing: -0.1px;
}

[data-theme="dark"] .recipe-deal-badge {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.45);
}

.recipe-deal-badge.meal-picker-deal-badge {
    margin-bottom: 2px;
}

.recipe-deal-summary-text {
    font-size: 11.5px;
    color: #15803d;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

[data-theme="dark"] .recipe-deal-summary-text {
    color: #4ade80;
}

.ingredient-deal-tag {
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: 6px;
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, 0.28);
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.ingredient-deal-tag.is-clickable {
    cursor: pointer;
    font-family: inherit;
    user-select: none;
    transition: all 0.15s ease;
}

.ingredient-deal-tag.is-clickable:hover {
    background: rgba(22, 163, 74, 0.22);
    border-color: rgba(22, 163, 74, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ingredient-deal-tag.is-clickable:active {
    transform: translateY(0);
}

[data-theme="dark"] .ingredient-deal-tag {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.38);
}

[data-theme="dark"] .ingredient-deal-tag.is-clickable:hover {
    background: rgba(34, 197, 94, 0.28);
    border-color: rgba(34, 197, 94, 0.6);
}

.ingredient-deal-tag i,
.ingredient-deal-tag svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.2px;
}


/* ==========================================================================
   Veckoplanering Flik 2 - Ingredienser & Extrapriser Highlights
   ========================================================================== */
.meal-ingredient-row.has-available-deal {
    border-color: rgba(245, 158, 11, 0.38) !important;
    background: rgba(245, 158, 11, 0.035) !important;
}

[data-theme="dark"] .meal-ingredient-row.has-available-deal {
    border-color: rgba(245, 158, 11, 0.35) !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

.meal-ingredient-row.has-available-deal:hover {
    border-color: rgba(245, 158, 11, 0.6) !important;
    background: rgba(245, 158, 11, 0.07) !important;
}

.ingredient-avail-deal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
    margin-top: 3px;
    width: fit-content;
    line-height: 1.25;
}

/* Veckoplanering Flik 2 - Loading State */
.meal-ingredients-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    text-align: center;
}

.meal-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.meal-loading-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

[data-theme="dark"] .ingredient-avail-deal-badge {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.45);
}

.ingredient-avail-deal-badge svg,
.ingredient-avail-deal-badge i {
    width: 12px;
    height: 12px;
    stroke-width: 2.2px;
}

.btn-ingredient-choose-deal {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.22) 100%) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.55) !important;
    color: #b45309 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15) !important;
}

[data-theme="dark"] .btn-ingredient-choose-deal {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.32) 100%) !important;
    border-color: rgba(245, 158, 11, 0.65) !important;
    color: #fbbf24 !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25) !important;
}

.btn-ingredient-choose-deal:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.26) 0%, rgba(217, 119, 6, 0.36) 100%) !important;
    border-color: #d97706 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28) !important;
}

.btn-ingredient-choose-deal svg,
.btn-ingredient-choose-deal i {
    width: 14px;
    height: 14px;
    stroke-width: 2.2px;
}

.btn-change-deal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

[data-theme="dark"] .btn-change-deal {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-change-deal:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.btn-change-deal svg,
.btn-change-deal i {
    width: 12px;
    height: 12px;
}

.btn-auto-link-deals {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.28);
}

.btn-auto-link-deals:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-auto-link-deals:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-auto-link-deals svg,
.btn-auto-link-deals i {
    width: 14px;
    height: 14px;
}

.btn-unlink-in-modal {
    margin-left: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-unlink-in-modal:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: #ef4444;
}

/* ==========================================================================
   Responsive Share Link Input Row (Dela matsedel & Dela inköpslista)
   ========================================================================== */
.share-link-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.share-link-input-row .share-link-input {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

.share-link-input-row .share-link-copy-btn {
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .share-link-input-row,
    #mealPlanShareLinkPremiumState .share-link-input-row,
    #shareLinkPremiumState .share-link-input-row {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .share-link-input-row .share-link-input,
    #inputMealPlanShareUrl,
    #inputShoppingListShareUrl {
        width: 100% !important;
        box-sizing: border-box !important;
        flex: none !important;
    }

    .share-link-input-row .share-link-copy-btn,
    #btnCopyMealPlanShareUrl,
    #btnCopyShareUrl {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
}

/* Hide global search bar when Veckoplanering is active */
body.meal-planner-active .search-container,
body.meal-planner-active #searchSubBar {
    display: none !important;
}

/* Watch groups section headers in deals feed */
.watch-group-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin-top: 28px;
    margin-bottom: 6px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.watch-group-header:first-of-type {
    margin-top: 4px;
}

.watch-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.watch-group-emoji {
    font-size: 22px;
    line-height: 1;
}

.watch-group-name {
    letter-spacing: -0.2px;
}

.watch-group-count {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.btn-filter-this-watch {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent, #6366f1);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-filter-this-watch:hover {
    background: var(--accent, #6366f1);
    color: white;
}

.watch-item-card.clickable-watch-card {
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.watch-item-card.clickable-watch-card:hover {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    transform: translateY(-1px);
}

