/**
 * Jibli - Morocco-Inspired SAAS Theme
 * Warm sand background, white cards, subtle zellij pattern
 * Primary: Moroccan red (#C1272D)
 * Secondary: Emerald green (#00A859)
 */

:root {
    /* Colors — Jibli design system (Web + App parity) */
    --color-moroccan-red: #C1272D;
    --color-emerald-green: #00A859;
    --color-warm-sand: #F5E6D3;
    --color-sand-light: #FAF5EF;
    --color-sand-dark: #E8D5B7;
    --color-white: #FFFFFF;
    --color-dark-green: #006B3C;
    --color-text-dark: #2C2C2C;
    --color-text-light: #666666;
    --color-border: #E0D5C4;
    --color-header-signup: #8B2942;
    --color-header-bg: #FAF7F2;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-arabic: 'Cairo', 'Arial', sans-serif;

    /* Spacing — consistent everywhere */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Shadows — cards and buttons */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-focus: 0 0 0 3px rgba(193, 39, 45, 0.25);

    /* Border radius — same as app */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Form controls — unified height and look */
    --input-height: 44px;
    --input-border: 1px solid var(--color-border);
    --input-radius: var(--radius-md);
    --input-focus-border: 2px solid var(--color-moroccan-red);
    --input-focus-shadow: var(--shadow-focus);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-warm-sand);
    color: var(--color-text-dark);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    max-width: 100%;
}

/* Prevent horizontal scroll on mobile (e.g. iPhone) - home page full-bleed sections use 100vw */
body.layout-public {
    overflow-x: hidden;
}

/* Global page background: Moroccan paper texture (public layout) */
body.layout-public {
    background-color: #F4E6D2;
    background-image: url('../img/zellij.svg');
    background-size: 200px 200px;
    background-repeat: repeat;
    background-attachment: fixed;
}

/* Background for admin, driver, and customer portal layouts */
body.app-layout,
body.portal-layout {
    background-color: #F4E6D2;
    background-image: url('../img/zellij.svg');
    background-size: 200px 200px;
    background-repeat: repeat;
    background-attachment: fixed;
}

/* Doodle overlay on top of page background, below content */
body.layout-public::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
opacity: 0.35;
}

.main-wrapper {
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow-x: hidden;
}

body:not(.layout-public)::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../img/zellij.svg');
    background-repeat: repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    font-family: var(--font-arabic);
}

body.rtl .navbar-container,
body.rtl .footer-container {
    flex-direction: row-reverse;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-dark-green);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-moroccan-red);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-dark-green);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-moroccan-red);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #A01F24;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: var(--color-emerald-green);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: #008A47;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-success {
    background-color: #4CAF50;
    color: var(--color-white);
}

.btn-success:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-danger {
    background-color: #f44336;
    color: var(--color-white);
}

.btn-danger:hover {
    background-color: #da190b;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-moroccan-red);
    color: var(--color-moroccan-red);
}

.btn-outline:hover {
    background-color: var(--color-moroccan-red);
    color: var(--color-white);
}

/* Cards */
.card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transition: box-shadow 0.2s;
}

/* ========== Global form controls (design system) ========== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
input[type="password"],
select,
textarea {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text-dark);
    background-color: var(--color-white);
    border: var(--input-border);
    border-radius: var(--input-radius);
    padding: 0.6rem 0.85rem;
    min-height: var(--input-height);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border: var(--input-focus-border);
    box-shadow: var(--input-focus-shadow);
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2.5 4.5L6 8l3.5-3.5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2rem;
}
textarea {
    min-height: 100px;
    resize: vertical;
}
.form-control {
    width: 100%;
    max-width: 100%;
}
.form-label {
    display: block;
    font-weight: 500;
    color: var(--color-text-dark);
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

/* ========== Public header ========== */
.header-public {
    background-color: var(--color-header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--color-border);
}

.header-public .header-top,
.header-public .header-sep,
.header-public .header-bottom {
    position: relative;
}

.header-top {
    padding: 0.75rem 0;
    min-height: 56px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-md);
}

.header-lang {
    position: relative;
    justify-self: start;
    z-index: 10;
}

.header-brand {
    justify-self: center;
}

.header-actions {
    justify-self: end;
}


/* RTL: right-aligned layout like reference image */
.header-public.header-rtl .header-container {
    direction: rtl;
}

.header-public.header-rtl .header-nav {
    justify-content: center;
    direction: rtl;
}

.header-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid #d0d0d0;
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.header-lang-trigger:hover {
    border-color: #b0b0b0;
    background: var(--color-sand-light);
}

.header-lang-chevron {
    color: #1a1a1a;
    line-height: 0;
}

.header-lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.35rem;
    min-width: 160px;
    border: 1px solid var(--color-border);
    z-index: 1000;
}

.header-public.header-rtl .header-lang-dropdown {
    left: auto;
    right: 0;
}

.header-lang-dropdown[hidden] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.header-lang-dropdown:not([hidden]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.header-lang-option {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

.header-lang-option:hover {
    background: var(--color-sand-light);
}

.header-public .header-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-logo-img {
    height: 40px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.header-mobile-toggle,
.burger {
    display: none !important;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 101;
    justify-self: end;
    align-self: center;
    color: var(--color-moroccan-red);
    visibility: hidden;
    opacity: 0;
}

.mobile-menu,
.header-drawer {
    display: none;
    background: var(--color-header-bg);
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-md);
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Full-height push drawer (used by public layout) */
.header-drawer {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
    z-index: 199;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding: 0;
    border: none;
}

.header-drawer[hidden] {
    display: none !important;
}

.header-drawer:not([hidden]) {
    display: block !important;
    transform: translateX(0);
}

.header-drawer-inner {
    padding: 1rem 0;
}

.header-drawer-sep {
    height: 1px;
    background: var(--color-border);
    margin: 0.5rem 1rem;
}

.header-drawer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
}

.header-drawer-login,
.header-drawer-signup {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-moroccan-red);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}

.header-drawer-login:hover,
.header-drawer-signup:hover {
    background: var(--color-sand-light);
    color: #9e2d33;
}

.header-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.header-drawer-link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.header-drawer-link:hover,
.header-drawer-link.is-active {
    background: var(--color-sand-light);
    color: var(--color-moroccan-red);
    border-left-color: var(--color-moroccan-red);
}

.header-public.header-rtl .header-drawer {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

.header-public.header-rtl .header-drawer:not([hidden]) {
    transform: translateX(0);
}

.header-public.header-rtl .header-drawer-link {
    border-left: none;
    border-right: 3px solid transparent;
}

.header-public.header-rtl .header-drawer-link:hover,
.header-public.header-rtl .header-drawer-link.is-active {
    border-right-color: var(--color-moroccan-red);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.mobile-nav-link {
    color: var(--color-moroccan-red);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: var(--color-sand-light);
    color: #9e2d33;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.mobile-login,
.mobile-signup {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-moroccan-red);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mobile-login:hover,
.mobile-signup:hover {
    background: var(--color-sand-light);
    color: #9e2d33;
}

.header-mobile-toggle span,
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-moroccan-red);
    transition: all 0.3s;
}

.header-mobile-toggle[aria-expanded="true"] span:nth-child(1),
.burger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.header-mobile-toggle[aria-expanded="true"] span:nth-child(2),
.burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.header-mobile-toggle[aria-expanded="true"] span:nth-child(3),
.burger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.header-logo-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.header-logo-row-arabic {
    flex-direction: row;
}

.header-public.header-rtl .header-logo-row-arabic {
    direction: rtl;
}

.header-logo-icon {
    display: inline-block;
    color: var(--color-moroccan-red);
    flex-shrink: 0;
    line-height: 0;
}

.header-logo-arabic {
    font-family: var(--font-arabic);
    font-size: 1.15rem;
    color: var(--color-moroccan-red);
    font-weight: 600;
    line-height: 1.2;
}

.header-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--color-moroccan-red);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 0 0 auto;
}

.header-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-moroccan-red);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.header-login:hover {
    color: #9e2d33;
    background: var(--color-sand-light);
}

.header-login-icon {
    flex-shrink: 0;
    color: var(--color-moroccan-red);
}

