@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #0ea5e9;
    --accent-dark: #0284c7;

    --bg: #f4f6f8;
    --card: #ffffff;

    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;

    --success: #16a34a;

    --header-height: 58px;
    --bottom-height: 68px;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

    font-family: 'Cairo', Tahoma, Arial, sans-serif;

    -webkit-tap-highlight-color: transparent;
}

html {
    direction: rtl;
    overflow-x: hidden;
    overflow-y: scroll;
    min-height: 100%;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    min-height: 100vh;

    background: var(--bg);
    color: var(--text);

    direction: rtl;

    padding-top: var(--header-height);

    padding-bottom:
        calc(
            var(--bottom-height)
            + env(safe-area-inset-bottom)
            + 12px
        );

    overflow-x: hidden;
    overflow-y: auto;

    touch-action: pan-y;

    user-select: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

button {
    font-family: inherit;
}

a {
    color: inherit;
}


/* ============================================================
   HEADER
============================================================ */

.app-header {
    position: fixed;

    top: 0;
    right: 0;
    left: 0;

    height: var(--header-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        0
        max(14px, env(safe-area-inset-right))
        0
        max(14px, env(safe-area-inset-left));

    background: var(--primary);

    color: #fff;

    z-index: 1000;

    box-shadow:
        0 2px 12px rgba(0, 0, 0, .12);
}

.header-brand {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 9px;
}

.brand-logo {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;

    color: var(--primary);

    border-radius: 11px;

    font-size: 9px;
    font-weight: 800;

    overflow: hidden;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, .15);
}

.brand-logo span {
    line-height: 1;
}

.brand-title {
    min-width: 0;

    color: #fff;

    font-size: .94rem;
    font-weight: 800;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search-btn {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 11px;

    background: rgba(255,255,255,.08);

    color: #fff;

    cursor: pointer;

    font-size: 1rem;

    transition:
        transform .15s ease,
        background .15s ease;
}

.header-search-btn:active {
    transform: scale(.91);

    background: rgba(255,255,255,.16);
}


/* ============================================================
   MAIN
============================================================ */

.store-main {
    width: 100%;

    max-width: 1180px;

    margin: 0 auto;

    padding-bottom: 10px;
}


/* ============================================================
   SLIDER
============================================================ */

.slider-container {
    position: relative;

    width: 100%;

    padding: 12px;
}

.slider-wrapper {
    display: flex;

    width: 100%;

    overflow-x: auto;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    border-radius: var(--radius-lg);

    box-shadow:
        0 5px 18px rgba(15, 23, 42, .10);

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slide-item {
    position: relative;

    flex: 0 0 100%;

    min-height: 172px;

    overflow: hidden;

    scroll-snap-align: start;

    display: flex;
    align-items: center;

    padding: 24px 22px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #0f172a 0%,
            #1e293b 48%,
            #0369a1 100%
        );
}

.slide-item::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    left: -60px;
    top: -70px;

    border-radius: 50%;

    background: rgba(14,165,233,.18);
}

.slide-item::after {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    left: 30%;
    bottom: -160px;

    border-radius: 50%;

    background: rgba(255,255,255,.05);
}

.slide-item-two {
    background:
        linear-gradient(
            135deg,
            #172554 0%,
            #1e3a8a 50%,
            #0369a1 100%
        );
}

.slide-content {
    position: relative;

    z-index: 2;

    max-width: 88%;
}

.slide-kicker {
    display: inline-block;

    margin-bottom: 5px;

    color: #bae6fd;

    font-size: .68rem;
    font-weight: 700;
}

.slide-content h1,
.slide-content h2 {
    margin: 0 0 6px;

    color: #fff;

    font-size: 1.28rem;
    line-height: 1.5;
    font-weight: 800;
}

.slide-content p {
    margin-bottom: 12px;

    color: rgba(255,255,255,.82);

    font-size: .72rem;
    line-height: 1.8;
}

.slide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 5px 14px;

    background: #fff;

    color: var(--primary);

    border-radius: 10px;

    text-decoration: none;

    font-size: .7rem;
    font-weight: 800;
}

.slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 8px;
}

.slider-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #cbd5e1;

    transition:
        width .2s ease,
        background .2s ease;
}

.slider-dot.active {
    width: 18px;

    border-radius: 10px;

    background: var(--accent);
}


/* ============================================================
   SECTIONS
============================================================ */

.store-section {
    width: 100%;

    margin-bottom: 18px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        0
        14px;

    margin-bottom: 10px;
}

