﻿/* ══════════════════════════════════════════
   ProSheet.css — Products Page
   Theme: Deep Indigo / Purple Glass
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    /* Light cyan theme — backgrounds light, text dark */
    --indigo-950: #f7f0d8; /* page bg base */
    --indigo-900: #ffffff; /* card bg */
    --indigo-800: #f0fbfd; /* raised surface */
    --indigo-700: #e3f6fa; /* hover surface */
    --indigo-600: #b3ebf2; /* borders / dividers */
    --indigo-500: #d4af37; /* mid accent */
    --indigo-400: #b8860b; /* primary cyan */
    --indigo-300: #8b6914; /* darker cyan for text-on-light */
    --indigo-200: #6b5010; /* deep cyan (was light text → now dark) */
    --indigo-100: #574008; /* deepest cyan text */

    --violet-500: #8b6914;
    --violet-400: #6b5010;
    --violet-300: #8b6914;
    --accent: #b8860b;
    --accent-glow: rgba(184,134,11,.35);
    --glass-bg: rgba(255,255,255,.75);
    --glass-border: rgba(184,134,11,.18);
    --text-primary: #0c2230; /* dark text on light bg */
    --text-muted: rgba(12,34,48,.6);
    --success: #d4af37;
    --whatsapp: #25d366;
    --card-radius: 18px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Page Body ── */
body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(160deg, #f0e2b0 0%, #d4af37 35%, #b8860b 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    direction: rtl;
}

    /* ── Animated Mesh Background ── */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: radial-gradient(ellipse 80% 60% at 20% 10%, rgba(184,134,11,.22) 0%, transparent 60%), radial-gradient(ellipse 60% 80% at 80% 80%, rgba(139,105,20,.18) 0%, transparent 60%), radial-gradient(ellipse 50% 50% at 50% 50%, rgba(30,27,90,.8) 0%, transparent 100%);
        pointer-events: none;
        z-index: 0;
    }

    body > * {
        position: relative;
        z-index: 1;
    }


/* ══════════════════════════════════════════
   HEADER / NAV
   ══════════════════════════════════════════ */
.pro-main-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 32px rgba(120,90,20,.12);
}

/* Logo */
.pro-main-logo img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform var(--transition);
}

.pro-main-logo:hover img {
    transform: scale(1.08) rotate(-2deg);
}

/* Search Bar */
.pro-main-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

    .pro-main-search:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .pro-main-search i {
        color: var(--indigo-300);
        font-size: 15px;
    }

    .pro-main-search input {
        background: none;
        border: none;
        outline: none;
        color: var(--text-primary);
        font-family: 'Cairo', sans-serif;
        font-size: 14px;
        width: 100%;
    }

        .pro-main-search input::placeholder {
            color: var(--text-muted);
        }

/* Icon Buttons */
.pro-icon-btn, .pro-brd.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--indigo-200);
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), box-shadow var(--transition), transform .15s;
    position: relative;
    flex-shrink: 0;
}

    .pro-icon-btn:hover, .pro-brd.icon-btn:hover {
        background: var(--accent);
        box-shadow: 0 0 16px var(--accent-glow);
        color: #fff;
        transform: scale(1.08);
    }

/* Cart Badge */
.pro-cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(244,63,94,.5);
}

/* ── Dropdown Menu ── */
.pro-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px;
    z-index: 1000;
    display: none;
    box-shadow: 0 24px 60px rgba(120,90,20,.18), 0 0 0 1px rgba(184,134,11,.15);
    animation: menuSlide .22s ease;
}

    .pro-dropdown-menu.show {
        display: block;
    }

@keyframes menuSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pro-dropdown-list {
    list-style: none;
}

.pro-dropdown-item + .pro-dropdown-item {
    border-top: 1px solid rgba(184,134,11,.06);
}

.pro-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--indigo-200);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), transform .15s;
}

    .pro-dropdown-link i {
        font-size: 16px;
        opacity: .8;
    }

    .pro-dropdown-link:hover {
        background: rgba(184,134,11,.15);
        color: #fff;
        transform: translateX(-3px);
    }

    .pro-dropdown-link.pro-logout {
        color: #f87171;
    }

        .pro-dropdown-link.pro-logout:hover {
            background: rgba(239,68,68,.15);
            color: #fca5a5;
        }


