/* ================================================================================
   HOME.CSS - Home Page Styles
   All selectors scoped to #homeOverlay
   No dark mode overrides - uses variables
   ================================================================================ */

/* ================================
   BASE CONTAINER
   ================================ */
#homeOverlay.home-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    background: var(--bg-home-page);
    padding-bottom: env(safe-area-inset-bottom);
}

#homeOverlay.overlay {
    display: flex !important;
    background: var(--bg-home-page);
}

/* ================================
   STATS TICKER - 4 ITEMS
   ================================ */
#homeOverlay .stats-ticker {
    background: var(--bg-purple);
    padding: var(--space-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-purple);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#homeOverlay .stats-ticker-content {
    flex: 1;
    height: 18px;
    position: relative;
    overflow: hidden;
}

#homeOverlay .stat-cycle-container {
    position: relative;
    height: 100%;
}

#homeOverlay .stat-item {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    white-space: nowrap;
    animation: homeStatCycle 12s infinite;
}

/* 4 items: 12s total, 3s per item */
#homeOverlay .stat-item:nth-child(1) { animation-delay: 0s; }
#homeOverlay .stat-item:nth-child(2) { animation-delay: 3s; }
#homeOverlay .stat-item:nth-child(3) { animation-delay: 6s; }
#homeOverlay .stat-item:nth-child(4) { animation-delay: 9s; }

@keyframes homeStatCycle {
    0%, 100% {
        opacity: 0;
        transform: translateY(10px);
    }
    2%, 23% {
        opacity: 1;
        transform: translateY(0);
    }
    25% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

#homeOverlay .stat-item strong {
    color: var(--purple);
    font-weight: 700;
    margin-right: 4px;
}

#homeOverlay .stats-expand-icon {
    color: var(--purple);
    font-size: var(--text-sm);
    transition: transform 0.3s ease;
}

#homeOverlay .stats-ticker.expanded .stats-expand-icon {
    transform: rotate(180deg);
}

/* ================================
   STATS DROPDOWN
   ================================ */
#homeOverlay .stats-dropdown {
    position: absolute;
    top: 8vh;
    left: var(--space-lg);
    right: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-purple);
    margin-top: 48px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9;
}

#homeOverlay .stats-dropdown.show {
    max-height: 250px;
    opacity: 1;
}

#homeOverlay .stats-dropdown-content {
    padding: var(--space-lg);
}

#homeOverlay .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--divider-color);
}

#homeOverlay .stat-row:last-child {
    border-bottom: none;
}

#homeOverlay .stat-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

#homeOverlay .stat-value {
    color: var(--purple);
    font-weight: 700;
    font-size: var(--text-lg);
}

/* ================================
   HERO SECTION
   ================================ */
#homeOverlay .hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: var(--space-lg) var(--space-lg) var(--space-xs);
    gap: var(--space-lg);
}

#homeOverlay .near-me-button,
#homeOverlay .shop-online-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    background: var(--primary-gradient);
    height: 100%;
    width: 100%;
    color: white;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-pill);
}

#homeOverlay .shop-online-button {
    position: relative;
    isolation: isolate;
}

#homeOverlay .shop-online-button::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: white;
    border-radius: var(--radius-pill);
    z-index: -1;
}

#homeOverlay .near-me-content h3,
#homeOverlay .shop-online-content h3 {
    margin: var(--space-xs) 0;
    font-size: var(--text-sm);
}

#homeOverlay .shop-online-content {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#homeOverlay .action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    gap: var(--space-xs);
    border-radius: var(--radius-pill);
    padding: var(--space-xs);
}

#homeOverlay .find-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

#homeOverlay .action-icon {
    font-size: 1.5rem;
}

#homeOverlay .action-content h3 {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
}

#homeOverlay .buy-beer-button {
    border-color: var(--border-orange);
}

