/* ============================================
   LuxeQ - Qatar Shopping Site - Custom Styles
   ============================================ */

:root {
    --qatar-maroon: #8D1B3D;
    --qatar-dark:   #6b1530;
    --qatar-light:  #b52a52;
    --qatar-pale:   #f9f0f3;
    --qatar-cream:  #fff5f7;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--qatar-maroon); border-radius: 3px; }

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

/* Active nav underline color fix */
.active { color: var(--qatar-maroon); }

/* ---- Main Hero Section (index) ---- */
.hero-section {
    position: relative;
    min-height: 380px;
    background: linear-gradient(135deg, #6b1530 0%, #8D1B3D 50%, #a52045 100%);
    overflow: hidden;
}
.hero-section .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
}
.hero-section .hero-content {
    position: relative;
    z-index: 2;
}
@media (min-width: 768px) {
    .hero-section { min-height: 480px; }
}

/* ---- Page Hero (about / contact / products) ---- */
.page-hero {
    position: relative;
    min-height: 180px;
    overflow: hidden;
}
.page-hero .page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.page-hero .page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(107,21,48,0.88) 0%, rgba(141,27,61,0.82) 60%, rgba(107,21,48,0.75) 100%);
}
.page-hero .page-hero-content {
    position: relative;
    z-index: 2;
}
@media (min-width: 768px) {
    .page-hero { min-height: 220px; }
}

/* ---- RTL Scrolling Banner ---- */
.scroll-track-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}
.scroll-track-wrapper::before,
.scroll-track-wrapper::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}
@media (min-width: 640px) {
    .scroll-track-wrapper::before,
    .scroll-track-wrapper::after { width: 80px; }
}
.scroll-track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #fff 0%, transparent 100%);
}
.scroll-track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #fff 0%, transparent 100%);
}
.scroll-track {
    display: flex;
    gap: 0.75rem;
    width: max-content;
    animation: scrollRTL 30s linear infinite;
}
@media (min-width: 640px) {
    .scroll-track { gap: 1.5rem; }
}
.scroll-track:hover { animation-play-state: paused; }

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

/* Scroll track cards — smaller on mobile */
.scroll-card-mobile {
    width: 140px;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .scroll-card-mobile { width: 208px; }
}

/* ---- Product Cards ---- */
.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(141, 27, 61, 0.15);
}
.product-card .add-btn {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.product-card:hover .add-btn {
    opacity: 1;
    transform: translateY(0);
}
/* Always show add button on touch devices */
@media (hover: none) {
    .product-card .add-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Product Card Image Heights ---- */
.card-img-scroll { height: 120px; }
.card-img-grid   { height: 160px; }
@media (min-width: 640px) {
    .card-img-scroll { height: 176px; }
    .card-img-grid   { height: 208px; }
}

/* ---- Badge ---- */
.badge-sale {
    background: var(--qatar-maroon);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-new {
    background: #059669;
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

/* ---- Cart Notification ---- */
#cart-toast {
    position: fixed;
    bottom: 24px;
    right: 16px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    max-width: calc(100vw - 32px);
}
#cart-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ---- Admin Panel ---- */
.admin-sidebar { min-height: 100vh; }
.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
}
.admin-menu-item:hover, .admin-menu-item.active {
    background: var(--qatar-pale);
    color: var(--qatar-maroon);
    font-weight: 600;
}

/* ---- Qty Input ---- */
.qty-input {
    width: 48px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 0.875rem;
}
@media (min-width: 640px) {
    .qty-input { width: 60px; padding: 4px 8px; }
}
.qty-input:focus { outline: none; border-color: var(--qatar-maroon); }

/* ---- Image placeholder ---- */
.img-placeholder {
    background: linear-gradient(135deg, #f9f0f3, #f3e8ec);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qatar-maroon);
}

/* ---- Section heading decoration ---- */
.section-heading::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--qatar-maroon);
    margin: 8px auto 0;
    border-radius: 2px;
}

/* ---- Buttons ---- */
.btn-maroon {
    background: var(--qatar-maroon);
    color: white;
    border: 2px solid var(--qatar-maroon);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}
.btn-maroon:hover {
    background: var(--qatar-dark);
    border-color: var(--qatar-dark);
}
.btn-outline-maroon {
    background: transparent;
    color: var(--qatar-maroon);
    border: 2px solid var(--qatar-maroon);
    transition: background 0.2s, color 0.2s;
}
.btn-outline-maroon:hover {
    background: var(--qatar-maroon);
    color: white;
}

/* ---- Contact form inputs ---- */
.form-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #fff;
}
.form-input:focus {
    border-color: var(--qatar-maroon);
    box-shadow: 0 0 0 3px rgba(141,27,61,0.08);
}

/* ---- Stars ---- */
.stars { color: #f59e0b; letter-spacing: 1px; }

/* ---- Loading spinner ---- */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Category Pills ---- */
.cat-pill {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1.5px solid #e5e7eb;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
    background: white;
    text-decoration: none;
    white-space: nowrap;
}
@media (min-width: 640px) {
    .cat-pill { padding: 6px 16px; font-size: 0.8rem; }
}
.cat-pill:hover, .cat-pill.active {
    background: var(--qatar-maroon);
    border-color: var(--qatar-maroon);
    color: white;
}

/* ---- Mobile: Cart row ---- */
@media (max-width: 479px) {
    .cart-item-img { width: 72px; height: 72px; }
}

/* ---- Animate on scroll ---- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Menu item class alias ---- */
.menu-item { /* same as admin-menu-item — kept for compatibility */ }