.header-signup {
    display: inline-block;
    color: var(--color-moroccan-red);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.header-signup:hover {
    color: #9e2d33;
    background: var(--color-sand-light);
}

.header-sep {
    height: 1px;
    background: #ddd;
    margin: 0;
}

.header-bottom {
    padding: 0.6rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.header-nav {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.header-public .header-nav-link {
    color: var(--color-moroccan-red);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.4rem 0.25rem;
    transition: color 0.2s;
}

.header-public .header-nav-link:hover {
    color: #9e2d33;
}

.header-public .header-nav-link.is-active {
    color: var(--color-moroccan-red);
    font-weight: 600;
}

/* Override global a styles inside header */
.header-public a.header-login,
.header-public a.header-signup {
    color: var(--color-moroccan-red);
    text-decoration: none;
}

.header-public a.header-login:hover,
.header-public a.header-signup:hover {
    color: #9e2d33;
}

/* Legacy navbar class alias (e.g. for any remaining references) */
.navbar {
    background-color: var(--color-header-bg);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container { max-width: 1200px; margin: 0 auto; padding: 0 var(--spacing-md); display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { flex: 0 0 auto; }
.logo-link { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.logo-arabic { font-family: var(--font-arabic); font-size: 1.2rem; color: var(--color-dark-green); font-weight: 600; }
.logo-text { font-size: 1.5rem; font-weight: 700; color: var(--color-moroccan-red); letter-spacing: -0.5px; }
.navbar-menu { display: flex; gap: var(--spacing-md); flex: 1; justify-content: center; }
.nav-link { color: var(--color-text-dark); font-weight: 500; padding: var(--spacing-xs) var(--spacing-sm); border-radius: var(--radius-sm); transition: all 0.2s; }
.nav-link:hover { color: var(--color-moroccan-red); background-color: var(--color-sand-light); }
.navbar-actions { display: flex; align-items: center; gap: var(--spacing-sm); }
.navbar-lang { position: relative; }
.lang-current { cursor: pointer; padding: var(--spacing-xs) var(--spacing-sm); border-radius: var(--radius-sm); display: inline-block; }
.lang-current:hover { background-color: var(--color-sand-light); }
.lang-dropdown { position: absolute; top: 100%; right: 0; background-color: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-medium); padding: var(--spacing-xs); margin-top: 2px; min-width: 150px; max-height: 70vh; overflow-y: auto; display: none; z-index: 10002; }
/* No dead zone: dropdown overlaps trigger slightly so mouse can reach list without closing */
.navbar-portal .navbar-lang .lang-dropdown { margin-top: -4px; padding-top: 8px; z-index: 10002; }
.navbar-lang:hover .lang-dropdown { display: block; }
.lang-option { display: block; padding: var(--spacing-xs) var(--spacing-sm); border-radius: var(--radius-sm); color: var(--color-text-dark); }
.lang-option:hover { background-color: var(--color-sand-light); }

/* ========== Page Home: Hero ========== */
.page-home {
    max-width: 100%;
    overflow-x: hidden;
}

.page-home .hero {
    position: relative;
    padding: var(--spacing-lg) var(--spacing-md) 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    background-repeat: no-repeat, repeat;
    background-position: center, center;
    background-size: cover, 800px 800px;
    border-radius: 18px;
    overflow-x: hidden;
    min-width: 0;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.10;
    pointer-events: none;
    display: none; /* Using hero background instead */
}

.hero-bg-map {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    max-width: 520px;
    height: 80%;
    max-height: 420px;
    background-image: url('../img/bg-map-wash.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.20;
    pointer-events: none;
    display: none; /* Using hero-illustration::before instead */
}

body.rtl .hero-bg-map {
    right: auto;
    left: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.page-home .hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: var(--spacing-md);
    min-width: 0;
    box-sizing: border-box;
}

body.rtl .page-home .hero-content {
    direction: rtl;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

body.rtl .hero-text {
    text-align: right;
    align-items: flex-end;
}

body:not(.rtl) .hero-text {
    text-align: left;
    align-items: flex-start;
}

.hero-text h1 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.2;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
}

.hero-text h1 .highlight-green {
    color: var(--color-dark-green);
}

.hero-text h1 .highlight-red {
    color: var(--color-moroccan-red);
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.5;
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
}

/* Hero search - single pill (input + button inside one capsule) */
.hero-search {
    margin: var(--spacing-lg) 0 0 0;
    width: 100%;
}

.hero-search-pill {
    display: flex;
    align-items: stretch;
    height: 56px;
    border-radius: 999px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    width: 100%;
}

.hero-search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-left: 18px;
    padding-right: 12px;
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1;
    border: none;
    background: transparent;
    box-shadow: none;
}

body.rtl .hero-search-pill .hero-search-icon {
    padding-left: 12px;
    padding-right: 18px;
}

/* Override global input border (higher specificity than input[type="text"]) */
.hero-search-pill .hero-search-input,
.hero-search-pill input.hero-search-input {
    flex: 1;
    height: 100%;
    border: none !important;
    outline: none;
    box-shadow: none !important;
    padding-inline: 0 18px;
    font-size: 1rem;
    background: transparent;
    font-family: inherit;
    color: var(--color-text-dark);
    min-width: 0;
}

.hero-search-pill .hero-search-input:focus,
.hero-search-pill input.hero-search-input:focus {
    border: none !important;
    box-shadow: none !important;
}

body:not(.rtl) .hero-search-input {
    padding-left: 0;
}

body.rtl .hero-search-input {
    padding-right: 0;
}

.hero-search-input::placeholder {
    color: var(--color-text-light);
    opacity: 0.7;
}

.hero-search-btn {
    flex-shrink: 0;
    height: 100%;
    min-height: 54px;
    border-radius: 0 999px 999px 0;
    margin: 0;
    padding: 0 20px;
    background: var(--color-dark-green);
    color: var(--color-white);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: none;
}

body.rtl .hero-search-btn {
    border-radius: 999px 0 0 999px;
    margin: 0;
}

.hero-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 107, 60, 0.25);
}

.hero-search-btn:active {
    transform: translateY(0);
}

.hero-search-btn-icon {
    font-size: 1rem;
    opacity: 0.95;
}

/* Trust line - inline text with bullet separators (not chips) */
.hero-trust-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 14px;
    line-height: 1.5;
}

body.rtl .hero-trust-inline {
    justify-content: flex-end;
}

body:not(.rtl) .hero-trust-inline {
    justify-content: flex-start;
}

.hero-trust-sep {
    color: var(--color-text-light);
    opacity: 0.5;
    user-select: none;
}

/* Store row - badges + links in one row */
.hero-store-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.hero-store-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-store-badges .store-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: transparent;
}

.hero-store-badges .store-badge {
    height: 44px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    transition: transform 0.18s ease;
}

.hero-store-badges .store-link:hover .store-badge {
    transform: translateY(-1px);
}

.hero-store-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-dark-green);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.hero-store-link:hover {
    color: var(--color-moroccan-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-store-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

body.rtl .hero-store-row {
    flex-direction: row-reverse;
}
.app-badges {
    display: flex !important;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.store-link {
    display: inline-flex;
    text-decoration: none;
}

.store-badge {
    height: 36px;
    width: auto;
    display: block;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.store-link:hover .store-badge {
    transform: translateY(-1px) scale(1.03);
}

/* Legacy app-badge support */
.app-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem 1.25rem !important;
    background: var(--color-white) !important;
    border: 2px solid var(--color-moroccan-red) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s;
    text-decoration: none !important;
    min-height: 50px !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-weight: 600;
    color: var(--color-moroccan-red) !important;
    gap: 0.5rem;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.hero-illustration {
    position: relative;
    text-align: center;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.hero-illustration::before {
    content: "";
    position: absolute;
    inset: -40px -40px -40px -40px;
    background: url('../img/bg-map-wash.png') center/contain no-repeat;
    opacity: 0.75;
    filter: blur(0.3px);
    pointer-events: none;
    z-index: 0;
}

body.rtl .hero-illustration {
    text-align: center;
}

.hero-illustration img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
}

body.rtl .hero-illustration img {
    margin: 0 auto;
}

/* Responsive hero */
@media (max-width: 640px) {
    .page-home .hero {
        padding-bottom: 32px;
    }
    .hero-search-pill {
        height: 50px;
    }
    .hero-search-input {
        height: 50px;
        font-size: 0.95rem;
        padding-inline: 8px 12px;
    }
    body:not(.rtl) .hero-search-input {
        padding-left: 0;
    }
    body.rtl .hero-search-input {
        padding-right: 0;
    }
    .hero-search-icon {
        padding-left: 14px;
        padding-right: 6px;
        font-size: 0.95rem;
    }
    body.rtl .hero-search-pill .hero-search-icon {
        padding-left: 6px;
        padding-right: 14px;
    }
    .hero-search-btn {
        height: 100%;
        min-height: 48px;
        margin: 0;
        padding: 0 14px;
        font-size: 0.9rem;
    }
    .hero-trust-inline {
        font-size: 0.8rem;
        margin-top: 12px;
        justify-content: center;
    }
    body.rtl .hero-trust-inline {
        justify-content: center;
    }
    .hero-store-row {
        margin-top: 10px;
    }
    .hero-store-row .store-badge {
        height: 36px;
    }
    .hero-store-link {
        font-size: 0.85rem;
    }
    .why-safe,
    .how-it-works,
    .products-section,
    .faq {
        padding-top: 32px;
        padding-bottom: 32px;
    }
}

@media (min-width: 900px) {
    .hero-search-pill {
        max-width: 640px;
    }
    .hero-trust-inline {
        flex-wrap: nowrap;
    }
    .hero-store-row {
        flex-wrap: nowrap;
    }
}

/* ========== Why Jibli is safer ========== */
.why-safe {
    padding: 48px var(--spacing-md) 48px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.why-safe h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 auto var(--spacing-md);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-dark-green);
    max-width: 100%;
}
.why-safe-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin: 0 auto var(--spacing-xl);
    max-width: 700px;
    text-align: center;
    padding-inline: var(--spacing-md);
    line-height: 1.6;
}
.why-safe-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    max-width: 100%;
    margin: 0 auto;
}
.why-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.why-card:hover {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.why-icon {
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto var(--spacing-md);
    line-height: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.why-card h3 {
    font-size: 1.2rem;
    color: var(--color-dark-green);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    line-height: 1.3;
}
.why-card p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}
@media (min-width: 600px) {
    .why-safe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}
@media (min-width: 900px) {
    .why-safe-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-xl);
    }
}

/* ========== How It Works ========== */
.how-it-works {
    padding: 48px var(--spacing-md) 48px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.how-it-works h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 auto var(--spacing-md);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-dark-green);
    max-width: 100%;
}

.how-it-works-subtitle,
.how-it-works p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin: 0 auto var(--spacing-xl);
    max-width: 700px;
    text-align: center;
    padding-inline: var(--spacing-md);
    line-height: 1.6;
}

.steps-wrap {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.steps-path {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 0;
    border-top: 2px dotted var(--color-border);
    margin-top: -20px;
    z-index: 0;
    pointer-events: none;
}

.step-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin: var(--spacing-sm) 0 var(--spacing-md) 0;
    background: var(--color-sand-light);
}

.step-image img,
.step-illus {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.step-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.step-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--color-moroccan-red);
    color: var(--color-white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
}

.step-image {
    width: 100%;
    aspect-ratio: 280/160;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    background: var(--color-sand-light);
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-illus {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin: 10px 0 12px 0;
    display: block;
}

.step-card h3 {
    color: var(--color-dark-green);
    margin-bottom: var(--spacing-sm);
    font-size: 1.15rem;
}

.step-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-get-started {
    margin-top: var(--spacing-md);
}

/* ========== Floral band (corner border) ========== */
.floral-band {
    width: 100%;
    min-height: 72px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 0;
}

.floral-band-top {
    background-image: url('../img/floral-band-top.png'), url('../img/floral-band.png');
}

.floral-band-bottom {
    background-image: url('../img/floral-band-bottom.png'), url('../img/floral-band.png');
}

/* ========== Floral Band Decoration ========== */
.section-band {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: 100px;
    background: url('../img/floral-band.png') center/contain no-repeat;
    opacity: 0.95;
    box-sizing: border-box;
}

.section-band-top {
    margin-top: 8px;
    margin-bottom: 0;
}

.section-band-bottom {
    transform: scaleY(-1);
    margin-top: 0;
    margin-bottom: 8px;
}

/* Fallback if floral-band.png doesn't exist */
.section-band:not([style*="background-image"]) {
    background: url('../img/floral-band-top.png') center/contain no-repeat;
}

.section-band-bottom:not([style*="background-image"]) {
    background: url('../img/floral-band-bottom.png') center/contain no-repeat;
}

/* ========== Popular Moroccan products (supplier products, no price) ========== */
.popular-products-section {
    padding: 48px var(--spacing-md) 48px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.popular-products-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 auto var(--spacing-md);
    font-weight: 700;
    color: var(--color-dark-green);
}

.popular-products-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin: 0 auto var(--spacing-xl);
    max-width: 700px;
    line-height: 1.6;
}

.popular-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    justify-items: center;
}

.popular-product-card {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 240px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.popular-product-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.popular-product-image {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-sand-light);
    margin-bottom: var(--spacing-sm);
}

.popular-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0 0 var(--spacing-xs);
    line-height: 1.3;
}

.popular-product-desc {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.4;
}