#homeOverlay .buy-beer-button:hover {
    transform: translateY(-2px);
    border-color: var(--orange);
    background: var(--bg-orange);
    box-shadow: 0 4px 16px var(--bg-orange);
}

/* ================================
   FEATURED SLIDER
   ================================ */
#homeOverlay .featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-sm);
}

#homeOverlay .featured-title {
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--text-xl);
}

#homeOverlay .featured-dots {
    display: flex;
    gap: 8px;
}

#homeOverlay .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    background: var(--bg-muted);
    transition: all 0.3s ease;
    cursor: pointer;
}

#homeOverlay .dot.active {
    width: 24px;
    border-radius: var(--radius-sm);
    background: var(--primary-gradient-simple);
}

#homeOverlay .featured-slider {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

#homeOverlay .slider-wrapper {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#homeOverlay .slide {
    min-width: 100%;
    background: var(--bg-card);
}

#homeOverlay .slide-image {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#homeOverlay .slide-emoji {
    font-size: var(--icon-2xl);
}

#homeOverlay .slide-venue .slide-image {
    background: var(--orange-gradient);
}

#homeOverlay .slide-beer .slide-image {
    background: var(--green-gradient);
}

#homeOverlay .slide-blog .slide-image {
    background: var(--pink-gradient);
}

#homeOverlay .slide-body {
    padding: var(--space-xl);
}

#homeOverlay .slide-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

#homeOverlay .slide-venue .slide-badge {
    background: var(--bg-orange);
    color: var(--dark-orange);
}

#homeOverlay .slide-beer .slide-badge {
    background: var(--bg-green);
    color: var(--green);
}

#homeOverlay .slide-blog .slide-badge {
    background: rgba(240, 147, 251, 0.1);
    color: #f5576c;
}

#homeOverlay .slide-heading {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

#homeOverlay .slide-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

#homeOverlay .slide-meta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

#homeOverlay .slide-cta {
    padding: var(--space-md) var(--space-xl);
    background: var(--primary-gradient-simple);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition);
}

#homeOverlay .slide-cta:hover {
    transform: translateY(-2px);
}

#homeOverlay .slider-nav {
    position: absolute;
    top: 11%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-circle);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
    color: var(--text-primary);
}

#homeOverlay .slider-nav:hover {
    background: var(--primary-gradient-simple);
    color: white;
}

#homeOverlay .slider-nav.prev {
    left: var(--space-md);
}

#homeOverlay .slider-nav.next {
    right: var(--space-md);
}

/* Featured Loading State */
#homeOverlay .featured-loading {
    position: relative;
}

#homeOverlay .slide-loading {
    display: flex;
    flex-direction: column;
}

#homeOverlay .slide-loading .slide-image {
    height: 80px;
    background: var(--orange-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

#homeOverlay .gradient-skeleton {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    animation: homePulse 1.5s ease-in-out infinite;
}

@keyframes homePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#homeOverlay .slide-loading .slide-body {
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ================================
   CATEGORY CAROUSEL
   ================================ */
#homeOverlay .category-carousel {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    position: relative;
}

#homeOverlay .category-carousel::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to left, var(--bg-home-page) 0%, transparent 100%);
    pointer-events: none;
}

#homeOverlay .category-carousel::-webkit-scrollbar {
    display: none;
}

#homeOverlay .category-card {
    flex: 0 0 auto;
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-sm);
    background: var(--bg-card);
    border: 2px solid var(--border-purple);
    border-radius: var(--radius-lg);
    scroll-snap-align: start;
    cursor: pointer;
    transition: all 0.3s ease;
}

#homeOverlay .category-card:hover {
    border-color: var(--purple);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--bg-purple);
}

#homeOverlay .category-icon {
    font-size: 2rem;
}

#homeOverlay .category-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

#homeOverlay .category-card:first-child {
    animation: homeGentleBounce 2s ease-in-out 1s;
}

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

/* ================================
   COMMUNITY FEED
   ================================ */
