/* Landing page styles adapted from GymTracker3 with grocery theme */
.landing-page {
    /* Fill below the sticky 60px navbar */
    min-height: calc(100vh - 60px);
    background: var(--bg-primary);
}

/* Full-bleed so backgrounds span edge-to-edge despite article padding */
.full-bleed { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #14401b 0%, #1d5f25 50%, #268a31 100%);
    /* Viewport minus navbar height */
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-text { color: white; }

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    text-align: center;
}

.gradient-text {
    background: linear-gradient(45deg, #ffffff 0%, #f0fff4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.85;
    max-width: 560px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}

.workout-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 420px;
}

.btn-workout {
    background: white;
    color: var(--accent-primary);
    border: none;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-workout::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent);
    transition: left 0.5s ease;
}
@media (hover: hover) {
    .btn-workout:hover::before { left: 100%; }
}

/* Sequential animation borrowed from GymTracker3 */
@keyframes buttonHighlight {
    0% { background: white; color: var(--accent-primary); transform: scale(1); }
    10% { background: #4CAF50; color: white; transform: scale(1.05); }
    20% { background: #4CAF50; color: white; transform: scale(1.05); }
    30% { background: white; color: var(--accent-primary); transform: scale(1); }
    100% { background: white; color: var(--accent-primary); transform: scale(1); }
}
.push-btn { animation: buttonHighlight 6s ease-in-out 0s infinite; }
.pull-btn { animation: buttonHighlight 6s ease-in-out 2s infinite; }
.legs-btn { animation: buttonHighlight 6s ease-in-out 4s infinite; }
@media (hover: hover) {
    .workout-buttons:hover .btn-workout { animation: none !important; }
}
@media (hover: hover) {
    .btn-workout:hover {
        background: #4CAF50 !important;
        color: white !important;
        transform: translateY(-2px) scale(1.05) !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    }
}

/* Hero Image (icon-based) */
.hero-image { display: flex; justify-content: center; align-items: center; overflow: visible; padding: 20px; }
.uncle-sam-container {
    position: relative;
    max-width: 420px;
    border-radius: 20px;
    overflow: visible;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    z-index: 100;
}
@media (hover: hover) {
    .uncle-sam-container:hover { transform: perspective(1000px) rotateY(-2deg) rotateX(2deg) scale(1.02); }
}
.uncle-sam-container:active {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(0.92);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.6, 1);
}
.uncle-sam-image { width: 100%; height: auto; display: block; border-radius: 16px; filter: brightness(0.9) contrast(1.1) saturate(0.95); position: relative; z-index: 1; }
.image-overlay { position: absolute; inset: 0; background: transparent; mix-blend-mode: multiply; }
.hero-cart-icon { font-size: 220px; color: rgba(255,255,255,0.9); filter: drop-shadow(0 12px 24px rgba(0,0,0,0.35)); }

/* Grocery burst animation */
.grocery-emoji {
    position: fixed;
    font-size: 2.5rem;
    pointer-events: none;
    z-index: 0;
    animation: groceryFly 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;

}

@keyframes groceryFly {
    0% {
        transform: translate(var(--tx-20), var(--ty-20)) rotate(var(--rot-20)) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.5);
        opacity: 0;
    }
}

/* Features Section */
.features-section { padding: 6rem 0; background: var(--bg-primary); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.features-header { text-align: center; margin-bottom: 4rem; }
.landing-page .section-title { font-size: 2.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; }
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 640px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { background: var(--card-bg); padding: 2rem; border-radius: 16px; text-align: center; border: 1px solid var(--border-light); transition: all 0.3s ease; box-shadow: var(--shadow); }
@media (hover: hover) {
    .feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -12px rgba(33, 37, 79, 0.25); }
}
.feature-icon { width: 72px; height: 72px; background: var(--accent-gradient); border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; font-size: 1.85rem; color: white; }
.feature-card h3 { font-size: 1.35rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); line-height: 1.6; }

