/* Modern 2025 Design System - SaverSaurus.com Brand */

:root {
    /* SaverSaurus Brand Colors */
    --primary: #7FB069;        /* Primary Green - soft sage green */
    --primary-hover: #6A9456;
    --primary-dark: #2D5016;   /* Dark Green - deep forest green */
    --primary-light: #A8C686;  /* Light Green - highlights */
    --secondary: #F4D03F;      /* Yellow - belly and warm accents */
    --secondary-hover: #E6C338;
    --accent-orange: #F39C12;  /* Orange - fire/energy elements */
    --accent-coral: #E74C3C;   /* Coral Red - mouth interior */
    --accent-blue: #85C1E9;    /* Sky Blue - tears and water */
    --dark: #1C1C1C;          /* Deep Black - background and contrast */
    
    /* UI Colors */
    --background: #FFFFFF;
    --surface: #F8FAFB;
    --surface-hover: #EFF4F7;
    --text-primary: #2D5016;   /* Using dark green for primary text */
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --border: #E2E8F0;
    --shadow-color: 45 80 22;  /* Green-tinted shadow */
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;
    
    /* Borders */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(var(--shadow-color) / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(var(--shadow-color) / 0.1), 0 2px 4px -2px rgb(var(--shadow-color) / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(var(--shadow-color) / 0.1), 0 4px 6px -4px rgb(var(--shadow-color) / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(var(--shadow-color) / 0.1), 0 8px 10px -6px rgb(var(--shadow-color) / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}



/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Desktop-specific styles */
@media (min-width: 769px) {
    /* Scanner is now visible on desktop too */
}

/* Container */
.app-container {
    max-width: 768px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
    min-height: 100vh;
}

/* Large screens - even wider */
@media (min-width: 1024px) {
    .app-container {
        max-width: 1024px;
        padding: var(--space-sm) var(--space-xl) var(--space-xl);
    }
}

@media (min-width: 1280px) {
    .app-container {
        max-width: 1200px;
    }
}

/* Navigation Bar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding: var(--space-xs) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
}

.logo-crown {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.logo-image {
    height: 60px;
    width: auto;
}

/* Stats Speech Bubble */
.stats-bubble {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: var(--surface);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 200px;
    opacity: 0;
    animation: bubbleFadeIn 0.5s ease-out forwards;
}

.stats-bubble::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--primary);
}

.stats-bubble::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--surface);
}

.stats-bubble-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.stat-bubble-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    white-space: nowrap;
}

.stat-emoji {
    font-size: 1.25rem;
}

.stat-number {
    font-weight: 700;
    color: var(--primary);
}

.stat-text {
    color: var(--text-secondary);
}

@keyframes bubbleFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes bubbleFadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Navbar Search */
.navbar-search {
    flex: 1;
    max-width: 800px;
    margin: 0 var(--space-lg);
}

.navbar-search-form {
    display: flex;
    align-items: center;
    position: relative;
}

.navbar-search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    padding-right: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    background: white;
    transition: all var(--transition-fast);
}

.navbar-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.navbar-search-button {
    position: absolute;
    right: 4px;
    background: var(--primary);
    border: none;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-search-button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Adjust search on smaller screens */
@media (max-width: 968px) {
    .navbar-search {
        flex: 1;
        margin: 0 var(--space-sm);
        max-width: none;
    }
    
    .navbar-search-input {
        font-size: 0.875rem;
        padding: 6px 10px;
        padding-right: 32px;
    }
    
    .navbar-search-button {
        padding: 3px 6px;
    }
    
    .logo-text {
        display: none; /* Hide logo text to save space */
    }
    
    .logo-crown {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .navbar-search-input {
        font-size: 0.8rem;
        padding: 5px 8px;
        padding-right: 30px;
    }
    
    .navbar-search-button {
        padding: 2px 5px;
        right: 3px;
    }
    
    .logo-crown {
        height: 35px;
    }
}

/* Modern Select Dropdown */
.select-wrapper {
    position: relative;
}

.select-modern {
    appearance: none;
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.25rem var(--space-md) 0.25rem var(--space-sm);
    font-size: 0.875rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select-modern:hover {
    background-color: var(--surface-hover);
    border-color: var(--primary);
}

.select-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(78 205 196 / 0.1);
}

.select-wrapper::after {
    content: "›";
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    pointer-events: none;
    color: var(--text-secondary);
}

/* Why Link, Browser Link & Contact Link */
.why-link, .browser-link, .contact-link, .favorites-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-dark);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.why-link:hover, .browser-link:hover, .contact-link:hover, .favorites-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

/* Settings Link */
.settings-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--surface);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.settings-link:hover {
    background-color: var(--primary);
    color: white;
}

/* Main Card */
.scanner-card {
    background: var(--background);
    border: 3px solid var(--primary-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.scanner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

.card-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.025em;
}

.card-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Scanner Area */
#reader {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    background-color: var(--surface);
    border: 2px solid var(--border);
    position: relative;
    z-index: 1;
}

#reader video {
    border-radius: var(--radius-lg);
}