.popular-product-fav {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

body.rtl .popular-product-fav {
    right: auto;
    left: var(--spacing-sm);
}

.popular-product-fav:hover {
    transform: scale(1.1);
}

.popular-product-fav .heart-icon {
    line-height: 1;
}

.popular-products-section .btn-browse {
    margin-top: var(--spacing-md);
}

/* ========== Products section + infinite slider ========== */
.products-section {
    padding: 48px var(--spacing-md) 48px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    direction: ltr !important; /* Force LTR for entire section */
}

body.rtl .products-section {
    direction: ltr !important; /* Override RTL */
}

.products-section * {
    box-sizing: border-box;
}

.products-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 auto var(--spacing-md);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-dark-green);
    max-width: 100%;
}

.products-subtitle,
.products-section p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin: 0 auto var(--spacing-xl);
    max-width: 700px;
    text-align: center;
    padding-inline: var(--spacing-md);
    line-height: 1.6;
}

/* Full-bleed wrapper for slider on large screens */
.brand-slider-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

/* Brand slider - infinite auto-scrolling with premium fade mask */
.brand-slider {
    overflow: hidden;
    position: relative;
    padding: 24px 0 40px;
    padding-left: clamp(20px, 5vw, 100px);
    padding-right: clamp(20px, 5vw, 100px);
    direction: ltr !important;
    max-width: 100%;
    box-sizing: border-box;
}

body.rtl .brand-slider {
    direction: ltr !important;
}

.brand-slider::before,
.brand-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.brand-slider::before {
    left: 0;
    background: linear-gradient(to right, var(--color-warm-sand) 0%, var(--color-warm-sand) 15%, transparent 100%);
}

.brand-slider::after {
    right: 0;
    background: linear-gradient(to left, var(--color-warm-sand) 0%, var(--color-warm-sand) 15%, transparent 100%);
}

.page-home .products-section {
    background: var(--color-warm-sand);
}

.brand-track {
    display: flex;
    gap: 28px;
    padding: 0 40px;
    width: max-content;
    animation: brandScroll 32s linear infinite;
    direction: ltr !important;
}

body.rtl .brand-track {
    direction: ltr !important;
}

.brand-slider:hover .brand-track {
    animation-play-state: paused;
}

@keyframes brandScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Legacy products-slider support */
.products-slider-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: var(--spacing-lg);
    -webkit-overflow-scrolling: touch;
    position: relative;
    direction: ltr !important;
}

body.rtl .products-slider-wrap {
    direction: ltr !important;
}

.products-slider {
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
    position: relative;
    direction: ltr !important;
}

body.rtl .products-slider {
    direction: ltr !important;
}

.products-slider-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    width: max-content !important;
    min-width: max-content !important;
    padding: var(--spacing-sm) 0;
    will-change: transform;
    align-items: flex-start;
    box-sizing: border-box;
    overflow: visible !important;
    direction: ltr !important;
    list-style: none !important;
}

body.rtl .products-slider-track {
    direction: ltr !important;
    flex-direction: row !important;
}

.products-slider-track > * {
    float: none !important;
    display: flex !important;
    flex-shrink: 0 !important;
}

.product-card {
    flex: 0 0 280px;
    flex-shrink: 0;
    flex-grow: 0;
    width: 280px;
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
    max-width: 280px;
    min-width: 280px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    float: none;
    clear: none;
    margin: 0;
    position: relative;
    overflow: visible;
}

.brand-track .product-card {
    flex: 0 0 clamp(160px, 18vw, 280px);
    width: clamp(160px, 18vw, 280px);
    max-width: 280px;
    min-width: 160px;
    padding: var(--spacing-sm);
    box-sizing: border-box;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    background: var(--color-white);
}

/* Ensure product cards are never block-level in slider */
.products-slider-track .product-card {
    display: flex !important;
    flex-direction: column !important;
    width: 150px !important;
    max-width: 150px !important;
    min-width: 150px !important;
}

.product-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.product-card .product-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    background: var(--color-sand-light);
    flex-shrink: 0;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-track .product-card .product-image {
    width: 100%;
    aspect-ratio: 1;
    max-height: none;
    overflow: hidden;
    position: relative;
}

.brand-track .product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    display: block;
}

.product-card h4 {
    color: var(--color-dark-green);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    padding: 0.25rem 0;
    line-height: 1.3;
    word-wrap: break-word;
}

.btn-browse {
    margin-top: var(--spacing-md);
}

