/* ═══════════════════════════════════════════════════════════════
   GoleOnline — Glassmorphism Premium Redesign
   All class names preserved for JS compatibility
   ═══════════════════════════════════════════════════════════════ */

/* CSS Variables - Glassmorphism Design System */
:root {
    --primary: #e06080;
    --primary-hover: #ff7a9a;
    --primary-glow: rgba(224, 96, 128, 0.4);
    --secondary: #8B6A4E;
    --accent: #50b4a0;
    --accent-glow: rgba(80, 180, 160, 0.3);
    --bg-dark: #0a150f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(8px);
    --text-main: #f0eef5;
    --text-muted: #b0c0b8;
    --font-en-head: 'Cormorant Garamond', serif;
    --font-en-body: 'Inter', sans-serif;
    --font-ku: 'Noto Sans Arabic', sans-serif;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
    --radius-sm: 10px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-en-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(10, 20, 15, 0.8), rgba(10, 20, 15, 0.85)), url('https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
}

/* Animated Aurora Background */



    33%  { transform: translate(30px, -20px) rotate(1deg); }
    66%  { transform: translate(-20px, 15px) rotate(-1deg); }
    100% { transform: translate(10px, -10px) rotate(0.5deg); }
}

body.lang-ku {
    font-family: var(--font-ku);
    direction: rtl;
}

h1, h2, h3, h4 {
    font-family: var(--font-en-head);
    font-weight: 600;
}

body.lang-ku h1, body.lang-ku h2, body.lang-ku h3, body.lang-ku h4 {
    font-family: var(--font-ku);
    font-weight: 700;
}

.hidden {
    display: none !important;
}

/* ─── Buttons ─── */
button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.btn-primary {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

/* ─── Splash Screen ─── */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 20, 15, 0.8), rgba(10, 20, 15, 0.85)), url('https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}



.splash-content {
    text-align: center;
    padding: 50px 45px;
    background: var(--glass-bg);
    border-radius: 24px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255,255,255,0.5);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.splash-logo {
    font-size: 3.8rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 10px var(--primary-glow));
}

.splash-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.15rem;
}

.lang-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ─── Header ─── */
.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    position: relative;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    margin: 20px auto;
    width: calc(100% - 40px);
    max-width: 1200px;
    border-radius: 30px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-en-head);
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #d8f0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 4px rgba(255,255,255,0.2));
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

#lang-toggle {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#lang-toggle:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.8);
}

.cart-icon {
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.cart-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: linear-gradient(135deg, var(--primary), #ff7a9a);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px var(--primary-glow);
}

body.lang-ku #cart-count {
    right: auto;
    left: -10px;
}

/* ─── Category Bar ─── */
.category-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 20px 10px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 0.85rem;
    border: 1px solid transparent;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: all 0.2s ease;
}

.cat-btn.active, .cat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ─── Hero ─── */
.hero {
    padding: 50px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}



.hero-text {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3.2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.1));
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* ─── Products Grid ─── */
.products-container {
    max-width: 1200px;
    margin: 30px auto 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    border-top-color: rgba(255, 255, 255, 0.5);
    border-left-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.lang-ku .product-badge {
    left: auto;
    right: 12px;
}

.badge-new {
    background: linear-gradient(135deg, rgba(240, 192, 96, 0.85), rgba(220, 160, 60, 0.85));
    color: #1a1000;
}

.badge-sale {
    background: linear-gradient(135deg, rgba(224, 96, 128, 0.85), rgba(192, 74, 112, 0.85));
    color: #fff;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-cat {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
    cursor: pointer;
    transition: color 0.3s;
}

.product-title:hover {
    color: var(--primary-hover);
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    margin-top: auto;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.btn-add-cart:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* ─── Modal ─── */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 10, 8, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, rgba(25, 35, 30, 0.8), rgba(10, 20, 15, 0.9));
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.close-modal:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.7);
    transform: rotate(90deg);
}

body.lang-ku .close-modal {
    right: auto;
    left: 20px;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 40px 30px;
}

.modal-details h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-desc {
    color: var(--text-muted);
    margin: 20px 0;
    white-space: pre-line;
}

/* ─── Cart Sidebar ─── */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(20, 30, 25, 0.7), rgba(10, 20, 15, 0.85));
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5), inset 1px 0 1px rgba(255, 255, 255, 0.1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

body.lang-ku .cart-sidebar {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    border-left: none;
    border-right: 1px solid var(--glass-border);
}

.cart-sidebar.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
}

body.lang-ku .cart-sidebar.open {
    transform: translateX(0);
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
}

.close-cart {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    font-size: 1.8rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cart:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.8);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--accent);
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qty-btn {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.7);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.15);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

/* ─── Loader ─── */
.loader {
    text-align: center;
    padding: 50px;
    color: var(--primary);
    font-size: 1.5rem;
    grid-column: 1 / -1;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero h2 { font-size: 2.2rem; }
    .splash-logo { font-size: 2.8rem; }
    .products-container { gap: 20px; }
}

@media (max-width: 600px) {
    /* Make grid 2-columns on small phones */
    .products-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 10px;
    }
    
    /* Shrink product card internals to fit 2-columns nicely */
    .product-info {
        padding: 12px;
    }
    .product-title {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }
    .product-price {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }
    .product-image {
        height: 160px;
    }
    .product-actions {
        flex-direction: column;
        gap: 5px;
    }
    .btn-add-cart, .btn-primary {
        padding: 8px;
        font-size: 0.85rem;
        width: 100%;
    }
    
    /* Fix Header to 2 rows on mobile */
    .header-inner {
        flex-direction: column-reverse;
        gap: 15px;
        align-items: stretch;
    }
    .header-actions {
        margin-left: 0 !important;
        justify-content: space-between;
        width: 100%;
    }
    .category-bar {
        width: 100%;
        margin-right: 0 !important;
        padding-bottom: 5px !important;
        padding-right: 35px !important;
        padding-left: 10px !important;
    }
    .header {
        border-radius: 20px;
        padding: 5px;
    }
}

/* Light Pass Effect & Scroll Hint */
body::after {
    content: '';
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    z-index: -1;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
    transform: translateX(calc(var(--scroll-percent, 0) * 40%));
    pointer-events: none;
}

.scroll-hint {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: transparent;
    padding-left: 10px;
    padding-right: 10px;
    display: none;
    align-items: center;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
    pointer-events: none;
    animation: pulseHint 1.5s infinite;
    transition: opacity 0.3s;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .scroll-hint { display: flex; }
}

@keyframes pulseHint {
    0% { transform: translateX(0); opacity: 0.4; }
    50% { transform: translateX(-4px); opacity: 1; }
    100% { transform: translateX(0); opacity: 0.4; }
}