.section-heading h2 {
    color: var(--text);

    font-size: .98rem;
    font-weight: 800;
}

.section-more {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    color: var(--accent-dark);

    text-decoration: none;

    font-size: .68rem;
    font-weight: 700;
}

.section-more i {
    font-size: .58rem;
}


/* ============================================================
   CATEGORIES
============================================================ */

.categories-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 10px;

    padding:
        0
        12px;
}

.category-card {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px;

    background: var(--card);

    border:
        1px solid rgba(226,232,240,.7);

    border-radius: var(--radius-md);

    color: inherit;

    text-decoration: none;

    box-shadow:
        0 3px 10px rgba(15,23,42,.055);

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.category-card:active {
    transform: scale(.975);
}
.category-image {
    width: 96px;
    height: 96px;

    min-width: 96px;
    min-height: 96px;

    flex: 0 0 96px;

    border-radius: 22px;

    overflow: hidden;

    display: grid;
    place-items: center;

    background: #0f172a;
}

.category-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

@media (max-width: 600px) {

    .category-image {
        width: 76px;
        height: 76px;

        min-width: 76px;
        min-height: 76px;

        flex-basis: 76px;

        border-radius: 18px;
    }

}
.category-signs {
    background:
        linear-gradient(135deg,#0284c7,#0369a1);
}

.category-shields {
    background:
        linear-gradient(135deg,#7c3aed,#5b21b6);
}

.category-boxes {
    background:
        linear-gradient(135deg,#ea580c,#c2410c);
}

.category-print {
    background:
        linear-gradient(135deg,#16a34a,#15803d);
}

.category-info {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 1px;
}

.category-info strong {
    color: var(--text);

    font-size: .8rem;
    font-weight: 800;
}

.category-info span {
    color: var(--muted);

    font-size: .59rem;
    line-height: 1.55;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================================
   PRODUCTS
============================================================ */

.products-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    padding:
        0
        12px;
}

.product-card {
    min-width: 0;

    overflow: hidden;

    background: var(--card);

    border:
        1px solid rgba(226,232,240,.7);

    border-radius: var(--radius-md);

    box-shadow:
        0 3px 10px rgba(15,23,42,.055);
}

.product-image {
    position: relative;

    width: 100%;

    aspect-ratio: 1 / .82;

    overflow: hidden;

    background: #e2e8f0;
}

.product-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #e2e8f0,
            #cbd5e1
        );

    color: #94a3b8;

    font-size: 1.8rem;
}

.product-badge {
    position: absolute;

    top: 8px;
    right: 8px;

    padding: 3px 7px;

    background: var(--accent-dark);

    color: #fff;

    border-radius: 7px;

    font-size: .57rem;
    font-weight: 800;
}

.product-info {
    padding: 9px;
}

.product-info h3 {
    margin-bottom: 2px;

    color: var(--text);

    font-size: .77rem;
    font-weight: 800;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info p {
    min-height: 22px;

    margin-bottom: 7px;

    color: var(--muted);

    font-size: .59rem;
    line-height: 1.7;

    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 6px;
}

.product-price {
    color: var(--success);

    font-size: .68rem;
    font-weight: 800;
}

.product-cart-btn {
    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 9px;

    background: #e0f2fe;

    color: var(--accent-dark);

    cursor: pointer;

    font-size: .76rem;
}

.product-cart-btn:active {
    transform: scale(.9);
}


/* ============================================================
   CTA
============================================================ */

.store-cta {
    display: flex;
    align-items: center;

    gap: 10px;

    margin:
        0
        12px
        20px;

    padding: 14px;

    background:
        linear-gradient(
            135deg,
            #0f172a,
            #1e293b
        );

    color: #fff;

    border-radius: var(--radius-lg);

    box-shadow:
        0 5px 18px rgba(15,23,42,.12);
}

.cta-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(14,165,233,.16);

    color: #38bdf8;

    border-radius: 11px;

    font-size: 1rem;
}

.cta-content {
    min-width: 0;

    flex: 1;
}

.cta-content h2 {
    margin-bottom: 2px;

    font-size: .77rem;
    font-weight: 800;
}

.cta-content p {
    color: #cbd5e1;

    font-size: .59rem;
}

.cta-button {
    flex: 0 0 auto;

    padding: 6px 10px;

    background: #fff;

    color: var(--primary);

    border-radius: 9px;

    text-decoration: none;

    font-size: .62rem;
    font-weight: 800;
}


/* ============================================================
   BOTTOM NAVIGATION
============================================================ */

.bottom-nav {
    position: fixed;

    right: 0;
    bottom: 0;
    left: 0;

    height:
        calc(
            var(--bottom-height)
            + env(safe-area-inset-bottom)
        );

    padding:
        4px
        5px
        env(safe-area-inset-bottom);

    display: flex;
    align-items: center;
    justify-content: space-around;

    background: #fff;

    border-top:
        1px solid rgba(226,232,240,.8);

    border-top-left-radius: 17px;
    border-top-right-radius: 17px;

    box-shadow:
        0 -3px 16px rgba(15,23,42,.08);

    z-index: 1000;
}

.nav-item {
    position: relative;

    min-width: 0;

    height: 56px;

    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 1px;

    color: #64748b;

    text-decoration: none;

    font-size: .61rem;
    font-weight: 700;
}

.nav-item > i {
    margin-bottom: 1px;

    font-size: 1.05rem;
}

.nav-item.active {
    color: var(--accent-dark);
}

.nav-item.main-btn {
    top: -10px;
}

.nav-item.main-btn .icon-box {
    width: 46px;
    height: 46px;

    margin-bottom: 1px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    color: #fff;

    border:
        3px solid #fff;

    border-radius: 50%;

    box-shadow:
        0 5px 14px rgba(2,132,199,.30);
}

.nav-item.main-btn .icon-box i {
    font-size: 1.12rem;
}

.cart-count {
    position: absolute;

    top: 7px;
    left: calc(50% - 2px);

    min-width: 15px;
    height: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 3px;

    background: #ef4444;

    color: #fff;

    border:
        2px solid #fff;

    border-radius: 10px;

    font-size: .46rem;
    line-height: 1;
}


/* ============================================================
   DESKTOP / TABLET
============================================================ */

@media (min-width: 600px) {

    .store-main {
        padding:
            0
            12px;
    }

    .slider-container {
        padding:
            16px
            0;
    }

    .slide-item {
        min-height: 220px;

        padding:
            34px
            38px;
    }

    .slide-content h1,
    .slide-content h2 {
        font-size: 1.65rem;
    }

    .slide-content p {
        font-size: .82rem;
    }

    .categories-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 12px;
    }

    .products-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 12px;
    }

    .category-card {
        padding: 13px;
    }

    .category-image {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }
}


@media (min-width: 900px) {

    :root {
        --header-height: 62px;
        --bottom-height: 72px;
    }

    .app-header {
        padding:
            0
            max(22px, calc((100vw - 1180px) / 2))
            0
            max(22px, calc((100vw - 1180px) / 2));
    }

    .brand-title {
        font-size: 1rem;
    }

    .store-main {
        padding-bottom: 25px;
    }

    .slider-container {
        padding-top: 18px;
    }

    .slide-item {
        min-height: 270px;
    }

    .slide-content {
        max-width: 620px;
    }

    .slide-content h1,
    .slide-content h2 {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .products-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .bottom-nav {
        right: 50%;

        left: auto;

        width: min(760px, calc(100% - 30px));

        transform: translateX(50%);

        border:
            1px solid rgba(226,232,240,.8);

        border-bottom-left-radius: 17px;
        border-bottom-right-radius: 17px;

        margin-bottom: 8px;
    }
}


/* ============================================================
   VERY SMALL PHONES
============================================================ */

@media (max-width: 340px) {

    .brand-title {
        font-size: .78rem;
    }

    .brand-logo {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
    }

    .header-search-btn {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
    }

    .categories-grid {
        gap: 7px;
        padding-inline: 9px;
    }

    .category-card {
        padding: 8px;
        gap: 7px;
    }

    .category-image {
        width: 45px;
        height: 45px;
        flex-basis: 45px;
        font-size: .95rem;
    }

    .category-info strong {
        font-size: .72rem;
    }

    .category-info span {
        font-size: .52rem;
    }

    .products-grid {
        gap: 7px;
        padding-inline: 9px;
    }

    .product-info {
        padding: 7px;
    }

    .product-info h3 {
        font-size: .69rem;
    }

    .product-price {
        font-size: .59rem;
    }

    .nav-item {
        font-size: .54rem;
    }

    .nav-item > i {
        font-size: .92rem;
    }
}


/* ============================================================
   DARK MODE
============================================================ */

html.dark-mode,
html.dark-mode body {
    background: #0f172a;
    color: #e2e8f0;
}

html.dark-mode .app-header {
    background: #020617;
}

html.dark-mode .header-search-btn {
    background: rgba(255,255,255,.07);
}

html.dark-mode .section-heading h2 {
    color: #f1f5f9;
}

html.dark-mode .section-more {
    color: #38bdf8;
}

html.dark-mode .category-card,
html.dark-mode .product-card {
    background: #1e293b;

    border-color: #334155;

    box-shadow:
        0 3px 10px rgba(0,0,0,.20);
}

html.dark-mode .category-info strong,
html.dark-mode .product-info h3 {
    color: #f1f5f9;
}

html.dark-mode .category-info span,
html.dark-mode .product-info p {
    color: #94a3b8;
}

html.dark-mode .product-placeholder {
    background:
        linear-gradient(
            135deg,
            #334155,
            #1e293b
        );

    color: #64748b;
}

html.dark-mode .product-cart-btn {
    background: #172554;
    color: #38bdf8;
}

html.dark-mode .bottom-nav {
    background: #111827;

    border-top-color: #334155;

    box-shadow:
        0 -3px 16px rgba(0,0,0,.35);
}

html.dark-mode .nav-item {
    color: #94a3b8;
}

html.dark-mode .nav-item.active {
    color: #38bdf8;
}

html.dark-mode .nav-item.main-btn .icon-box {
    border-color: #111827;
}

html.dark-mode .cart-count {
    border-color: #111827;
}


/* ============================================================
   ACCESSIBILITY / MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================
   CATEGORY PAGE
============================================================ */

.category-page-header {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 12px;

    padding: 10px;

    background: var(--card);

    border: 1px solid rgba(226,232,240,.75);

    border-radius: var(--radius-md);

    box-shadow:
        0 3px 10px rgba(15,23,42,.055);
}


/* زر الرجوع */

.category-page-back {
    flex: 0 0 auto;
}

.category-back-btn {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f1f5f9;

    color: var(--primary);

    text-decoration: none;

    font-size: .85rem;
}

.category-back-btn:active {
    transform: scale(.92);
}


/* صورة القسم */

.category-page-image {
    width: 52px;
    height: 52px;

    flex: 0 0 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #0284c7,
            #0369a1
        );

    color: #fff;

    font-size: 1.1rem;
}

.category-page-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* بيانات القسم */

.category-page-info {
    min-width: 0;

    flex: 1;
}

.category-page-info h1 {
    margin: 0 0 2px;

    color: var(--text);

    font-size: .95rem;
    font-weight: 800;
}

.category-page-info p {
    margin: 0;

    color: var(--muted);

    font-size: .61rem;
    line-height: 1.6;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* حالة القسم الفارغ */

.category-empty-state {
    margin: 12px;

    padding: 30px 18px;

    text-align: center;

    background: var(--card);

    border:
        1px solid rgba(226,232,240,.75);

    border-radius: var(--radius-md);
}

.category-empty-state > i {
    margin-bottom: 10px;

    color: var(--accent);

    font-size: 2rem;
}

.category-empty-state h2 {
    margin: 0 0 5px;

    color: var(--text);

    font-size: .9rem;
}

.category-empty-state p {
    margin: 0;

    color: var(--muted);

    font-size: .65rem;
}


/* الموبايلات الصغيرة */

@media (max-width: 340px) {

    .category-page-header {
        gap: 7px;
        padding: 8px;
    }

    .category-page-image {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 11px;
    }

    .category-back-btn {
        width: 31px;
        height: 31px;
    }

    .category-page-info h1 {
        font-size: .82rem;
    }

    .category-page-info p {
        font-size: .55rem;
    }
}


/* الوضع الليلي */

html.dark-mode .category-page-header {
    background: #1e293b;
    border-color: #334155;
}

html.dark-mode .category-back-btn {
    background: #0f172a;
    color: #38bdf8;
}

html.dark-mode .category-page-info h1 {
    color: #f1f5f9;
}

html.dark-mode .category-page-info p {
    color: #94a3b8;
}

html.dark-mode .category-empty-state {
    background: #1e293b;
    border-color: #334155;
}

/* ============================================================
   PRODUCT DETAILS
============================================================ */

.product-details {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;

    padding: 12px;
}


/* الصورة الرئيسية */

.product-main-image {
    width: 100%;

    aspect-ratio: 1 / .82;

    overflow: hidden;

    background: #e2e8f0;

    border-radius: var(--radius-lg);

    box-shadow:
        0 5px 18px rgba(15,23,42,.08);
}

.product-main-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.product-detail-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #94a3b8;

    font-size: 2.5rem;
}


/* الصور المصغرة */

.product-thumbnails {
    display: flex;

    gap: 7px;

    margin-top: 8px;

    overflow-x: auto;

    padding-bottom: 2px;
}

.product-thumbnail {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    padding: 0;

    overflow: hidden;

    border:
        2px solid transparent;

    border-radius: 10px;

    background: #e2e8f0;

    cursor: pointer;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.product-thumbnail.active {
    border-color: var(--accent);
}


/* بيانات المنتج */

.product-details-info {
    margin-top: 14px;

    padding: 14px;

    background: var(--card);

    border:
        1px solid rgba(226,232,240,.75);

    border-radius: var(--radius-lg);

    box-shadow:
        0 3px 12px rgba(15,23,42,.055);
}

.product-detail-badge {
    display: inline-block;

    margin-bottom: 6px;

    padding: 3px 8px;

    background: var(--accent-dark);

    color: #fff;

    border-radius: 7px;

    font-size: .58rem;
    font-weight: 800;
}

.product-details-info h1 {
    margin: 0 0 8px;

    color: var(--text);

    font-size: 1.05rem;
    font-weight: 800;
}

.product-description {
    color: var(--muted);

    font-size: .7rem;

    line-height: 1.9;

    margin-bottom: 12px;
}


/* السعر */

.product-detail-price {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 12px;
}

.product-detail-price strong {
    color: var(--success);

    font-size: 1rem;
    font-weight: 800;
}

.product-detail-price del {
    color: #94a3b8;

    font-size: .68rem;
}


/* غير متاح */

.product-unavailable {
    margin-bottom: 10px;

    padding: 9px;

    background: #fee2e2;

    color: #b91c1c;

    border-radius: 9px;

    font-size: .65rem;

    font-weight: 700;

    text-align: center;
}


/* الفيديو */

.product-video-btn {
    width: 100%;

    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-bottom: 9px;

    padding: 8px 12px;

    background: #0f172a;

    color: #fff;

    border-radius: 10px;

    text-decoration: none;

    font-size: .7rem;
    font-weight: 800;
}

.product-video-btn i {
    color: #38bdf8;

    font-size: 1rem;
}

.product-video-btn small {
    color: #94a3b8;

    font-size: .55rem;
}


/* إضافة للسلة */

.product-add-cart-btn {
    width: 100%;

    min-height: 44px;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    color: #fff;

    font-family: inherit;

    font-size: .72rem;

    font-weight: 800;

    cursor: pointer;
}

.product-add-cart-btn:active {
    transform: scale(.98);
}

.product-add-cart-btn:disabled {
    opacity: .5;

    cursor: not-allowed;
}


/* الشاشات الأكبر */

@media (min-width: 700px) {

    .product-details {
        display: grid;

        grid-template-columns:
            minmax(0, 1.15fr)
            minmax(300px, .85fr);

        gap: 18px;

        align-items: start;

        padding:
            18px;
    }

    .product-details-info {
        margin-top: 0;
    }

}
.product-card {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   PRODUCT CARD IMAGE - FIXED SIZE
============================================================ */

.product-card {
    overflow: hidden;
}

.product-card > img,
.product-card .product-image,
.product-card .product-card-image {
    width: 100%;
    height: 150px !important;

    display: block;

    object-fit: cover;

    object-position: center;

    overflow: hidden;
}


/* الشاشات الصغيرة جدًا */

@media (max-width: 360px) {

    .product-card > img,
    .product-card .product-image,
    .product-card .product-card-image {
        height: 135px !important;
    }

}


/* الشاشات الأكبر */

@media (min-width: 600px) {

    .product-card > img,
    .product-card .product-image,
    .product-card .product-card-image {
        height: 170px !important;
    }

}
/* ============================================================
   PRODUCT DETAILS - FIXED IMAGE AREA
============================================================ */

.product-gallery {
    width: 100%;
}


/*
 * منطقة الصورة الرئيسية
 * حوالي 40% من ارتفاع شاشة الهاتف
 */

.product-main-image {
    width: 100%;

    height: 40vh;

    min-height: 250px;
    max-height: 430px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border:
        1px solid rgba(226, 232, 240, .9);

    border-radius: 18px;

    box-shadow:
        0 4px 18px rgba(15, 23, 42, .07);
}


/*
 * الصورة نفسها
 */

.product-main-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    object-position: center;
}


/*
 * في حالة عدم وجود صورة
 */

.product-detail-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #94a3b8;

    font-size: 2.5rem;
}


/* ============================================================
   PRODUCT THUMBNAILS
============================================================ */

.product-thumbnails {
    display: flex;

    gap: 8px;

    margin-top: 9px;

    padding: 2px 0 4px;

    overflow-x: auto;

    scrollbar-width: none;
}

.product-thumbnails::-webkit-scrollbar {
    display: none;
}


.product-thumbnail {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    padding: 0;

    overflow: hidden;

    border:
        2px solid transparent;

    border-radius: 10px;

    background: #f1f5f9;

    cursor: pointer;
}


.product-thumbnail img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.product-thumbnail.active {
    border-color: var(--accent);
}


/* ============================================================
   SMALL PHONES
============================================================ */

@media (max-width: 360px) {

    .product-main-image {
        height: 38vh;

        min-height: 220px;
        max-height: 350px;

        border-radius: 15px;
    }

}


/* ============================================================
   TABLETS / DESKTOP
============================================================ */

@media (min-width: 700px) {

    .product-main-image {
        height: 430px;

        max-height: 430px;
    }

}
/* ============================================================
   ADMIN LOGIN
============================================================ */

.admin-login-page {
    min-height: 100vh;

    margin: 0;

    background:
        radial-gradient(
            circle at top right,
            rgba(14,165,233,.12),
            transparent 35%
        ),
        #f1f5f9;

    font-family:
        'Cairo',
        Tahoma,
        Arial,
        sans-serif;
}


.admin-login-wrapper {
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;
}


.admin-login-card {
    width: 100%;

    max-width: 420px;

    padding: 28px 22px;

    background: #ffffff;

    border:
        1px solid #e2e8f0;

    border-radius: 22px;

    box-shadow:
        0 15px 45px rgba(15,23,42,.09);

    text-align: center;
}


.admin-login-logo {
    width: 72px;
    height: 72px;

    margin: 0 auto 14px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #0f172a;

    color: #ffffff;

    border-radius: 20px;

    font-size: 17px;

    font-weight: 800;
}


.admin-login-card h1 {
    margin: 0;

    color: #0f172a;

    font-size: 1.15rem;

    font-weight: 800;
}


.admin-login-subtitle {
    margin: 4px 0 20px;

    color: #64748b;

    font-size: .7rem;
}


.admin-login-error {
    margin-bottom: 14px;

    padding: 9px 11px;

    background: #fee2e2;

    color: #b91c1c;

    border:
        1px solid #fecaca;

    border-radius: 10px;

    font-size: .67rem;

    font-weight: 700;

    line-height: 1.7;
}


.admin-form-group {
    margin-bottom: 13px;

    text-align: right;
}


.admin-form-group label {
    display: block;

    margin-bottom: 5px;

    color: #334155;

    font-size: .67rem;

    font-weight: 700;
}


.admin-form-group input {
    width: 100%;

    height: 44px;

    padding:
        0 12px;

    border:
        1px solid #cbd5e1;

    border-radius: 10px;

    background: #f8fafc;

    color: #0f172a;

    font-family: inherit;

    font-size: .72rem;

    outline: none;

    transition:
        border-color .2s,
        box-shadow .2s;
}


.admin-form-group input:focus {
    border-color: #0ea5e9;

    box-shadow:
        0 0 0 3px
        rgba(14,165,233,.12);

    background: #ffffff;
}


.admin-login-btn {
    width: 100%;

    height: 45px;

    margin-top: 5px;

    border: 0;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #0ea5e9,
            #0369a1
        );

    color: #ffffff;

    font-family: inherit;

    font-size: .72rem;

    font-weight: 800;

    cursor: pointer;
}


