:root {
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #dbe5ef;
    --page: #f6f9fc;
    --panel: #ffffff;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --teal: #14b8a6;
    --emerald: #059669;
    --rose: #e11d48;
    --purple: #7c3aed;
    --indigo: #4f46e5;
    --radius-xl: 14px;
    --radius-2xl: 18px;
    --radius-3xl: 28px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 22px 55px rgba(15, 23, 42, 0.16);
    --app-font: "Tajawal", "Almarai", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

@media only screen and (max-width: 640px) {
    .category-result-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 110px !important;
        padding: 1rem !important;
    }
    .category-result-header__main {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .category-result-header h2 {
        font-size: 1.45rem !important;
    }
    .category-result-header p {
        font-size: .78rem !important;
    }
    .category-result-count {
        flex: 0 0 76px !important;
        min-width: 76px !important;
        padding: .65rem .45rem !important;
    }
}
    header.site-header > .header-actions,
    header.site-header > .header-search {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 100000 !important;
    }
    header.site-header > .header-search form,
    header.site-header > .header-search button,
    header.site-header > .header-search input,
    header.site-header > .header-actions button {
        display: flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .category-result-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 110px !important;
        padding: 1rem !important;
    }
    .category-result-header__main { flex: 1 1 auto !important; min-width: 0 !important; }
    .category-result-header h2 { font-size: 1.45rem !important; }
    .category-result-header p { font-size: .78rem !important; }
    .category-result-count { flex: 0 0 76px !important; min-width: 76px !important; padding: .65rem .45rem !important; }
}