/* ========== FAQ accordion ========== */
.faq {
    padding: 48px var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.faq h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 auto var(--spacing-md);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-dark-green);
    max-width: 100%;
}
.faq-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin: 0 auto var(--spacing-xl);
    max-width: 700px;
    text-align: center;
    padding-inline: var(--spacing-md);
    line-height: 1.6;
}
.faq-list {
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 100%;
    margin: 0 auto;
}
.faq-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    width: 100%;
    box-sizing: border-box;
}
.faq-item:hover {
    border-color: var(--color-dark-green);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.faq-item[open] {
    border-color: var(--color-dark-green);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.faq-item summary {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-weight: 600;
    color: var(--color-text-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    font-size: 1.1rem;
    transition: color 0.2s, background-color 0.2s;
    user-select: none;
    line-height: 1.5;
}
.faq-item summary:hover {
    color: var(--color-dark-green);
    background-color: var(--color-sand-light);
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--color-moroccan-red);
    flex-shrink: 0;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-sand-light);
    transition: transform 0.3s, background-color 0.2s;
}
.faq-item[open] summary::after {
    content: "−";
    background: var(--color-dark-green);
    color: var(--color-white);
    transform: rotate(180deg);
}
.faq-body {
    padding: 0 var(--spacing-xl) var(--spacing-lg);
    animation: faqSlideDown 0.3s ease-out;
}
@keyframes faqSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.faq-body p {
    margin: 0;
    padding: 0;
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.7;
}
body.rtl .faq-list {
    text-align: right;
    direction: rtl;
}

body:not(.rtl) .faq-list {
    text-align: left;
    direction: ltr;
}

body.rtl .faq-item summary {
    flex-direction: row-reverse;
    text-align: right;
}

body:not(.rtl) .faq-item summary {
    text-align: left;
}

/* Legacy carousel class (if used elsewhere) */
.products-carousel {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: var(--spacing-md) 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Footer */
.footer {
    background-color: var(--color-white);
    padding: var(--spacing-xl) var(--spacing-md);
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    color: var(--color-moroccan-red);
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--color-text-light);
}

.footer-section a:hover {
    color: var(--color-moroccan-red);
}

.footer-bottom {
    max-width: 1200px;
    margin: var(--spacing-lg) auto 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        grid-template-columns: auto 1fr auto;
        gap: var(--spacing-sm);
    }

    .header-mobile-toggle,
    .burger {
        display: inline-flex !important;
        justify-self: start;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .header-brand {
        justify-self: center;
    }

    .header-lang {
        justify-self: end;
    }
    
    .page-home .hero-content {
        grid-template-columns: 1fr;
        padding-inline: var(--spacing-md);
    }
    
    .hero-text {
        order: 1;
        width: 100%;
        text-align: center;
        align-items: center;
    }

    body.rtl .hero-text {
        text-align: center;
        align-items: center;
    }

    .hero-text h1,
    .hero-text p {
        text-align: center;
    }

    .hero-trust-inline {
        justify-content: center;
        text-align: center;
    }

    body.rtl .hero-trust-inline {
        justify-content: center;
    }

    .hero-search {
        display: flex;
        justify-content: center;
    }

    .hero-search-pill {
        max-width: 100%;
    }

    .hero-store-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    body.rtl .hero-store-row {
        flex-direction: column;
    }

    .hero-store-badges {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .hero-store-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        margin-top: 0.75rem;
    }
    
    .hero-illustration {
        order: 2;
        text-align: center;
        width: 100%;
    }
    
    .app-badges {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .store-badge {
        height: 40px;
    }
    
    .brand-track .product-card {
        flex: 0 0 140px;
        width: 140px;
        max-width: 140px;
        min-width: 140px;
        padding: var(--spacing-xs);
    }
    
    .brand-track .product-card .product-image {
        aspect-ratio: 1;
    }
    
    .brand-track .product-card .product-image img {
        max-width: 100%;
        max-height: 100%;
    }
    
    .section-band {
        height: 80px;
    }
    
    .why-safe-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .why-card {
        padding: var(--spacing-lg);
    }
    
    .why-icon {
        width: 40px;
        height: 40px;
        font-size: 1.75rem;
    }
    
    .faq-item summary {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
    
    .faq-body {
        padding: 0 var(--spacing-lg) var(--spacing-md);
    }
    
    .navbar-container {
        flex-wrap: wrap;
    }
    
    .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .page-home .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-bg-map {
        width: 100%;
        max-width: none;
        height: 50%;
        top: 60%;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .steps-path {
        display: none;
    }
    
    .products-slider-wrap,
    .brand-slider {
        direction: ltr !important;
    }
    
    .products-slider {
        direction: ltr !important;
    }
    
    .products-slider-track,
    .brand-track {
        padding-left: var(--spacing-md);
        direction: ltr !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
    }
    
    .product-card {
        flex: 0 0 140px !important;
        width: 140px !important;
        max-width: 140px !important;
        min-width: 140px !important;
        padding: var(--spacing-xs);
        display: flex !important;
        flex-direction: column !important;
    }
    
    .brand-track .product-card {
        flex: 0 0 140px !important;
        width: 140px !important;
        max-width: 140px !important;
        min-width: 140px !important;
    }
    
    .brand-track .product-card .product-image {
        aspect-ratio: 1 !important;
        height: auto !important;
    }
    
    .store-link {
        display: inline-flex !important;
    }
    
    .store-badge {
        height: 40px !important;
        display: block !important;
    }
    
    .section-band {
        height: 60px !important;
    }

    /* Prevent horizontal overflow on phones: 100vw can exceed viewport (e.g. iPhone) */
    .page-home .section-band,
    .page-home .section-band-top,
    .page-home .section-band-bottom {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .page-home .brand-slider-bleed {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* Hero full width on mobile: no side padding so image and content aren’t cut off */
    .page-home .hero {
        max-width: 100%;
        width: 100%;
        margin-inline: auto;
        padding-inline: 0;
        box-sizing: border-box;
    }
    .page-home .hero-content {
        padding-inline: 1rem;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }
    .page-home .hero-text {
        min-width: 0;
        overflow-wrap: break-word;
    }
    .page-home .hero-text h1,
    .page-home .hero-text p {
        min-width: 0;
        overflow-wrap: break-word;
    }
    .hero-search-pill {
        min-width: 0;
        max-width: 100%;
    }
    .hero-illustration {
        margin-inline: -1rem;
        width: calc(100% + 2rem);
        max-width: 100%;
        box-sizing: border-box;
    }
    .hero-illustration img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    .hero-illustration::before {
        inset: -16px;
    }
    
    .products-carousel {
        padding-bottom: var(--spacing-md);
    }
    
    /* Mobile header */
    .header-top {
        padding: 0.5rem 0;
        min-height: 48px;
    }

    .header-container {
        padding: 0 1rem;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .header-lang-trigger {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    .header-brand {
        flex: 1;
        justify-content: center;
    }

    .header-logo-img {
        height: 32px;
        max-width: 100px;
    }

    .header-sep {
        display: none;
    }

    .header-bottom {
        display: none;
    }
    
    .navbar-logo-img {
        height: 28px;
        width: auto;
        max-width: 90px;
    }
}

/* Navbar App - Mobile */
.navbar-app .navbar-toggler {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.navbar-app .navbar-toggler span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-dark);
    border-radius: 1px;
}
@media (max-width: 768px) {
    .navbar-app {
        min-height: 52px;
        padding: 0.5rem 0;
    }
    .navbar-app .navbar-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .navbar-app .navbar-toggler {
        display: flex;
        order: 0;
    }
    .navbar-app .navbar-brand {
        order: 1;
        flex: 1;
        justify-content: center;
        text-align: center;
    }
    .navbar-app .navbar-brand .navbar-logo-img {
        max-height: 28px;
        width: auto;
    }
    .navbar-app .navbar-actions {
        order: 2;
        gap: 0.5rem;
    }
    .navbar-app .navbar-actions .navbar-lang,
    .navbar-app .navbar-actions .nav-link-with-icon,
    .navbar-app .navbar-actions .nav-link {
        font-size: 0.9rem;
    }
    .navbar-app .navbar-menu {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        padding: 0.5rem 0;
        border-top: 1px solid var(--color-border);
        margin-top: 0.25rem;
    }
    .navbar-app .navbar-menu.is-open {
        display: flex;
    }
    .navbar-app .navbar-menu .nav-link {
        padding: 0.75rem;
    }
}

/* App Layout */
.app-layout {
    background-color: var(--color-sand-light);
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.app-main {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    min-height: calc(100vh - 200px);
}

/* Portal Layout */
.portal-layout {
    background-color: var(--color-sand-light);
}

/* Portal header: hamburger | logo | language (same structure as public) */
.navbar-portal .navbar-portal-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}
.dashboard-header-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-portal-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.navbar-portal-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--color-text-dark);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.navbar-portal-action:hover {
    background: rgba(0,0,0,0.06);
    color: var(--color-moroccan-red);
}
@media (max-width: 768px) {
    .navbar-portal .navbar-portal-row {
        grid-template-columns: auto 1fr auto auto;
    }
    .dashboard-header-title {
        display: none;
    }
}
.navbar-portal .navbar-portal-toggler {
    justify-self: start;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-md);
    color: var(--color-text-dark);
}
.navbar-portal .navbar-portal-toggler:hover {
    background: rgba(0,0,0,0.06);
}
.navbar-portal .navbar-portal-toggler span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
/* Driver and customer: sidebar is not collapsable on web — hide hamburger on desktop */
@media (min-width: 992px) {
    body.sidebar-not-collapsable-on-web .navbar-portal-toggler {
        display: none;
    }
}
.navbar-portal .navbar-brand-portal {
    justify-self: center;
}
.navbar-portal .navbar-portal-lang {
    justify-self: end;
    position: relative;
}

.portal-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background-image: url('../img/bg-paper-zellij-tile.png'), url('../img/zellij.svg');
    background-repeat: repeat, repeat;
}
.portal-navbar-wrap {
    width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 10001; /* above portal-drawer (10000) so language dropdown is not covered */
}
.portal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.portal-footer-wrap {
    width: 100%;
    flex-shrink: 0;
}
.portal-footer-wrap .footer {
    margin-top: 0;
}
.portal-drawer {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    background: var(--color-white);
    box-shadow: 4px 0 20px rgba(0,0,0,0.12);
    z-index: 10000;
    overflow: hidden;
    transition: transform 0.25s ease;
    transform: translateX(-100%);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}
body.portal-drawer-open .portal-drawer {
    transform: translateX(0);
    pointer-events: auto;
}
.portal-drawer[hidden] {
    display: none !important;
}
@media (min-width: 992px) {
    .portal-drawer[hidden] {
        display: none !important;
    }
}
html[dir="rtl"] .portal-drawer,
body.rtl .portal-drawer {
    left: auto;
    right: 0;
    box-shadow: -4px 0 20px rgba(0,0,0,0.12);
    transform: translateX(100%);
}
html[dir="rtl"] body.portal-drawer-open .portal-drawer,
body.rtl.portal-drawer-open .portal-drawer {
    transform: translateX(0);
}
/* Backdrop when drawer is open (tap to close) */
body.portal-drawer-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9999;
    pointer-events: auto;
}
@media (min-width: 992px) {
    body.portal-drawer-open::before {
        display: block;
    }
}
.portal-content-wrap {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-left: 0;
}
/* Desktop: navbar full width, sidebar below navbar (in-flow) for driver/customer; for admin when drawer open */
@media (min-width: 992px) {
    body.portal-drawer-open .portal-body,
    body.sidebar-not-collapsable-on-web .portal-body {
        display: flex;
        flex-direction: row;
    }
    body.portal-drawer-open .portal-body .portal-drawer,
    body.sidebar-not-collapsable-on-web .portal-body .portal-drawer {
        display: flex !important;
        position: relative;
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
        height: auto;
        min-height: 0;
        transform: none;
        box-shadow: 4px 0 20px rgba(0,0,0,0.08);
    }
    body.portal-drawer-open .portal-content-wrap,
    body.sidebar-not-collapsable-on-web .portal-content-wrap {
        flex: 1;
        min-width: 0;
    }
    /* Arabic (RTL): force sidebar on the RIGHT — use dir so it works even if body class is wrong */
    html[dir="rtl"] body.sidebar-not-collapsable-on-web .portal-body,
    html[dir="rtl"] body.portal-drawer-open .portal-body {
        position: relative;
        display: block !important; /* override flex so we can use absolute sidebar */
    }
    html[dir="rtl"] body.sidebar-not-collapsable-on-web .portal-body .portal-content-wrap,
    html[dir="rtl"] body.portal-drawer-open .portal-body .portal-content-wrap {
        margin-right: 260px; /* space for sidebar on the right */
        min-width: 0;
    }
    html[dir="rtl"] body.sidebar-not-collapsable-on-web .portal-body .portal-drawer,
    html[dir="rtl"] body.portal-drawer-open .portal-body .portal-drawer {
        position: absolute !important;
        top: 0;
        right: 0 !important;
        left: auto !important;
        bottom: 0;
        width: 260px;
        height: auto;
        min-height: 100%;
        box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    }
    /* No backdrop on desktop when sidebar is in-flow */
    body.portal-drawer-open::before {
        display: none;
    }
}

.portal-drawer-inner {
    padding: 1rem 0;
    pointer-events: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}
.portal-drawer-sidebar {
    padding: 0.5rem 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}
.portal-drawer-sidebar .sidebar-menu {
    pointer-events: auto;
}
.portal-drawer-sidebar .sidebar-menu a {
    pointer-events: auto !important;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}
.portal-drawer-sidebar .sidebar-menu a:hover {
    background: var(--color-sand-light);
    color: var(--color-moroccan-red);
}
.portal-drawer-sidebar .sidebar-menu li {
    list-style: none;
    margin: 0;
}
.portal-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
    pointer-events: auto;
}
.portal-drawer-actions a,
.portal-drawer-link {
    pointer-events: auto;
    cursor: pointer;
}
.portal-drawer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    color: var(--color-text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--radius-md);
}
.portal-drawer-link:hover {
    background: var(--color-sand-light);
    color: var(--color-moroccan-red);
}
.portal-drawer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: currentColor;
}
.portal-drawer-notifications {
    position: relative;
}
.portal-drawer-notifications .badge {
    margin-inline-start: auto;
}
.portal-drawer-sep {
    height: 1px;
    background: var(--color-border);
    margin: 0.5rem 1rem;
}
.portal-drawer-sidebar {
    padding: 0.5rem 0;
}
.portal-drawer-sidebar .sidebar {
    border: none;
    box-shadow: none;
    background: transparent;
}
.portal-drawer-sidebar .sidebar-menu {
    padding: 0 0.5rem;
}
.portal-drawer-sidebar .sidebar-menu a {
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0.08);
}

.portal-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
}

.portal-sidebar {
    flex: 0 0 250px;
}