.admin-login-btn:active {
    transform: scale(.98);
}


.admin-back-store {
    display: inline-block;

    margin-top: 17px;

    color: #64748b;

    text-decoration: none;

    font-size: .63rem;
}


.admin-back-store:hover {
    color: #0284c7;
}

/* ============================================================
   HOME - BROWSE ALL PRODUCTS BUTTON
============================================================ */

.home-all-products-wrap {
    padding: 0 12px;
    margin: -2px 0 18px;
}

.home-all-products-btn {
    position: relative;

    width: 100%;
    min-height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 10px 18px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    color: #fff;

    border-radius: 15px;

    text-decoration: none;

    font-size: .82rem;
    font-weight: 900;

    box-shadow:
        0 7px 18px rgba(2,132,199,.22);

    overflow: hidden;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.home-all-products-btn::before {
    content: "";

    position: absolute;

    width: 110px;
    height: 110px;

    left: -30px;
    top: -55px;

    border-radius: 50%;

    background: rgba(255,255,255,.10);
}

.home-all-products-btn::after {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    right: -70px;
    bottom: -100px;

    border-radius: 50%;

    background: rgba(255,255,255,.07);
}

.home-all-products-btn > * {
    position: relative;
    z-index: 1;
}

.home-all-products-btn i:first-child {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,.14);

    border-radius: 10px;

    font-size: .9rem;
}

