/* ==========================================================================
   DamasOrbit — stylesheet

   Written with CSS logical properties (inline-start/end rather than left/right)
   so a single sheet serves both the English LTR layout and the Arabic RTL one.
   Setting dir="rtl" on <html> mirrors the whole page with no separate file.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand — taken from the logo */
    --color-primary: #E31E24;   /* orbit red */
    --color-secondary: #393185; /* deep blue ring */
    --color-tertiary: #D7856D;  /* coral */
    --color-gold: #E0B85C;      /* the star */

    /* Surfaces & text */
    --bg-main: #f8f9fa;
    --bg-light: #ffffff;
    --bg-alt: #ffffff;
    --text-main: #333333;
    --text-muted: #6c757d;
    --text-light: #ffffff;

    /* UI */
    --nav-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e0e0e0;
    --card-border: rgba(0, 0, 0, 0.05);
    --image-bg: #f0f2f5;
    --mobile-nav-bg: #ffffff;
    --overlay: rgba(0, 0, 0, 0.5);

    /* Status */
    --color-success: #1B8A5A;
    --color-warning: #B26A00;
    --color-danger: #C42B2B;
    --success-bg: rgba(27, 138, 90, 0.1);
    --warning-bg: rgba(178, 106, 0, 0.1);
    --danger-bg: rgba(196, 43, 43, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary), #ff4d4d);
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary), #5a52a5);

    /* Depth & motion */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px rgba(57, 49, 133, 0.1);
    --shadow-lg: 0 15px 30px rgba(57, 49, 133, 0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Type — the Arabic stack is prepended on [lang="ar"] below */
    --font-heading: 'Outfit', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    /* Layout */
    --nav-height: 80px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
}

/* Dark theme. Set on <html> before first paint so there is no light flash. */
[data-theme="dark"] {
    --bg-main: #121212;
    --bg-light: #1e1e1e;
    --bg-alt: #181818;
    --text-main: #f8f9fa;
    --text-muted: #adb5bd;

    --nav-bg: rgba(30, 30, 30, 0.95);
    --border-color: #333333;
    --card-border: rgba(255, 255, 255, 0.05);
    --image-bg: #2d2d2d;
    --mobile-nav-bg: #1e1e1e;
    --overlay: rgba(0, 0, 0, 0.7);

    /* The brand blue is too dark to read on near-black, so the dark theme
       lifts it rather than reusing the light-theme value. */
    --color-secondary: #7d75d8;
    --gradient-secondary: linear-gradient(135deg, #7d75d8, #a49df0);

    --color-success: #4ADE80;
    --color-warning: #FBBF24;
    --color-danger: #F87171;

    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* Arabic typography: Cairo reads better than Inter for Arabic script, and
   needs slightly more line height to stay comfortable. */
[lang="ar"] {
    --font-heading: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
    --font-body: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Anchor targets clear the fixed navbar instead of hiding beneath it. */
    scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

[lang="ar"] body {
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-secondary);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
}

/* Visible keyboard focus everywhere — the previous stylesheet removed it. */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 2rem;
}

.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }

/* Screen-reader-only, but focusable (used by the skip link). */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -100px;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: var(--color-secondary);
    color: var(--text-light);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-normal);
    text-align: center;
}

.btn:disabled,
.btn[aria-busy="true"] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 30, 36, 0.4);
    color: var(--text-light);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(57, 49, 133, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(57, 49, 133, 0.4);
    color: var(--text-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-secondary);
    color: var(--text-light);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* --------------------------------------------------------------------------
   4. Section headers
   -------------------------------------------------------------------------- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.85rem, 5vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 60ch;
    margin-inline: auto;
}

.header-line {
    height: 4px;
    width: 60px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   5. Navbar
   -------------------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    inset-inline: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

.navbar.is-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* The wordmark PNG has dark navy text baked in and disappears on a dark
   background. Until an SVG or light-variant file exists, invert it. */
[data-theme="dark"] .logo img,
[data-theme="dark"] .footer-logo {
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-secondary);
    position: relative;
    white-space: nowrap;
}

[data-theme="dark"] .nav-links a {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    inset-inline-start: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
    color: var(--color-primary);
}

/* Controls that stay visible on mobile, outside the collapsing menu. The old
   markup nested the theme toggle inside .nav-links, which hid it behind the
   hamburger on phones. */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.theme-toggle-btn,
.lang-switch,
.mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: 50px;
}

[data-theme="dark"] .theme-toggle-btn,
[data-theme="dark"] .lang-switch,
[data-theme="dark"] .mobile-menu-btn {
    color: var(--text-main);
}