.portal-main {
    flex: 1;
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

/* Dashboard workspace: soft container for customer/driver content (layering over pattern) */
.dashboard-workspace {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
}
.dashboard-workspace .dashboard-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    margin: 1.5rem 0 0.75rem;
    padding: 0 0.25rem;
}
.dashboard-workspace .dashboard-section-label:first-child {
    margin-top: 0;
}
.dashboard-workspace .dashboard-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    min-width: 0;
}
@media (max-width: 1200px) {
    .dashboard-workspace .dashboard-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .dashboard-workspace .dashboard-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .dashboard-workspace .dashboard-cards-grid {
        grid-template-columns: 1fr;
    }
}
.dashboard-workspace .dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    min-height: 160px;
    box-sizing: border-box;
}
.dashboard-workspace .dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--color-moroccan-red);
    transform: translateY(-2px);
}
.dashboard-workspace .dashboard-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgba(193, 39, 45, 0.1);
    color: var(--color-moroccan-red);
}
.dashboard-workspace .dashboard-card-icon svg {
    width: 28px;
    height: 28px;
}
.dashboard-workspace .dashboard-card:hover .dashboard-card-icon {
    background: rgba(193, 39, 45, 0.18);
}
.dashboard-workspace .dashboard-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-dark);
}
.dashboard-workspace .dashboard-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.4;
}
.dashboard-workspace .dashboard-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}
.dashboard-workspace .dashboard-summary-item {
    padding: 1rem;
    background: var(--color-sand-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}
.dashboard-workspace .dashboard-summary-item strong {
    display: block;
    color: var(--color-moroccan-red);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.dashboard-workspace .dashboard-welcome {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    color: var(--color-text-dark);
}

/* Portal: full-width responsive – all driver/customer pages */
.portal-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.portal-main {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
.portal-main h1,
.portal-main h2,
.portal-main h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
/* Button groups and action rows: wrap on small screens */
.portal-main .portal-actions,
.portal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.portal-actions .btn {
    flex-shrink: 0;
}
/* Headline + actions row (common pattern) */
.portal-main .portal-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.portal-page-header h1,
.portal-page-header h2 {
    margin: 0;
}
/* Cards and grids: responsive */
.portal-main .card {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
/* Tables: horizontal scroll on small screens */
.portal-main .table-wrap,
.portal-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}
.portal-main .table-wrap table,
.portal-table-wrap table {
    min-width: 600px;
    width: 100%;
}
/* Forms: stack and full width on mobile */
.portal-main .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}
@media (min-width: 600px) {
    .portal-main .form-grid.form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}
.portal-main input[type="text"],
.portal-main input[type="email"],
.portal-main input[type="number"],
.portal-main input[type="tel"],
.portal-main input[type="url"],
.portal-main input[type="password"],
.portal-main select,
.portal-main textarea {
    max-width: 100%;
    box-sizing: border-box;
}
/* Dashboard / card grids: already use auto-fit minmax – ensure min width doesn’t break */
.portal-main [style*="grid-template-columns"][style*="minmax"] {
    min-width: 0;
}

.portal-cards-grid {
    min-width: 0;
}

.portal-card-row {
    flex-wrap: wrap;
}
.portal-card-row > *:first-child {
    flex: 1;
    min-width: 0;
}

.portal-filter-form select,
.portal-filter-form input[type="text"],
.portal-filter-form input[type="number"] {
    max-width: 100%;
}

.dashboard-cards {
    min-width: 0;
}
.dashboard-cards-icons .dashboard-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(0, 168, 89, 0.12);
    color: var(--color-emerald-green);
}
.dashboard-cards-icons .dashboard-card-icon svg {
    flex-shrink: 0;
}
.dashboard-cards-icons .dashboard-card:hover .dashboard-card-icon {
    background: rgba(0, 168, 89, 0.2);
    color: var(--color-emerald-green);
}

@media (max-width: 768px) {
    .portal-container {
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }
    .portal-main {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
    }
    .portal-main .driver-page-trip-builder {
        max-width: 100%;
    }
    /* Single column form on mobile */
    .portal-main .form-grid.form-grid-2 {
        grid-template-columns: 1fr;
    }
    /* Push drawer: reduce margin on small screens so content isn’t squeezed */
    body.portal-drawer-open.rtl .footer {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .portal-container {
        padding: 0.5rem;
    }
    .portal-main {
        padding: 0.75rem;
    }
    /* Full-width buttons in action groups on very small screens */
    .portal-main .portal-actions .btn,
    .portal-main .portal-actions a.btn {
        flex: 1 1 100%;
        min-width: 0;
        justify-content: center;
    }
    .portal-main .portal-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    .portal-main .portal-page-header .portal-actions {
        width: 100%;
    }
    .portal-main .portal-page-header .portal-actions .btn {
        width: 100%;
    }
}

/* Portal: full-width responsive overrides for inline max-width on inner wrappers */
.portal-main .portal-page-inner,
.portal-main .browse-products-page,
.portal-main .customer-favorites-page {
    max-width: 100% !important;
    width: 100% !important;
}

/* Buttons: ensure they wrap and don't overflow */
.portal-main .btn {
    max-width: 100%;
    min-width: 0;
}
.portal-main .portal-actions .btn[style*="min-width"],
.portal-main .portal-actions a.btn[style*="min-width"] {
    min-width: 0 !important;
}
@media (max-width: 768px) {
    .portal-main .portal-actions .btn[style*="min-width"],
    .portal-main .portal-actions a.btn[style*="min-width"] {
        flex: 1 1 auto;
    }
}

/* Forms: ensure filter forms and any flex form wrap and are full width */
.portal-main form[style*="flex"] {
    max-width: 100%;
}
.portal-main form select,
.portal-main form input[type="text"],
.portal-main form input[type="number"],
.portal-main form input[type="email"] {
    max-width: 100%;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .portal-main #tripsFilterForm select,
    .portal-main .portal-filter-form select {
        min-width: 0 !important;
        width: 100%;
    }
    .portal-main .form-group[style*="max-width"] {
        max-width: 100% !important;
    }
    .portal-main .portal-card-row {
        flex-direction: column;
        align-items: stretch !important;
    }
    .portal-main .portal-card-row .portal-actions {
        align-items: stretch !important;
    }
    .portal-main .portal-card-row .portal-actions .btn {
        width: 100%;
    }
}

/* Request detail / driver request: 3-col grid stacks on mobile */
.portal-main div[style*="grid-template-columns: 1fr 1fr 1fr"],
.portal-main div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
}
@media (min-width: 600px) {
    .portal-main div[style*="grid-template-columns: 1fr 1fr 1fr"],
    .portal-main div[style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr 1fr !important;
    }
}

/* Product line grid (create_purchase): stack on small screens */
.portal-main .product-line {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
}
.portal-main .product-line input:nth-child(1) {
    grid-column: 1 / -1;
}
.portal-main .product-line .btn-remove-line,
.portal-main .product-line .btn-add-line {
    min-width: 0;
}
@media (min-width: 640px) {
    .portal-main .product-line {
        grid-template-columns: 1fr 100px 1fr 44px 44px !important;
    }
    .portal-main .product-line input:nth-child(1) {
        grid-column: span 1;
    }
}

/* ========== Browse products discovery (customer) ========== */
.browse-products-discovery .browse-products-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.browse-products-discovery .browse-products-header-text { flex: 1; min-width: 0; }
.browse-products-discovery .browse-products-title { margin: 0 0 0.35rem 0; font-size: 1.75rem; }
.browse-products-discovery .browse-products-description { margin: 0; color: #666; font-size: 1rem; }
.browse-products-discovery .browse-products-favorites-btn { flex-shrink: 0; }

.browse-products-discovery .browse-products-search-wrap { margin-bottom: 1rem; }
.browse-products-discovery .browse-products-search {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 2px solid #E0D5C4;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}
.browse-products-discovery .browse-products-search:focus {
    outline: none;
    border-color: #C1272D;
}

.browse-products-discovery .browse-products-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.browse-products-discovery .browse-products-filter-pill {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 2px solid #E0D5C4;
    background: #fff;
    color: #2C2C2C;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.browse-products-discovery .browse-products-filter-pill:hover {
    border-color: #c4b8a0;
    background: #FAF7F2;
}
.browse-products-discovery .browse-products-filter-pill.is-active {
    border-color: #C1272D;
    background: #C1272D;
    color: #fff;
}

.browse-products-discovery .browse-products-section {
    margin-bottom: 40px;
}
.browse-products-discovery .browse-products-section-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.browse-products-discovery .browse-products-scroll-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}
.browse-products-discovery .browse-products-scroll-row {
    display: flex;
    gap: 1rem;
    min-width: min-content;
}
.browse-products-discovery .browse-products-scroll-row .browse-product-card {
    flex: 0 0 220px;
    min-width: 220px;
}

.browse-products-discovery .browse-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.browse-products-discovery .browse-product-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E0D5C4;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.browse-products-discovery .browse-product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.browse-products-discovery .browse-product-fav {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    padding: 0.25rem 0;
    margin: -0.25rem -0.25rem 0.5rem 0;
}
.browse-products-discovery .browse-product-fav:hover { color: #C1272D; }
.browse-products-discovery .browse-product-fav .heart-icon { font-size: 1.1rem; }
.browse-products-discovery .browse-product-image-link { display: block; margin-bottom: 0.75rem; }
.browse-products-discovery .browse-product-image {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
}
.browse-products-discovery .browse-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.browse-products-discovery .browse-product-info { margin-bottom: 0.75rem; flex: 1; min-height: 0; }
.browse-products-discovery .browse-product-name {
    display: block;
    font-weight: 600;
    color: #2C2C2C;
    text-decoration: none;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.browse-products-discovery .browse-product-name:hover { color: #C1272D; }
.browse-products-discovery .browse-product-category {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}
.browse-products-discovery .browse-product-request-btn {
    width: 100%;
    margin-top: auto;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

.browse-products-discovery .browse-products-empty {
    text-align: center;
    padding: 3rem 2rem;
}

/* Product detail: Featured products slider */
.product-detail-featured {
    padding: 0 0 1rem 0;
}
.product-detail-featured-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}
.product-detail-featured-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}
.product-detail-featured-slider {
    display: flex;
    gap: 1rem;
    min-width: min-content;
}
.product-detail-featured-card {
    flex: 0 0 220px;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E0D5C4;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.product-detail-featured-card .browse-product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-detail-featured-card .browse-product-fav {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    padding: 0.25rem 0;
    margin: -0.25rem -0.25rem 0.5rem 0;
}
.product-detail-featured-card .browse-product-fav:hover { color: #C1272D; }
.product-detail-featured-card .browse-product-image-link { display: block; margin-bottom: 0.75rem; }
.product-detail-featured-card .browse-product-image {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
}
.product-detail-featured-card .browse-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-detail-featured-card .browse-product-info { margin-bottom: 0.75rem; flex: 1; min-height: 0; }
.product-detail-featured-card .browse-product-name {
    display: block;
    font-weight: 600;
    color: #2C2C2C;
    text-decoration: none;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.product-detail-featured-card .browse-product-name:hover { color: #C1272D; }
.product-detail-featured-card .browse-product-category {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}
.product-detail-featured-card .browse-product-request-btn {
    width: 100%;
    margin-top: auto;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
}
@media (max-width: 768px) {
    .product-detail-featured-card {
        flex: 0 0 180px;
        min-width: 180px;
    }
}

/* Request item modal */
.browse-products-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    padding: 1rem;
}
.browse-products-modal-overlay[hidden] { display: none !important; }
.browse-products-modal {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.browse-products-modal-title { margin: 0 0 1.25rem 0; font-size: 1.25rem; }
.browse-products-modal-form .browse-products-modal-field {
    margin-bottom: 1rem;
}
.browse-products-modal-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.browse-products-modal-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid #E0D5C4;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}
.browse-products-modal-input[readonly] { background: #f5f5f5; }
.browse-products-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 768px) {
    .browse-products-discovery .browse-products-scroll-row {
        flex-wrap: wrap;
        min-width: 0;
    }
    .browse-products-discovery .browse-products-scroll-row .browse-product-card {
        flex: 1 1 100%;
        min-width: 0;
    }
    .browse-products-discovery .browse-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
}

/* Legacy browse-products-page (non-discovery) compatibility */
.portal-main .browse-products-page div[style*="display:flex"][style*="min-width:100%"],
.portal-main .browse-products-page div[style*="display: flex"][style*="min-width:100%"] {
    flex-wrap: wrap !important;
}
.portal-main .browse-products-page .popular-product-card,
.portal-main .browse-products-page [style*="min-width:200px"] {
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 200px;
}
.browse-product-card {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}
.browse-product-card .browse-product-actions {
    margin-top: auto;
}
@media (max-width: 768px) {
    .portal-main .browse-products-page .popular-product-card,
    .portal-main .browse-products-page [style*="min-width:200px"] {
        flex: 1 1 100%;
    }
}

/* Ensure forms and buttons are clickable */
.portal-main form,
.portal-main .btn,
.portal-main button {
    position: relative;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* Specifically ensure buttons inside forms are clickable */
.portal-main form button[type="submit"],
.portal-main form .btn {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 11 !important;
}

/* Ensure cards don't block interactions */
.card {
    pointer-events: auto;
}

.card * {
    pointer-events: auto;
}

/* Request action buttons - maximum priority */
.request-action-form {
    display: inline-block !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.request-action-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1001 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.request-actions {
    position: relative !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.request-actions * {
    pointer-events: auto !important;
}

/* Driver Portal – Trip builder form (professional layout) */
.driver-page-trip-builder {
    max-width: 860px;
    margin: 0 auto;
}

.form-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md) var(--spacing-lg);
    align-items: start;
}

.form-field {
    min-width: 0;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-row-2 {
    grid-column: span 1;
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-dark);
}

.form-label .required {
    color: var(--color-moroccan-red);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    line-height: 1.4;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    min-height: 44px;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-moroccan-red);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.form-message-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.form-message-error {
    background: #ffebee;
    color: #c62828;
}

.form-message-error ul {
    margin: 0;
    padding-left: 1.25rem;
}

.form-section-title {
    grid-column: 1 / -1;
    font-size: 1.25rem;
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
}

.form-stop-item {
    padding: var(--spacing-md);
    background: var(--color-sand-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.form-stop-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-submit-wrap {
    margin-top: var(--spacing-md);
}

.btn-block {
    width: 100%;
}

.btn-remove-stop {
    margin-top: 0.5rem;
}

.stops-reorder-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
}

.stops-reorder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-sand-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.35rem;
}

.stops-reorder-handle {
    cursor: grab;
    color: #888;
    font-size: 1rem;
    user-select: none;
    padding: 0.25rem;
}
.stops-reorder-handle:active {
    cursor: grabbing;
}
.stops-reorder-item.stops-reorder-dragging {
    opacity: 0.6;
}
.stops-reorder-label {
    font-weight: 500;
    flex: 1;
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
}

.trip-publish-badge--published {
    background: #2e7d32;
    color: #fff;
}
.trip-publish-badge--draft {
    background: #757575;
    color: #fff;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-row-2,
    .form-field-full {
        grid-column: 1 / -1;
    }
    .form-stop-row {
        grid-template-columns: 1fr;
    }
    .form-input, .form-textarea {
        min-height: 48px;
    }
}

.sidebar {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-soft);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-dark);
    min-height: 36px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--color-sand-light);
    color: var(--color-moroccan-red);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.pagination-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--color-text-dark);
    text-decoration: none;
    border: 2px solid var(--color-border);
    transition: all 0.2s;
}

.pagination-link:hover {
    background-color: var(--color-sand-light);
    border-color: var(--color-moroccan-red);
}

.pagination-current {
    background-color: var(--color-moroccan-red);
    color: var(--color-white);
    border-color: var(--color-moroccan-red);
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--color-text-light);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: var(--color-moroccan-red);
    color: var(--color-white);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-icon {
    display: inline-block;
    padding: var(--spacing-xs);
    color: var(--color-text-dark);
    position: relative;
    text-decoration: none;
}

.nav-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
}

/* ========== Admin Panel (screenshot style) ========== */
.navbar-brand-portal .logo-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.navbar-logo-img {
    height: 32px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.navbar-brand-portal .logo-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: normal;
    margin-top: 0.1rem;
}
.btn-notifications {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.btn-notifications .nav-icon {
    padding: 0;
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
body.rtl .sidebar-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}
.sidebar-icon-svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}
.dashboard-sidebar .dashboard-sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    padding: 1rem 0.65rem 0.35rem;
    margin: 0;
    list-style: none;
    border: none;
}
.dashboard-sidebar .dashboard-sidebar-section-label:first-child {
    padding-top: 0.5rem;
}
.sidebar-menu a.active {
    background-color: var(--color-moroccan-red);
    color: var(--color-white);
}
.sidebar-menu a.active .sidebar-icon-svg {
    color: inherit;
}

/* Customer sidebar: premium active style (sand + red bar), sections, mobile collapse */
.sidebar-customer .sidebar-section {
    margin-bottom: 0.75rem;
}
.sidebar-customer .sidebar-section:last-of-type {
    margin-bottom: 0;
}
.sidebar-customer .sidebar-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    padding: 0.5rem 0.65rem 0.35rem;
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.sidebar-customer .sidebar-section-title::-webkit-details-marker,
.sidebar-customer .sidebar-section-title::marker {
    display: none;
}
.sidebar-customer .sidebar-section-title::after {
    content: '';
    display: inline-block;
    margin-left: 0.35rem;
    vertical-align: 0.15em;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    transition: transform 0.2s;
}
body.rtl .sidebar-customer .sidebar-section-title::after {
    margin-left: 0;
    margin-right: 0.35rem;
    transform: rotate(-135deg);
}
.sidebar-customer .sidebar-section[open] .sidebar-section-title::after {
    transform: rotate(-135deg);
}
body.rtl .sidebar-customer .sidebar-section[open] .sidebar-section-title::after {
    transform: rotate(45deg);
}
.sidebar-customer .sidebar-menu {
    margin-top: 0;
}
.sidebar-customer .sidebar-menu a.active {
    background-color: var(--color-sand-light);
    color: var(--color-moroccan-red);
    font-weight: 600;
    border-left: 3px solid var(--color-moroccan-red);
    padding-left: calc(0.65rem - 3px);
}
.sidebar-customer .sidebar-menu a.active .sidebar-icon-svg {
    color: var(--color-moroccan-red);
}
body.rtl .sidebar-customer .sidebar-menu a.active {
    border-left: none;
    border-right: 3px solid var(--color-moroccan-red);
    padding-right: calc(0.65rem - 3px);
    padding-left: 0.65rem;
}
@media (max-width: 768px) {
    .sidebar-customer .sidebar-section {
        margin-bottom: 0.5rem;
    }
    .sidebar-customer .sidebar-section[open] .sidebar-menu {
        margin-bottom: 0.25rem;
    }
}

.navbar-portal .nav-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: currentColor;
}
.btn-notifications .nav-icon-svg {
    margin-right: 0.35rem;
}
body.rtl .btn-notifications .nav-icon-svg {
    margin-right: 0;
    margin-left: 0.35rem;
}

/* Admin Dashboard */
.admin-dashboard {
    padding: 0;
}
.admin-welcome {
    margin-bottom: 1.5rem;
}
.admin-welcome-title {
    font-size: 2rem;
    color: var(--color-emerald-green) !important;
    margin-bottom: 0.25rem !important;
}
.admin-welcome-sub {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0 !important;
}
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}
@media (max-width: 992px) {
    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }
}
.admin-kpi-card {
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-sand-light) 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.admin-kpi-card-animated {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-kpi-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
}