/* Final mobile touch and spacing overrides. */
@media only screen and (max-width: 640px) {
    header.site-header,
    header.site-header > .header-brand-wrap,
    header.site-header > .header-actions,
    header.site-header > .header-search {
        position: relative !important;
        z-index: 100000 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    header.site-header > .header-actions {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    header.site-header button,
    header.site-header a,
    header.site-header input,
    header.site-header form {
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    .catalog-hero { margin-top: -1.25rem !important; }
}

/* Mobile touch fix: keep header controls above decorative layers. */
@media only screen and (max-width: 640px) {
    header.site-header,
    header.site-header > .header-brand-wrap,
    header.site-header > .header-actions,
    header.site-header > .header-search {
        position: relative !important;
        z-index: 100000 !important;
        pointer-events: auto !important;
    }

    header.site-header button,
    header.site-header a,
    header.site-header input,
    header.site-header form {
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .catalog-hero {
        margin-top: -1.25rem !important;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page);
    color: var(--ink);
    direction: rtl;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--app-font);
    background:
        radial-gradient(circle at 10% 10%, rgba(8, 145, 178, 0.08), transparent 28rem),
        linear-gradient(180deg, #fbfdff 0%, var(--page) 42%, #ffffff 100%);
    color: var(--ink);
}

body,
button,
input,
select,
textarea {
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

button {
    cursor: pointer;
    border: 0;
}

img {
    display: block;
    max-width: 100%;
}

input,
select,
textarea {
    width: 100%;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 0.85rem 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    background: #ffffff;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

input[type="color"] {
    min-height: 44px;
    padding: 0.3rem;
}

input[type="file"] {
    padding: 0.65rem 1rem;
}

.h-full {
    min-height: 100%;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

.block {
    display: block;
}

.hidden {
    display: none !important;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.inset-0 {
    inset: 0;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.top-0 {
    top: 0;
}

.top-2 {
    top: 0.5rem;
}

.top-5 {
    top: 1.25rem;
}

.right-0 {
    right: 0;
}

.right-2 {
    right: 0.5rem;
}

.left-0 {
    left: 0;
}

.left-2 {
    left: 0.5rem;
}

.bottom-0 {
    bottom: 0;
}

.bottom-2 {
    bottom: 0.5rem;
}

.z-10 {
    z-index: 10;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-0\.5 {
    margin-top: 0.125rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-auto {
    margin-top: auto;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-1\.5 {
    margin-bottom: 0.375rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.p-1\.5 {
    padding: 0.375rem;
}

.p-3\.5 {
    padding: 0.875rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.p-12 {
    padding: 3rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-2\.5 {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-2\.5 {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-3\.5 {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.pb-4 {
    padding-bottom: 1rem;
}

.pr-3 {
    padding-right: 0.75rem;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-1\.5 {
    gap: 0.375rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-5 {
    gap: 1.25rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-5 > * + * {
    margin-top: 1.25rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.w-1\.5 {
    width: 0.375rem;
}

.w-2\.5 {
    width: 0.625rem;
}

.w-5,
.h-5 {
    width: 1.25rem;
    height: 1.25rem;
}

.w-7,
.h-7 {
    width: 1.75rem;
    height: 1.75rem;
}

.w-8,
.h-8 {
    width: 2rem;
    height: 2rem;
}

.w-10,
.h-10 {
    width: 2.5rem;
    height: 2.5rem;
}

.w-12,
.h-12 {
    width: 3rem;
    height: 3rem;
}

.w-14,
.h-14 {
    width: 3.5rem;
    height: 3.5rem;
}

.w-16,
.h-16 {
    width: 4rem;
    height: 4rem;
}

.h-11 {
    height: 2.75rem;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.max-w-md {
    max-width: 28rem;
}

.shrink-0 {
    flex-shrink: 0;
}

.flex-1 {
    flex: 1 1 0%;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

.pointer-events-none {
    pointer-events: none;
}

.rounded-lg {
    border-radius: 0.625rem;
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-2xl {
    border-radius: var(--radius-2xl);
}

.rounded-3xl {
    border-radius: var(--radius-3xl);
}

.rounded-full {
    border-radius: 999px;
}

.border {
    border: 1px solid var(--line);
}

.border-b {
    border-bottom: 1px solid var(--line);
}

.border-t {
    border-top: 1px solid var(--line);
}

.bg-white,
.bg-white\/80,
.bg-white\/90 {
    background: rgba(255, 255, 255, 0.95);
}

.bg-slate-50 {
    background: #f8fafc;
}

.bg-slate-100 {
    background: #f1f5f9;
}

.bg-slate-900 {
    background: #0f172a;
}

.bg-cyan-50 {
    background: #ecfeff;
}

.bg-cyan-600 {
    background: var(--cyan);
}

.bg-teal-50 {
    background: #f0fdfa;
}

.bg-emerald-50 {
    background: #ecfdf5;
}

.bg-rose-50 {
    background: #fff1f2;
}

.bg-indigo-50 {
    background: #eef2ff;
}

.bg-purple-50 {
    background: #f5f3ff;
}

.bg-white\/20 {
    background: rgba(255, 255, 255, 0.2);
}

.bg-gradient-to-r {
    background: linear-gradient(90deg, var(--cyan), var(--teal));
}

.bg-gradient-to-br {
    background:
        radial-gradient(circle at 12% 18%, rgba(20, 184, 166, 0.18), transparent 20rem),
        linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #083344 100%);
}

.text-white {
    color: #ffffff;
}

.text-slate-300 {
    color: #cbd5e1;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-500 {
    color: var(--muted);
}

.text-slate-600 {
    color: #475569;
}

.text-slate-700 {
    color: #334155;
}

.text-slate-800 {
    color: #1e293b;
}

.text-slate-900 {
    color: var(--ink);
}

.text-cyan-300 {
    color: #67e8f9;
}

.text-cyan-600,
.text-cyan-700 {
    color: var(--cyan);
}

.text-teal-600,
.text-teal-700 {
    color: #0d9488;
}

.text-emerald-600,
.text-emerald-700,
.text-emerald-800 {
    color: #047857;
}

.text-rose-600,
.text-rose-800 {
    color: var(--rose);
}

.text-purple-600 {
    color: var(--purple);
}

.text-indigo-600 {
    color: var(--indigo);
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1.25rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.5rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.65rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.85rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-\[10px\] {
    font-size: 10px;
    line-height: 1rem;
}

.text-\[11px\] {
    font-size: 11px;
    line-height: 1rem;
}

.font-light {
    font-weight: 300;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.02em;
}

.tracking-wider,
.tracking-widest {
    letter-spacing: 0.04em;
}

.leading-relaxed {
    line-height: 1.9;
}

.underline {
    text-decoration: underline;
}

.shadow-sm,
.shadow-md,
.shadow-lg,
.shadow-xl,
.shadow-2xl {
    box-shadow: var(--shadow-sm);
}

.shadow-xl,
.shadow-2xl {
    box-shadow: var(--shadow-xl);
}

.object-cover {
    object-fit: cover;
}

.transition-all,
.transition-colors,
.transition-transform,
.transition-opacity {
    transition: all 0.22s ease;
}

.duration-300 {
    transition-duration: 0.3s;
}

.duration-500 {
    transition-duration: 0.5s;
}

.transform {
    transform: translateZ(0);
}

.-translate-x-full {
    transform: translateX(-100%);
}

.translate-x-0 {
    transform: translateX(0);
}

.translate-x-full {
    transform: translateX(100%);
}

.-translate-x-1\/2 {
    transform: translateX(-50%);
}

.opacity-0 {
    opacity: 0;
}

.backdrop-blur-sm,
.backdrop-blur-md,
.backdrop-blur-xl {
    backdrop-filter: blur(14px);
}

.resize-none {
    resize: none;
}

.cursor-pointer {
    cursor: pointer;
}

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

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

.divide-y > * + * {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
}

.scrollbar-none {
    scrollbar-width: none;
}

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

header {
    min-height: 78px;
}

.site-header {
    direction: ltr;
    display: grid !important;
    grid-template-columns: auto minmax(18rem, 42rem) auto;
    grid-template-areas: "cart search brand";
    align-items: center;
    gap: 1.25rem;
}

.header-brand-wrap {
    grid-area: brand;
    direction: rtl;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.brand-link {
    min-width: 0;
}

.header-search {
    grid-area: search;
    direction: rtl;
    justify-self: center;
    display: flex;
    width: min(42rem, 100%);
    min-width: 14rem;
}

.header-actions {
    grid-area: cart;
    direction: rtl;
    justify-self: start;
}

.brand-kicker {
    font-size: 0.95rem;
    line-height: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.brand-title {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.92rem;
    line-height: 1.35rem;
    font-weight: 800;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 44px;
    padding: 0.65rem 1rem;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    font-size: 0.8rem;
    font-weight: 900;
}

.hamburger-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: var(--cyan);
}

.catalog-search {
    align-items: center;
    gap: 0.5rem;
    min-width: min(28rem, 100%);
    padding: 0.35rem;
    background: #f8fafc;
    border: 1px solid #dbe5ef;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.catalog-search input {
    min-width: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0.65rem 0.85rem;
}

.catalog-search input:focus {
    box-shadow: none;
    background: transparent;
}

.catalog-search button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0.55rem 1rem;
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 900;
}

.header-search {
    min-height: 40px;
    padding: 0.25rem 0.45rem;
    background: #ffffff;
    border-color: #cfd8e3;
    border-radius: 3px;
    box-shadow: none;
}

.header-search button {
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    color: #1f2937;
    background: transparent;
    border-radius: 6px;
    box-shadow: none;
}

.header-search button span {
    display: none;
}

.header-search input {
    min-height: 34px;
    padding: 0.35rem 0.55rem;
    font-size: 0.86rem;
}

.catalog-search-panel {
    display: flex;
    width: 100%;
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe5ef;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.search-panel .catalog-search {
    display: flex;
    flex: 0 1 34rem;
}

.side-menu {
    right: 0;
    left: auto;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #dbe5ef;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 900;
    transition: all 0.2s ease;
}

.menu-link:hover,
.menu-link.is-active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(8, 145, 178, 0.18);
}

.menu-link-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.75);
}

.menu-link span:nth-child(2) {
    flex: 1;
}

.menu-link small {
    min-width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
    color: inherit;
    font-weight: 900;
}

.menu-link.is-active small,
.menu-link:hover small {
    background: rgba(255, 255, 255, 0.18);
}

.menu-overlay[hidden] {
    display: none !important;
}

.category-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.4rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dbe5ef;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.category-result-header__main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.category-result-dot {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
    border-radius: 999px;
    box-shadow: 0 0 0 7px rgba(8, 145, 178, 0.09);
}

.category-result-eyebrow {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--cyan);
    font-size: 0.72rem;
    line-height: 1rem;
    font-weight: 900;
}

.category-result-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 2.05rem;
    font-weight: 900;
}

.category-result-header p {
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.65rem;
    font-weight: 600;
}

.category-result-header strong {
    color: var(--cyan-dark);
    font-weight: 900;
}

.category-result-count {
    min-width: 5rem;
    padding: 0.65rem 0.9rem;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.18);
}

.category-result-count strong {
    display: block;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1.35rem;
    font-weight: 900;
}

.category-result-count span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    line-height: 1rem;
    font-weight: 800;
}

header a:first-child img,
header > div:first-child img {
    flex: 0 0 auto;
}

header nav a,
header > div:last-child a,
header button,
.rounded-2xl.border {
    min-height: 40px;
}

header nav a,
main > section:nth-of-type(2) a {
    white-space: nowrap;
}

main {
    width: 100%;
}

main > section:first-of-type {
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

main > section:first-of-type h1 {
    margin: 0;
}

main > section:first-of-type p {
    margin: 0.75rem 0 0;
}

main > section:first-of-type .inline-flex {
    margin-bottom: 0.85rem;
}

article {
    min-width: 0;
}

article[data-id] {
    background: #ffffff;
    border: 1px solid #dce6ef;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

article[data-id]:hover {
    border-color: rgba(8, 145, 178, 0.55);
    box-shadow: var(--shadow-md);
}

article[data-id] button {
    background: transparent;
    color: inherit;
}

article[data-id] .aspect-square {
    background: #eef3f8;
}

article[data-id] img {
    width: 100%;
    height: 100%;
}

article[data-id] .catalog-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    background: #f8fafc;
}

article[data-id] .catalog-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
    background: #ffffff;
}

.card-meta {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
    text-align: right;
}

.product-card-body {
    display: grid;
    gap: 0.65rem;
}

.product-card-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.65rem;
}

.product-card-price {
    display: grid;
    justify-items: end;
    gap: 0.15rem;
}

.part-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.35rem;
    font-weight: 900;
}

.card-meta span {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.1rem;
    font-weight: 700;
}

.card-meta > span:not(.part-code) {
    display: block;
    max-width: 100%;
    white-space: normal;
}

.card-meta .part-code {
    width: max-content;
    max-width: 100%;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.66rem;
    line-height: 1rem;
    font-weight: 900;
}

.card-meta strong {
    color: #047857;
    font-size: 0.78rem;
    line-height: 1.1rem;
    font-weight: 900;
}

.card-meta .part-price-badge {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.55rem;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    background: #dcfce7;
    color: #047857;
    box-shadow: 0 8px 18px rgba(4, 120, 87, 0.08);
}

.cart-card-button {
    min-height: 2.2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 21rem));
    justify-content: center;
    gap: 1.75rem;
    align-items: start;
}

article[data-id].product-card,
.product-card {
    position: relative;
    width: 100%;
    max-width: 21rem;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

article[data-id].product-card:hover,
.product-card:hover {
    border-color: rgba(14, 116, 144, 0.35);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
    transform: translateY(-3px);
}

.product-card__button {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    overflow: hidden;
    color: inherit;
    background: #ffffff !important;
    text-align: right;
}

.product-card__button:focus-visible {
    outline: 3px solid rgba(8, 145, 178, 0.24);
    outline-offset: -4px;
}

.product-card__media {
    position: relative;
    min-height: 25.6rem;
    padding: 4.85rem 1.05rem 1rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.98), transparent 11rem),
        radial-gradient(circle at 88% 20%, rgba(8, 145, 178, 0.08), transparent 11rem),
        linear-gradient(145deg, #ffffff 0%, #f5f7fb 54%, #edf2f7 100%);
    border-bottom: 1px solid #e2e8f0;
}

.product-card__media::before,
.product-card__media::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0.55;
}

.product-card__media::before {
    inset: 0;
    background:
        linear-gradient(126deg, transparent 0 34%, rgba(255, 255, 255, 0.86) 34% 39%, transparent 39% 100%),
        linear-gradient(-50deg, transparent 0 74%, rgba(15, 23, 42, 0.04) 74% 78%, transparent 78% 100%);
}

.product-card__media::after {
    right: -18%;
    bottom: -28%;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
}

.product-card__brand-corner {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 6.45rem;
    height: 6.35rem;
    padding: 0.72rem;
    background:
        radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.16), transparent 4.5rem),
        linear-gradient(135deg, #081529 0%, #0b2a55 100%);
    border-bottom-right-radius: 34px;
    box-shadow: 0 18px 36px rgba(11, 42, 85, 0.2);
}

.product-card__brand-corner img {
    width: 4.45rem;
    height: 4.45rem;
    object-fit: contain;
    border-radius: 16px;
}

.product-card__discount {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: calc(100% - 8rem);
    min-height: 2.3rem;
    padding: 0.48rem 0.82rem;
    color: #ffffff;
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 15px;
    box-shadow: 0 16px 30px rgba(190, 18, 60, 0.25);
    font-size: 0.78rem;
    line-height: 1.1rem;
    font-weight: 900;
    white-space: nowrap;
}

.product-card__heading {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.18rem;
    min-height: 4rem;
    margin: 0 auto 0.9rem;
    padding-inline: 0.2rem;
    text-align: center;
}

.product-card__heading h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #0b2a55;
    font-size: 1.42rem;
    line-height: 1.35;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card__heading p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.35rem;
    font-weight: 800;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.product-card__image-box {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 13.4rem;
    padding: 0.62rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    transform: translateZ(0);
    transition: transform 0.35s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.035);
}

.product-card__features {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.78rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.product-card__features span {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.66rem 0.3rem;
    color: #0b2a55;
    text-align: center;
    border-left: 1px solid #e2e8f0;
}

.product-card__features span:last-child {
    border-left: 0;
}

.product-card__features i {
    margin: 0 auto;
    color: #0b2a55;
    font-size: 1.05rem;
}

.product-card__features strong {
    overflow: hidden;
    color: #0b2a55;
    font-size: 0.7rem;
    line-height: 1rem;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: end;
    padding: 1rem 1.05rem 1.1rem;
    background: #ffffff;
}

.product-card__info {
    display: grid;
    gap: 0.34rem;
    min-width: 0;
}

.product-card__code {
    width: max-content;
    max-width: 100%;
    padding: 0.34rem 0.68rem;
    overflow: hidden;
    color: #0b2a55;
    background: #eef2f7;
    border-radius: 12px;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-card__info strong {
    display: block;
    overflow: hidden;
    color: #0b2a55;
    font-size: 1.06rem;
    line-height: 1.45rem;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-card__info small {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.15rem;
    font-weight: 800;
}

.product-card__pricing {
    display: grid;
    justify-items: end;
    gap: 0.18rem;
    min-width: 6.2rem;
}

.product-card__old-price {
    color: #94a3b8;
    font-size: 0.84rem;
    line-height: 1rem;
    font-weight: 800;
    text-decoration: line-through;
}

.product-card__price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.42rem 0.75rem;
    color: #047857;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(4, 120, 87, 0.08);
    font-size: 0.92rem;
    line-height: 1rem;
    font-weight: 900;
    white-space: nowrap;
}

.product-card__action-row {
    grid-column: 1 / -1;
}

.product-card__cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 3.05rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    background:
        radial-gradient(circle at 22% 20%, rgba(34, 211, 238, 0.24), transparent 8rem),
        linear-gradient(135deg, #0b2a55 0%, #061733 100%);
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(11, 42, 85, 0.2);
    font-size: 0.96rem;
    line-height: 1.25rem;
    font-weight: 900;
}

.product-card.is-selected .product-card__cart {
    background: linear-gradient(135deg, #059669 0%, #14b8a6 100%);
    box-shadow: 0 16px 30px rgba(5, 150, 105, 0.2);
}

.product-card.is-selected {
    border-color: rgba(20, 184, 166, 0.8);
}

.fa-tag::before {
    content: "◇";
}

.fa-shield-halved::before {
    content: "✓";
}

.fa-gear::before {
    content: "⚙";
}

.fa-bolt::before {
    content: "⚡";
}

.fa-cart-shopping::before {
    content: "▦";
}

.admin-edit-card {
    min-width: 0;
}

.admin-edit-card__image {
    aspect-ratio: 4 / 3;
}

.admin-edit-card__image img {
    width: 100%;
    height: 100%;
}

.admin-inline-form {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

article[data-id]:hover .catalog-card-image {
    transform: scale(1.025);
}

form button,
a.bg-cyan-50,
a.bg-slate-100,
button.bg-gradient-to-r,
button.bg-cyan-600 {
    border-radius: 14px;
    font-weight: 800;
}

button.bg-gradient-to-r,
form button.bg-gradient-to-r,
button.bg-cyan-600 {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.2);
}

button.bg-gradient-to-r:hover,
form button.bg-gradient-to-r:hover,
button.bg-cyan-600:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(8, 145, 178, 0.28);
}

main section.bg-white,
main div.bg-white,
main form.bg-slate-50,
main article.bg-slate-50,
.bg-white.border {
    box-shadow: var(--shadow-sm);
}

label {
    display: block;
}

aside[data-basket] {
    max-width: 28rem;
}

aside[data-basket] .flex-1 {
    min-height: 0;
}

[data-close-basket][hidden] {
    display: none !important;
}

.bg-slate-900\/50 {
    background: rgba(15, 23, 42, 0.5);
}

.fa-solid,
.fa-regular {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}

.fa-basket-shopping::before {
    content: "▦";
}

.fa-border-all::before {
    content: "▦";
}

.fa-plus-circle::before,
.fa-check::before,
.fa-circle-check::before {
    content: "+";
}

.fa-xmark::before {
    content: "x";
}

.fa-paper-plane::before,
.fa-upload::before,
.fa-cloud-arrow-up::before {
    content: "↑";
}

.fa-image::before,
.fa-images::before,
.fa-photo-film::before {
    content: "□";
}

.fa-folder-plus::before,
.fa-folder-tree::before,
.fa-tags::before {
    content: "▣";
}

.fa-store::before {
    content: "■";
}

.fa-file-invoice-dollar::before {
    content: "جنيه";
}

.fa-file-invoice-dollar {
    width: auto;
    min-width: 2.6rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 900;
}

.fa-chevron-left::before {
    content: "<";
}

.fa-certificate::before {
    content: "*";
}

.fa-magnifying-glass::before {
    content: "⌕";
}

.fa-triangle-exclamation::before {
    content: "!";
}

.fa-trash::before,
.fa-eye-slash::before {
    content: "x";
}

footer {
    margin-top: auto;
}

.catalog-hero {
    isolation: isolate;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.16), transparent 16rem),
        radial-gradient(circle at 88% 20%, rgba(168, 85, 247, 0.22), transparent 20rem),
        linear-gradient(135deg, #1f1b3d 0%, #45307d 45%, #7b6fc8 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(76, 29, 149, 0.22);
}

.catalog-hero::before {
    content: "";
    position: absolute;
    top: -55%;
    bottom: -55%;
    left: -34%;
    width: 36%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 35%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.05) 65%,
        transparent 100%
    );
    filter: blur(1px);
    transform: translateX(370%) skewX(-16deg);
    animation: catalog-hero-shine 6.2s ease-in-out infinite;
}

@keyframes catalog-hero-shine {
    0%,
    54% {
        opacity: 0;
        transform: translateX(370%) skewX(-16deg);
    }

    68% {
        opacity: 0.68;
    }

    100% {
        opacity: 0;
        transform: translateX(-135%) skewX(-16deg);
    }
}

.admin-page {
    background:
        radial-gradient(circle at 82% 6%, rgba(20, 184, 166, 0.12), transparent 24rem),
        radial-gradient(circle at 10% 16%, rgba(14, 116, 144, 0.08), transparent 24rem),
        linear-gradient(180deg, #f8fbff 0%, #eef5f9 48%, #f8fafc 100%);
}

.admin-page h1 {
    font-family: var(--app-font);
    font-weight: 900;
    letter-spacing: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 100px;
    padding: 0.9rem 1.75rem;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(203, 213, 225, 0.75);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(18px);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.admin-brand img {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.admin-brand span {
    display: block;
    color: var(--cyan);
    font-size: 0.96rem;
    line-height: 1.15rem;
    font-weight: 900;
}

.admin-brand h1 {
    margin: 0.05rem 0 0;
    color: var(--ink);
    font-family: var(--app-font);
    font-size: 1.55rem;
    line-height: 2rem;
    font-weight: 900;
}

.admin-brand p {
    margin: 0.1rem 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.2rem;
    font-weight: 700;
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-nav-btn,
.admin-online-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.7rem 1.05rem;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    font-size: 0.86rem;
    line-height: 1.2rem;
    font-weight: 900;
}

.admin-nav-btn {
    color: var(--cyan-dark);
    background: #ecfeff;
    border-color: #bae6fd;
}

.admin-online-link {
    color: #047857;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.online-gear {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: #059669;
    background: transparent;
    border: 0;
    border-radius: 0;
    animation: admin-spin 0.9s linear infinite;
}

.online-gear::before {
    content: "⚙";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: currentColor;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 900;
}

.online-gear::after {
    display: none;
}

@keyframes admin-spin {
    to {
        transform: rotate(360deg);
    }
}

.admin-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    overflow: hidden;
    padding: 2rem;
    color: #ffffff;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.16), transparent 16rem),
        radial-gradient(circle at 88% 20%, rgba(168, 85, 247, 0.22), transparent 20rem),
        linear-gradient(135deg, #1f1b3d 0%, #45307d 45%, #7b6fc8 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.admin-hero::before {
    content: "";
    position: absolute;
    top: -55%;
    bottom: -55%;
    left: -35%;
    width: 38%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 36%,
        rgba(255, 255, 255, 0.32) 50%,
        rgba(255, 255, 255, 0.06) 64%,
        transparent 100%
    );
    filter: blur(1px);
    transform: translateX(360%) skewX(-16deg);
    animation: admin-hero-shine 5.8s ease-in-out infinite;
}

@keyframes admin-hero-shine {
    0%,
    52% {
        opacity: 0;
        transform: translateX(360%) skewX(-16deg);
    }

    66% {
        opacity: 0.75;
    }

    100% {
        opacity: 0;
        transform: translateX(-130%) skewX(-16deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-hero::before,
    .admin-hero::before {
        animation: none;
        opacity: 0;
    }
}

.admin-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.admin-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    padding: 0.48rem 0.78rem;
    color: #d1fae5;
    background: rgba(5, 150, 105, 0.18);
    border: 1px solid rgba(110, 231, 183, 0.28);
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1.1rem;
    font-weight: 900;
}

.admin-status-pill .online-gear {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.admin-hero h2 {
    margin: 1rem 0 0;
    color: #ffffff;
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 1.15;
    font-weight: 900;
}

.admin-hero p {
    max-width: 42rem;
    margin: 0.85rem 0 0;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.9rem;
    font-weight: 600;
}

.admin-hero__media {
    display: none;
}

.admin-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.35rem;
}

.admin-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.72rem 1.05rem;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    font-size: 0.86rem;
    line-height: 1.2rem;
    font-weight: 900;
}

.admin-hero-btn--primary {
    color: #073042;
    background: #67e8f9;
    border-color: #67e8f9;
    box-shadow: 0 16px 32px rgba(103, 232, 249, 0.2);
}

.admin-hero__media {
    position: relative;
    z-index: 2;
    display: none;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 0.9rem;
    align-items: stretch;
}

.admin-logo-tile,
.admin-thumb-grid {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-logo-tile {
    display: grid;
    place-items: center;
    min-height: 14rem;
    padding: 1rem;
}

.admin-logo-tile img {
    width: min(11rem, 100%);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.admin-thumb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.55rem;
}

.admin-thumb-grid img {
    width: 100%;
    height: 100%;
    min-height: 6rem;
    object-fit: cover;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.admin-page main > section.grid:first-of-type > div {
    border-color: rgba(203, 213, 225, 0.72);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.07);
}

.admin-page main > div > section.bg-white,
.admin-page main > section.bg-white {
    border-color: rgba(203, 213, 225, 0.78);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.admin-page input,
.admin-page select,
.admin-page textarea {
    background: #f8fbff;
}

.admin-page input:focus,
.admin-page select:focus,
.admin-page textarea:focus {
    background: #ffffff;
}

@media (min-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }

    .sm\:block {
        display: block !important;
    }

    .sm\:flex {
        display: flex !important;
    }

    .sm\:flex-row {
        flex-direction: row;
    }

    .sm\:items-center {
        align-items: center;
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .sm\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .sm\:p-8 {
        padding: 2rem;
    }

    .sm\:p-12 {
        padding: 3rem;
    }

    .sm\:text-base {
        font-size: 1rem;
        line-height: 1.7rem;
    }

    .sm\:text-4xl {
        font-size: 2.25rem;
        line-height: 2.7rem;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (min-width: 1024px) {
    .lg\:flex {
        display: flex !important;
    }

    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .lg\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .lg\:grid-cols-\[0\.85fr_1\.15fr\] {
        grid-template-columns: 0.85fr 1.15fr;
    }

    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 900px) {
    header {
        align-items: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
    }

    header > div:last-child {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .search-panel .catalog-search {
        width: 100%;
        flex-basis: auto;
    }

    .category-result-header {
        align-items: stretch;
        flex-direction: column;
    }

    .category-result-count {
        align-self: flex-start;
    }

    .site-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "cart brand"
            "search search";
        align-items: center;
        gap: 0.85rem;
        overflow: hidden;
    }

    .site-header .header-brand-wrap {
        justify-self: end;
        width: auto;
        overflow: visible;
        padding-bottom: 0;
    }

    .site-header .header-actions {
        justify-self: start;
        width: auto;
        justify-content: flex-start;
        overflow: visible;
        padding-bottom: 0;
    }

    .site-header .header-search {
        width: 100%;
        min-width: 0;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.9rem 1rem;
    }

    .admin-nav-actions {
        width: 100%;
    }

    .admin-nav-btn,
    .admin-online-link {
        flex: 1 1 12rem;
    }

    .admin-hero {
        grid-template-columns: 1fr;
        padding: 1.35rem;
    }

    .admin-hero__media {
        grid-template-columns: 1fr;
    }

    .admin-logo-tile {
        min-height: auto;
    }

    .admin-logo-tile img {
        width: 8rem;
    }
}

@media (max-width: 640px) {
    header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    header a:first-child,
    header > div:first-child {
        min-width: 0;
    }

    header a:first-child > div,
    header > div:first-child > div {
        min-width: 0;
    }

    header .text-base,
    header h1 {
        font-size: 0.95rem;
        line-height: 1.35rem;
    }

    .site-header {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    .header-brand-wrap {
        gap: 0.55rem;
    }

    .menu-toggle {
        padding: 0.58rem 0.72rem;
    }

    .menu-toggle > span:last-child {
        display: none;
    }

    .brand-kicker {
        font-size: 0.8rem;
        line-height: 0.95rem;
    }

    .brand-title {
        font-size: 0.82rem;
        line-height: 1.2rem;
    }

    .admin-brand h1 {
        font-size: 1.05rem;
        line-height: 1.45rem;
    }

    .admin-brand p {
        display: none;
    }

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

    .admin-thumb-grid img {
        min-height: 4.8rem;
    }

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

    main > section:first-of-type {
        border-radius: 22px;
        padding: 1.5rem;
    }
}

.product-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 19rem));
    justify-content: center;
    gap: 1.45rem;
}

article[data-id].product-card,
.product-card {
    max-width: 19rem;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.product-card__media {
    min-height: auto;
    padding: 0.85rem 0.75rem 0.75rem;
}

.product-card__brand-corner {
    width: 4.85rem;
    height: 4.95rem;
    padding: 0.45rem;
    border-bottom-right-radius: 2rem;
}

.product-card__brand-corner img {
    width: 3.55rem;
    height: 3.55rem;
    border-radius: 12px;
}

.product-card__discount {
    top: 0.72rem;
    right: 0.72rem;
    max-width: 8.6rem;
    min-height: 2rem;
    padding: 0.42rem 0.72rem;
    border-radius: 12px;
    font-size: 0.68rem;
    line-height: 0.95rem;
}

.product-card__heading {
    min-height: 5rem;
    margin: 0 0 0.55rem;
    padding-right: 7.35rem;
    padding-left: 4.75rem;
    align-content: center;
}

.product-card__heading h3 {
    font-size: 1.22rem;
    line-height: 1.2;
}

.product-card__heading p {
    font-size: 0.72rem;
    line-height: 1rem;
}

.product-card__image-box {
    height: 10rem;
    padding: 0.35rem;
    border-radius: 14px;
}

.product-card__image-box::before {
    display: none !important;
}

.product-card__image {
    border-radius: 10px;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.08);
}

.product-card:hover .product-card__image {
    transform: scale(1.12);
}

.product-card__features {
    margin-top: 0.55rem;
    border-radius: 14px;
}

.product-card__features span {
    gap: 0.14rem;
    padding: 0.48rem 0.2rem 0.42rem;
}

.product-card__features i {
    font-size: 1rem;
}

.product-card__features strong {
    font-size: 0.58rem;
    line-height: 0.78rem;
}

.product-card__features span::after {
    display: block;
    overflow: hidden;
    color: #64748b;
    font-size: 0.5rem;
    line-height: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-card__features span:nth-child(1)::after {
    content: "موثوق وأداء ممتاز";
}

.product-card__features span:nth-child(2)::after {
    content: "استجابة سريعة";
}

.product-card__features span:nth-child(3)::after {
    content: "عمل مستقر وآمن";
}

.product-card__footer {
    grid-template-columns: minmax(0, 1fr) minmax(5.6rem, auto);
    gap: 0.65rem;
    align-items: center;
    padding: 0.78rem 0.82rem 0.86rem;
    border-top: 1px solid #eef2f7;
}

.product-card__code {
    padding: 0.22rem 0.5rem;
    border-radius: 9px;
    font-size: 0.6rem;
}

.product-card__info {
    gap: 0.24rem;
}

.product-card__info strong {
    font-size: 0.88rem;
    line-height: 1.15rem;
}

.product-card__info small {
    font-size: 0.72rem;
}

.product-card__pricing {
    min-width: 5.6rem;
}

.product-card__old-price {
    font-size: 0.7rem;
}

.product-card__price {
    min-height: auto;
    padding: 0;
    color: #e11d48;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 1.32rem;
    line-height: 1.25rem;
}

.product-card__action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.2rem;
    gap: 0.65rem;
}

.product-card__cart {
    min-height: 2.45rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.product-card__action-row::after {
    content: "♡";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 800;
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: minmax(0, 19rem);
    }

    .product-card__heading {
        padding-right: 6.9rem;
        padding-left: 4.55rem;
    }
}

.product-card__discount {
    top: 0.72rem;
    right: 0.72rem;
    left: auto;
}

.product-card__heading {
    min-height: 4.75rem;
    margin: 0 0 0.48rem;
    padding: 2.7rem 0 0 5rem;
    align-content: start;
    justify-items: end;
    text-align: right;
}

.product-card__heading h3,
.product-card__heading p {
    width: 100%;
    text-align: right;
}

.product-card__heading h3 {
    font-size: 1.12rem;
    line-height: 1.25;
}

.product-card__heading p {
    font-size: 0.72rem;
    line-height: 1rem;
}

.product-card__image-box {
    height: 9.15rem;
    padding: 0.72rem;
}

.product-card__image {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.94);
}

.product-card:hover .product-card__image {
    transform: scale(0.98);
}

@media (max-width: 640px) {
    .product-card__heading {
        padding: 2.7rem 0 0 4.75rem;
    }
}

.product-card__heading h3 {
    display: block;
    overflow: hidden;
    font-size: 0.98rem;
    line-height: 1.2rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-line-clamp: unset;
}

.product-card__image-box {
    height: 9.35rem;
    padding: 0.48rem;
}

.product-card__image {
    transform: scale(1.03);
}

.product-card:hover .product-card__image {
    transform: scale(1.06);
}

.catalog-hero {
    display: block !important;
    min-height: 8.5rem;
    aspect-ratio: 4724 / 886;
    padding: 0 !important;
    background-image: url("../img/store-hero-background.png") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
}

.catalog-hero > div {
    display: none !important;
}

.catalog-hero::before {
    z-index: 2;
}

@media (min-width: 1180px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 17.35rem));
        gap: 1.05rem;
        justify-content: center;
    }

    article[data-id].product-card,
    .product-card {
        max-width: 17.35rem;
    }

    .product-card__heading {
        padding-left: 4.3rem;
    }
}

body.store-page {
    background-color: #f6f9fc !important;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(8, 145, 178, 0.08), transparent 28rem),
        linear-gradient(180deg, #fbfdff 0%, #f6f9fc 42%, #ffffff 100%) !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: center top, center top !important;
    background-size: auto, auto !important;
    background-attachment: scroll, scroll !important;
}

body.store-page main {
    background: transparent !important;
}

body.store-page footer {
    background: rgba(255, 255, 255, 0.92) !important;
}

.admin-form-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 800;
}

.admin-input {
    width: 100%;
    min-height: 3.15rem;
    border: 1px solid #dbe5f0;
    border-radius: 0.9rem;
    background: #f8fbff;
    padding: 0.78rem 1rem;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 700;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-input:focus {
    outline: none;
    border-color: #0891b2;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.bundle-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6rem;
    gap: 0.75rem;
    align-items: center;
}

.bundle-qty-input {
    text-align: center;
}

.bundle-admin-hero {
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.2), transparent 18rem),
        linear-gradient(135deg, #31215f 0%, #5b3d9d 52%, #8b6be8 100%) !important;
}

.admin-bundle-card {
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 1.4rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 1rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.07);
}

.admin-bundle-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #eef2f7;
}

.admin-bundle-card__head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.06rem;
    font-weight: 900;
}

.admin-bundle-card__head p {
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
}

.admin-bundle-card__price {
    display: grid;
    justify-items: end;
    gap: 0.1rem;
    color: #0f766e;
}

.admin-bundle-card__price small {
    color: #64748b;
    font-weight: 800;
}

.admin-bundle-card__price strong {
    color: #0f766e;
    font-size: 1.04rem;
    font-weight: 900;
}

.admin-bundle-card__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.admin-bundle-card__items span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    padding: 0.35rem 0.55rem;
}

.admin-bundle-card__items img {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    object-fit: cover;
    background: #f1f5f9;
}

.admin-bundle-card__items b {
    max-width: 9rem;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.72rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-bundle-card__items small {
    color: #0891b2;
    font-size: 0.72rem;
    font-weight: 900;
}

.admin-bundle-card__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.admin-bundle-card__summary span {
    border-radius: 999px;
    background: #f1f5f9;
    padding: 0.45rem 0.7rem;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 800;
}

.admin-bundle-card__summary strong {
    color: #0f172a;
}

.bundle-offers-section {
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 1.7rem;
    background: rgba(255, 255, 255, 0.94);
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

.bundle-offers-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bundle-offers-section__head span {
    color: #0891b2;
    font-size: 0.78rem;
    font-weight: 900;
}

.bundle-offers-section__head h2 {
    margin: 0.12rem 0 0;
    color: #0f172a;
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    font-weight: 900;
}

.bundle-offers-section__head p {
    margin: 0.3rem 0 0;
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 700;
}

.bundle-offers-section__head strong {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #ecfeff;
    padding: 0.55rem 0.85rem;
    color: #0891b2;
    font-size: 0.8rem;
    font-weight: 900;
}

.bundle-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1rem;
}

.bundle-offer-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 1.35rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.96)),
        radial-gradient(circle at 12% 14%, rgba(8, 145, 178, 0.11), transparent 13rem);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bundle-offer-card:hover {
    transform: translateY(-4px);
    border-color: rgba(8, 145, 178, 0.45);
    box-shadow: 0 26px 56px rgba(15, 23, 42, 0.15);
}

.bundle-offer-card.is-selected {
    border-color: rgba(20, 184, 166, 0.8);
}

.bundle-offer-card__button {
    display: grid;
    gap: 0.85rem;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    padding: 1rem;
    color: inherit;
    font: inherit;
    text-align: right;
    cursor: pointer;
}

.bundle-offer-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bundle-offer-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    padding: 0.5rem 0.75rem;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 900;
    box-shadow: 0 14px 26px rgba(225, 29, 72, 0.24);
}

.bundle-offer-card__logo {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    object-fit: cover;
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.16);
}

.bundle-offer-card__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
}

.bundle-offer-card__content h3 {
    margin: 0;
    color: #0b2a55;
    font-size: 1.24rem;
    line-height: 1.25;
    font-weight: 900;
}

.bundle-offer-card__content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.25rem;
    font-weight: 700;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bundle-offer-card__items {
    display: flex;
    direction: ltr;
}

.bundle-offer-card__items span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.8rem;
    height: 3.8rem;
    margin-left: -0.65rem;
    border: 3px solid #ffffff;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.bundle-offer-card__items img {
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    object-fit: cover;
}

.bundle-offer-card__items b {
    position: absolute;
    right: -0.42rem;
    bottom: -0.42rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.72rem;
    height: 1.72rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b2a55 0%, #111827 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.22);
}

.bundle-offer-card__list {
    display: grid;
    gap: 0.45rem;
    border-top: 1px solid rgba(203, 213, 225, 0.7);
    padding-top: 0.85rem;
}

.bundle-offer-card__list span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
}

.bundle-offer-card__list i {
    color: #059669;
}

.bundle-offer-card__list small {
    margin-inline-start: auto;
    min-width: 2.1rem;
    border-radius: 999px;
    background: #ecfeff;
    padding: 0.2rem 0.48rem;
    color: #0891b2;
    font-size: 0.82rem;
    text-align: center;
    font-weight: 900;
}

.bundle-offer-card__footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    border-top: 1px solid rgba(203, 213, 225, 0.7);
    padding-top: 0.85rem;
}

.bundle-offer-card__price {
    display: grid;
    gap: 0.1rem;
}

.bundle-offer-card__price small {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: line-through;
}

.bundle-offer-card__price strong {
    color: #e11d48;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 900;
}

.bundle-offer-card__cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #0b2a55 0%, #08204a 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    box-shadow: 0 16px 28px rgba(11, 42, 85, 0.2);
}