/* Input Group */
.input-group {
    display: flex;
    gap: var(--space-sm);
    position: relative;
    z-index: 1;
}

.input-modern {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.input-modern::placeholder {
    color: var(--text-tertiary);
}

.input-modern:focus {
    outline: none;
    background-color: var(--background);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(78 205 196 / 0.1);
}

/* Large input variant */
.input-group-large {
    margin-top: var(--space-sm);
}

.input-large {
    padding: var(--space-md) var(--space-lg);
    font-size: 1.25rem;
    font-weight: 500;
    border-width: 2px;
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
    font-weight: 600;
}

/* Manual entry section */
.manual-entry-primary {
    margin-top: var(--space-xl);
}

.input-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
    text-align: center;
}

/* Divider */
.divider-with-text {
    position: relative;
    text-align: center;
    margin: var(--space-xl) 0;
}

.divider-with-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider-with-text span {
    position: relative;
    padding: 0 var(--space-md);
    background: var(--background);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Camera section */
.camera-section-secondary {
    text-align: center;
}

.btn-camera {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
}

/* Modern Button */
.btn {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--surface-hover);
    border-color: var(--primary);
}

/* Results Section */
.results-container {
    margin-top: var(--space-xl);
    position: relative;
    /* Ensure visibility on all devices */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100px;
}

/* Mascot Loading Indicator */
#mascot-loading-indicator {
    margin-bottom: var(--space-lg);
    /* Ensure it's at the top on mobile when searching */
    margin-top: var(--space-md);
}

.result-card {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Product Header */
.product-header {
    display: block;
    margin-bottom: var(--space-md);
}

.product-image-container {
    flex-shrink: 0;
    position: relative;
}

.product-thumbnails {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-xs); /* For scrollbar */
}

.product-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.product-thumbnail:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.product-thumbnail.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.product-image {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background-color: var(--surface);
    border: 1px solid var(--border);
}

.product-info {
    flex: 1;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.product-barcode {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

/* Modern Table */
.offers-table {
    width: 100%;
    border-collapse: collapse;
}

.offers-table th {
    text-align: left;
    padding: var(--space-md) var(--space-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background-color: var(--surface);
    border-bottom: 2px solid var(--border);
}

/* Align price columns to the right */
.offers-table th:nth-child(2),
.offers-table th:nth-child(3) {
    text-align: right;
}

/* Column widths */
.offers-table th:nth-child(1),
.offers-table td:nth-child(1) {
    width: 50%;
}

.offers-table th:nth-child(2),
.offers-table td:nth-child(2) {
    width: 25%;
    text-align: right;
}

.offers-table th:nth-child(3),
.offers-table td:nth-child(3) {
    width: 25%;
    text-align: right;
}

.offers-table td {
    padding: var(--space-md) var(--space-md);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

/* Price styling */
.offers-table td:nth-child(2) {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Total styling - make it prominent */
.offers-table td:nth-child(3) {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.offers-table tbody tr {
    transition: background-color var(--transition-fast);
    cursor: pointer;
    height: 56px;
}

.offers-table tbody tr:hover {
    background-color: var(--surface-hover);
}

.offers-table tbody tr:last-child td {
    border-bottom: none;
}

.merchant-name {
    font-weight: 400;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9375rem;
}

.merchant-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
    background-color: var(--surface);
    padding: 1px;
    vertical-align: middle;
    margin-right: var(--space-xs);
}

/* New Table Structure Styles */
.zone-header {
    width: 6px !important;
    padding: 0 !important;
}

.favicon-header {
    width: 40px !important;
    padding-left: var(--space-sm) !important;
}

.merchant-header {
    width: auto;
    min-width: 200px;
}

.price-header, .total-header {
    width: 120px !important;
    text-align: right !important;
}

/* Zone indicator column */
.zone-cell {
    width: 6px !important;
    padding: 0 !important;
    position: relative;
    vertical-align: middle;
}

.zone-indicator-bar {
    display: block;
    width: 6px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
}

/* Favicon column */
.favicon-cell {
    width: 40px !important;
    padding: var(--space-sm) !important;
    vertical-align: middle;
}

.table-favicon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

/* Merchant column */
.merchant-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: var(--space-md);
    vertical-align: middle;
}

.merchant-name-text {
    font-weight: 500;
    color: var(--text-primary);
}

.merchant-badges-inline {
    margin-left: var(--space-xs);
}

.merchant-badges-inline .winner-crown {
    font-size: 1rem;
}

.merchant-badges-inline .condition-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    margin-left: 4px;
    vertical-align: middle;
}

/* Price columns */
.price-cell, .total-cell {
    text-align: right !important;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.price-cell {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.total-cell {
    color: var(--primary);
    font-size: 1.125rem;
}

.price {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.total-price {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* Condition Badge */
.condition-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: var(--secondary);
    color: var(--dark-blue);
    border-radius: var(--radius-sm);
    margin-left: var(--space-xs);
    letter-spacing: 0.025em;
}

/* Modern Loading Indicator */
.loading-container {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md);
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.loading-mascot {
    width: 48px;
    height: 48px;
    animation: bounce 2s ease-in-out infinite;
    flex-shrink: 0;
}

.loading-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

/* Mobile Full-Screen Loading Indicator */
@media (max-width: 768px) {
    #mascot-loading-indicator.mobile-fullscreen {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 9999;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        margin: 0;
        padding: 2rem;
        border-radius: 1rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        max-width: 90%;
        pointer-events: auto;
        /* Removed full screen coverage and touch-action: none */
    }
    
    #mascot-loading-indicator.mobile-fullscreen .loading-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: var(--space-lg);
        background: transparent;
        border: none;
        box-shadow: none;
        gap: var(--space-lg);
        max-width: none;
        margin: 0;
        width: 100%;
        height: 100%;
    }
    
    #mascot-loading-indicator.mobile-fullscreen .loading-mascot {
        width: 250px;
        height: 250px;
        animation: dino-pulse 2s ease-in-out infinite;
    }
    
    #mascot-loading-indicator.mobile-fullscreen .loading-content {
        align-items: center;
        text-align: center;
        gap: var(--space-md);
    }
    
    #mascot-loading-indicator.mobile-fullscreen .loading-text {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: var(--space-lg) 0 var(--space-md) 0;
        line-height: 1.5;
        letter-spacing: -0.02em;
    }
    
    #mascot-loading-indicator.mobile-fullscreen .loading-dots {
        display: flex;
        gap: var(--space-sm);
        justify-content: center;
    }
    
    #mascot-loading-indicator.mobile-fullscreen .dot {
        width: 12px;
        height: 12px;
        background-color: var(--primary-color);
        border-radius: 50%;
        animation: dot-pulse 1.5s infinite ease-in-out;
    }
    
    #mascot-loading-indicator.mobile-fullscreen .dot:nth-child(2) {
        animation-delay: 0.2s;
    }
    
    #mascot-loading-indicator.mobile-fullscreen .dot:nth-child(3) {
        animation-delay: 0.4s;
    }
}