.admin-kpi-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.2;
}

.admin-kpi-icon-green {
    color: var(--color-emerald-green);
    background: rgba(0, 168, 89, 0.1);
}

.admin-kpi-icon-blue {
    color: #0066CC;
    background: rgba(0, 102, 204, 0.1);
}

.admin-kpi-icon-red {
    color: var(--color-moroccan-red);
    background: rgba(193, 39, 45, 0.1);
}

.admin-kpi-icon-orange {
    color: #FF6B35;
    background: rgba(255, 107, 53, 0.1);
}

.admin-kpi-content {
    flex: 1;
}

.admin-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-dark);
    display: block;
    line-height: 1.2;
}

.admin-kpi-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
    display: block;
    margin-top: 0.25rem;
}
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.admin-card-chart {
    min-height: 300px;
}

.admin-chart-container {
    padding: var(--spacing-md) 0;
}

.admin-chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 0.5rem;
    height: 200px;
    padding: 0 var(--spacing-sm);
}

.admin-chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.admin-chart-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(to top, var(--color-moroccan-red), var(--color-emerald-green));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 8px;
    animation: chartBarGrow 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes chartBarGrow {
    from {
        height: 0%;
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.admin-chart-bar-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-dark);
    white-space: nowrap;
}

.admin-chart-bar-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-align: center;
}

.admin-chart-bars-horizontal {
    flex-direction: column;
    height: auto;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
}

.admin-chart-bar-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.admin-chart-bar-row .admin-chart-bar-label {
    min-width: 80px;
    margin: 0;
    text-align: left;
    font-size: 0.9rem;
}

.admin-chart-bar-horizontal-wrap {
    flex: 1;
    height: 32px;
    background: var(--color-sand-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.admin-chart-bar-horizontal {
    height: 100%;
    background: linear-gradient(to right, var(--color-emerald-green), var(--color-moroccan-red));
    border-radius: var(--radius-sm);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    min-width: 8px;
    animation: chartBarGrowHorizontal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes chartBarGrowHorizontal {
    from {
        width: 0% !important;
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.admin-chart-bar-row {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.admin-chart-bar-horizontal .admin-chart-bar-value {
    position: static;
    transform: none;
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 600;
}

@media (max-width: 992px) {
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-kpi-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .admin-kpi-value {
        font-size: 1.5rem;
    }
}

.admin-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}

.admin-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.admin-card-title {
    font-size: 1.25rem;
    color: var(--color-emerald-green) !important;
    margin-bottom: 1rem !important;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text-dark);
    font-weight: 600;
}
.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
.admin-status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.admin-status-active {
    background: #d4edda;
    color: #155724;
}
.admin-status-pending {
    background: #fff3cd;
    color: #856404;
}
.admin-status-completed {
    background: #e2e3e5;
    color: #383d41;
}
.admin-notif-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.admin-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-sand-light);
    border-radius: var(--radius-md);
}
.admin-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.4rem;
}
.admin-notif-dot-red {
    background: var(--color-moroccan-red);
}
.admin-notif-dot-green {
    background: var(--color-emerald-green);
}
.admin-notif-dot-orange {
    background: #fd7e14;
}
.admin-notif-item > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.admin-notif-text {
    font-size: 0.95rem;
    color: var(--color-text-dark);
}
.admin-notif-time {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* ========== Supplier portal (same look as driver/customer) ========== */
.supplier-layout {
    background-color: var(--color-sand-light);
}
.supplier-container-standalone {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.sidebar-item-placeholder,
.sidebar-item-disabled {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.sidebar-item-placeholder {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}
.sidebar-item-disabled {
    cursor: not-allowed;
    opacity: 0.7;
}
.sidebar-badge-coming {
    display: inline-block;
    background: var(--color-border);
    color: var(--color-text-light);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    margin-left: auto;
}
.sidebar-item-billing .sidebar-plan-name {
    display: block;
    width: 100%;
    font-size: 0.8rem;
    color: var(--color-text-dark);
}
.sidebar-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.sidebar-status-active {
    background: #2e7d32;
    color: #fff;
}
.sidebar-status-inactive {
    background: #757575;
    color: #fff;
}
.navbar-supplier-toggler {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--color-text-dark);
    cursor: pointer;
    border-radius: var(--radius-md);
}
.navbar-supplier-toggler:hover {
    background: var(--color-sand-light);
}
@media (max-width: 768px) {
    .navbar-supplier-toggler {
        display: flex;
    }
    .supplier-portal-container .portal-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 2px 0 12px rgba(0,0,0,0.1);
    }
    body.rtl .supplier-portal-container .portal-sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }
    body.supplier-sidebar-open .supplier-portal-container .portal-sidebar {
        transform: translateX(0);
    }
    body.rtl.supplier-sidebar-open .supplier-portal-container .portal-sidebar {
        transform: translateX(0);
    }
    body.supplier-sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 199;
    }
}
.navbar-lang-select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.9rem;
}
.supplier-inactive-banner {
    background: #fff3cd;
    color: #856404;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid #ffc107;
}
.supplier-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
@media (max-width: 992px) {
    .supplier-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .supplier-stats-grid {
        grid-template-columns: 1fr;
    }
}
.supplier-stat-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
}
.supplier-stat-card h3 {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}
.supplier-stat-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-dark);
}
.supplier-analytics-placeholder {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--spacing-lg);
    border: 1px dashed var(--color-border);
    color: var(--color-text-light);
    text-align: center;
}
.supplier-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}
@media (max-width: 992px) {
    .supplier-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .supplier-products-grid {
        grid-template-columns: 1fr;
    }
}
.supplier-product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}
.supplier-product-card .card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--color-sand-light);
}
.supplier-product-card .card-body {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}
.supplier-product-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}
.supplier-product-card .card-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}
.supplier-product-card .card-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.supplier-product-card .card-badge.active {
    background: #2e7d32;
    color: #fff;
}
.supplier-product-card .card-badge.inactive {
    background: #757575;
    color: #fff;
}
.supplier-product-card .card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}
.supplier-product-card .card-actions .btn {
    flex: 1;
    min-width: 70px;
}