/* CTA Section */
.cta-section { background: linear-gradient(135deg, #14401b 0%, #1d5f25 50%, #268a31 100%); padding: 5rem 0; text-align: center; }
.cta-content { max-width: 800px; margin: 0 auto; }
.cta-title { font-size: 2.25rem; font-weight: 700; color: white; margin-bottom: 1rem; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.cta-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.9); margin-bottom: 2rem; }
.cta-actions { display: flex; justify-content: center; gap: 1rem; }

/* Responsive - Tablet */
@media (max-width: 900px) {
    .hero-content { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .uncle-sam-container { max-width: 320px; }
    .features-grid { grid-template-columns: 1fr; }
    .cta-actions { flex-direction: column; align-items: center; }
}

/* Mobile - Touch Friendly */
@media (max-width: 576px) {
    .hero-container { padding: 0 1rem; }
    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 1rem; }
    .btn-workout { min-height: 48px; padding: 0.875rem 1.5rem; width: 100%; justify-content: center; }
    .feature-card { padding: 1.5rem; }
    .feature-icon { width: 56px; height: 56px; font-size: 1.5rem; }
    .section-title { font-size: 1.5rem; }
    .cta-section { padding: 3rem 1rem; }
    .cta-title { font-size: 1.5rem; }
    .cta-subtitle { font-size: 1rem; }
    .cta-actions .btn { width: 100%; min-height: 48px; }
}

/* ========================================
   BENTO GRID SECTION
   ======================================== */

/* Simple fade-in animations (replaces AOS) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bento-section {
    padding: 6rem 0;
    background: var(--bg-primary);
    animation: fadeInUp 0.6s ease-out;
}

/* Scoped to bento section to avoid conflicts with app section headers */
.bento-section .section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.section-label {
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: block;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@media (hover: hover) {
    .glass-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 40px -12px rgba(33, 37, 79, 0.25);
        border-color: var(--accent-primary);
    }
}

@media (hover: hover) {
    .dark-theme .glass-card:hover {
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    }
}

.bento-card {
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out backwards;
}

.bento-card:nth-child(1) { animation-delay: 0.1s; }
.bento-card:nth-child(2) { animation-delay: 0.2s; }
.bento-card:nth-child(3) { animation-delay: 0.3s; }
.bento-card:nth-child(4) { animation-delay: 0.4s; }

.bento-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    color: white;
}

.bento-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.bento-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.bento-visual {
    height: 120px;
    margin-top: auto;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
}

.dark-theme .bento-visual {
    background: rgba(0, 0, 0, 0.2);
}

/* Bento Visual: Lists + Sharing (Mini Phones Sync) */
.bento-sync-visual {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1rem;
}