/* Adjust for smaller mobile screens */
@media (max-width: 380px) {
    #mascot-loading-indicator.mobile-fullscreen .loading-mascot {
        width: 200px;
        height: 200px;
    }
    
    #mascot-loading-indicator.mobile-fullscreen .loading-text {
        font-size: 1rem;
    }
}

/* New animations for mobile loading */
@keyframes dino-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes dot-pulse {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.loading-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Modern Loading Dots */
.loading-dots {
    display: flex;
    gap: var(--space-xs);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
    animation: pulse 1.4s ease-in-out infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Search Suggestions */
.search-suggestions {
    margin-top: var(--space-xl);
}

.suggestion-section {
    margin-bottom: var(--space-xl);
}

.suggestion-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--space-md);
}

@media (max-width: 1200px) {
    .suggestion-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .suggestion-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .suggestion-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.suggestion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm);
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-fast);
    text-align: center;
}

.suggestion-card:hover {
    background-color: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.suggestion-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
}

.suggestion-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background-color: var(--background);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
}

.suggestion-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Category Section */
.category-section {
    margin-bottom: var(--space-xl);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--light-gray);
}

.category-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
}

.category-placeholder {
    width: 120px;
    height: 120px;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: var(--space-xs);
}

.category-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

/* Share Button */
.share-button-container {
    text-align: center;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.share-button {
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-md);
}

/* Share notification */
.share-notification {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-blue);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
    font-size: 0.875rem;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Merchant Link */
.merchant-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    transition: color var(--transition-fast);
    font-size: 0.9375rem;
}