.theme-toggle-btn {
    font-size: 1.15rem;
    /* 44px minimum touch target. */
    width: 44px;
    height: 44px;
}

.lang-switch {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    min-height: 44px;
    border: 1.5px solid var(--border-color);
}

.theme-toggle-btn:hover,
.lang-switch:hover,
.mobile-menu-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-block: calc(var(--nav-height) + 2rem) 3rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(215, 133, 109, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(57, 49, 133, 0.05) 0%, transparent 40%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

/* clamp() replaces the old fixed 4rem, which never scaled below the 992px
   breakpoint and swallowed the whole first screen on a phone. */
.hero-title {
    font-size: clamp(2.1rem, 7vw, 4rem);
    margin-bottom: 1rem;
    color: var(--text-main);
    text-wrap: balance;
}

.hero-title span {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* If the gradient fails for any reason the text must not vanish, which is
   exactly what happened when --gradient-secondary went undefined. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .hero-title span {
        -webkit-text-fill-color: currentColor;
        color: var(--color-secondary);
        background: none;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 60ch;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-logo {
    max-width: min(80%, 420px);
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(57, 49, 133, 0.2));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}

/* --------------------------------------------------------------------------
   7. About cards
   -------------------------------------------------------------------------- */
.about {
    padding-block: 6rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--bg-light);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 0;
    background: var(--gradient-secondary);
    z-index: -1;
    transition: height var(--transition-normal);
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card:hover::before {
    height: 100%;
}

.about-card:hover h3,
.about-card:hover p,
.about-card:hover .icon-wrapper i {
    color: var(--text-light);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(227, 30, 36, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition-normal);
}

.icon-wrapper i {
    font-size: 2rem;
    color: var(--color-primary);
    transition: color var(--transition-normal);
}

.about-card:hover .icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
}

.about-card h3 {
    margin-bottom: 1rem;
    transition: color var(--transition-normal);
}

.about-card p {
    color: var(--text-muted);
    transition: color var(--transition-normal);
}

/* --------------------------------------------------------------------------
   8. Store
   -------------------------------------------------------------------------- */
.store {
    padding-block: 6rem;
}

.store-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    min-height: 44px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn[aria-pressed="true"] {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--text-light);
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card[hidden] {
    display: none;
}

.product-image {
    height: 200px;
    background: var(--image-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-icon {
    font-size: 4rem;
    color: var(--color-tertiary);
    opacity: 0.5;
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    background: var(--gradient-primary);
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.8rem;
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.2rem;
    margin-block: 0.5rem;
}

.product-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .product-price {
    color: var(--color-secondary);
}

.stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.stock-pill::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.stock-pill.is-in-stock     { color: var(--color-success); background: var(--success-bg); }
.stock-pill.is-low-stock    { color: var(--color-warning); background: var(--warning-bg); }
.stock-pill.is-out-of-stock { color: var(--color-danger);  background: var(--danger-bg); }

/* Push the action to the bottom so cards of differing text length still line
   their buttons up. */
.product-info .btn {
    margin-top: auto;
}

.store-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   9. Partners & clients
   -------------------------------------------------------------------------- */
.partners,
.clients {
    padding-block: 6rem;
}

.clients {
    background: var(--bg-alt);
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.logo-item {
    padding: 1.5rem;
    background: var(--bg-main);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 120px;
}

.logo-item img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* Monochrome placeholder for entries with no logo file yet — replaces the
   two Font Awesome brand icons that do not exist in FA6 and rendered as
   invisible 0px elements. */
.logo-item .logo-initials {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--gradient-secondary);
    color: var(--text-light);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.logo-item:hover {
    background: var(--bg-alt);
    box-shadow: var(--shadow-md);
    color: var(--color-primary);
    transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   10. Contact
   -------------------------------------------------------------------------- */
.contact {
    padding-block: 6rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item i {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(57, 49, 133, 0.1);
    color: var(--color-secondary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

/* Phone numbers and emails must stay LTR even inside an RTL page. */
.ltr-text {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: start;
}

.contact-form {
    background: var(--bg-light);
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(57, 49, 133, 0.15);
}

.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
    border-color: var(--color-danger);
}

.field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--color-danger);
}

/* The honeypot: hidden from people, still present for naive bots to fill.
   Deliberately not display:none, which some bots skip.

   Clipped rather than pushed off-canvas with a negative offset: in an RTL
   document a left:-9999px element becomes scrollable content, which added
   10,000px of horizontal scroll to every Arabic page. Clipping is
   direction-agnostic and keeps the field in the accessibility tree for bots
   while removing it visually and from the tab order. */
.hp-field {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.form-status {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.form-status[hidden] { display: none; }
.form-status.is-success { color: var(--color-success); background: var(--success-bg); }
.form-status.is-error   { color: var(--color-danger);  background: var(--danger-bg); }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.footer {
    background: #393185; /* fixed: the footer is always dark, in both themes */
    color: rgba(255, 255, 255, 0.8);
    padding-block: 4rem 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer h4 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--color-tertiary);
    padding-inline-start: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    transition: var(--transition-fast);
}

.social-icon:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding-block: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .nav-links { gap: 1.25rem; }
}

@media (max-width: 768px) {
    .container { padding-inline: 1.25rem; }

    /* Off-canvas menu. Slides in from the start edge, which is the right-hand
       side once the page is RTL — handled automatically by inset-inline. */
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        inset-inline-start: -100%;
        width: 100%;
        height: calc(100dvh - var(--nav-height));
        background: var(--mobile-nav-bg);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        gap: 1.5rem;
        transition: inset-inline-start var(--transition-normal);
        box-shadow: var(--shadow-md);
        overflow-y: auto;
    }

    .nav-links.is-open {
        inset-inline-start: 0;
    }

    .nav-links a {
        font-size: 1.15rem;
        padding: 0.5rem 1rem;
    }

    .mobile-menu-btn { display: inline-flex; }

    .hero {
        min-height: auto;
        padding-block: calc(var(--nav-height) + 2.5rem) 3.5rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-subtitle { margin-inline: auto; }
    .hero-buttons { justify-content: center; }

    /* Logo above the copy reads better on a narrow screen. */
    .hero-image { order: -1; }
    .floating-logo { max-width: min(62%, 260px); }

    .about, .store, .partners, .clients, .contact { padding-block: 4rem; }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo { margin-inline: auto; }
    .social-icons { justify-content: center; }
    .footer-links a:hover { padding-inline-start: 0; }
}

@media (max-width: 420px) {
    .nav-actions { gap: 0.25rem; }
    .lang-switch { padding-inline: 0.6rem; font-size: 0.78rem; }
    .logo img { height: 32px; }
    .store-filter { gap: 0.5rem; }
    .filter-btn { padding-inline: 1rem; font-size: 0.9rem; }
}

/* --------------------------------------------------------------------------
   13. Motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .about-card:hover,
    .product-card:hover,
    .logo-item:hover,
    .btn:hover {
        transform: none;
    }
}

@media print {
    .navbar, .hero-image, .store-filter, .social-icons, .contact-form { display: none; }
    body { background: #fff; color: #000; }
    .footer { background: none; color: #000; }
}

/* ==========================================================================
   14. Store & category pages
   Written with logical properties throughout, so the slider, sidebar and
   pagination all mirror correctly when the page flips to RTL.
   ========================================================================== */

.page {
    padding-top: var(--nav-height);
}

.page-head {
    padding-block: 3rem 2rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(215, 133, 109, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(57, 49, 133, 0.06) 0%, transparent 45%);
}

.page-head h1 {
    font-size: clamp(1.9rem, 5vw, 2.75rem);
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.page-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 62ch;
}

/* --- Breadcrumb ---------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb i       { font-size: 0.65rem; opacity: 0.5; }
.breadcrumb [aria-current] { color: var(--text-main); font-weight: 600; }

/* --- Section bar --------------------------------------------------------- */
.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.section-bar h2 {
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Category slider — 4 cards per row, scrolls horizontally
   -------------------------------------------------------------------------- */
.cat-slider-section { padding-block: 2.5rem; }

.slider-nav {
    display: flex;
    gap: 0.5rem;
}

.slider-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-light);
    color: var(--color-secondary);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition-fast);
}

.slider-btn:hover:not(:disabled) {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--text-light);
}

.slider-btn:disabled { opacity: 0.35; cursor: default; }

/*
 * Scroll-snap rather than a JS carousel: swipeable on touch, keyboard
 * scrollable, RTL-aware for free, and still usable if the script never loads.
 * The 4-up figure comes from the flex-basis calculation below.
 */
.cat-slider {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-block: 0.5rem 1.25rem;
    /* Room for the card hover lift, which would otherwise be clipped. */
    margin-block: -0.5rem;
    scrollbar-width: thin;
}

.cat-slider::-webkit-scrollbar        { height: 6px; }
.cat-slider::-webkit-scrollbar-track  { background: var(--border-color); border-radius: 3px; }
.cat-slider::-webkit-scrollbar-thumb  { background: var(--color-secondary); border-radius: 3px; }

.cat-card {
    /* Four per row: subtract the three 1.25rem gaps, then quarter what is left. */
    flex: 0 0 calc((100% - (3 * 1.25rem)) / 4);
    scroll-snap-align: start;
    background: var(--bg-light);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    position: relative;
}

.cat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-secondary);
}