.home-all-products-btn .home-all-products-arrow {
    font-size: .66rem;
    opacity: .9;
}

.home-all-products-btn:hover {
    filter: brightness(1.04);

    box-shadow:
        0 10px 24px rgba(2,132,199,.28);
}

.home-all-products-btn:active {
    transform: scale(.985);
}


/* ============================================================
   ALL PRODUCTS PAGE
============================================================ */

.all-products-header {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 12px;

    padding: 12px;

    background: var(--card);

    border:
        1px solid rgba(226,232,240,.75);

    border-radius: var(--radius-md);

    box-shadow:
        0 3px 10px rgba(15,23,42,.055);
}

.all-products-back {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f1f5f9;

    color: var(--primary);

    text-decoration: none;

    font-size: .85rem;
}

.all-products-title {
    min-width: 0;
    flex: 1;
}

.all-products-title h1 {
    margin: 0 0 2px;

    color: var(--text);

    font-size: 1rem;
    font-weight: 900;
}

.all-products-title p {
    margin: 0;

    color: var(--muted);

    font-size: .61rem;
}

.all-products-summary {
    margin: 0 12px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    padding: 8px 11px;

    background: #eff6ff;

    color: #0369a1;

    border-radius: 11px;

    font-size: .62rem;
    font-weight: 800;
}