.bundle-offer-card.is-selected .bundle-offer-card__cart {
    background: linear-gradient(135deg, #059669 0%, #14b8a6 100%);
}

@media (max-width: 640px) {
    .bundle-item-row,
    .bundle-offer-card__content,
    .bundle-offer-card__footer {
        grid-template-columns: 1fr;
    }

    .bundle-qty-input {
        width: 100%;
    }
}

.admin-logout-link {
    color: #be123c !important;
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
}
.admin-logout-link:hover {
    background: #ffe4e6 !important;
    border-color: #fb7185 !important;
    color: #9f1239 !important;
}

/* INK SYSTEM nav polish */
.ink-admin-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    direction: ltr !important;
    margin-inline-start: 28px !important;
}

.ink-admin-pill {
    direction: rtl !important;
    min-height: 46px !important;
    padding: 0 20px !important;
    border: 1px solid rgba(16,161,191,.24) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg,#ffffff,#eefbff) !important;
    color: #0b5872 !important;
    box-shadow: 0 14px 28px rgba(12,41,70,.09) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    transition: .18s ease !important;
}

.ink-admin-pill::after {
    content: attr(data-icon);
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(31,177,203,.13);
    color: #0897bc;
}

.ink-admin-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(12,41,70,.14) !important;
}

.ink-admin-live {
    background: linear-gradient(135deg,#f3fff8,#ecfff7) !important;
    color: #087a59 !important;
}

.ink-admin-live::after {
    animation: inkGearSpin 2.5s linear infinite;
    color: #0f9f68;
}

.ink-admin-logout::after {
    background: rgba(225,29,72,.1);
    color: #e11d48;
}

.ink-store-admin-entry {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 16px !important;
    padding: 16px 18px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg,#0b2444,#1299b4) !important;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 18px 36px rgba(11,36,68,.18) !important;
}

.ink-store-admin-entry span {
    font-size: 18px;
    font-weight: 950;
}

.ink-store-admin-entry b {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    font-size: 12px;
}

@keyframes inkGearSpin {
    to { transform: rotate(360deg); }
}
/* ===== 2026-08-27: cleaner store/admin navigation ===== */
.menu-admin-separator {
    height: 1px;
    margin: 1.15rem 0 .85rem;
    background: linear-gradient(90deg, transparent, #dbe7ef 16%, #dbe7ef 84%, transparent);
}

.menu-admin-link {
    margin-top: .15rem;
    color: #0f4660 !important;
    background: #f0fbfd !important;
    border: 1px solid #bdebf1 !important;
}

.menu-admin-link:hover {
    background: #e1f8fb !important;
    border-color: #7edbe5 !important;
}

.menu-admin-lock {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    color: #0c8aa5;
    background: #dff7fa;
    font-size: .76rem;
    flex: 0 0 auto;
}

/* The dashboard is intentionally quieter and closer to the storefront style. */
.admin-page {
    background: #f5f8fb;
}

.admin-topbar {
    min-height: 82px;
    padding: .75rem max(1.25rem, calc((100vw - 1280px) / 2));
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #dbe5ed;
    box-shadow: 0 8px 24px rgba(15,23,42,.055);
}

.admin-brand {
    gap: .75rem;
    text-decoration: none;
}

.admin-brand img {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15,23,42,.10);
}

.admin-brand span {
    font-size: .78rem;
    letter-spacing: .03em;
}

.admin-brand h1 {
    font-size: 1.2rem;
    line-height: 1.45rem;
}

.admin-nav-actions {
    gap: .5rem;
    justify-content: flex-start;
}

.admin-nav-btn,
.admin-online-link {
    min-height: 40px;
    padding: .58rem .82rem;
    border-radius: 12px;
    box-shadow: none;
    font-size: .78rem;
    white-space: nowrap;
    text-decoration: none;
}

.admin-nav-btn {
    color: #31536a;
    background: #f7fafc;
    border-color: #dce6ed;
}

.admin-nav-btn:hover {
    color: #087d98;
    background: #eefbfc;
    border-color: #bde8ee;
}

.admin-online-link {
    color: #087d98;
    background: #ecfbfd;
    border-color: #bdebf1;
}

.admin-online-link:hover {
    background: #dcf6f9;
}

.admin-logout-link {
    color: #b4233f !important;
    background: #fff7f8 !important;
    border-color: #ffd8df !important;
}

.admin-logout-link:hover {
    background: #fff0f2 !important;
    border-color: #ffc4cf !important;
}

.admin-page main {
    padding-top: 1.5rem !important;
}

.admin-hero {
    padding: 1.7rem 2rem;
    min-height: 0;
    background:
        radial-gradient(circle at 88% 18%, rgba(45,212,191,.18), transparent 18rem),
        linear-gradient(135deg, #0d3044 0%, #0d5366 58%, #0d7f8e 100%);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(13,48,68,.16);
}

.admin-hero::before {
    display: none;
}

.admin-status-pill {
    padding: .42rem .72rem;
    color: #dffcf4;
    background: rgba(16,185,129,.14);
    border-color: rgba(167,243,208,.26);
}

.admin-hero h2 {
    margin-top: .8rem;
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    line-height: 1.2;
}

.admin-hero p {
    margin-top: .5rem;
    max-width: 52rem;
    color: #d5e8ee;
    font-size: .94rem;
    line-height: 1.75rem;
}

.admin-hero-actions {
    margin-top: 1rem;
    gap: .55rem;
}

.admin-hero-btn {
    min-height: 40px;
    padding: .6rem .9rem;
    border-radius: 12px;
    font-size: .78rem;
}

.admin-hero-btn--primary {
    color: #073643;
    background: #67e8f9;
    border-color: #67e8f9;
    box-shadow: none;
}

.admin-page main > section.grid:first-of-type > div,
.admin-page main > div > section.bg-white,
.admin-page main > section.bg-white {
    border-color: #dfe7ee;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15,23,42,.045);
}

@media (max-width: 1050px) {
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: .8rem 1rem;
    }
    .admin-nav-actions {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .2rem;
    }
}

@media (max-width: 640px) {
    .admin-brand img { width: 46px; height: 46px; }
    .admin-brand h1 { font-size: 1rem; }
    .admin-hero { padding: 1.35rem; border-radius: 20px; }
    .admin-hero h2 { font-size: 1.65rem; }
}
/* ===== 2026-08-27: final admin navigation correction ===== */
.admin-nav-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .55rem !important;
    flex-wrap: wrap !important;
    direction: ltr !important;
    margin-inline-start: auto !important;
}

