/* =============================================================
   assets/css/beer.css
   Styles for the beer listing page (beer.php).
   ============================================================= */

/* Page-specific variables */
        :root {
            --deep-teal: #0f2027;
            --brown: #543c29;
            --warm-pale: #f5f1e6;
            --accent-red: #e64833;
            --muted-teal: #2c5364;
            --s-1: 0.25rem;
            --s-2: 0.5rem;
            --s-3: 1rem;
            --s-4: 2rem;
            --s-5: 4rem;
        }

        /*
         * Dark background fallback.
         * When WebGL loads, the animated #pageShader canvas covers this.
         * When WebGL is unavailable, this solid color still looks correct
         * because all the glass cards are designed for a dark background.
         */
        body {
            background-color: var(--deep-teal);
        }

        /* Cart badge in header */
        .cart-badge {
            position: relative;
            display: inline-block;
        }
        
        .cart-badge-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background: var(--accent-red);
            color: var(--warm-pale);
            font-size: 0.7rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 10px;
            min-width: 18px;
            text-align: center;
            font-family: 'Oswald', sans-serif;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        }
        
        /* Add to Cart Button */
        .add-to-cart-btn {
            background: var(--accent-red);
            color: var(--warm-pale);
            border: none;
            padding: 8px 16px;
            border-radius: 20px;
            font-family: 'Oxanium', sans-serif;
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            margin-top: 8px;
            box-shadow: 0 4px 12px rgba(230, 72, 51, 0.3);
        }
        
        .add-to-cart-btn:hover {
            background: #d13a28;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(230, 72, 51, 0.4);
        }
        
        .add-to-cart-btn:active {
            transform: translateY(0);
        }
        
        .add-to-cart-btn:disabled {
            background: #999;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        
        /* Add to Cart Success Message */
        .cart-message {
            margin-top: 8px;
            padding: 6px 12px;
            border-radius: 12px;
            font-family: 'Space Mono', monospace;
            font-size: 0.75rem;
            text-align: center;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.3s ease;
            pointer-events: none;
        }
        
        .cart-message.show {
            opacity: 1;
            transform: translateY(0);
            pointer-events: all;
        }
        
        .cart-message.success {
            background: rgba(40, 167, 69, 0.15);
            color: #28a745;
            border: 1px solid rgba(40, 167, 69, 0.3);
        }
        
        .cart-message.error {
            background: rgba(220, 53, 69, 0.15);
            color: #dc3545;
            border: 1px solid rgba(220, 53, 69, 0.3);
        }
        
        /* Slide-out Cart Button */
        .slide-out-cart {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: var(--deep-teal);
            color: var(--warm-pale);
            padding: 16px 24px;
            border-radius: 50px;
            font-family: 'Oswald', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
            z-index: 1000;
            opacity: 0;
            transform: translateX(100px) scale(0.8);
            pointer-events: none;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .slide-out-cart.show {
            opacity: 1;
            transform: translateX(0) scale(1);
            pointer-events: all;
        }
        
        .slide-out-cart:hover {
            transform: translateX(0) scale(1.05);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
            background: var(--brown);
        }
        
        .slide-out-cart:active {
            transform: translateX(0) scale(0.98);
        }
        
        .slide-out-cart-count {
            background: var(--accent-red);
            color: var(--warm-pale);
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 0.9rem;
            font-weight: 700;
            min-width: 28px;
            text-align: center;
        }
        
        /* Epic hero section — background comes from the full-page WebGL canvas */
        .epic-hero {
            position: relative;
            min-height: 70vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            /*
             * No background set here intentionally.
             * The fixed #pageShader WebGL canvas sits at z-index: -1 and shows
             * through any transparent element. The body fallback color (#0f2027)
             * is used when WebGL is unavailable.
             */
            color: var(--warm-pale);
            text-align: center;
            padding: var(--s-5) var(--s-3) var(--s-4);
            margin-top: clamp(80px, 12vw, 120px);
        }
        
        /*
         * The ::before overlay was used to darken the old static background image.
         * It is no longer needed because the WebGL shader is already dark.
         * Removed entirely to avoid blocking mouse events on the canvas.
         */
        
        .hero-content {
            position: relative;
            z-index: 2;
            max-width: 1200px;
            width: 100%;
            padding: var(--s-4);
        }
        
        .page-title {
            font-family: 'Oswald', sans-serif;
            font-size: clamp(3rem, 8vw, 5rem);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: var(--s-2);
            text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
            line-height: 1;
        }
        
        .page-subtitle {
            font-family: 'Oxanium', sans-serif;
            font-size: clamp(1.2rem, 3vw, 1.8rem);
            font-weight: 300;
            margin-bottom: var(--s-3);
            opacity: 0.95;
            letter-spacing: 0.05em;
        }
        
        .hero-description {
            font-family: 'Space Mono', monospace;
            font-size: clamp(1rem, 2vw, 1.2rem);
            max-width: 800px;
            margin: 0 auto var(--s-4);
            line-height: 1.6;
            opacity: 0.9;
        }
        
        /* Main content */
        .main-content {
            padding: var(--s-4) 0;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 var(--s-3);
        }
        
        /* Filter controls — glassmorphism panel over the WebGL background */
        .filter-controls {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: var(--s-2);
            margin-bottom: var(--s-4);
            padding: var(--s-3);
            /*
             * backdrop-filter blurs whatever is behind the element (the WebGL canvas).
             * The semi-transparent background tints it slightly dark so buttons stay legible.
             */
            background: rgba(15, 32, 39, 0.35);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        }
        
        .filter-btn {
            background: rgba(245, 241, 230, 0.1);
            color: var(--warm-pale);
            border: 1px solid rgba(245, 241, 230, 0.3);
            padding: var(--s-1) var(--s-2);
            border-radius: 50px;
            font-family: 'Oxanium', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .filter-btn:hover,
        .filter-btn.active {
            background: var(--warm-pale);
            color: var(--deep-teal);
            border-color: var(--warm-pale);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        /* Interactive beer grid */
        .beer-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: var(--s-3);
            margin-bottom: var(--s-5);
        }
        
        /* Compact beer cards — glassmorphism style over the WebGL background */
        .beer-card {
            /*
             * Glassmorphism recipe:
             * - Semi-transparent gradient background lets the WebGL canvas bleed through
             * - backdrop-filter: blur() frosts the glass
             * - White border gives the "glass edge" look
             * - Box shadow adds depth
             */
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            cursor: pointer;
            height: 100%;
            display: flex;
            flex-direction: column;
            min-height: 460px;
        }
        
        .beer-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
            border-color: rgba(255, 255, 255, 0.3);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.09));
        }
        
        .beer-card-image {
            position: relative;
            height: 160px;
            overflow: hidden;
            background: linear-gradient(135deg, var(--deep-teal), var(--brown));
        }
        
        .beer-card-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: var(--s-3);
            transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .beer-card:hover .beer-card-image img {
            transform: scale(1.05);
        }
        
        .beer-badge {
            position: absolute;
            top: var(--s-2);
            right: var(--s-2);
            background: var(--accent-red);
            color: var(--warm-pale);
            padding: 4px 10px;
            border-radius: 15px;
            font-family: 'Oxanium', sans-serif;
            font-size: 0.75rem;
            font-weight: 600;
            z-index: 2;
        }
        
        .out-of-stock-badge {
            background: #666;
        }
        
        .sale-badge {
            position: absolute;
            top: var(--s-2);
            left: var(--s-2);
            background: #e64833;
            color: var(--warm-pale);
            padding: 4px 8px;
            border-radius: 15px;
            font-family: 'Oxanium', sans-serif;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            z-index: 2;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        .beer-card-content {
            padding: var(--s-2);
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        .beer-card-title {
            font-family: 'Oswald', sans-serif;
            font-size: 1.2rem;
            color: var(--warm-pale);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 600;
            line-height: 1.2;
        }
        
        .beer-card-subtitle {
            font-family: 'Oxanium', sans-serif;
            font-size: 0.85rem;
            color: rgba(245, 241, 230, 0.7);
            margin-bottom: var(--s-1);
            font-weight: 300;
            line-height: 1.3;
        }
        
        .beer-card-description {
            font-family: 'Space Mono', monospace;
            font-size: 0.8rem;
            line-height: 1.5;
            margin-bottom: var(--s-1);
            flex: 1;
            color: rgba(245, 241, 230, 0.8);
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .beer-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-bottom: var(--s-1);
        }
        
        .beer-tag {
            background: rgba(255, 255, 255, 0.12);
            color: rgba(245, 241, 230, 0.85);
            padding: 2px 8px;
            border-radius: 12px;
            font-family: 'Space Mono', monospace;
            font-size: 0.7rem;
            font-weight: 600;
            white-space: nowrap;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }
        
        .beer-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: var(--s-1);
            margin-bottom: var(--s-1);
            padding: var(--s-1);
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        
        .beer-stat {
            text-align: center;
        }
        
        .stat-value {
            font-family: 'Oswald', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            color: var(--warm-pale);
            display: block;
            line-height: 1;
        }
        
        .stat-label {
            font-family: 'Space Mono', monospace;
            font-size: 0.7rem;
            color: rgba(245, 241, 230, 0.6);
            line-height: 1.2;
        }
        
        .beer-card-footer {
            display: flex;
            flex-direction: column;
            gap: var(--s-2);
            margin-top: auto;
            padding-top: var(--s-1);
            border-top: 1px solid rgba(255, 255, 255, 0.12);
        }
        
        .beer-price-container {
            display: flex;
            flex-direction: column;
            gap: 2px;
            text-align: center;
        }
        
        .original-price {
            font-family: 'Oswald', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            color: #e64833;
            text-decoration: line-through;
            opacity: 0.8;
        }
        
        .discounted-price {
            font-family: 'Oswald', sans-serif;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--warm-pale);
        }
        
        .view-beer-btn {
            background: var(--deep-teal);
            color: var(--warm-pale);
            border: none;
            padding: 6px 12px;
            border-radius: 20px;
            font-family: 'Oxanium', sans-serif;
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
            white-space: nowrap;
        }
        
        .view-beer-btn:hover {
            background: var(--brown);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        .out-of-stock-btn {
            background: #666;
            cursor: not-allowed;
        }
        
        /* CTA section */
        .cta-section {
            text-align: center;
            padding: var(--s-5) var(--s-3);
            background: linear-gradient(135deg, rgba(84, 60, 41, 0.9) 0%, rgba(15, 32, 39, 0.9) 100%);
            border-radius: 20px;
            margin: var(--s-5) auto;
            max-width: 800px;
            color: var(--warm-pale);
            border: 2px solid rgba(245, 241, 230, 0.2);
        }
        
        .cta-section h2 {
            font-family: 'Oswald', sans-serif;
            font-size: clamp(2rem, 5vw, 2.5rem);
            margin-bottom: var(--s-2);
            color: var(--warm-pale);
        }
        
        .cta-section p {
            font-family: 'Space Mono', monospace;
            font-size: 1.1rem;
            margin-bottom: var(--s-3);
            opacity: 0.9;
        }
        
        .cta-buttons {
            display: flex;
            gap: var(--s-3);
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .primary-cta {
            background: var(--warm-pale);
            color: var(--deep-teal);
            padding: var(--s-2) var(--s-4);
            border-radius: 50px;
            font-family: 'Oswald', sans-serif;
            font-size: 1.2rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
            border: 2px solid var(--warm-pale);
        }
        
        .primary-cta:hover {
            background: transparent;
            color: var(--warm-pale);
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        
        .secondary-cta {
            background: transparent;
            color: var(--warm-pale);
            padding: var(--s-2) var(--s-4);
            border-radius: 50px;
            font-family: 'Oswald', sans-serif;
            font-size: 1.2rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            text-decoration: none;
            transition: all 0.3s ease;
            border: 2px solid var(--warm-pale);
        }
        
        .secondary-cta:hover {
            background: var(--warm-pale);
            color: var(--deep-teal);
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        
        /* Responsive adjustments */
        @media (min-width: 1025px) {
            .beer-grid { grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
            .beer-card { min-height: 460px; }
        }
        
        @media (max-width: 1024px) and (min-width: 769px) {
            .beer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
            .beer-card { min-height: 480px; }
            .beer-card-image { height: 180px; }
            .beer-card-title { font-size: 1.3rem; }
            .beer-card-description { -webkit-line-clamp: 4; }
        }
        
        @media (max-width: 768px) {
            .beer-grid { grid-template-columns: 1fr; gap: var(--s-3); max-width: 500px; margin-left: auto; margin-right: auto; }
            .epic-hero { min-height: 60vh; padding: var(--s-4) var(--s-2); }
            .hero-content { padding: var(--s-3) var(--s-2); }
            .filter-controls { flex-direction: column; align-items: center; }
            .slide-out-cart { bottom: 20px; right: 20px; padding: 14px 20px; font-size: 0.9rem; }
            .cta-buttons { flex-direction: column; align-items: center; }
            .cta-buttons a, .cta-buttons button { width: 100%; text-align: center; }
            .beer-card { min-height: auto; }
            .beer-card-image { height: 200px; }
            .beer-card-title { font-size: 1.4rem; }
            .beer-card-description { -webkit-line-clamp: 4; }
        }
        
        @media (max-width: 480px) {
            .page-title { font-size: 2.5rem; }
            .page-subtitle { font-size: 1.1rem; }
            .beer-stats { grid-template-columns: repeat(4, 1fr); }
            .beer-card-footer { flex-direction: column; gap: var(--s-2); align-items: stretch; }
            .view-beer-btn, .add-to-cart-btn { text-align: center; padding: 8px; width: 100%; }
            .beer-card { min-height: auto; }
            .beer-card-image { height: 180px; }
            .slide-out-cart { padding: 12px 18px; font-size: 0.85rem; }
        }
        
        /* Animation classes */
        .fade-in {
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        
        @keyframes fadeInUp {
            to { opacity: 1; transform: translateY(0); }
        }
        
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        
        *:focus {
            outline: 2px solid var(--warm-pale);
            outline-offset: 2px;
        }
        
        .img-fallback {
            background: linear-gradient(135deg, var(--deep-teal), var(--brown));
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--warm-pale);
            font-family: 'Oswald', sans-serif;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            height: 100%;
        }
        
        /* Quantity selector */
        .quantity-selector {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-bottom: 8px;
        }
        
        .qty-btn {
            background: var(--deep-teal);
            color: var(--warm-pale);
            border: none;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            font-family: 'Oswald', sans-serif;
            font-size: 1.2rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .qty-btn:hover { background: var(--brown); transform: scale(1.1); }
        .qty-btn:disabled { background: #999; cursor: not-allowed; transform: none; }
        
        .beer-quantity {
            width: 40px;
            text-align: center;
            padding: 4px 8px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            font-family: 'Oswald', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            color: var(--warm-pale);
            background: rgba(255, 255, 255, 0.1);
        }