.merchant-link:hover {
    color: var(--primary);
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

/* Mobile First Design */
@media (max-width: 640px) {
    :root {
        --space-xs: 0.25rem;
        --space-sm: 0.5rem;
        --space-md: 0.75rem;
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    .app-container {
        padding: var(--space-xs) var(--space-md) var(--space-md);
        max-width: 100%;
    }
    
    .navbar {
        margin-bottom: var(--space-sm);
        padding: var(--space-xs) 0;
        flex-wrap: nowrap;
    }
    
    .logo {
        gap: 4px;
    }
    
    .logo-crown {
        height: 32px;
    }
    
    .logo-text {
        font-size: 1.125rem;
        display: block; /* Always show SaverSaurus text */
    }
    
    .logo-image {
        height: 40px;
    }
    
    .nav-actions {
        gap: var(--space-xs);
        flex-shrink: 0;
    }
    
    .why-link, .browser-link, .contact-link, .favorites-link {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Hide links on very small screens */
    .why-link, .browser-link {
        display: none;
    }
    
    .select-modern {
        font-size: 0.75rem;
        padding: 0.125rem var(--space-xs) 0.125rem var(--space-xs);
        min-width: 45px;
        max-width: 60px;
    }
    
    .select-wrapper::after {
        right: 2px;
        font-size: 0.75rem;
    }
    
    .settings-link {
        width: 28px;
        height: 28px;
    }
    
    .settings-link svg {
        width: 16px;
        height: 16px;
    }
}

/* Slightly larger mobile screens */
@media (min-width: 375px) and (max-width: 640px) {
    .logo-text {
        font-size: 1.25rem; /* Slightly larger on bigger screens */
    }
    
    .logo-crown {
        height: 36px;
    }
    
    .why-link {
        display: inline-block;
    }
    
    .browser-link {
        display: none; /* Still hide browser link on medium screens */
    }
}

/* Even larger mobile screens - show full country names */
@media (min-width: 480px) and (max-width: 640px) {
    .select-modern {
        max-width: 100px;
    }
    
    .browser-link {
        display: inline-block; /* Show browser link on larger screens */
    }
    
    .contact-link {
        display: none; /* Hide contact on medium screens to make room */
    }
}

@media (max-width: 640px) {
    .scanner-card {
        padding: var(--space-md);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-md);
    }
    
    .card-header {
        margin-bottom: var(--space-lg);
    }
    
    .card-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .card-subtitle {
        font-size: 0.875rem;
    }
    
    #reader {
        margin-bottom: var(--space-md);
        min-height: 250px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-modern {
        width: 100%;
        padding: var(--space-md);
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: var(--space-md) var(--space-lg);
    }
    
    .result-card {
        padding: var(--space-md);
        border-radius: var(--radius-xl);
        border: 1px solid var(--border);
    }
    
    .results-container {
        margin-top: var(--space-lg);
        /* Force visibility on mobile */
        display: block !important;
        visibility: visible !important;
    }
    
    .product-header {
        gap: var(--space-md);
    }
    
    .product-image {
        width: 60px;
        height: 60px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-barcode {
        font-size: 0.75rem;
    }
    
    /* Mobile table - redesigned structure */
    .offers-table-container {
        margin-top: var(--space-md);
        background: transparent;
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    .offers-table {
        display: block;
        width: 100%;
    }

    .offers-table thead {
        display: none;
    }

    .offers-table tbody {
        display: block;
    }

    /* Mobile table row */
    .offers-table tr {
        display: flex;
        align-items: center;
        background: var(--background);
        border-bottom: 1px solid var(--border);
        padding: var(--space-sm);
        min-height: 3.5rem;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        position: relative;
    }

    .offers-table td {
        display: block;
        padding: 0;
        border: none;
    }

    /* Zone cell - show as vertical bar */
    .zone-cell {
        width: 4px !important;
        height: 100%;
        padding: 0 !important;
        position: relative;
    }
    
    .zone-indicator-bar {
        width: 4px;
        height: 40px;
        border-radius: 2px;
        position: relative;
        margin-right: var(--space-sm);
    }

    /* Favicon cell */
    .favicon-cell {
        width: auto !important;
        padding: 0 var(--space-xs) 0 0 !important;
    }
    
    .table-favicon {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        flex-shrink: 0;
    }

    /* Merchant cell - takes remaining space */
    .merchant-cell {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        padding-right: var(--space-sm);
        overflow: hidden;
    }
    
    .merchant-name-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.9375rem;
    }
    
    .merchant-badges-inline {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    /* Hide price column on mobile */
    .price-cell {
        display: none;
    }

    /* Total cell - show on right */
    .total-cell {
        flex: 0 0 auto;
        font-size: 1.125rem;
        font-weight: 700;
        color: var(--primary);
        white-space: nowrap;
        text-align: right !important;
    }
    
    /* Ensure loading indicator is prominently visible on mobile */
    #mascot-loading-indicator:not(.mobile-fullscreen) {
        position: relative;
        z-index: 100;
        margin-top: 0;
        padding-top: var(--space-md);
    }
    
    #mascot-loading-indicator:not(.mobile-fullscreen) .loading-container {
        padding: var(--space-sm);
        gap: var(--space-md);
        /* Make loading indicator more prominent on mobile */
        background-color: var(--surface);
        border: 2px solid var(--primary-color);
        margin: var(--space-md) auto;
        max-width: 90%;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    #mascot-loading-indicator:not(.mobile-fullscreen) .loading-mascot {
        width: 40px;
        height: 40px;
    }
    
    #mascot-loading-indicator:not(.mobile-fullscreen) .loading-text {
        font-size: 0.8125rem;
    }
    
    #mascot-loading-indicator:not(.mobile-fullscreen) .loading-content {
        gap: 0.25rem;
    }
    
    /* Ensure results container is at top when searching */
    #results-container {
        padding-top: var(--space-sm);
        /* Ensure results are visible on mobile */
        display: block !important;
        visibility: visible !important;
        min-height: 50px;
    }
    
    /* Touch-friendly targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Ensure proper click/tap area for table rows */
    .offers-table tr {
        cursor: pointer;
        transition: background-color var(--transition-fast);
    }
    
    .offers-table tr:active {
        background-color: var(--surface-hover);
    }
    
    /* First row (best price) highlight */
    .offers-table tbody tr:first-child {
        background-color: rgba(78, 205, 196, 0.05);
    }
    
    .offers-table tbody tr:first-child .zone-indicator {
        height: 32px;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Safe area insets for notched devices */
    .app-container {
        padding-left: env(safe-area-inset-left, var(--space-sm));
        padding-right: env(safe-area-inset-right, var(--space-sm));
        padding-bottom: env(safe-area-inset-bottom, var(--space-sm));
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Product Info Container */
.product-info-container {
    background: linear-gradient(to right, rgba(127, 176, 105, 0.05), rgba(168, 198, 134, 0.05));
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.5s ease-out;
}

.product-display {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.product-image-main {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: white;
    padding: var(--space-sm);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

/* Single image display - make it larger */
.product-image-main.single-image {
    width: 250px;
    height: 250px;
    box-shadow: var(--shadow-md);
}

.product-details {
    flex: 1;
}

.product-title-main {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.product-barcode-main {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Stats Container */
.stats-container {
    margin: var(--space-2xl) 0;
    animation: fadeIn 0.5s ease-out;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    transition: all var(--transition-medium);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Podium Container */
.podium-container {
    margin: var(--space-lg) 0 var(--space-xl) 0;
    animation: fadeIn 0.5s ease-out;
}

.podium-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.podium-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-sm);
    max-width: 600px;
    margin: 0 auto;
}

.podium-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUp 0.5s ease-out;
    max-width: 180px;
}

.podium-rank {
    display: none;
}

.podium-crown {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.75rem;
    animation: bounce 2s infinite;
    z-index: 10;
}

.podium-content {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    margin-bottom: 0;
    box-shadow: var(--shadow-md);
    min-width: 120px;
    z-index: 2;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.podium-favicon {
    width: 20px;
    height: 20px;
    margin: 0 auto var(--space-xs) auto;
    display: block;
}

.podium-merchant {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.podium-price {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary);
}

.podium-stand {
    width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    position: relative;
    margin-top: 50px; /* Space for the badge */
}

.podium-badge {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    z-index: 3;
}

/* Animate the position 1 dinosaur */
.podium-badge.animated-dino {
    animation: foxBounce 2s ease-in-out infinite;
}

/* Animate the position 2 dinosaur */
.podium-badge.animated-dino-2 {
    animation: foxBounce2 2.5s ease-in-out infinite;
}

/* Animate the position 3 dinosaur */
.podium-badge.animated-dino-3 {
    animation: foxBounce3 3s ease-in-out infinite;
}

@keyframes foxBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes foxBounce2 {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes foxBounce3 {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-6px);
    }
}

.podium-stand.gold {
    height: 120px;
    background: linear-gradient(135deg, #F4D03F, #F39C12);
}

.podium-stand.silver {
    height: 100px;
    background: linear-gradient(135deg, #A8C686, #7FB069);
}

.podium-stand.bronze {
    height: 80px;
    background: linear-gradient(135deg, #F39C12, #E74C3C);
}

.podium-item.first {
    order: 2;
}

.podium-item.second {
    order: 1;
}

.podium-item.third {
    order: 3;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* Mobile-specific table adjustments */
@media (max-width: 640px) {
    .offers-table-container {
        overflow: visible;
    }
    
    .offers-table {
        width: 100%;
    }
    
    .offers-table thead {
        display: table-header-group;
    }
    
    .offers-table tbody {
        display: table-row-group;
    }
    
    .offers-table tr {
        display: table-row;
    }
    
    .offers-table td, .offers-table th {
        display: table-cell;
        padding: var(--space-sm);
    }
    
    .offers-table th {
        font-size: 0.625rem;
        padding: var(--space-xs) var(--space-sm);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    .offers-table td {
        font-size: 0.875rem;
        vertical-align: middle;
    }
    
    /* On mobile card view, hide price and show total */
    .offers-table td[data-label="Price"] {
        display: none !important;
    }
    
    /* Ensure total is visible on mobile */
    .offers-table td[data-label="Total"] {
        display: flex !important;
    }
    
    /* Merchant column */
    .offers-table td:nth-child(1) {
        width: 50%;
    }
    
    .merchant-name {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        flex-wrap: nowrap;
    }
    
    .merchant-logo {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    /* Price column (now visible on mobile) */
    .offers-table td:nth-child(2) {
        width: 25%;
        text-align: right;
        font-weight: 600;
    }
    
    .total-price {
        font-size: 0.875rem;
    }
    
    .total-price span {
        display: block;
        font-size: 0.625rem;
        font-weight: normal;
        color: var(--text-tertiary);
        margin-top: 2px;
    }
    
    /* Action column */
    .offers-table td:nth-child(4) {
        width: 25%;
        text-align: right;
        padding-right: var(--space-xs);
    }
    
    .offers-table .btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
        min-height: 32px;
    }
    
    .offers-table .btn svg {
        display: none;
    }
    
    /* Highlight best price row */
    .offers-table tbody tr:first-child {
        background-color: rgba(78, 205, 196, 0.05);
    }
}

/* Pagination Styles */
.pagination-controls {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.pagination-btn {
    padding: var(--space-xs) var(--space-sm);
    min-width: 36px;
    height: 36px;
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(.disabled) {
    background-color: var(--surface-hover);
    border-color: var(--primary);
}

.pagination-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0 var(--space-xs);
    color: var(--text-tertiary);
}

.pagination-info {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Mobile pagination adjustments */
@media (max-width: 640px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: var(--space-xs);
        min-width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .pagination-info {
        font-size: 0.75rem;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Wishlist Styles */
.wishlist-heart {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.wishlist-heart:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wishlist-heart svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    transition: all var(--transition-fast);
}

.wishlist-heart.active svg {
    fill: var(--primary);
    stroke: var(--primary);
}

.wishlist-section {
    background: linear-gradient(to right, rgba(127, 176, 105, 0.05), rgba(168, 198, 134, 0.05));
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    display: none;
}

.wishlist-section.has-items {
    display: block;
}

.wishlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.wishlist-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.wishlist-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
}

.wishlist-item {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.wishlist-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.wishlist-item-image {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: var(--space-xs);
}

.wishlist-item-title {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishlist-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.wishlist-item:hover .wishlist-remove {
    opacity: 1;
}

.wishlist-remove:hover {
    background: var(--accent-coral);
    color: white;
}

/* Cookie Consent Overlay - Compact */
.cookie-consent-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    animation: slideUp 0.5s ease-out;
}

.cookie-consent-content {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cookie-mascot {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.cookie-title {
    display: none;
}

.cookie-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    flex: 1;
    text-align: left;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.cookie-btn-accept {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cookie-btn-accept:hover {
    background: var(--primary-hover);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.cookie-link {
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
    margin-left: var(--space-xs);
}

.cookie-link:hover {
    text-decoration: underline;
}

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

@media (max-width: 768px) {
    .cookie-consent-overlay {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        padding: var(--space-sm);
    }
    
    .cookie-text {
        text-align: center;
        font-size: 0.75rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-link {
        display: block;
        margin-top: var(--space-xs);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Step by Step Guide */
.steps-guide {
    max-width: 1200px;
    margin: 0 auto var(--space-2xl) auto;
    padding: var(--space-xl);
    text-align: center;
    position: relative;
}

.close-guide {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-guide:hover {
    background: var(--primary);
    color: white;
}

.steps-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: var(--space-2xl);
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.step-item {
    position: relative;
    background: linear-gradient(135deg, rgba(127, 176, 105, 0.05), rgba(244, 208, 63, 0.05));
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 220px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: var(--primary-dark);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.125rem;
}

.step-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.step-icon svg {
    color: var(--primary);
}

.step-rex {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.step-item h3 {
    color: var(--primary-dark);
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.step-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary-light);
    flex-shrink: 0;
}

@media (max-width: 968px) {
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: var(--space-sm) 0;
    }
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: white;
    margin-top: var(--space-2xl);
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.footer-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.footer-text h3 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--secondary);
}

.footer-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--primary-light);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.footer-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--secondary);
}

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-lg) auto 0;
    padding: var(--space-md) var(--space-md) 0;
    border-top: 1px solid rgba(168, 198, 134, 0.3);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--primary-light);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
}
/* Sort buttons */
.sort-btn {
    transition: color 0.2s ease;
}

.sort-btn:hover {
    color: var(--primary) !important;
}

.sort-arrow {
    transition: opacity 0.2s ease;
    font-size: 0.875rem;
    margin-left: 4px;
}

/* Stock Exchange Style Ticker */
.stats-ticker {
    width: calc(100% + 2 * var(--space-md));
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    background: linear-gradient(to right, #1a1a1a, #2d2d2d);
    margin-top: var(--space-md);
    position: relative;
    overflow: hidden;
    border-top: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
}

@media (max-width: 768px) {
    .stats-ticker {
        width: calc(100% + 2 * var(--space-sm));
        margin-left: calc(-1 * var(--space-sm));
        margin-right: calc(-1 * var(--space-sm));
    }
}

.ticker-track {
    padding: var(--space-xs) 0;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    height: 28px;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-flex;
    padding-right: 100%;
    animation: scroll 60s linear infinite;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
}

.ticker-content:nth-child(2) {
    display: none; /* Hide duplicate to prevent overlap */
}

.ticker-duplicate {
    display: inline-flex;
    padding-right: 200px;
    align-items: center;
    white-space: nowrap;
    position: absolute;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ticker-item {
    color: #A8C686;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-weight: 400;
    font-size: 0.875rem;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    letter-spacing: 0.5px;
}

.ticker-item span {
    color: #fff;
    font-weight: 500;
}

.ticker-message {
    color: #F4D03F;
    font-style: italic;
}

/* Highlight specific values */
#ticker-savings, #ticker-savings-2 {
    color: #7FB069;
}

#ticker-variation, #ticker-variation-2 {
    color: #F39C12;
}

.ticker-divider {
    color: #333;
    font-size: 0.75rem;
    padding: 0 var(--space-xs);
}

/* Responsive ticker */
@media (max-width: 768px) {
    .ticker-item {
        font-size: 0.875rem;
    }
    
    .ticker-content {
        animation-duration: 15s;
    }
    
    /* Responsive image grid */
    .product-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Single image on tablet/mobile */
    .product-images-grid.single-image {
        grid-template-columns: 1fr;
        max-width: 250px;
    }
    
    .product-images-grid.single-image .grid-image-slot {
        max-width: 250px;
        height: 250px;
    }
    
    .product-image-main.single-image {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .product-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }
    
    .grid-image-slot {
        max-width: none;
    }
    
    /* Single image on small mobile */
    .product-images-grid.single-image {
        max-width: 200px;
    }
    
    .product-images-grid.single-image .grid-image-slot {
        max-width: 200px;
        height: 200px;
    }
    
    .product-image-main.single-image {
        width: 150px;
        height: 150px;
    }
}

/* Winner crown in table */
.winner-crown {
    display: inline-block;
    margin-left: var(--space-xs);
    font-size: 1.2rem;
    vertical-align: middle;
    animation: bounce 2s infinite;
}

/* Error mascot animation */
.error-mascot {
    display: block;
    margin: 0 auto 2rem auto;
    width: 200px;
    height: 200px;
    object-fit: contain;
    animation: bounce 2s infinite;
}

/* Larger mascot on desktop */
@media (min-width: 768px) {
    .error-mascot {
        width: 250px;
        height: 250px;
    }
}

/* Product Images Grid */
.product-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 150px));
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
    justify-content: center;
}

/* Single image in grid - make it larger */
.product-images-grid.single-image {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.product-images-grid.single-image .grid-image-slot {
    max-width: 300px;
    width: 100%;
    height: 300px;
}

.grid-image-slot {
    position: relative;
    aspect-ratio: 1;
    background-color: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast);
    border: 2px solid var(--border);
    max-width: 150px;
}

.grid-image-slot:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.grid-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-sm);
}

/* Image Overlay */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
}

.image-overlay.hidden {
    display: none;
}

.overlay-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.overlay-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.overlay-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.overlay-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Price Distribution Bar - Ultra Compact Design */
.price-distribution-container {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    border: 1px solid var(--border);
}

.distribution-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.distribution-title::before {
    content: '📊';
    font-size: 0.875rem;
}

.distribution-bar {
    display: flex;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.distribution-segment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    transition: all var(--transition-fast);
    cursor: pointer;
    min-width: 30px;
}

.distribution-segment:hover {
    filter: brightness(1.1);
}

.segment-count {
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-right: 12px;
}

.segment-favicons {
    display: flex;
    gap: 2px;
    align-items: center;
    justify-content: center;
}

.segment-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: white;
    padding: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.segment-range {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.distribution-segment:hover .segment-range {
    opacity: 1;
}

.distribution-details {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: nowrap;
    align-items: center;
    font-size: 0.625rem;
    color: var(--text-secondary);
}

.zone-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.zone-detail:not(:last-child)::after {
    content: '•';
    margin: 0 6px;
    color: var(--text-tertiary);
}

.zone-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.zone-text {
    display: inline;
}

.zone-name {
    font-weight: 600;
    font-size: 0.625rem;
    color: var(--text-primary);
}

.zone-info {
    font-size: 0.625rem;
    color: var(--text-secondary);
}

/* Zone indicator in offers table */
.zone-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: var(--space-xs);
    vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-distribution-container {
        margin-top: var(--space-sm);
        padding: var(--space-sm);
    }
    
    .distribution-bar {
        height: 32px;
        margin-bottom: var(--space-xs);
        position: relative;
    }
    
    .segment-count {
        font-size: 0.8rem;
        min-width: 1.2em;
        text-align: center;
        flex-shrink: 0;
    }
    
    .distribution-details {
        flex-wrap: wrap;
        font-size: 0.5625rem;
        gap: 4px;
    }
    
    .zone-detail:not(:last-child)::after {
        display: none;
    }
    
    .segment-favicons {
        flex-wrap: wrap;
        max-width: 100%;
        display: none; /* Hide favicons on mobile to save space */
    }
    
    .segment-favicon-link {
        display: inline-block;
    }
    
    .segment-favicon {
        width: 14px;
        height: 14px;
        padding: 1px;
    }
    
    /* Ensure distribution segments have minimum width on mobile */
    .distribution-segment {
        min-width: 50px;
        padding: 4px 2px;
    }
}

/* Search Results Grid - Category Page Style */
.search-results-grid {
    margin-top: var(--space-lg);
}

.search-results-grid .category-header {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: var(--light-gray);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-xl);
}

.search-results-grid .category-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.search-results-grid .category-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.search-results-grid .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    padding: var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
}

.search-results-grid .product-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.search-results-grid .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.search-results-grid .product-image-container {
    width: 100%;
    height: 256px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--space-md);
}

.search-results-grid .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.search-results-grid .product-info {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.search-results-grid .product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.search-results-grid .product-seller-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.search-results-grid .seller-favicon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.search-results-grid .product-seller {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
}

.product-price-inline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-left: auto;
}

.shipping-info-line {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: var(--space-sm);
}

.search-results-grid .product-price-container {
    margin-top: auto;
    padding-top: var(--space-sm);
}

.search-results-grid .product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.search-results-grid .product-action {
    background: var(--primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: block;
}

.search-results-grid .product-action:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Different button colors for Visit Store vs More Info */
.product-action-primary {
    background: #FF6B35 !important;
    color: white;
}

.product-action-primary:hover {
    background: #E85A2C !important;
    color: white;
}

.product-action-secondary {
    background: var(--primary) !important;
    color: white;
}

.product-action-secondary:hover {
    background: var(--primary-dark) !important;
    color: white;
}

@media (max-width: 1200px) {
    .search-results-grid .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .search-results-grid .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-results-grid .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        padding: var(--space-sm);
    }
    
    .search-results-grid .product-image-container {
        height: 180px;
    }
}

/* Fix category placement on mobile for product detail pages */
@media (max-width: 768px) {
    /* Ensure scanner section doesn't take too much space on product pages */
    body.product-view #scanner-section {
        display: none !important;
    }
    
    /* Force categories to bottom on mobile product pages */
    body.product-view .category-section {
        order: 999 !important;
        position: relative !important;
    }
    
    body.product-view #search-suggestions {
        order: 998 !important;
        position: relative !important;
    }
    
    body.product-view main {
        display: flex !important;
        flex-direction: column !important;
    }
    
    body.product-view #product-info-container {
        order: 1 !important;
        position: relative !important;
    }
    
    body.product-view #results-container {
        order: 2 !important;
        position: relative !important;
        display: block !important;
        visibility: visible !important;
    }
    
    /* Ensure product and offers are always visible on mobile */
    #product-header,
    #offers-tbody,
    .offers-table-container,
    .result-card {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Prevent body overflow issues on mobile */
    body {
        overflow-x: hidden;
        overflow-y: auto !important;
    }
    
    /* Hide categories initially on mobile product pages */
    body.product-view .category-section,
    body.product-view #search-suggestions {
        display: none;
    }
    
    /* Show them when moved to bottom */
    body.product-view #bottom-content-mobile .category-section,
    body.product-view #bottom-content-mobile #search-suggestions,
    body.product-view .bottom-content-mobile .category-section,
    body.product-view .bottom-content-mobile #search-suggestions {
        display: block !important;
    }
    
    /* Add spacing for bottom content on mobile */
    body.product-view .bottom-content-mobile,
    #bottom-content-mobile {
        margin-top: 3rem;
        padding-top: 2rem;
        order: 999 !important;
        display: block !important;
        border-top: 1px solid var(--border);
    }
}