.admin-nav-actions > a {
    direction: rtl !important;
    flex: 0 0 auto !important;
    order: 10;
    white-space: nowrap !important;
}

.admin-nav-actions > .admin-online-link,
.admin-nav-actions > a[href="../index.php"] { order: 1 !important; }

.admin-nav-actions > .admin-logout-link,
.admin-nav-actions > a[href="logout.php"] { order: 2 !important; }

.admin-nav-actions > a[href="users.php"] { order: 3 !important; }
.admin-nav-actions > a[href="index.php"] { order: 4 !important; }
.admin-nav-actions > a[href="categories.php"] { order: 5 !important; }
.admin-nav-actions > a[href="bundles.php"] { order: 6 !important; }
.admin-nav-actions > a[href="orders.php"] { order: 7 !important; }

.admin-nav-actions .ink-admin-pill::before,
.admin-nav-actions .ink-admin-pill::after {
    content: none !important;
    display: none !important;
}

.admin-online-link .online-gear,
.admin-online-link .fa-store {
    width: 22px !important;
    height: 22px !important;
    display: inline-grid !important;
    place-items: center !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    animation: admin-gear-spin 2.4s linear infinite !important;
}

.admin-online-link .online-gear::before,
.admin-online-link .fa-store::before {
    content: "\2699" !important;
    display: block !important;
    position: static !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
}