.all-products-summary strong {
    font-size: .70rem;
}

.all-products-list {
    padding: 0 12px;
}

.all-products-category {
    margin-bottom: 12px;

    background: var(--card);

    border:
        1px solid rgba(226,232,240,.75);

    border-radius: var(--radius-lg);

    box-shadow:
        0 3px 12px rgba(15,23,42,.055);

    overflow: hidden;
}

.all-products-category-header {
    width: 100%;

    min-height: 56px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    border: 0;

    background: transparent;

    color: var(--text);

    font-family: inherit;

    cursor: pointer;

    text-align: right;
}

.all-products-category-header:active {
    background: rgba(14,165,233,.045);
}

.all-products-category-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #e0f2fe,
            #bae6fd
        );

    color: #0369a1;

    font-size: .78rem;
}

.all-products-category-name {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 1px;
}

.all-products-category-name strong {
    color: var(--text);

    font-size: .78rem;
    font-weight: 900;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.all-products-category-name small {
    color: var(--muted);

    font-size: .54rem;
}

.all-products-category-arrow {
    width: 28px;
    height: 28px;

    flex: 0 0 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--muted);

    transition:
        transform .22s ease,
        color .22s ease;
}

.all-products-category.is-collapsed .all-products-category-arrow {
    transform: rotate(90deg);
}