/* Related Products Section */
.related-products-section {
    max-width: 1400px;
    margin: 3rem auto 2rem;
    padding: 0 var(--space-md);
}

.related-products-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-products-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.related-products-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.related-products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    min-height: 200px;
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(127, 176, 105, 0.05) 0%, rgba(127, 176, 105, 0.02) 100%);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    border: 4px solid rgba(127, 176, 105, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 20px rgba(127, 176, 105, 0.2);
}

.related-products-loading p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

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

.related-products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.related-product-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.related-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.related-product-image-container {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    background: var(--background);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.related-product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.related-product-seller-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.related-product-favicon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.related-product-seller {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.related-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .related-products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .related-product-card {
        padding: 0.75rem;
    }
    
    .related-product-image-container {
        height: 120px;
    }
    
    .related-product-title {
        font-size: 0.85rem;
    }
}

/* Floating Action Button for Scan */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.fab-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7FB069, #6A9456);
    border: none;
    box-shadow: 0 4px 12px rgba(127, 176, 105, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(127, 176, 105, 0.4);
    background: linear-gradient(135deg, #6A9456, #2D5016);
}

.fab-button:active {
    transform: scale(0.95);
}

.fab-button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Barcode icon for FAB */
.fab-button .barcode-icon {
    display: flex;
    gap: 2px;
    align-items: center;
    height: 24px;
}

.fab-button .barcode-line {
    background: white;
    border-radius: 1px;
    height: 20px;
}

.fab-button .barcode-line:nth-child(1) {
    width: 3px;
}

.fab-button .barcode-line:nth-child(2) {
    width: 2px;
}

.fab-button .barcode-line:nth-child(3) {
    width: 4px;
}

.fab-button .barcode-line:nth-child(4) {
    width: 2px;
}

.fab-button .barcode-line:nth-child(5) {
    width: 3px;
}

/* Tooltip for FAB */
.fab-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #1C1C1C;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fab-button:hover + .fab-tooltip,
.fab-container:hover .fab-tooltip {
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab-button {
        width: 48px;
        height: 48px;
    }
    
    .fab-tooltip {
        display: none;
    }
}


/* Force mobile styles when forcemobile parameter is set */
body.force-mobile {
    max-width: 375px !important;
    margin: 0 auto !important;
    font-size: 16px !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

body.force-mobile .navbar {
    max-width: 375px !important;
}

body.force-mobile .desktop-nav {
    display: none !important;
}

body.force-mobile .mobile-nav {
    display: flex !important;
}

/* Apply all mobile styles to force-mobile */
body.force-mobile .results-container,
body.force-mobile #results-container,
body.force-mobile .offers-table-container,
body.force-mobile .product-header,
body.force-mobile .result-card {
    display: block !important;
    visibility: visible !important;
}

body.force-mobile .navbar-search {
    display: none !important;
}

body.force-mobile .mobile-country {
    display: flex !important;
}

/* Simulate mobile viewport */
body.force-mobile {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