.admin-online-link .online-gear::after,
.admin-online-link .fa-store::after {
    content: none !important;
    display: none !important;
}

@keyframes admin-gear-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 1050px) {
    .admin-nav-actions {
        width: 100% !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: .2rem !important;
    }
}

/* ===== Mobile side menu: full viewport and reliable touch target ===== */
@media screen and (max-width: 900px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .side-menu {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        z-index: 50 !important;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(100%) !important;
        transition: transform .25s ease, visibility 0s linear .25s !important;
    }

    .side-menu.translate-x-0 {
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0) !important;
        transition-delay: 0s !important;
    }

    .side-menu.translate-x-full {
        visibility: hidden;
        pointer-events: none;
        transform: translateX(100%) !important;
    }

    .side-menu [data-close-menu] {
        position: relative;
        z-index: 2;
        pointer-events: auto !important;
        touch-action: manipulation;
    }

    [data-menu-overlay] {
        position: fixed !important;
        inset: 0 !important;
        z-index: 49 !important;
    }
}

/* Keep the store banner complete on desktop as well. */
.catalog-hero {
    display: block !important;
    min-height: 0 !important;
    aspect-ratio: 2362 / 1772 !important;
    padding: 0 !important;
    background-image: url("../img/store-hero-background.png") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 100% 100% !important;
}