.all-products-category.is-open .all-products-category-arrow {
    color: var(--accent-dark);
}

.all-products-category-body {
    padding: 0 10px 12px;
}

.all-products-category.is-collapsed .all-products-category-body {
    display: none;
}

.all-products-category .products-grid {
    padding: 0;
}

.all-products-category-empty {
    padding: 18px 10px 8px;

    text-align: center;

    color: var(--muted);

    font-size: .62rem;
}

.all-products-category-children {
    display: grid;

    gap: 8px;

    margin-bottom: 10px;
}

.all-products-child-link {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    min-height: 38px;

    padding: 7px 10px;

    background: #f8fafc;

    border:
        1px solid #e2e8f0;

    border-radius: 10px;

    color: var(--text);

    text-decoration: none;

    font-size: .62rem;
    font-weight: 800;
}

.all-products-child-link span {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-products-child-link i {
    color: var(--accent-dark);
    font-size: .55rem;
}

.all-products-empty {
    margin: 12px;

    padding: 35px 18px;

    text-align: center;

    background: var(--card);

    border:
        1px solid rgba(226,232,240,.75);

    border-radius: var(--radius-lg);

    color: var(--muted);
}

.all-products-empty i {
    display: block;

    margin-bottom: 9px;

    color: var(--accent);

    font-size: 2rem;
}

.all-products-empty strong {
    display: block;

    margin-bottom: 4px;

    color: var(--text);

    font-size: .82rem;
}

.all-products-empty span {
    font-size: .62rem;
}


/* ============================================================
   ALL PRODUCTS - DARK MODE
============================================================ */

html.dark-mode .home-all-products-btn {
    box-shadow:
        0 8px 22px rgba(2,132,199,.22);
}

html.dark-mode .all-products-header,
html.dark-mode .all-products-category,
html.dark-mode .all-products-empty {
    background: #1e293b;

    border-color: #334155;
}

html.dark-mode .all-products-back {
    background: #0f172a;
    color: #38bdf8;
}

html.dark-mode .all-products-title h1,
html.dark-mode .all-products-category-name strong,
html.dark-mode .all-products-empty strong {
    color: #f1f5f9;
}

html.dark-mode .all-products-title p,
html.dark-mode .all-products-category-name small,
html.dark-mode .all-products-category-arrow,
html.dark-mode .all-products-category-empty {
    color: #94a3b8;
}

html.dark-mode .all-products-summary {
    background: #172554;
    color: #7dd3fc;
}

html.dark-mode .all-products-category-icon {
    background: #172554;
    color: #38bdf8;
}

html.dark-mode .all-products-child-link {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html.dark-mode .all-products-child-link i {
    color: #38bdf8;
}


/* ============================================================
   ALL PRODUCTS - DESKTOP
============================================================ */

@media (min-width: 600px) {

    .home-all-products-wrap {
        padding: 0;
    }

    .home-all-products-btn {
        min-height: 62px;

        font-size: .90rem;
    }

    .all-products-header {
        margin:
            16px
            0;
    }

    .all-products-summary {
        margin:
            0
            0
            16px;
    }

    .all-products-list {
        padding: 0;
    }

    .all-products-category-body {
        padding:
            0
            14px
            15px;
    }
}

@media (min-width: 900px) {

    .home-all-products-wrap {
        margin-bottom: 22px;
    }

    .all-products-category-header {
        min-height: 62px;

        padding:
            11px
            15px;
    }

    .all-products-category-name strong {
        font-size: .86rem;
    }

    .all-products-category-name small {
        font-size: .57rem;
    }
}


/* ============================================================
   SALEH STORE - ALL PRODUCTS / HOME CTA FIX
   أضف هذا الجزء في نهاية style.css الحالي
============================================================ */

/* زر جميع المنتجات في الرئيسية */
.home-all-products-wrap {
    padding: 2px 12px 14px;
}

.home-all-products-btn {
    position: relative;
    width: 100%;
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    padding: 10px 15px;

    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff !important;

    border: 0;
    border-radius: 16px;

    text-decoration: none;

    font-family: inherit;
    font-size: .82rem;
    font-weight: 900;

    box-shadow: 0 7px 18px rgba(2,132,199,.20);

    overflow: hidden;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.home-all-products-btn::before {
    content: "";
    position: absolute;

    width: 105px;
    height: 105px;

    left: -38px;
    top: -58px;

    border-radius: 50%;
    background: rgba(255,255,255,.10);
}

.home-all-products-btn::after {
    content: "";
    position: absolute;

    width: 135px;
    height: 135px;

    right: -65px;
    bottom: -95px;

    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.home-all-products-btn > * {
    position: relative;
    z-index: 1;
}

.home-all-products-btn > i:first-child {
    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 34px;

    border-radius: 10px;
    background: rgba(255,255,255,.14);

    font-size: .90rem;
}

.home-all-products-btn .home-all-products-arrow {
    font-size: .65rem;
    opacity: .90;
}

.home-all-products-btn:hover {
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(2,132,199,.25);
}

.home-all-products-btn:active {
    transform: scale(.985);
}

@media (max-width: 480px) {
    .home-all-products-wrap {
        padding: 2px 10px 12px;
    }

    .home-all-products-btn {
        min-height: 54px;
        border-radius: 14px;
        font-size: .76rem;
        gap: 9px;
    }

    .home-all-products-btn > i:first-child {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        font-size: .82rem;
    }
}