#homeOverlay .community-feed {
    padding: var(--space-sm) var(--space-lg);
}

#homeOverlay .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--space-2xl) 0 var(--space-lg) 0;
    position: relative;
    padding-bottom: var(--space-md);
}

#homeOverlay .section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--purple-gradient);
    border-radius: 2px;
}

#homeOverlay .section-header h2 {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--text-primary);
}

#homeOverlay .see-all-link {
    color: var(--purple);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
}

/* ================================
   FINDS GRID
   ================================ */
#homeOverlay .finds-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

#homeOverlay .find-card {
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

#homeOverlay .find-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

#homeOverlay .find-card.highlight {
    background: var(--bg-purple);
    border: 1px solid var(--border-purple);
}

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

#homeOverlay .find-user {
    font-weight: 600;
    color: var(--text-primary);
}

#homeOverlay .find-time {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

#homeOverlay .find-brewery {
    font-weight: 600;
    color: var(--text-primary);
}

#homeOverlay .find-content p {
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-secondary);
}

#homeOverlay .find-content strong {
    color: var(--text-primary);
}

#homeOverlay .find-location {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

#homeOverlay .find-photo {
    margin: var(--space-md) 0;
    border-radius: var(--radius);
    overflow: hidden;
    height: 150px;
}

#homeOverlay .find-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#homeOverlay .find-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

/* ================================
   TRENDING LIST
   ================================ */
#homeOverlay .trending-list {
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-lg);
}

#homeOverlay .trending-item {
    display: flex;
    padding: var(--space-sm);
    border-radius: var(--radius);
    transition: background var(--transition);
}

#homeOverlay .trending-item:hover {
    background: var(--bg-purple);
}

#homeOverlay .trending-item:last-child {
    border-bottom: none;
}

#homeOverlay .trending-rank {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--purple);
    min-width: 30px;
}

#homeOverlay .trending-content {
    flex: 1;
}

#homeOverlay .trending-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

#homeOverlay .trending-content small {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

#homeOverlay .trending-badge {
    font-size: var(--text-xl);
}

/* ================================
   QUICK ACTIONS
   ================================ */
#homeOverlay .quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

#homeOverlay .action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--primary-gradient);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

#homeOverlay .action-card:hover {
    border-color: var(--border-purple);
    transform: translateY(-2px);
    background: var(--bg-purple);
    box-shadow: var(--shadow);
}

#homeOverlay .action-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: white;
}

/* ================================
   BADGES (Soon indicators)
   ================================ */
#homeOverlay .venue-badge-soon,
#homeOverlay .review-badge-soon {
    position: absolute;
    background: var(--orange);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    border: 2px solid white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: homeGentlePulse 3s ease-in-out infinite;
    box-shadow: var(--shadow-sm);
}

#homeOverlay .review-badge-soon {
    left: 1vh;
}

#homeOverlay .venue-badge-soon {
    right: 1vh;
}

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

/* ================================
   GF STATUS INDICATORS
   ================================ */
#homeOverlay .gf-indicator {
    background: var(--success-gradient);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}

#homeOverlay .gf-indicator.unknown {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

#homeOverlay .gf-status {
    background: var(--status-current-bg);
    border: 2px solid var(--status-current-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

#homeOverlay .gf-status.unknown {
    background: var(--status-unknown-bg);
    border-color: var(--status-unknown-border);
}

#homeOverlay .gf-status-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
}

#homeOverlay .gf-status-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-style: italic;
}

#homeOverlay .gf-formats {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

#homeOverlay .gf-format-tag {
    background: var(--success-gradient);
    color: white;
    padding: 4px var(--space-sm);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ================================
   RESULT CARDS (Search results)
   ================================ */
#homeOverlay .result-address {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

#homeOverlay .result-postcode {
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

#homeOverlay .result-authority {
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ================================
   DISCOVERIES OVERLAY
   ================================ */
#discoveriesOverlay {
    overflow: hidden;
}