/* ══════════════════════════════════════════
   PRODUCTS GRID
   ══════════════════════════════════════════ */
.pr-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    padding: 16px 0;
}

/* Tighten the fluid container that wraps the grid + chips so cards fill width */
.container-fluid.px-3,
.container-fluid {
    --bs-gutter-x: 0;
    width: 100%;
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
    margin-left: 0;
    margin-right: 0;
    overflow-x: hidden;
}

/* ── Product Card ── */
.pr-product-card {
    position: relative;
    background: linear-gradient(145deg, rgba(240,251,253,.9), rgba(255,255,255,.9));
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    animation: cardIn .5s ease both;
    backdrop-filter: blur(8px);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered delay for first 12 cards */
.pr-product-card:nth-child(1) {
    animation-delay: .04s;
}

.pr-product-card:nth-child(2) {
    animation-delay: .08s;
}

.pr-product-card:nth-child(3) {
    animation-delay: .12s;
}

.pr-product-card:nth-child(4) {
    animation-delay: .16s;
}

.pr-product-card:nth-child(5) {
    animation-delay: .20s;
}

.pr-product-card:nth-child(6) {
    animation-delay: .24s;
}

.pr-product-card:nth-child(7) {
    animation-delay: .28s;
}

.pr-product-card:nth-child(8) {
    animation-delay: .32s;
}

.pr-product-card:nth-child(9) {
    animation-delay: .36s;
}

.pr-product-card:nth-child(10) {
    animation-delay: .40s;
}

.pr-product-card:nth-child(11) {
    animation-delay: .44s;
}

.pr-product-card:nth-child(12) {
    animation-delay: .48s;
}

.pr-product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(184,134,11,.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.pr-product-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(184,134,11,.5);
    box-shadow: 0 20px 50px rgba(120,90,20,.15), 0 0 0 1px rgba(184,134,11,.25), 0 0 30px rgba(184,134,11,.12);
}

/* Discount Badge */
.pr-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 3;
    letter-spacing: .3px;
    box-shadow: 0 2px 12px rgba(244,63,94,.45);
    animation: badgePop .4s ease both;
}

@keyframes badgePop {
    from {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Image Wrapper */
.pr-product-image {
    display: block;
    text-decoration: none;
    overflow: hidden;
    position: relative;
}

.img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--indigo-800), var(--indigo-700));
    overflow: hidden;
}

.img-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--indigo-800);
}

    .img-spinner::after {
        content: '';
        width: 28px;
        height: 28px;
        border: 3px solid rgba(184,134,11,.3);
        border-top-color: var(--accent);
        border-radius: 50%;
        animation: spin .8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease, filter .3s;
    position: relative;
    z-index: 1;
}

.pr-product-card:hover .product-img {
    transform: scale(1.07);
    filter: brightness(1.1);
}

/* Image overlay on hover */
.pr-product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(255,255,255,.0) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 2;
}

.pr-product-card:hover .pr-product-image::after {
    opacity: 1;
}

/* ── Card Body ── */
.pr-product-body {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.pr-product-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pr-product-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Pricing */
.pr-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0;
}

.old-price.mute {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.new-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--violet-300);
    letter-spacing: -.3px;
}

/* WhatsApp Button */
.service-btn.whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    color: var(--whatsapp);
    border: 1px solid rgba(37,211,102,.3);
    background: rgba(37,211,102,.06);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform .15s;
}

    .service-btn.whatsapp:hover {
        background: var(--whatsapp);
        color: #fff;
        border-color: var(--whatsapp);
        box-shadow: 0 4px 16px rgba(37,211,102,.4);
        transform: translateY(-1px);
    }

/* Add to Cart Button */
.pr-add-cart-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: 'Cairo', sans-serif !important;
    text-decoration: none;
    color: var(--indigo-200) !important;
    border: 1px solid rgba(184,134,11,.35) !important;
    background: rgba(184,134,11,.08) !important;
    transition: all var(--transition) !important;
}

    .pr-add-cart-btn:hover {
        background: var(--accent) !important;
        color: #fff !important;
        border-color: var(--accent) !important;
        box-shadow: 0 4px 16px var(--accent-glow) !important;
        transform: translateY(-1px);
    }

    .pr-add-cart-btn i {
        font-size: 14px;
    }