.mini-phone {
    width: 50px;
    height: 80px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: var(--card-bg);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dark-theme .mini-phone {
    border-color: #444;
    background: #222;
}

.mini-item {
    height: 10px;
    background: var(--border-light);
    border-radius: 2px;
}

.dark-theme .mini-item {
    background: #444;
}

.mini-phone-1 .mini-item:first-child {
    animation: miniCheck 3s ease infinite;
}

.mini-phone-2 .mini-item:first-child {
    animation: miniCheck 3s ease infinite 0.3s;
}

.sync-arrow {
    font-size: 1.25rem;
    color: var(--accent-primary);
    animation: syncRotate 2s linear infinite;
}

@keyframes miniCheck {
    0%, 30% { background: var(--border-light); }
    35%, 100% { background: var(--accent-primary); }
}

.dark-theme @keyframes miniCheck {
    0%, 30% { background: #444; }
    35%, 100% { background: var(--accent-primary); }
}

@keyframes syncRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bento Visual: Pantry Tracking */
.bento-pantry-visual {
    width: 100%;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Scoped to bento visual to avoid conflicts with actual Pantry page */
.bento-pantry-visual .pantry-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.bento-pantry-visual .pantry-item span {
    width: 40px;
    flex-shrink: 0;
}

.bento-pantry-visual .pantry-bar {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.dark-theme .bento-pantry-visual .pantry-bar {
    background: #333;
}

.bento-pantry-visual .pantry-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bento-pantry-visual .pantry-bar.low .pantry-fill {
    width: 20%;
    background: #ef4444;
    animation: lowPulse 2s ease infinite;
}

.bento-pantry-visual .pantry-bar.medium .pantry-fill {
    width: 50%;
    background: #f59e0b;
}

.bento-pantry-visual .pantry-bar.full .pantry-fill {
    width: 90%;
    background: var(--accent-primary);
}

@keyframes lowPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Bento Visual: Catalog Deals */
.bento-catalog-visual {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem;
    position: relative;
    width: 100%;
}

.catalog-page {
    width: 60px;
    height: 80px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dark-theme .catalog-page {
    background: #2a2a2a;
    border-color: #444;
}

.catalog-line {
    height: 6px;
    background: var(--border-light);
    border-radius: 2px;
}

.dark-theme .catalog-line {
    background: #444;
}

.catalog-line.short {
    width: 60%;
}

.deal-badge {
    background: var(--accent-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: dealSlide 3s ease infinite;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

@keyframes dealSlide {
    0%, 20% { transform: translateX(-20px); opacity: 0; }
    30%, 80% { transform: translateX(0); opacity: 1; }
    90%, 100% { transform: translateX(20px); opacity: 0; }
}

/* Bento Visual: Scan & Add */
.bento-scan-visual {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barcode-lines {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 50px;
}

.barcode-line {
    width: 3px;
    height: 100%;
    background: var(--text-primary);
    opacity: 0.7;
}

.barcode-line.wide {
    width: 5px;
}

.scan-laser-line {
    position: absolute;
    width: 80%;
    height: 2px;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: scanLineMove 2s ease-in-out infinite;
}

@keyframes scanLineMove {
    0%, 100% { top: 20%; opacity: 0.5; }
    50% { top: 80%; opacity: 1; }
}

/* ========================================
   FEATURE DEEP DIVE SECTIONS
   ======================================== */

.feature-section {
    padding: 6rem 0;
    position: relative;
    background: var(--bg-primary);
    animation: fadeInUp 0.6s ease-out;
}

.feature-section:nth-child(even) {
    background: var(--bg-secondary, var(--bg-primary));
}

.feature-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 0 1.5rem;
}

.feature-container.reverse {
    flex-direction: row-reverse;
}

.feature-content {
    flex: 1;
}

.feature-visual {
    flex: 1;
}

.feature-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-list li i {
    color: var(--accent-primary);
    font-size: 1rem;
}

.mockup-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.dark-theme .mockup-card {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (hover: hover) {
    .feature-section:hover .mockup-card {
        transform: translateY(-5px);
    }
}

/* Feature Visual: Grocery Sync (from LifeTracker.Landing) */
.visual-grocery-container {
    width: 100%;
    height: 350px;
    background: var(--bg-primary);
    display: flex;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: center;
    position: relative;
}

.dark-theme .visual-grocery-container {
    background: #1a1a1a;
}

.grocery-phone {
    width: 140px;
    height: 240px;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    background: var(--card-bg);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.dark-theme .grocery-phone {
    border-color: #444;
    background: #222;
}

.phone-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 5px;
}

.grocery-item {
    height: 28px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.dark-theme .grocery-item {
    background: #333;
}

.grocery-checkbox {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-light);
    border-radius: 3px;
    margin-right: 8px;
    flex-shrink: 0;
}

.dark-theme .grocery-checkbox {
    border-color: #666;
}

/* Phone 1 (User A) Animation */
.phone-1 .grocery-item:nth-child(2) .grocery-checkbox {
    animation: groceryCheck 3s steps(1) infinite;
}

.phone-1 .grocery-item:nth-child(2) {
    animation: groceryFade 3s ease infinite;
}

/* Phone 2 (User B) Animation - Slight delay for sync effect */
.phone-2 .grocery-item:nth-child(2) .grocery-checkbox {
    animation: groceryCheck 3s steps(1) infinite 0.2s;
}

.phone-2 .grocery-item:nth-child(2) {
    animation: groceryFade 3s ease infinite 0.2s;
}

.grocery-sync-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    animation: grocerySyncPop 3s ease infinite;
    z-index: 10;
}

@keyframes groceryCheck {
    0%, 20% { background: transparent; border-color: var(--border-light); }
    21%, 100% { background: var(--accent-primary); border-color: var(--accent-primary); }
}

.dark-theme .grocery-checkbox {
    animation-name: groceryCheckDark;
}

@keyframes groceryCheckDark {
    0%, 20% { background: transparent; border-color: #666; }
    21%, 100% { background: var(--accent-primary); border-color: var(--accent-primary); }
}

@keyframes groceryFade {
    0%, 25% { opacity: 1; }
    30%, 100% { opacity: 0.4; }
}

@keyframes grocerySyncPop {
    0%, 25% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    40% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Feature Visual: Pantry Tracking */
.visual-pantry-container {
    width: 100%;
    height: 350px;
    background: var(--bg-primary);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.dark-theme .visual-pantry-container {
    background: #1a1a1a;
}

/* Scoped to visual container to avoid conflicts with actual Pantry page */
.visual-pantry-container .pantry-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visual-pantry-container .pantry-header i {
    color: var(--accent-primary);
}

.visual-pantry-container .pantry-inventory {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.visual-pantry-container .inventory-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.visual-pantry-container .item-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.visual-pantry-container .item-name {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visual-pantry-container .item-qty {
    color: var(--text-secondary);
}

.visual-pantry-container .inventory-bar {
    height: 10px;
    background: var(--border-light);
    border-radius: 5px;
    overflow: hidden;
}

.dark-theme .visual-pantry-container .inventory-bar {
    background: #333;
}

.visual-pantry-container .inventory-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.visual-pantry-container .inventory-bar.low .inventory-fill {
    width: 20%;
    background: #ef4444;
    animation: lowPulse 2s ease infinite;
}

.visual-pantry-container .inventory-bar.medium .inventory-fill {
    width: 50%;
    background: #f59e0b;
}

.visual-pantry-container .inventory-bar.full .inventory-fill {
    width: 95%;
    background: var(--accent-primary);
}

.visual-pantry-container .low-stock-alert {
    margin-top: auto;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #ef4444;
    animation: alertSlide 4s ease infinite;
}

.visual-pantry-container .low-stock-alert i {
    font-size: 1rem;
}

@keyframes alertSlide {
    0%, 10% { transform: translateY(20px); opacity: 0; }
    20%, 80% { transform: translateY(0); opacity: 1; }
    90%, 100% { transform: translateY(-10px); opacity: 0; }
}

/* Feature Visual: Catalog Extraction */
.visual-catalog-container {
    width: 100%;
    height: 350px;
    background: var(--bg-primary);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
}

.dark-theme .visual-catalog-container {
    background: #1a1a1a;
}

.catalog-flyer {
    width: 160px;
    height: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    position: relative;
    overflow: hidden;
}

.dark-theme .catalog-flyer {
    background: #2a2a2a;
    border-color: #444;
}

.flyer-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.dark-theme .flyer-header {
    border-color: #444;
}

.flyer-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.flyer-item {
    text-align: center;
}

.flyer-img {
    width: 50px;
    height: 50px;
    margin: 0 auto 4px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.dark-theme .flyer-img {
    background: #333;
}

.flyer-price {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.flyer-scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    left: 0;
    animation: flyerScan 3s linear infinite;
}

@keyframes flyerScan {
    0% { top: 10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 90%; opacity: 0; }
}

.extracted-deals {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deal-card {
    background: var(--accent-primary);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    animation: dealCardSlide 3s ease infinite;
}

.deal-card.delay {
    animation-delay: 0.5s;
}

@keyframes dealCardSlide {
    0%, 30% { transform: translateX(50px); opacity: 0; }
    40%, 80% { transform: translateX(0); opacity: 1; }
    90%, 100% { transform: translateX(-20px); opacity: 0; }
}

/* Feature Visual: Receipt Scanning */
.visual-receipt-container {
    width: 100%;
    height: 350px;
    background: var(--bg-primary);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
}

.dark-theme .visual-receipt-container {
    background: #1a1a1a;
}

.receipt-paper {
    width: 140px;
    background: white;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.dark-theme .receipt-paper {
    background: #f5f5f5;
}

.receipt-header {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    color: #333;
    margin-bottom: 8px;
}

.receipt-line {
    height: 1px;
    background: #ddd;
    margin: 8px 0;
}

.receipt-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.receipt-item {
    font-size: 0.65rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

.receipt-total {
    font-size: 0.75rem;
    font-weight: 700;
    color: #333;
    text-align: right;
    margin-top: 8px;
}

.scan-crosshair {
    position: absolute;
    width: 160px;
    height: 180px;
    pointer-events: none;
    animation: crosshairPulse 2s ease infinite;
}

.crosshair-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--accent-primary);
}

.crosshair-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.crosshair-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.crosshair-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.crosshair-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

@keyframes crosshairPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
}

.scanned-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scanned-item {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: itemPopIn 3s ease infinite;
}

.dark-theme .scanned-item {
    background: #2a2a2a;
    border-color: #444;
}

.scanned-item i {
    color: var(--accent-primary);
}

.scanned-item.delay-1 {
    animation-delay: 0.4s;
}

.scanned-item.delay-2 {
    animation-delay: 0.8s;
}

@keyframes itemPopIn {
    0%, 20% { transform: translateX(30px) scale(0.8); opacity: 0; }
    30%, 80% { transform: translateX(0) scale(1); opacity: 1; }
    90%, 100% { transform: translateX(-10px) scale(0.9); opacity: 0; }
}

/* ========================================
   RESPONSIVE - BENTO & FEATURES
   ======================================== */

@media (max-width: 900px) {
    .bento-section {
        padding: 4rem 0;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bento-card {
        height: auto;
        min-height: 280px;
    }

    .feature-section {
        padding: 4rem 0;
    }

    .feature-container {
        flex-direction: column;
        gap: 2rem;
    }

    .feature-container.reverse {
        flex-direction: column;
    }

    .mockup-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .visual-grocery-container,
    .visual-pantry-container,
    .visual-catalog-container,
    .visual-receipt-container {
        height: 300px;
    }

    .grocery-phone {
        width: 110px;
        height: 180px;
    }
}

@media (max-width: 576px) {
    .bento-section,
    .feature-section {
        padding: 3rem 0;
    }

    .bento-section .section-header {
        margin-bottom: 2rem;
    }

    .landing-page .section-title {
        font-size: 1.5rem;
    }

    .bento-card {
        padding: 1.5rem;
        min-height: 260px;
    }

    .bento-card-title {
        font-size: 1.25rem;
    }

    .bento-visual {
        height: 100px;
    }

    .feature-container {
        padding: 0 1rem;
    }

    .feature-list li {
        font-size: 0.9rem;
    }

    .visual-grocery-container {
        flex-direction: column;
        gap: 10px;
        height: auto;
        padding: 15px;
    }

    .grocery-phone {
        width: 100%;
        max-width: 200px;
        height: auto;
        padding: 8px;
    }

    .grocery-sync-indicator {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        opacity: 1;
        animation: none;
    }
}