/* Mobile-only order: header, cart, search, then the full store image. */
@media screen and (max-width: 640px) {
    header.site-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto auto !important;
        grid-template-areas:
            "brand"
            "cart"
            "search" !important;
        align-items: center !important;
        gap: .55rem !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: .7rem 1rem .8rem !important;
    }

    header.site-header > .header-brand-wrap {
        grid-area: brand !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        justify-self: stretch !important;
        overflow: visible !important;
    }

    header.site-header > .header-actions {
        grid-area: cart !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        direction: ltr !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        justify-self: stretch !important;
        overflow: visible !important;
    }

    header.site-header > .header-actions > button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: .35rem !important;
        width: auto !important;
        min-width: 6rem !important;
        height: 2.75rem !important;
        padding: .45rem .75rem !important;
        direction: rtl !important;
        white-space: nowrap !important;
        overflow: visible !important;
        border-radius: .85rem !important;
    }

    header.site-header > .header-actions > button > span:not([data-basket-count]) {
        display: inline-flex !important;
        width: auto !important;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
    }

    header.site-header > .header-search {
        grid-area: search !important;
        display: flex !important;
        position: relative !important;
        inset: auto !important;
        z-index: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        justify-self: stretch !important;
    }

    header.site-header > .header-search input {
        width: 100% !important;
        min-width: 0 !important;
    }

    header.site-header + main {
        position: relative !important;
        margin-top: 0 !important;
        z-index: 0 !important;
    }

    .catalog-hero {
        display: block !important;
        min-height: 0 !important;
        aspect-ratio: 2362 / 1772 !important;
        padding: 0 !important;
        background-image: url("../img/store-hero-background.png") !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-size: 100% 100% !important;
    }
}