/* ── Empty / No Items Alert ── */
.alert.alert-warning {
    background: rgba(245,158,11,.1) !important;
    border: 1px solid rgba(245,158,11,.3) !important;
    color: #fcd34d !important;
    border-radius: 14px !important;
}

#noItems {
    border-radius: 14px;
    color: var(--text-primary);
}

.social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

    .social-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        color: var(--indigo-200);
        font-size: 16px;
        text-decoration: none;
        transition: background var(--transition), transform .15s;
    }

        .social-icons a:hover {
            background: var(--accent);
            transform: scale(1.1);
        }

.reset-btn {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: 50% !important;
    transition: transform .2s !important;
}

    .reset-btn:hover {
        transform: rotate(180deg) scale(1.1) !important;
    }

/* ══════════════════════════════════════════
   SECTION HEADER (search bar container)
   ══════════════════════════════════════════ */
.pr-main-bar-container.mb-3 {
    display: none !important;
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.pro-main-footer {
    background: rgba(255,255,255,.95);
    border-top: 1px solid var(--glass-border);
    padding: 48px 0 24px;
    margin-top: 60px;
    position: relative;
}

.pro-footer-box h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--indigo-200);
    margin-bottom: 12px;
}

.pro-footer-box p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
}

.pro-footer-links {
    list-style: none;
}

    .pro-footer-links li {
        margin-bottom: 8px;
    }

    .pro-footer-links a {
        color: var(--text-muted);
        text-decoration: none;
        font-size: 13px;
        transition: color var(--transition);
    }

        .pro-footer-links a:hover {
            color: var(--indigo-200);
        }

.pro-contact-list {
    list-style: none;
}

    .pro-contact-list li {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
        font-size: 13px;
        color: var(--text-muted);
        direction: ltr;
        justify-content: flex-end;
    }

    .pro-contact-list i {
        color: var(--indigo-300);
        font-size: 16px;
    }

.pro-social-icons {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

    .pro-social-icons a {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        color: var(--indigo-200);
        font-size: 16px;
        text-decoration: none;
        transition: all var(--transition);
    }

        .pro-social-icons a:hover {
            background: var(--accent);
            border-color: var(--accent);
            box-shadow: 0 0 16px var(--accent-glow);
            transform: translateY(-2px);
        }

.pro-footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 12px;
    color: var(--text-muted);
}

/* WhatsApp Float */
.pro-whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--whatsapp);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,211,102,.5);
    z-index: 998;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: floatPulse 3s ease-in-out infinite;
}

@keyframes floatPulse {
    0%,100% {
        box-shadow: 0 4px 20px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37,211,102,.7), 0 0 0 10px rgba(37,211,102,0);
    }
}

.pro-whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 32px rgba(37,211,102,.7);
    color: #fff;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 640px) {
    .pr-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pr-product-body {
        padding: 9px 9px 11px;
    }

    .pro-main-bar-container {
        gap: 8px;
        padding: 8px 12px;
    }

    /* Make the grid container use minimal side padding so cards fill the screen */
    .container-fluid.px-3 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (min-width: 1200px) {
    .pr-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ══════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ══════════════════════════════════════════ */
#scrollTopBtn {
    position: fixed;
    bottom: 88px;
    left: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--indigo-200);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 997;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition), background var(--transition);
    backdrop-filter: blur(8px);
}

    #scrollTopBtn.visible {
        opacity: 1;
        pointer-events: auto;
    }

    #scrollTopBtn:hover {
        background: var(--accent);
        box-shadow: 0 4px 16px var(--accent-glow);
        transform: translateY(-2px);
    }

/* ── Category pills (quick filter chips) ── */
.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 4px 10px;
    scrollbar-width: none;
}

    .category-chips::-webkit-scrollbar {
        display: none;
    }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Cairo', sans-serif;
}

    .chip:hover, .chip.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
        box-shadow: 0 2px 12px var(--accent-glow);
    }