/* Supplier products gallery (cards + kebab menu) */
.supplier-products-grid--gallery {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
@media (min-width: 1200px) {
    .supplier-products-grid--gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}
.supplier-product-card--gallery {
    display: flex;
    flex-direction: column;
    padding: 0;
}
.supplier-product-card__image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--color-sand-light);
    overflow: hidden;
}
.supplier-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.supplier-product-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 2.5rem;
    background: var(--color-sand-light);
}
.supplier-product-card__status-pill {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}
.supplier-product-card__status-pill--active {
    background: #2e7d32;
    color: #fff;
}
.supplier-product-card__status-pill--inactive {
    background: #757575;
    color: #fff;
}
.supplier-product-card__menu-wrap {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    pointer-events: auto;
}
.supplier-product-card__kebab {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.95);
    color: var(--color-text-dark);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    pointer-events: auto;
    position: relative;
    z-index: 6;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.supplier-product-card__kebab:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.supplier-product-card__kebab:focus {
    outline: 2px solid var(--color-moroccan-red, #C1272D);
    outline-offset: 2px;
}
.supplier-product-card__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 140px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border);
    z-index: 10;
    padding: 0.25rem 0;
}
.supplier-product-card__menu-wrap.is-open .supplier-product-card__dropdown {
    display: block;
}
.supplier-product-card__dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-text-dark);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.supplier-product-card__dropdown-item:hover {
    background: var(--color-sand-light);
}
.supplier-product-card__dropdown-item--button {
    width: 100%;
}
.supplier-product-card__dropdown-form {
    margin: 0;
    padding: 0;
    border: none;
}
.supplier-product-card__dropdown-item--danger {
    color: #c62828;
}

/* Driver trip card: primary Loading Order + Trip actions dropdown */
.trip-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.trip-actions-dropdown {
    position: relative;
}
.trip-actions-details {
    position: relative;
    display: inline-block;
}
.trip-actions-details summary {
    list-style: none;
    cursor: pointer;
}
.trip-actions-details summary::-webkit-details-marker,
.trip-actions-details summary::marker {
    display: none;
}
.trip-actions-summary {
    white-space: nowrap;
}
.trip-actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 200px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border);
    z-index: 20;
    padding: 0.25rem 0;
}
body.rtl .trip-actions-menu {
    right: auto;
    left: 0;
}
.trip-actions-item,
.trip-actions-item-btn {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-text-dark);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}
body.rtl .trip-actions-item,
body.rtl .trip-actions-item-btn {
    text-align: right;
}
.trip-actions-item:hover,
.trip-actions-item-btn:hover {
    background: var(--color-sand-light);
    color: var(--color-moroccan-red, #C1272D);
}
.trip-actions-form {
    margin: 0;
    padding: 0;
    border: none;
    display: block;
}
.trip-actions-item-danger {
    color: #c62828;
}
.trip-actions-item-danger:hover {
    background: #ffebee;
    color: #b71c1c;
}

.supplier-product-card__body {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.supplier-product-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.supplier-product-card__meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.4;
}
.supplier-products-empty {
    text-align: center;
    padding: var(--spacing-xl);
}
.supplier-products-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}
.btn-danger {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
}
.btn-danger:hover {
    background: #b71c1c;
}
.supplier-delete-modal-message {
    margin-bottom: 1rem;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.is-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Loading Order page: tabs and add-packages section spacing */
.loading-tabs-bar {
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}
.loading-add-packages-section .loading-add-divider {
    margin: 1.25rem 0;
    border-top: 1px solid #E0D5C4;
}

.modal-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-medium);
}
.modal-box h3 {
    margin-bottom: 0.75rem;
}
.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}
.form-group-supplier {
    margin-bottom: var(--spacing-md);
}
.form-group-supplier label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}
.form-group-supplier input,
.form-group-supplier select,
.form-group-supplier textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
}
.supplier-form-section {
    margin-bottom: var(--spacing-lg);
}
.supplier-form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}
.toast-success {
    background: #2e7d32;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
}
.portal-page-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========== Request a Delivery — structured workflow page ========== */
.request-delivery-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 32px;
}
.request-delivery-page .page-header {
    margin-bottom: 24px;
}
.request-delivery-page .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}
.request-delivery-page .page-header .page-desc {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
}
.request-delivery-page .form-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
    padding: 24px;
    margin-bottom: 0;
}
.request-delivery-page .form-section {
    margin-bottom: 24px;
}
.request-delivery-page .form-section:last-of-type {
    margin-bottom: 0;
}
.request-delivery-page .form-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

/* Segmented control — direction toggle */
.segmented-control {
    display: inline-flex;
    background: var(--color-sand-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 0;
}
.segmented-control label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-dark);
    cursor: pointer;
    margin: 0;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.segmented-control label:has(input:checked) {
    background: var(--color-white);
    color: var(--color-moroccan-red);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.segmented-control label:hover:not(:has(input:checked)) {
    background: rgba(255,255,255,0.6);
}

/* Form control — unified inputs (16px grid) */
.form-control-wrap {
    margin-bottom: 16px;
}
.form-control-wrap:last-child {
    margin-bottom: 0;
}
.form-control-wrap label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-dark);
    margin-bottom: 6px;
}
.form-control-wrap input[type="text"],
.form-control-wrap input[type="number"],
.form-control-wrap input[type="date"],
.form-control-wrap input[type="email"],
.form-control-wrap select,
.form-control-wrap textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text-dark);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.form-control-wrap input:focus,
.form-control-wrap select:focus,
.form-control-wrap textarea:focus {
    outline: none;
    border-color: var(--color-moroccan-red);
    box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.12);
}
.form-control-wrap input::placeholder,
.form-control-wrap textarea::placeholder {
    color: var(--color-text-light);
    opacity: 0.8;
}

/* Two-column route grid */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* Toggle row — checkbox + label (styled) */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.toggle-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-moroccan-red);
    cursor: pointer;
    flex-shrink: 0;
}
.toggle-row label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-dark);
    cursor: pointer;
    margin: 0;
}
.toggle-row .conditional-input {
    margin-top: 12px;
    margin-left: 32px;
}
.request-delivery-page .form-submit-wrap {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}
.request-delivery-page .btn-primary-lg {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-moroccan-red);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
    box-shadow: 0 2px 8px rgba(193, 39, 45, 0.25);
}
.request-delivery-page .btn-primary-lg:hover {
    background: #a01f24;
}
.request-delivery-page .btn-primary-lg:active {
    transform: scale(0.98);
}
.request-delivery-page .form-error-list {
    background: #fef2f2;
    color: #b91c1c;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid #fecaca;
    list-style: none;
    margin-left: 0;
    padding-left: 1.25rem;
}
.request-delivery-page .form-error-list li {
    margin-bottom: 4px;
}
.request-delivery-page .form-error-list li:last-child {
    margin-bottom: 0;
}
.request-delivery-page .checkbox-group-styled {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.request-delivery-page .checkbox-group-styled input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-moroccan-red);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}
.request-delivery-page .checkbox-group-styled label {
    font-size: 0.9375rem;
    color: var(--color-text-dark);
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}
.request-delivery-page .checkbox-group-styled a {
    color: var(--color-moroccan-red);
    text-decoration: underline;
}
.request-delivery-page .checkbox-group-styled a:hover {
    text-decoration: none;
}
.request-delivery-page #packages_items_section .package-block,
.request-delivery-page #packages_items_section .card {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-sand-light);
}
.request-delivery-page #packages_items_section .package-block-title,
.request-delivery-page #packages_items_section .card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--color-text-dark);
}
.request-delivery-page #packages_items_section .package-item-row {
    display: grid;
    grid-template-columns: 1fr 80px 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}
.request-delivery-page #packages_items_section .package-item-row .form-control-wrap {
    margin-bottom: 0;
}
.request-delivery-page #packages_items_section .package-item-row input,
.request-delivery-page #packages_items_section .package-item-row select {
    padding: 10px 12px;
    font-size: 0.9375rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
}
.request-delivery-page #packages_items_section .package-block .btn-outline {
    margin-top: 8px;
}
.request-delivery-page .favorites-in-package {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}
.request-delivery-page .favorites-in-package-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 10px;
}
.request-delivery-page .favorites-search-wrap {
    margin-bottom: 12px;
}
.request-delivery-page .favorites-search-input {
    width: 100%;
    max-width: 280px;
    padding: 10px 12px;
    font-size: 0.9375rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-sizing: border-box;
}
.request-delivery-page .favorites-search-input:focus {
    outline: none;
    border-color: var(--color-moroccan-red);
    box-shadow: 0 0 0 2px rgba(193, 39, 45, 0.15);
}
.request-delivery-page .favorites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.request-delivery-page .favorite-product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-sand-light);
    flex: 1 1 280px;
    max-width: 100%;
}
.request-delivery-page .favorite-product-photo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-border);
}
.request-delivery-page .favorite-product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.request-delivery-page .favorite-product-photo-placeholder {
    background: var(--color-sand);
}
.request-delivery-page .favorite-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.request-delivery-page .favorite-product-name {
    font-weight: 500;
    color: var(--color-text-dark);
}
.request-delivery-page .favorite-product-supplier {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}
.request-delivery-page .favorite-product-card .btn-add-to-package {
    flex-shrink: 0;
}
.request-delivery-page .favorites-empty {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}
.request-delivery-page .package-item-supplier {
    display: block;
    font-size: 0.8125rem;
    font-weight: normal;
    color: var(--color-text-muted);
}
.request-delivery-page .btn-outline {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-moroccan-red);
    background: transparent;
    border: 1px solid var(--color-moroccan-red);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.request-delivery-page .btn-outline:hover {
    background: rgba(193, 39, 45, 0.08);
}