/* Product card layout: square media, full titles, and blue card surface. */
article[data-id].product-card,
.product-card {
    background: #abe1fa !important;
    border-color: rgba(0, 67, 130, .28) !important;
}

article[data-id].product-card > .product-card__button,
.product-card__button {
    background: #abe1fa !important;
    color: #062b55 !important;
}

.product-card__media {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .7rem !important;
    min-height: 0 !important;
    padding: .85rem .85rem 3.35rem !important;
    overflow: visible !important;
    background: #abe1fa !important;
    border-bottom: 0 !important;
}

.product-card__brand-corner {
    display: none !important;
}

.product-card__discount {
    top: auto !important;
    right: auto !important;
    bottom: .85rem !important;
    left: .85rem !important;
    z-index: 2 !important;
    width: max-content !important;
    max-width: calc(100% - 1.7rem) !important;
    margin: 0 !important;
    background: #ffe1e8 !important;
    color: #d7194f !important;
    box-shadow: none !important;
}

.product-card__heading {
    order: 2 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: .1rem 0 0 !important;
    padding: 0 !important;
    align-content: normal !important;
    justify-items: stretch !important;
    text-align: right !important;
}

.product-card__heading h3 {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-align: justify !important;
    text-align-last: right !important;
    color: #062b55 !important;
}

.product-card__heading p {
    display: none !important;
}

.product-card__image-box {
    order: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 auto !important;
    padding: .55rem !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 67, 130, .18) !important;
    border-radius: 14px !important;
}

.product-card__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
}

.product-card__features {
    display: none !important;
}

.product-card__footer {
    grid-template-columns: minmax(0, 1fr) minmax(6.2rem, auto) !important;
    gap: .7rem !important;
    align-items: start !important;
    padding: .85rem .85rem 1rem !important;
    background: #abe1fa !important;
    border-top: 1px solid rgba(0, 67, 130, .18) !important;
}

.product-card__info {
    align-content: start !important;
    gap: .25rem !important;
    min-width: 0 !important;
    color: #062b55 !important;
}

.product-card__code {
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    color: #062b55 !important;
    background: rgba(255, 255, 255, .64) !important;
}

.product-card__info strong {
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    color: #062b55 !important;
}

.product-card__info strong::before {
    content: "اسم القسم: " !important;
    font-weight: 700 !important;
}

.product-card__info small {
    color: rgba(6, 43, 85, .76) !important;
}

.product-card__pricing {
    justify-items: end !important;
    align-content: start !important;
    min-width: 6.2rem !important;
}

.product-card__old-price {
    color: rgba(6, 43, 85, .7) !important;
}

.product-card__price {
    color: #d7194f !important;
    background: transparent !important;
    white-space: nowrap !important;
}

.product-card__action-row {
    margin-top: .1rem !important;
}

.product-card__cart {
    background: #06204a !important;
    color: #ffffff !important;
}

@media screen and (max-width: 640px) {
    .product-card__media {
        padding: .7rem .7rem 3.2rem !important;
        gap: .58rem !important;
    }

    .product-card__discount {
        bottom: .7rem !important;
        left: .7rem !important;
    }

    .product-card__footer {
        padding: .72rem .7rem .8rem !important;
    }
}

/* Final contrast and mobile flow correction. */
article[data-id].product-card,
article[data-id].product-card > .product-card__button,
.product-card,
.product-card__button,
.product-card__media,
.product-card__footer {
    color: #ffffff !important;
}

.product-card__heading h3,
.product-card__info,
.product-card__info strong,
.product-card__info small,
.product-card__code {
    color: #ffffff !important;
}

.product-card__code {
    background: rgba(255, 255, 255, .18) !important;
    border-color: rgba(255, 255, 255, .42) !important;
}

.product-card__info small,
.product-card__old-price {
    color: #062b55 !important;
}