.cat-card-media {
    height: 130px;
    background: var(--gradient-secondary);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.cat-card-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-media i   { font-size: 2.75rem; color: rgba(255, 255, 255, 0.9); }

.cat-card-body { padding: 1.1rem 1.25rem 1.4rem; flex-grow: 1; }
.cat-card-body h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }

.cat-card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.cat-card-go {
    position: absolute;
    inset-block-end: 0.9rem;
    inset-inline-end: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(227, 30, 36, 0.1);
    color: var(--color-primary);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.cat-card:hover .cat-card-go {
    background: var(--color-primary);
    color: var(--text-light);
}

@media (max-width: 992px) { .cat-card { flex-basis: calc((100% - (2 * 1.25rem)) / 3); } }
@media (max-width: 768px) { .cat-card { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (max-width: 520px) { .cat-card { flex-basis: 78%; } }

/* --------------------------------------------------------------------------
   Category banner
   -------------------------------------------------------------------------- */
.cat-banner {
    position: relative;
    padding-block: 3rem 2.5rem;
    background: var(--bg-light);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.cat-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
}

/* Keeps the heading readable over whatever image is uploaded. */
.cat-banner.has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), var(--bg-light));
}

.cat-banner-inner { position: relative; z-index: 1; }

.cat-banner-head {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.cat-banner-icon {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: var(--radius-md);
    background: var(--gradient-secondary);
    color: var(--text-light);
    display: grid;
    place-items: center;
    font-size: 1.65rem;
    box-shadow: var(--shadow-md);
}

.cat-banner h1 {
    font-size: clamp(1.7rem, 4.5vw, 2.5rem);
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.cat-banner-text {
    color: var(--text-muted);
    max-width: 62ch;
    margin-bottom: 0.4rem;
}

.cat-banner-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   PRODUCTS-GRID
   -------------------------------------------------------------------------- */
.pg-section { padding-block: 2.5rem 4rem; }

.pg {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

/* No sidebar (the store page) — let the results use the full width. */
.pg:not(:has(.pg-side)) { grid-template-columns: 1fr; }

/* --- Sidebar: subcategories --------------------------------------------- */
.pg-side {
    background: var(--bg-light);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.pg-side-toggle { display: none; }

.pg-side-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.pg-sublist { display: flex; flex-direction: column; gap: 0.2rem; }

.pg-sublist a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    transition: var(--transition-fast);
}

.pg-sublist a span:first-child {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.pg-sublist i { width: 16px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

.pg-sublist a:hover { background: var(--bg-main); color: var(--color-primary); }
.pg-sublist a:hover i { color: var(--color-primary); }

.pg-sublist a.is-current {
    background: var(--color-secondary);
    color: var(--text-light);
    font-weight: 600;
}

.pg-sublist a.is-current i { color: var(--text-light); }

.pg-count-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 50px;
    background: var(--bg-main);
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.pg-sublist a.is-current .pg-count-pill {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

/* --- Filter bar ---------------------------------------------------------- */
.pg-filters {
    background: var(--bg-light);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pg-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pg-search {
    position: relative;
    flex: 1 1 240px;
    display: flex;
    align-items: center;
}

.pg-search i {
    position: absolute;
    inset-inline-start: 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.pg-search input {
    width: 100%;
    padding: 0.7rem 1rem;
    padding-inline-start: 2.4rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.pg-filters select,
.pg-price input {
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.92rem;
    cursor: pointer;
}

.pg-search input:focus,
.pg-filters select:focus,
.pg-price input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(57, 49, 133, 0.15);
}

.pg-row-secondary {
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.pg-price,
.pg-avail {
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pg-price legend,
.pg-avail legend {
    /* float:none keeps the legend inline rather than breaking the flex row */
    float: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-inline-end: 0.3rem;
}

.pg-price input { width: 92px; cursor: text; }
.pg-apply { padding-block: 0.6rem; margin-inline-start: auto; }

/* --- View switcher ------------------------------------------------------- */
.pg-view {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.pg-view-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--bg-main);
    color: var(--text-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition-fast);
}

.pg-view-btn + .pg-view-btn { border-inline-start: 1px solid var(--border-color); }
.pg-view-btn:hover { color: var(--color-primary); }

.pg-view-btn[aria-pressed="true"] {
    background: var(--color-secondary);
    color: var(--text-light);
}

/* --- Status line & chips ------------------------------------------------- */
.pg-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.pg-count { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }

.pg-chips { display: flex; gap: 0.45rem; flex-wrap: wrap; }

.pg-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.32rem 0.7rem;
    border-radius: 50px;
    background: rgba(57, 49, 133, 0.1);
    color: var(--color-secondary);
    transition: var(--transition-fast);
}

.pg-chip i { font-size: 0.7rem; }
.pg-chip:hover { background: var(--color-secondary); color: var(--text-light); }

.pg-chip-clear {
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
}

.pg-chip-clear:hover { background: var(--color-primary); border-color: var(--color-primary); color: var(--text-light); }

/* --- Results: grid and list views --------------------------------------- */
.pg-results.is-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 1.5rem;
}

.pg-results.is-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/*
 * List view reuses the identical card markup — only the layout changes, so the
 * filter JS never has to know which view is active.
 */
.pg-results.is-list .product-card {
    flex-direction: row;
    align-items: stretch;
}

.pg-results.is-list .product-image {
    flex: 0 0 190px;
    height: auto;
    min-height: 150px;
}

.pg-results.is-list .product-info {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "cat    cat"
        "title  title"
        "sum    sum"
        "meta   action";
    align-items: end;
    gap: 0.35rem 1rem;
}

.pg-results.is-list .product-category { grid-area: cat; }
.pg-results.is-list .product-title    { grid-area: title; }
.pg-results.is-list .product-summary  { grid-area: sum; margin-bottom: 0.5rem; }
.pg-results.is-list .product-meta     { grid-area: meta; display: flex; align-items: center; gap: 0.85rem; }
.pg-results.is-list .product-meta .product-price { margin-bottom: 0; }
.pg-results.is-list .stock-pill       { margin-bottom: 0; }

.pg-results.is-list .product-info .btn {
    grid-area: action;
    margin-top: 0;
    width: auto;
    display: inline-flex;
    padding-inline: 1.5rem;
}

@media (max-width: 620px) {
    .pg-results.is-list .product-card { flex-direction: column; }
    .pg-results.is-list .product-image { flex-basis: auto; height: 180px; }
    .pg-results.is-list .product-info {
        grid-template-columns: 1fr;
        grid-template-areas: "cat" "title" "sum" "meta" "action";
        align-items: start;
    }
    .pg-results.is-list .product-info .btn { width: 100%; }
}

/* --- Empty state --------------------------------------------------------- */
.pg-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.pg-empty i { font-size: 2.5rem; opacity: 0.3; }

/* --- Pagination ---------------------------------------------------------- */
.pg-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.pg-page {
    min-width: 42px;
    height: 42px;
    padding-inline: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-light);
    transition: var(--transition-fast);
}

.pg-page:hover:not(.is-disabled):not(.is-current) {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.pg-page.is-current {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--text-light);
}

.pg-page.is-disabled { opacity: 0.4; pointer-events: none; }
.pg-page i { font-size: 0.7rem; }
.pg-gap { padding-inline: 0.3rem; color: var(--text-muted); }

/* --- Loading state ------------------------------------------------------- */
.pg-results.is-loading { opacity: 0.45; pointer-events: none; transition: opacity 0.15s ease; }

/* --------------------------------------------------------------------------
   Responsive: collapse the sidebar into a disclosure on small screens
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .pg { grid-template-columns: 1fr; }

    .pg-side {
        position: static;
        padding: 0;
        border: none;
        background: none;
    }

    .pg-side-toggle {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        width: 100%;
        padding: 0.85rem 1.1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        background: var(--bg-light);
        color: var(--text-main);
        font-family: var(--font-heading);
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
    }

    .pg-side-toggle span { margin-inline-end: auto; }

    .pg-side-toggle i:last-child { transition: transform var(--transition-fast); }
    .pg-side-toggle[aria-expanded="true"] i:last-child { transform: rotate(180deg); }

    .pg-side-body {
        display: none;
        margin-top: 0.6rem;
        padding: 1rem;
        background: var(--bg-light);
        border: 1px solid var(--card-border);
        border-radius: var(--radius-md);
    }

    .pg-side-body.is-open { display: block; }
    .pg-side-title { display: none; }

    .pg-apply { margin-inline-start: 0; width: 100%; }
    .pg-price, .pg-avail { width: 100%; }
    .pg-avail select { flex-grow: 1; }
}

@media (max-width: 520px) {
    .pg-row { gap: 0.5rem; }
    .pg-filters select, .pg-search input { font-size: 0.9rem; }
    .pg-price input { width: 100%; }
    .cat-banner-head { flex-direction: column; gap: 1rem; }
}