/* ========== Trips Page ========== */
.page-trips {
    padding: var(--spacing-lg) 0;
}

.trips-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.trips-container h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: var(--spacing-xl);
    color: var(--color-dark-green);
    font-weight: 700;
}

/* Trips Filter Bar */
.trips-filter-bar,
.drivers-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-xl);
    align-items: flex-end;
}

/* Drivers page */
.page-drivers {
    padding: var(--spacing-lg) 0;
}

.drivers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.drivers-container h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: var(--spacing-xl);
    color: var(--color-dark-green);
    font-weight: 700;
}

.drivers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.driver-card {
    cursor: pointer;
    padding: var(--spacing-lg);
    transition: box-shadow 0.2s, transform 0.2s;
}

.driver-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.driver-card-name {
    color: var(--color-moroccan-red);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
}

.driver-card-rating {
    margin-bottom: var(--spacing-sm);
}

.driver-rating-value {
    color: var(--color-dark-green);
    font-weight: 600;
}

.driver-rating-count {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.driver-card-bio {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.driver-card-btn {
    width: 100%;
}

.drivers-empty {
    text-align: center;
    padding: var(--spacing-xl);
}

/* Drivers filter: one row only, narrow fixed width (150–200px) */
.page-drivers .drivers-filter-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    align-items: flex-end;
    gap: var(--spacing-md);
}

.page-drivers .drivers-filter-bar .filter-group {
    flex: 0 0 auto !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
}

.page-drivers .drivers-filter-bar .filter-input,
.page-drivers .drivers-filter-bar .drivers-filter-select {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    padding: 0.6rem 2rem 0.6rem 0.75rem;
    font-size: 0.95rem;
    box-sizing: border-box;
    line-height: 1.4;
    height: 42px;
}

.page-drivers .drivers-filter-bar select.filter-input option {
    padding: 0.25rem 0.5rem;
}

@media (max-width: 640px) {
    .page-drivers .drivers-filter-bar {
        flex-wrap: wrap !important;
    }
    .page-drivers .drivers-filter-bar .filter-group {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    .page-drivers .drivers-filter-bar .filter-input,
    .page-drivers .drivers-filter-bar .drivers-filter-select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0;
    line-height: 1.2;
}

.filter-input {
    padding: 0.75rem 1rem;
    height: 44px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--color-white);
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1.5;
}

.filter-input:hover {
    border-color: var(--color-dark-green);
}

.filter-input:focus {
    outline: none;
    border-color: var(--color-dark-green);
    box-shadow: 0 0 0 3px rgba(0, 107, 60, 0.1);
}

/* Trips List */
.trips-list {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.trip-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s, transform 0.2s;
}

.trip-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.trip-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
}
.trip-driver-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-sand-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.trip-driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.trip-driver-initial {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-white);
    background: var(--color-moroccan-red);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trip-driver-meta {
    min-width: 0;
}
.trip-driver-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 1rem;
}
.trip-driver-name a {
    color: var(--color-text-dark);
    text-decoration: none;
}
.trip-driver-name a:hover {
    color: var(--color-moroccan-red);
}
.trip-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-emerald-green);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 700;
}
.trip-rating {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 0.15rem;
}

.trip-card-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.trip-info {
    flex: 1;
    min-width: 300px;
}

.trip-direction {
    color: var(--color-moroccan-red);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
}

.trip-driver,
.trip-date,
.trip-eta,
.trip-stops {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
    line-height: 1.5;
}

.trip-stops {
    font-size: 0.9rem;
}

.trip-action {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-sm);
}
.trip-view-details {
    min-width: 140px;
}

body.rtl .trip-action {
    text-align: left;
    align-items: flex-start;
}

.trip-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-moroccan-red);
    margin: 0;
}

.trip-capacity {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin: 0;
}

.trips-empty {
    text-align: center;
    padding: var(--spacing-xl);
}

/* Responsive Trips Filter */
@media (min-width: 900px) {
    .trips-filter-bar {
        flex-wrap: nowrap;
        align-items: flex-end;
    }
    
    .filter-group {
        flex: 1;
        min-width: 0;
    }
}

@media (min-width: 641px) and (max-width: 899px) {
    .trips-filter-bar {
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: 1 1 calc(50% - var(--spacing-md));
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .trips-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
        min-width: 0;
    }
    
    .trip-card-content {
        flex-direction: column;
    }
    
    .trip-action {
        width: 100%;
        text-align: left;
        align-items: flex-start;
    }
    
    body.rtl .trip-action {
        text-align: right;
        align-items: flex-end;
    }
}

/* ========== Delivery Marketplace: filters + cards ========== */
.marketplace-filters .marketplace-filters-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    max-width: 100%;
}
@media (max-width: 900px) {
    .marketplace-filters .marketplace-filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 560px) {
    .marketplace-filters .marketplace-filters-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.marketplace-filters .form-group {
    margin-bottom: 0;
}
.marketplace-filters-actions .form-label {
    visibility: hidden;
}
.marketplace-filters-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.marketplace-filters-buttons .btn {
    padding: 0.5rem 1rem;
    min-height: 38px;
}
.portal-page-desc {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}
.portal-empty-message {
    text-align: center;
    color: var(--color-text-light);
    margin: 0;
}
.portal-results-count {
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}
.marketplace-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.marketplace-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
}
.marketplace-card-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.marketplace-card-main {
    flex: 1;
    min-width: 0;
}
.marketplace-card-label {
    margin: 0 0 0.5rem 0;
}
.marketplace-card-label-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    background: #fff8e1;
    border: 1px solid #ffc107;
    color: #b45309;
}
.marketplace-card-route {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0 0 0.35rem 0;
    line-height: 1.35;
}
.marketplace-card-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0.25rem 0 0 0;
}
.marketplace-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}
.marketplace-card-actions .btn {
    white-space: nowrap;
}

/* Request detail page */
.link-back {
    color: var(--color-moroccan-red);
    text-decoration: none;
}
.link-back:hover {
    text-decoration: underline;
}
.marketplace-detail-card {
    margin-bottom: 1.5rem;
}
.marketplace-detail-route {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0 0 0.75rem 0;
}
.marketplace-detail-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin: 0;
    font-size: 0.95rem;
}
.marketplace-detail-meta dt {
    color: var(--color-text-light);
    font-weight: 500;
}
.marketplace-detail-meta dd {
    margin: 0;
}
.marketplace-detail-desc {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.marketplace-detail-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.75rem;
}
.marketplace-detail-package {
    margin-bottom: 1rem;
}
.marketplace-detail-package-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}
.marketplace-detail-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.marketplace-detail-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}
.marketplace-detail-item:last-child {
    border-bottom: none;
}
.marketplace-detail-item-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.marketplace-detail-item-photo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.marketplace-detail-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.marketplace-detail-item-supplier {
    font-size: 0.85rem;
    color: var(--color-text-light);
}
.marketplace-detail-item-notes {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}
.marketplace-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ========== Driver Make Offer page ========== */
.offer-page {
    max-width: 1200px;
    margin: 0 auto;
}
.offer-page-back {
    margin-bottom: var(--spacing-md);
}
.offer-page-title {
    margin-bottom: var(--spacing-lg);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-dark);
}
.offer-page-errors {
    background: rgba(193, 39, 45, 0.08);
    color: var(--color-moroccan-red);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(193, 39, 45, 0.25);
}
.offer-page-errors ul {
    margin: 0;
    padding-inline-start: 1.25rem;
}
.offer-page-grid {
    display: grid;
    gap: var(--spacing-xl);
    align-items: start;
}
@media (min-width: 900px) {
    .offer-page-grid {
        grid-template-columns: 1fr 320px;
    }
    .offer-summary-col .sticky {
        position: sticky;
        top: var(--spacing-md);
    }
}
.offer-form-col {
    min-width: 0;
}
.offer-form.card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
}
.offer-section {
    margin-bottom: var(--spacing-xl);
}
.offer-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0 0 var(--spacing-md) 0;
}
.offer-section-desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0 0 var(--spacing-md) 0;
}
.offer-pricing-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}
@media (max-width: 500px) {
    .offer-pricing-row {
        grid-template-columns: 1fr;
    }
}
.offer-estimated-total {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-moroccan-red);
    margin: 0;
}
.offer-items-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}
.offer-items-header .offer-section-title {
    margin-bottom: 0;
}
.offer-cannot-alert {
    background: rgba(193, 39, 45, 0.08);
    color: var(--color-moroccan-red);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(193, 39, 45, 0.25);
}
.offer-cannot-alert p {
    margin: 0;
    font-size: 0.95rem;
}
.offer-packages {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.offer-package-block.card {
    padding: 0;
    overflow: hidden;
}
.offer-package-heading {
    margin: 0;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    background: var(--color-sand-light);
    border-bottom: 1px solid var(--color-border);
}
.offer-package-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.offer-item-card.card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.offer-item-product {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.offer-item-photo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-sand-light);
}
.offer-item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.offer-item-info {
    flex: 1;
    min-width: 0;
}
.offer-item-name {
    display: block;
    font-size: 1rem;
    color: var(--color-text-dark);
}
.offer-item-supplier,
.offer-item-qty {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 0.15rem;
}
.offer-item-notes {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0.25rem 0 0 0;
}
.offer-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}
.offer-item-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text-dark);
    cursor: pointer;
}
.offer-item-btn:hover {
    background: var(--color-sand-light);
    border-color: var(--color-emerald-green);
    color: var(--color-emerald-green);
}
.offer-item-btn-exact.is-selected {
    background: rgba(0, 168, 89, 0.12);
    border-color: var(--color-emerald-green);
    color: var(--color-emerald-green);
}
.offer-item-btn-alternative.is-selected {
    background: rgba(255, 152, 0, 0.12);
    border-color: #E65100;
    color: #E65100;
}
.offer-item-btn-cannot.is-selected {
    background: rgba(193, 39, 45, 0.1);
    border-color: var(--color-moroccan-red);
    color: var(--color-moroccan-red);
}
.offer-item-extras {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}
.offer-item-extras .form-control {
    margin-bottom: var(--spacing-sm);
}
.offer-submit-wrap {
    margin-top: var(--spacing-xl);
}
.offer-submit-wrap .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}
.offer-submit-wrap .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.offer-summary-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
}
.offer-summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-md) 0;
}
.offer-summary-dl {
    margin: 0;
    display: grid;
    gap: 0.35rem 0.75rem;
}
.offer-summary-dl dt {
    font-size: 0.85rem;
    color: var(--color-text-light);
}
.offer-summary-dl dd {
    margin: 0;
    font-size: 0.95rem;
}
.offer-summary-notes {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}
.offer-summary-notes p {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}