@media screen and (max-width: 640px) {
    html,
    body {
        overflow-x: hidden !important;
    }

    header.site-header {
        position: sticky !important;
        top: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto auto !important;
        grid-template-areas: "brand" "cart" "search" !important;
        align-items: center !important;
        gap: .55rem !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: .7rem 1rem .8rem !important;
        overflow: visible !important;
    }

    header.site-header > .header-brand-wrap,
    header.site-header > .header-actions,
    header.site-header > .header-search {
        position: relative !important;
        inset: auto !important;
        float: none !important;
        clear: none !important;
        transform: none !important;
    }

    header.site-header > .header-brand-wrap {
        grid-area: brand !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    header.site-header > .header-actions {
        grid-area: cart !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    header.site-header > .header-actions > button {
        position: relative !important;
        inset: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 6.4rem !important;
        height: 2.75rem !important;
        margin: 0 !important;
        padding: .45rem .8rem !important;
        direction: rtl !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }

    header.site-header > .header-search {
        grid-area: search !important;
        display: flex !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        z-index: 1 !important;
    }

    header.site-header > .header-search input {
        width: 100% !important;
        min-width: 0 !important;
    }

    header.site-header + main {
        position: relative !important;
        z-index: 0 !important;
        margin-top: 0 !important;
    }

    header.site-header + main .catalog-hero {
        position: relative !important;
        z-index: 0 !important;
        margin-top: 0 !important;
    }
}

/* Put the discount between the old price and the current price. */
.product-card__button {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(6.2rem, auto) !important;
    grid-template-areas:
        "image image"
        "heading heading"
        "info old"
        "info discount"
        "info price"
        "actions actions" !important;
    gap: .58rem !important;
    padding: .85rem !important;
    direction: rtl !important;
}

.product-card__media {
    display: contents !important;
}

.product-card__media::before,
.product-card__media::after {
    display: none !important;
}

.product-card__image-box {
    grid-area: image !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    margin: 0 !important;
}

.product-card__heading {
    grid-area: heading !important;
    width: 100% !important;
    margin: 0 !important;
}

.product-card__discount {
    position: static !important;
    grid-area: discount !important;
    justify-self: end !important;
    align-self: center !important;
    width: max-content !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
}

.product-card__footer {
    display: contents !important;
}

.product-card__info {
    grid-area: info !important;
    align-self: start !important;
    width: 100% !important;
    padding: 0 !important;
}

.product-card__pricing {
    display: contents !important;
}

.product-card__old-price {
    grid-area: old !important;
    justify-self: end !important;
    align-self: end !important;
    margin: 0 !important;
}

.product-card__price {
    grid-area: price !important;
    justify-self: end !important;
    align-self: start !important;
    margin: 0 !important;
}

.product-card__action-row {
    grid-area: actions !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

@media screen and (max-width: 640px) {
    .product-card__button {
        grid-template-columns: minmax(0, 1fr) minmax(5.6rem, auto) !important;
        gap: .48rem !important;
        padding: .7rem !important;
    }
}

/* Explicit mobile rows: brand, cart, search, then the store image. */
@media only screen and (max-width: 640px) {
    header.site-header,
    .site-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto auto !important;
        grid-template-areas: none !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: .7rem 1rem .8rem !important;
        gap: .55rem !important;
    }

    header.site-header > .header-brand-wrap,
    .site-header > .header-brand-wrap {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    header.site-header > .header-actions,
    .site-header > .header-actions {
        grid-column: 1 !important;
        grid-row: 2 !important;
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        justify-content: flex-start !important;
        direction: ltr !important;
    }

    header.site-header > .header-search,
    .site-header > .header-search {
        grid-column: 1 !important;
        grid-row: 3 !important;
        display: flex !important;
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    header.site-header > .header-actions > button,
    .site-header > .header-actions > button {
        position: relative !important;
        inset: auto !important;
        width: auto !important;
        min-width: 6.4rem !important;
        margin: 0 !important;
    }

    .catalog-hero {
        margin-top: 0 !important;
    }
}

/* Mobile-only final header: brand/menu row, then the store image. */
@media only screen and (max-width: 640px) {
    header.site-header,
    .site-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: stretch !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        gap: .35rem !important;
        padding: .7rem 1rem !important;
    }

    header.site-header > .header-brand-wrap,
    .site-header > .header-brand-wrap {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        position: relative !important;
        inset: auto !important;
    }

    header.site-header > .header-actions,
    .site-header > .header-actions,
    header.site-header > .header-search,
    .site-header > .header-search {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    header.site-header > .header-brand-wrap .brand-link,
    .site-header > .header-brand-wrap .brand-link {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        gap: .45rem !important;
        overflow: visible !important;
    }

    header.site-header > .header-brand-wrap .brand-link > div,
    .site-header > .header-brand-wrap .brand-link > div {
        min-width: 0 !important;
        text-align: right !important;
    }

    header.site-header > .header-brand-wrap .brand-link img,
    .site-header > .header-brand-wrap .brand-link img {
        flex: 0 0 auto !important;
    }

    header.site-header > .header-brand-wrap .menu-toggle,
    .site-header > .header-brand-wrap .menu-toggle {
        flex: 0 0 auto !important;
        position: relative !important;
        inset: auto !important;
        margin: 0 !important;
    }

    .catalog-hero {
        margin-top: 0 !important;
    }
}

/* Stable mobile header flow: each row stays in normal document flow. */
@media only screen and (max-width: 640px) {
    header.site-header,
    .site-header {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        gap: .55rem !important;
    }

    header.site-header > .header-brand-wrap,
    .site-header > .header-brand-wrap {
        order: 1 !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        min-height: 0 !important;
    }

    header.site-header > .header-actions,
    .site-header > .header-actions {
        order: 2 !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        direction: ltr !important;
    }

    header.site-header > .header-search,
    .site-header > .header-search {
        order: 3 !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: stretch !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        position: relative !important;
        inset: auto !important;
        transform: none !important;
    }

    header.site-header > .header-search input,
    .site-header > .header-search input {
        width: 100% !important;
        min-width: 0 !important;
    }

    .catalog-hero {
        margin-top: 0 !important;
    }
}

/* Final price contrast on the blue card. */
.product-card__price {
    color: #d7194f !important;
    text-shadow: 0 1px 0 rgba(6, 43, 85, .24) !important;
}

.product-card__discount {
    background: #d7194f !important;
    border-color: rgba(6, 43, 85, .14) !important;
    color: #ffffff !important;
}

/* Hard-stop mobile layout so the hero starts after the complete header. */
@media only screen and (max-width: 640px) {
    header.site-header,
    .site-header {
        display: grid !important;
        grid-template-columns: 100% !important;
        grid-template-rows: auto auto auto !important;
        grid-template-areas: none !important;
        align-content: start !important;
        justify-content: stretch !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    header.site-header > .header-brand-wrap,
    .site-header > .header-brand-wrap {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    header.site-header > .header-actions,
    .site-header > .header-actions {
        grid-column: 1 !important;
        grid-row: 2 !important;
        justify-self: stretch !important;
        align-self: stretch !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    header.site-header > .header-actions > button,
    .site-header > .header-actions > button {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    header.site-header > .header-actions > button > span,
    .site-header > .header-actions > button > span {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    header.site-header > .header-search,
    .site-header > .header-search {
        grid-column: 1 !important;
        grid-row: 3 !important;
        justify-self: stretch !important;
        align-self: stretch !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .catalog-hero {
        clear: both !important;
        margin-top: 0 !important;
    }
}

/* Latest card order: discount, old price, then current price. */
.product-card__heading {
    border-bottom: 1px solid rgba(255, 255, 255, .42) !important;
    padding-bottom: .55rem !important;
}

.product-card__button {
    grid-template-areas:
        "image image"
        "heading heading"
        "info discount"
        "info old"
        "info price"
        "actions actions" !important;
}

article[data-id].product-card:not(:has(.product-card__discount)) > .product-card__button,
.product-card:not(:has(.product-card__discount)) > .product-card__button {
    grid-template-areas:
        "image image"
        "heading heading"
        "info old"
        "info price"
        "actions actions" !important;
}

.product-card__discount {
    position: static !important;
    grid-area: discount !important;
    justify-self: end !important;
    align-self: center !important;
    margin: 0 !important;
}

/* Final mobile flow: header, cart, search, then the store image. */
@media only screen and (max-width: 640px) {
    header.site-header,
    .site-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto auto !important;
        grid-template-areas: none !important;
        position: sticky !important;
        top: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: .7rem 1rem .8rem !important;
        gap: .55rem !important;
    }

    header.site-header > .header-brand-wrap,
    .site-header > .header-brand-wrap {
        grid-column: 1 !important;
        grid-row: 1 !important;
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    header.site-header > .header-actions,
    .site-header > .header-actions {
        grid-column: 1 !important;
        grid-row: 2 !important;
        position: relative !important;
        inset: auto !important;
        display: flex !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        direction: ltr !important;
    }

    header.site-header > .header-search,
    .site-header > .header-search {
        grid-column: 1 !important;
        grid-row: 3 !important;
        position: relative !important;
        inset: auto !important;
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    header.site-header > .header-actions > button,
    .site-header > .header-actions > button {
        position: relative !important;
        inset: auto !important;
        width: auto !important;
        min-width: 6.4rem !important;
        margin: 0 !important;
    }

    .catalog-hero {
        margin-top: 0 !important;
    }
}

/* Final mobile flow: brand/header, cart/actions, then search */
@media only screen and (max-width: 640px) {

    /* =========================
       HEADER MOBILE
    ========================== */
    header.site-header,
    .site-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;

        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "brand actions"
            "search search" !important;

        width: 100% !important;
        height: auto !important;
        min-height: auto !important;

        padding: 0.75rem !important;
        gap: 0.65rem !important;

        align-items: center !important;

        overflow: visible !important;
        box-sizing: border-box !important;

        direction: rtl !important;
    }


    /* =========================
       LOGO / BRAND
    ========================== */
    header.site-header > .header-brand-wrap,
    .site-header > .header-brand-wrap {
        grid-area: brand !important;

        position: static !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;

        transform: none !important;

        width: auto !important;
        max-width: 100% !important;

        margin: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }


    /* =========================
       CART / ACTIONS
    ========================== */
    header.site-header > .header-actions,
    .site-header > .header-actions {
        grid-area: actions !important;

        position: static !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;

        inset: auto !important;
        transform: none !important;

        width: auto !important;
        height: auto !important;

        margin: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;

        z-index: auto !important;
    }


    /* زر السلة */
    header.site-header > .header-actions > button,
    .site-header > .header-actions > button,
    .header-actions .cart-btn,
    .header-actions .cart-button,
    #cartBtn {
        position: static !important;

        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;

        inset: auto !important;
        transform: none !important;

        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;

        height: auto !important;

        padding: 0.50rem 0.75rem !important;
        margin: 0 !important;

        font-size: 0.85rem !important;

        white-space: nowrap !important;
    }


    /* =========================
       SEARCH
    ========================== */
    header.site-header > .header-search,
    .site-header > .header-search {
        grid-area: search !important;

        position: static !important;

        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;

        inset: auto !important;
        transform: none !important;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;

        z-index: auto !important;

        box-sizing: border-box !important;
    }


    /* إذا كان الفورم نفسه عليه position */
    .header-search form {
        position: static !important;

        top: auto !important;
        right: auto !important;
        left: auto !important;

        transform: none !important;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
    }


    /* input البحث */
    .header-search input,
    .header-search input[type="search"],
    .header-search input[type="text"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }


    /* =========================
       HERO / BANNER
    ========================== */
    .catalog-hero {
        position: relative !important;
        margin-top: 0.75rem !important;
        clear: both !important;
        z-index: 1 !important;
    }
}

.product-card__image-box {
     width: calc(100% + 1rem) !important;
     margin-inline: -.5rem !important;
     margin-block: -.5rem !important;
}

.product-card__heading h3 {
    color: #000000 !important;
    transform: translateY(0.3rem) !important;
    text-align: right !important;
    text-align-last: right !important;
}

.product-card__heading h3,
.product-card__heading p,
.product-card__info,
.product-card__info strong,
.product-card__info small,
.product-card__code {
    color: #000000 !important;
}


.product-card__pricing small.product-card__old-price {
    color: #d7194f !important;
    opacity: 1 !important;
    text-decoration-color: #d7194f !important;
}
@media (max-width: 640px) {
    header.site-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        pointer-events: auto !important;
    }

    header.site-header .header-actions,
    header.site-header .header-search,
    header.site-header button,
    header.site-header input,
    header.site-header form {
        position: relative !important;
        z-index: 100000 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .menu-overlay[hidden],
    [data-basket][aria-hidden="true"],
    [data-close-basket][hidden] {
        pointer-events: none !important;
    }

    header.site-header > .header-actions,
    header.site-header > .header-search {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 100000 !important;
    }
    header.site-header > .header-search form,
    header.site-header > .header-search button,
    header.site-header > .header-search input,
    header.site-header > .header-actions button {
        display: flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
}

@media only screen and (max-width: 640px) {
    .category-result-header {
        min-height: 82px !important;
        padding: 0.7rem 0.9rem !important;
    }

    .category-result-header h2 {
        font-size: 1.25rem !important;
        line-height: 1.5rem !important;
    }

    .category-result-header p {
        font-size: 0.72rem !important;
        line-height: 1.2rem !important;
    }

    .category-result-count {
        flex-basis: 68px !important;
        min-width: 68px !important;
        padding: 0.45rem !important;
    }
}

@media only screen and (max-width: 640px) {
    header.site-header + main {
        padding-top: 2rem !important;
    }
}
/* Keep the category drawer and its backdrop above the sticky store header. */
header.site-header {
    z-index: 40 !important;
}

.side-menu {
    z-index: 50 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

[data-menu-overlay] {
    z-index: 49 !important;
}

.side-menu > div:first-child {
    flex-shrink: 0;
}

.side-menu > nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}