
/* ========================================== */
/* FILE: storefront-base.css */
/* ========================================== */

/**
 * HES COMPUTERS - Design System CSS
 * ==================================
 * Core design tokens and CSS variables for the entire UI system.
 * 
 * INTEGRATION:
 * - Load this file FIRST in <head> before all other CSS files.
 * - This prevents Flash of Unstyled Content (FOUC).
 * 
 * WHAT THIS FILE DOES:
 * - Defines all color, spacing, typography, shadow, and border-radius tokens.
 * - Provides light mode (default) and dark mode variables.
 * - Imports Google Fonts (Heebo).
 * - Sets base RTL and Hebrew typography defaults.
 *
 * PRESERVES:
 * - No existing PHP logic is affected.
 * - No database or backend changes required.
 */

/* ============================================
   FONT IMPORTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* ---- Brand Colors (HES Core Tech) ---- */
    --color-primary: #1A365D; /* HES Cobalt ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ main brand color */
    --color-primary-hover: #2B6CB0; /* HES Blue */
    --color-primary-light: #EBF4FF;
    --color-primary-dark: #0f1f3a;

    /* HES Palette */
    --hes-cobalt: #1A365D;
    --hes-blue: #2B6CB0;
    --hes-blue-hover: #3182CE;
    --hes-green: #2F855A;
    --hes-gold: #B7791F;
    --hes-red: #C53030;
    --hes-bg: #F7FAFC;
    --hes-border: #E2E8F0;
    --hes-text: #1A202C;
    --hes-text-secondary: #4A5568;

    --color-secondary: #B7791F; /* HES Gold for highlights */
    --color-secondary-hover: #975a16;

    /* ---- Neutral Palette (Light Theme Default) ---- */
    --color-bg-main: #F7FAFC; /* HES background */
    --color-bg-white: #ffffff; /* Pure white for cards/panels */
    --color-bg-elevated: #ffffff;
    --color-bg-sunken: #e9ecef;
    --color-bg-overlay: rgba(0, 0, 0, 0.6);

    --color-text-main: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-tertiary: #757575;
    --color-text-inverted: #ffffff;

    --color-border: #E2E8F0;
    --color-border-strong: #CBD5E0;
    --color-border-focus: #2B6CB0;

    /* ---- Status Colors ---- */
    --color-success: #10B981;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-warning: #F59E0B;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-error: #C53030; /* HES Red */
    --color-error-bg: rgba(197, 48, 48, 0.1);
    --color-info: #1A365D;
    --color-info-bg: rgba(26, 54, 93, 0.1);

    /* ---- Price Colors ---- */
    --color-price: #1a1a1a;
    --color-price-sale: #C53030; /* HES Red for sales */
    --color-price-original: #757575;

    /* ---- Typography ---- */
    --font-hebrew: 'Heebo', Arial, sans-serif;
    --font-heading: 'Heebo', Arial, sans-serif;
    --font-mono: 'Heebo', Arial, sans-serif;
    --font-body: 'Heebo', Arial, sans-serif;

    /* High density typography */
    --text-xs: 0.7rem;    /* 11.2px */
    --text-sm: 0.8rem;    /* 12.8px */
    --text-base: 0.9rem;  /* 14.4px */
    --text-lg: 1.05rem;   /* 16.8px */
    --text-xl: 1.2rem;    /* 19.2px */
    --text-2xl: 1.4rem;   /* 22.4px */
    --text-3xl: 1.7rem;   /* 27.2px */
    --text-4xl: 2.1rem;   /* 33.6px */

    --leading-tight: 1.2;
    --leading-normal: 1.4;
    --leading-relaxed: 1.6;

    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;

    /* ---- Spacing (High Density Base) ---- */
    --space-1: 3px;
    --space-2: 6px;
    --space-3: 10px;
    --space-4: 14px;
    --space-5: 18px;
    --space-6: 22px;
    --space-8: 28px;
    --space-10: 36px;
    --space-12: 44px;
    --space-16: 60px;

    /* ---- Border Radius (Sharper for Tech vibe) ---- */
    --radius-sm: 2px;
    --radius: 3px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --radius-full: 9999px;

    /* ---- Shadows ---- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* Legacy token bridge */
    --c-void: #F7FAFC;
    --c-dark: #ffffff;
    --c-panel: var(--color-bg-white);
    --c-rim: var(--color-border);
    --c-blue: var(--color-primary);
    --c-blue-lt: #2B6CB0;
    --c-blue-bg: var(--color-primary-light);
    --c-red: var(--color-error);
    --c-amber: var(--color-warning);
    --c-green: var(--color-success);
    --bg: var(--color-bg-main);
    --bg-white: var(--color-bg-white);
    --bg-subtle: var(--color-bg-sunken);
    --tx-1: var(--color-text-main);
    --tx-2: var(--color-text-secondary);
    --tx-3: var(--color-text-tertiary);
    --tx-inv: var(--color-text-inverted);
    --bd: var(--color-border);
    --bd-dark: var(--color-border-strong);
    --sh-sm: var(--shadow-sm);
    --sh-md: var(--shadow-md);
    --sh-lg: var(--shadow-lg);
    --sh-blue: 0 0 0 3px rgba(26, 54, 93, 0.2);
    --sh-glow: 0 4px 14px rgba(26, 54, 93, 0.15);
    --r-sm: var(--radius-sm);
    --r-md: var(--radius-md);
    --r-lg: var(--radius-lg);
    --r-xl: var(--radius-xl);
    --r-full: var(--radius-full);
    --font: var(--font-body);
    --container: 100%;

    /* ---- Transitions ---- */
    --transition-fast: 100ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;

    /* ---- Z-Index Scale ---- */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
    --z-tooltip: 600;
    --z-accessibility: 700;

    /* ---- Layout ---- */
    --max-width: 100%;
    --header-height: 140px; /* topbar 32px + header 68px + quicknav 40px */
    --header-height-mobile: 68px;
    --bottom-nav-height: 60px;
    --sidebar-width: 260px;

    /* ---- Grid ---- */
    --grid-columns: 12;
    --grid-gap: 12px;
    --grid-gap-sm: 8px;
}

/* ============================================
   PRODUCT IMAGE — transparent white background
   ============================================ */
[data-product-id] img,
.gallery-img,
.view-gallery-item img,
.slot-product-img,
.pcb-comp-img,
.product-thumb,
.pli-img {
    mix-blend-mode: multiply;
}
body.dark-mode [data-product-id] img,
body.dark-mode .gallery-img,
body.dark-mode .view-gallery-item img,
body.dark-mode .slot-product-img,
body.dark-mode .pcb-comp-img,
body.dark-mode .product-thumb,
body.dark-mode .pli-img {
    mix-blend-mode: normal;
}
html.dark .product-thumb {
    mix-blend-mode: normal;
}

/* ============================================
   DARK MODE TOKENS
   ============================================ */
body.dark-mode {
    --color-bg-main: #0F1117;
    --color-bg-white: #1A1D27;
    --color-bg-elevated: #232735;
    --color-bg-sunken: #0A0C12;
    --color-bg-overlay: rgba(0, 0, 0, 0.7);

    --color-text-main: #E8ECF1;
    --color-text-secondary: #94A3B8;
    --color-text-tertiary: #64748B;

    --color-border: #2D3348;
    --color-border-strong: #3D4460;

    --color-price: #E8ECF1;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5), 0 10px 10px rgba(0, 0, 0, 0.2);

    /* Legacy alias overrides for dark mode */
    --c-void: #0F1117;
    --c-dark: #1A1D27;
    --c-panel: #1A1D27;
    --c-rim: #2D3348;
    --c-blue-bg: rgba(43, 108, 176, 0.15);
    --bg: #0F1117;
    --bg-white: #1A1D27;
    --bg-subtle: #0A0C12;
    --tx-1: #E8ECF1;
    --tx-2: #94A3B8;
    --tx-3: #64748B;
    --tx-inv: #0F1117;
    --bd: #2D3348;
    --bd-dark: #3D4460;
    --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --sh-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --sh-lg: 0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.2);

    /* Form inputs */
    --input-bg: #1A1D27;
    --input-border: #2D3348;
    --input-focus-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
body.high-contrast {
    --color-bg-main: #FFFFFF;
    --color-bg-white: #FFFFFF;
    --color-text-main: #000000;
    --color-text-secondary: #000000;
    --color-border: #000000;
    --color-border-strong: #000000;
    --color-primary: #0050CC;
}

body.high-contrast.dark-mode {
    --color-bg-main: #000000;
    --color-bg-white: #000000;
    --color-bg-elevated: #111111;
    --color-text-main: #FFFFFF;
    --color-text-secondary: #FFFFFF;
    --color-border: #FFFFFF;
    --color-primary: #66B3FF;
}

/* ============================================
   BASE RESET & DEFAULTS
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-main);
    background: var(--color-bg-main);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
}

/* ============================================
   UTILITY: SCREEN READER ONLY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */
.font-hebrew { font-family: var(--font-hebrew); }
.font-heading { font-family: var(--font-heading); }
.font-mono { font-family: var(--font-mono); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
/* ---- FORMS ----------------------------------------------------------------- */
.product-form-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}
.product-form-main { min-width: 0; }
.product-form-side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 1.5rem; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .82rem; font-weight: 700; color: var(--text-secondary, #334155); margin-bottom: .45rem; }
.form-label.required::after { content: ' *'; color: #ef4444; }

.form-input {
    display: block; width: 100%;
    padding: .55rem .85rem;
    background: var(--input-bg, #ffffff);
    border: 1.5px solid var(--input-border, #cbd5e1);
    border-radius: var(--r-md, 6px);
    font-size: .875rem; color: var(--tx-1, #0f172a);
    font-family: inherit;
    transition: border-color .12s, box-shadow .12s, background-color .12s;
}
.form-input:focus {
    outline: none;
    border-color: var(--brand-accent, #1d4ed8);
    box-shadow: var(--input-focus-shadow, 0 0 0 2px rgba(29, 78, 216, 0.15));
    background: var(--bg-white, #fff);
}
.form-input.is-error { border-color: #ef4444; background: var(--bg-white, #fff5f5); }
.form-input[readonly] { background: var(--bg-subtle, #f1f5f9); color: var(--text-muted, #64748b); cursor: not-allowed; border-color: var(--bd, #e2e8f0); }

.form-textarea    { height: 200px; resize: vertical; line-height: 1.65; }
.form-textarea-sm { height: 90px; resize: vertical; }
.form-select      { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left .75rem center; padding-left: 2rem; cursor: pointer; }

.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.field-error  { display: block; margin-top: .3rem; font-size: .75rem; color: #ef4444; }
.field-hint   { display: block; margin-top: .3rem; font-size: .75rem; color: var(--text-muted, #64748b); }
.char-count   { display: block; margin-top: .3rem; font-size: .72rem; color: var(--text-muted, #64748b); text-align: left; }

/* Checkboxes */
.form-check     { margin-bottom: .6rem; }
.checkbox-label { display: flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .875rem; color: var(--text-secondary, #334155); }
.checkbox-input { width: 17px; height: 17px; accent-color: var(--brand-accent, #1d4ed8); cursor: pointer; flex-shrink: 0; }

.publish-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.25rem; }
.btn-spinner { display: none; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; }
form.is-loading .btn-spinner { display: inline-block; animation: spin .6s linear infinite; }
form.is-loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Margin preview */
.margin-preview { display: flex; align-items: center; gap: .65rem; margin-top: .6rem; padding: .5rem .75rem; background: var(--bg-subtle, #f8fafc); border-radius: var(--r-md, 6px); font-size: .82rem; border: 1px solid var(--bd, #e2e8f0); }
.margin-label   { color: var(--text-muted, #64748b); }
.margin-value   { font-weight: 700; color: #16a34a; }

/* ---- SPEC BUILDER ---------------------------------------------------------- */
#specsContainer { display: flex; flex-direction: column; gap: .5rem; }
.spec-group     { margin-bottom: .75rem; }
.spec-group-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #64748b); margin-bottom: .4rem; padding-bottom: .3rem; border-bottom: 1px dashed var(--bd, #e2e8f0); }
.spec-row-inner { display: grid; grid-template-columns: 1fr 1.5fr .7fr auto; gap: .4rem; align-items: center; }
.spec-label-input, .spec-value-input, .spec-unit-input { font-size: .82rem; }
.spec-remove-btn { width: 28px; height: 28px; border-radius: 50%; background: none; border: 1px solid #cbd5e1; color: var(--text-muted, #64748b); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; transition: all .12s; }
.spec-remove-btn:hover { border-color: #ef4444; color: #ef4444; background: #fff5f5; }

/* ---- IMAGE UPLOAD ---------------------------------------------------------- */
.image-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: border-color .15s, background .15s;
    cursor: pointer;
    position: relative;
}
.image-upload-zone:hover,
.image-upload-zone.drag-over {
    border-color: var(--brand-accent, #1d4ed8);
    background: var(--brand-accent-glow, rgba(29, 78, 216, 0.05));
}
.file-input-hidden { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-prompt { pointer-events: none; }
.upload-icon  { font-size: 2.5rem; margin-bottom: .6rem; color: #cbd5e1; }
.upload-prompt p { font-size: .875rem; color: var(--text-muted, #64748b); margin: .2rem 0; }
.upload-browse-link { color: var(--brand-accent, #1d4ed8); font-weight: 600; pointer-events: all; cursor: pointer; }
.upload-hint { font-size: .75rem !important; }

.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: .6rem; margin-top: .75rem; }
.preview-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--bg-subtle, #f1f5f9); }
.preview-item img { width: 100%; height: 100%; object-fit: contain; }
.preview-remove { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: none; font-size: .7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Existing images gallery (edit page) */
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: .6rem; margin-bottom: 1rem; }
.gallery-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--bg-subtle, #f8fafc); border: 2px solid var(--bd, #e2e8f0); cursor: grab; transition: border-color .12s; }
.gallery-item.is-primary { border-color: var(--brand-accent, #1d4ed8); }
.gallery-img { width: 100%; height: 100%; object-fit: contain; padding: .3rem; }
.gallery-item-actions { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; gap: .4rem; opacity: 0; transition: opacity .15s; }
.gallery-item:hover .gallery-item-actions { opacity: 1; }
.gallery-set-primary, .gallery-delete { width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); font-size: .8rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gallery-set-primary:disabled { opacity: .4; cursor: not-allowed; }
.gallery-delete:hover { background: #ef4444; color: #fff; }
.primary-badge { position: absolute; bottom: 0; right: 0; left: 0; background: rgba(29,78,216,.85); color: #fff; font-size: .6rem; font-weight: 700; text-align: center; padding: .15rem; }

/* Current image (category/brand) */
.current-image { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.current-image-thumb { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; border: 1px solid var(--bd, #e2e8f0); background: var(--bg-subtle, #f8fafc); padding: .3rem; }

/* ---- EMPTY STATE ----------------------------------------------------------- */
.empty-state { padding: 4rem 2rem; text-align: center; }
.empty-icon  { font-size: 3.5rem; margin-bottom: .75rem; opacity: 0.6; }
.empty-state h3 { font-size: 1.1rem; font-weight: 800; color: var(--text-secondary, #334155); margin-bottom: .5rem; }
.empty-state p  { color: var(--text-muted, #64748b); font-size: .875rem; }

/* ---- STOCK HISTORY --------------------------------------------------------- */
.stock-history         { border: 1px solid var(--bd, #e2e8f0); border-radius: 8px; overflow: hidden; margin-top: .6rem; }
.stock-history-toggle  { padding: .7rem 1rem; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--brand-accent, #1d4ed8); background: var(--bg-subtle, #f8fafc); border: none; width: 100%; text-align: right; }
.stock-mini-move { display: flex; align-items: center; justify-content: space-between; padding: .25rem .5rem; font-size: .78rem; }

/* Product view */
.product-view-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.product-view-main   { min-width: 0; }
.product-view-side   { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 86px; }
.view-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: .5rem; }
.view-gallery-item { border: 2px solid var(--bd, #e2e8f0); border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.view-gallery-item img { width: 100%; height: 100%; object-fit: contain; padding: .4rem; }
.view-gallery-item.is-primary { border-color: var(--brand-accent, #1d4ed8); }
.prose { line-height: 1.75; color: var(--text-secondary, #334155); }
.short-desc { font-weight: 600; margin-bottom: .75rem; color: var(--tx-1, #0f172a); }
.spec-table-group { margin-bottom: 1.5rem; }
.spec-group-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #64748b); margin-bottom: .5rem; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th { text-align: right; padding: .6rem .75rem; font-size: .82rem; font-weight: 700; color: var(--text-secondary, #334155); background: var(--bg-subtle, #f8fafc); width: 40%; border-bottom: 1px solid var(--bd, #e2e8f0); }
.spec-table td { padding: .6rem .75rem; font-size: .82rem; color: var(--tx-1, #0f172a); border-bottom: 1px solid var(--bd, #e2e8f0); }
.spec-unit { font-size: .72rem; color: var(--text-muted, #64748b); margin-right: .2rem; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th { text-align: right; padding: .55rem .75rem; font-size: .78rem; font-weight: 700; color: var(--text-muted, #64748b); background: var(--bg-subtle, #f8fafc); white-space: nowrap; border-bottom: 1px solid var(--bd, #e2e8f0); }
.info-table td { padding: .55rem .75rem; font-size: .82rem; color: var(--tx-1, #0f172a); border-bottom: 1px solid var(--bd, #e2e8f0); }
.price-cell { font-weight: 800; color: var(--tx-1, #0f172a); }
.stock-display { margin-bottom: .25rem; }

/* Product meta info */
.product-meta-info { background: var(--bg-subtle, #f8fafc); border-radius: 8px; padding: .85rem; border: 1px solid var(--bd, #e2e8f0); }
.meta-row { display: flex; justify-content: space-between; font-size: .8rem; padding: .3rem 0; }
.meta-row span:first-child { color: var(--text-muted, #64748b); }
.meta-row span:last-child  { color: var(--text-secondary, #334155); font-weight: 600; }

/* ---- MODAL ----------------------------------------------------------------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: fadein .15s;
}
.modal-overlay[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-box { background: var(--bg-white, #fff); border-radius: var(--r-xl, 10px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); min-width: 320px; max-width: 100%; animation: slideupin .2s ease; overflow: hidden; border: 1px solid var(--bd, #e2e8f0); }
.modal-sm { max-width: 440px; }
@keyframes slideupin { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--bd, #e2e8f0); background: var(--bg-subtle, #fafafa); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: .95rem; font-weight: 800; margin: 0; color: var(--brand-900, #0f172a); }
.modal-close { background: none; border: none; font-size: 1.1rem; color: var(--text-muted, #64748b); cursor: pointer; transition: color 0.12s; }
.modal-close:hover { color: #ef4444; }
.modal-body { padding: 1.5rem; color: var(--text-secondary, #334155); font-size: .875rem; line-height: 1.6; }
.modal-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--bd, #e2e8f0); background: var(--bg-subtle, #fafafa); display: flex; gap: .6rem; justify-content: flex-end; }

/* ---- ALERTS ---------------------------------------------------------------- */
.alert { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-radius: var(--r-md, 6px); margin-bottom: 1.25rem; font-size: .875rem; font-weight: 600; }
.alert-error { background: #fff5f5; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-icon { font-weight: 900; font-size: 1.1rem; }

/* ---- PAGINATION ------------------------------------------------------------ */
.pagination { display: flex; align-items: center; gap: .35rem; padding: 1.25rem 1.5rem; border-top: 1px solid var(--bd, #e2e8f0); flex-wrap: wrap; background: var(--bg-subtle, #fafafa); }
.page-btn {
    min-width: 34px; height: 34px; padding: 0 .6rem;
    background: var(--bg-white, #fff); border: 1px solid #cbd5e1; border-radius: var(--r-md, 6px);
    font-size: .82rem; color: var(--text-secondary, #334155); font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; cursor: pointer;
    transition: all .12s;
}
.page-btn:hover { border-color: var(--brand-accent, #1d4ed8); color: var(--brand-accent, #1d4ed8); background: var(--bg-subtle, #f8fafc); }
.page-btn.active { background: var(--brand-accent, #1d4ed8); color: #fff; border-color: var(--brand-accent, #1d4ed8); }
.page-info { font-size: .78rem; color: var(--text-muted, #64748b); padding: 0 .5rem; font-weight: 500; }

/* Category tree */
.tree-indent { color: #cbd5e1; margin-left: .5rem; }

/* ---- MISC ------------------------------------------------------------------ */
.text-success { color: #16a34a; }
.text-danger  { color: #dc2626; }
.text-muted   { color: var(--text-muted, #64748b); }
.text-sm      { font-size: .82rem; }
.text-center  { text-align: center; }
@media (max-width: 900px) {
    .product-form-layout { grid-template-columns: 1fr; }
    .product-form-side { position: static; }
    .product-view-layout { grid-template-columns: 1fr; }
    .product-view-side { position: static; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
    .spec-row-inner { grid-template-columns: 1fr 1fr auto; }
    .spec-unit-input { display: none; }
}

@media (max-width: 600px) {
    .form-row-3 { grid-template-columns: 1fr; }
    .filter-row { flex-direction: column; align-items: stretch; }
    .search-box { min-width: 100%; }
    .modal-box { min-width: unset; width: 100%; max-width: 100%; border-radius: 14px 14px 0 0; position: fixed; bottom: 0; }
    .modal-overlay { align-items: flex-end; }
}

/* --- Order view tfoot ---------------------------------------------------- */
.data-table tfoot tr td {
    padding: .6rem 1.25rem;
    border-bottom: none;
    font-size: .85rem;
}
.data-table tfoot .totals-foot-row:first-child td { border-top: 2px solid #cbd5e1; }

/* ========================================== */
/* FILE: orders.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Orders Management CSS
   /assets/css/orders.css
   ============================================================================= */

/* ---- ORDER STATS ROW ------------------------------------------------------- */
.order-stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 1100px) { .order-stats-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 650px)  { .order-stats-row { grid-template-columns: repeat(2, 1fr); } }

.ostat-card {
    background: var(--bg-white, #fff);
    border: 1px solid var(--bd, #e2e8f0);
    border-radius: var(--r-lg, 8px);
    padding: 1.1rem 1.25rem;
    text-align: right; /* RTL friendly layout */
    box-shadow: 0 1px 3px rgba(0,0,0,.02);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ostat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}
.ostat-warn { border-right: 3px solid #f59e0b; border-left: none; }
.ostat-revenue { border-right: 3px solid var(--brand-accent, #1d4ed8); border-left: none; }
.ostat-num   { font-size: 1.4rem; font-weight: 800; color: var(--tx-1, #0f172a); line-height: 1.25; }
.ostat-label { font-size: .75rem; color: var(--text-muted, #64748b); margin-top: .3rem; font-weight: 600; }

/* ---- ORDER STATUS BADGE ---------------------------------------------------- */
.order-status-badge {
    display: inline-block;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
.order-status-badge-lg {
    font-size: .9rem;
    padding: .35rem 1rem;
}

/* ---- ORDER LIST ------------------------------------------------------------ */
.order-num-link {
    font-weight: 700;
    color: var(--brand-accent, #1d4ed8);
    font-family: monospace;
    font-size: .88rem;
    text-decoration: none;
}
.order-num-link:hover { text-decoration: underline; }
.order-customer-name  { font-weight: 600; font-size: .88rem; color: var(--tx-1, #0f172a); }

/* ---- ORDER VIEW LAYOUT ----------------------------------------------------- */
.order-view-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.order-view-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 86px;
}

/* ---- STATUS TIMELINE ------------------------------------------------------- */
.status-timeline {
    padding: .5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.timeline-row {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .65rem 0;
    border-right: 2px solid #e2e8f0;
    padding-right: 1.25rem;
    margin-right: .4rem;
    position: relative;
}
.timeline-row:last-child { border-right-color: transparent; }
.timeline-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: absolute;
    right: -7px;
    top: .85rem;
    background: var(--bg-white, #fff);
    border: 2px solid var(--brand-accent, #1d4ed8);
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12);
}
.timeline-content { flex: 1; min-width: 0; }
.timeline-status { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.timeline-from   { font-size: .8rem; color: var(--text-muted, #64748b); font-weight: 500; }
.timeline-note   { font-size: .8rem; color: var(--text-secondary, #334155); margin-top: .3rem; background: var(--bg-subtle, #f8fafc); border-radius: var(--r-sm, 4px); padding: .3rem .6rem; border: 1px solid var(--bd, #e2e8f0); }
.timeline-meta   { margin-top: .2rem; }

/* ---- TOTALS TABLE (in items card) ----------------------------------------- */
.data-table tfoot tr td {
    padding: .6rem 1.25rem;
    border-bottom: none;
    font-size: .85rem;
    border-top: 1px solid var(--bd, #e2e8f0);
}
.totals-foot-row td { color: var(--text-secondary, #334155); }
.totals-foot-total td { font-weight: 800; border-top: 2px solid #cbd5e1 !important; color: var(--tx-1, #0f172a); }
.discount-row td { color: #16a34a; }
.text-left { text-align: right !important; }

/* ---- SHIPPING ADDRESS DISPLAY --------------------------------------------- */
.shipping-address-display {
    font-style: normal;
    line-height: 1.9;
    font-size: .875rem;
    color: var(--text-secondary, #334155);
}

/* ---- ADMIN NOTES ---------------------------------------------------------- */
.note-add-form { border-bottom: 1px solid var(--bd, #e2e8f0); padding-bottom: 1.5rem; }
.notes-list    { display: flex; flex-direction: column; gap: .75rem; }

.note-item {
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--bd, #e2e8f0);
    border-radius: var(--r-md, 6px);
    padding: .85rem 1.1rem;
}
.note-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .45rem;
    flex-wrap: wrap;
}
.note-author        { font-weight: 700; font-size: .82rem; color: var(--tx-1, #0f172a); }
.note-date          { margin-right: auto; font-size: .78rem; color: var(--text-muted, #64748b); }
.note-actions-btns  { display: flex; gap: .25rem; }
.note-body          { font-size: .875rem; color: var(--text-secondary, #334155); line-height: 1.6; white-space: pre-wrap; }

.note-editing .note-body { display: none; }
.note-edit-form     { display: none; }
.note-editing .note-edit-form { display: block; }

/* ---- STATUS CHANGE FORM --------------------------------------------------- */
.current-status-display { margin-bottom: .25rem; }
.status-change-form .form-group { margin-bottom: .75rem; }

/* ---- QUICK ACTIONS -------------------------------------------------------- */
.quick-actions-list { display: flex; flex-direction: column; gap: .5rem; }
.btn-danger-outline { color: #ef4444; border-color: #fecaca; background: var(--bg-white, #fff); }
.btn-danger-outline:hover { border-color: #ef4444; background: #fff5f5; color: #ef4444; }

/* ---- TRACKING ------------------------------------------------------------ */
.tracking-update-form .form-group { margin-bottom: .6rem; }

/* ---- SHIPPING METHOD TAG -------------------------------------------------- */
.shipping-method-tag { margin-top: .6rem; }

/* ---- BULK ACTION TOOLBAR -------------------------------------------------- */
.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--brand-900, #0f172a);
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: var(--r-lg, 8px);
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(15,23,42,.12);
    animation: slideDown .25s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bulk-count {
    font-weight: 700;
    font-size: .88rem;
    margin-left: auto;
}
.btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: .4rem .9rem;
    border-radius: var(--r-sm, 4px);
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s;
}
.btn-danger:hover { background: #dc2626; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* Row hover with checkbox */
.row-select { cursor: pointer; }
tr:has(.row-select:checked) td {
    background: rgba(29, 78, 216, 0.05) !important;
}

/* Responsive */
@media (max-width: 900px) {
    .order-view-layout {
        grid-template-columns: 1fr;
    }
    .order-view-side { position: static; }
}


/* ========================================== */
/* FILE: quotes.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Quotes CSS
   /assets/css/quotes.css
   ============================================================================= */

/* ---- PUBLIC QUOTE PAGE ---------------------------------------------------- */
.quote-public-wrap { padding: 2rem 1.25rem 3rem; max-width: 900px; margin: 0 auto; }
.quote-public-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.quote-public-title { font-size: 1.6rem; font-weight: 900; }
.quote-public-num   { font-size: .88rem; color: var(--text-muted,#64748b); margin-top: .2rem; font-family: monospace; }
.quote-public-card  {
    background: var(--bg-card,#fff);
    border: 1px solid var(--border,#e2e8f0);
    border-radius: 14px; overflow: hidden; margin-bottom: 1.25rem;
}
.quote-public-section-title { font-size: 1rem; font-weight: 700; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border,#e2e8f0); }
.quote-public-notes { padding: 1rem 1.25rem; border-top: 1px solid var(--border,#e2e8f0); }
.quote-public-notes h3 { font-size: .9rem; font-weight: 700; margin-bottom: .4rem; }
.quote-public-notes p  { font-size: .88rem; color: var(--text-secondary,#334155); line-height: 1.7; }
.quote-public-actions  { display: flex; gap: .75rem; flex-wrap: wrap; padding: 1rem 0; }

/* ---- QUOTE PRODUCT SEARCH (admin form) ------------------------------------ */
.quote-product-search { position: relative; }
.quote-search-dropdown {
    position: absolute; top: 100%; right: 0; left: 0; z-index: 500;
    background: var(--bg-card,#fff);
    border: 1px solid var(--border,#e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
    max-height: 300px; overflow-y: auto;
}
.qsd-item {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem .85rem;
    border-bottom: 1px solid var(--border,#e2e8f0);
    cursor: pointer; font-size: .85rem;
    transition: background .1s;
}
.qsd-item:last-child { border-bottom: none; }
.qsd-item:hover { background: var(--bg-page,#f8fafc); }
.qsd-name  { font-weight: 600; flex: 1; }
.qsd-sku   { font-size: .72rem; color: var(--text-muted,#64748b); font-family: monospace; }
.qsd-price { font-weight: 800; color: var(--brand-accent,#1d4ed8); white-space: nowrap; }
.qsd-brand { font-size: .72rem; color: var(--text-muted,#64748b); }

/* Item rows live total */
.item-line-total { color: var(--text-primary,#0f172a); }

/* ---- DATA TABLE tfoot for quotes ------------------------------------------ */
.data-table tfoot td { padding: .5rem 1rem; font-size: .88rem; }
.data-table tfoot tr:last-child td { font-size: 1rem; border-top: 2px solid var(--border,#e2e8f0); padding-top: .65rem; }


/* ========================================== */
/* FILE: payments.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Payments CSS
   /assets/css/payments.css
   ============================================================================= */

/* ---- PAYMENT PAGE LAYOUT -------------------------------------------------- */
.payment-page-wrap { padding: 1.5rem 1.25rem 3rem; max-width: 1100px; margin: 0 auto; }
.payment-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

/* ---- GATEWAY SELECTION ---------------------------------------------------- */
.payment-methods-card {
    background: var(--bg-white, #fff);
    border: 1px solid var(--bd, #e2e8f0);
    border-radius: 14px;
    padding: 1.5rem;
}
.payment-methods-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }

.payment-gateway-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.25rem; }

.payment-gw-option {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .9rem 1rem;
    border: 1.5px solid var(--bd, #e2e8f0);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}
.payment-gw-option:hover,
.payment-gw-option:has(.payment-gw-radio:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}
.payment-gw-radio { width: 17px; height: 17px; accent-color: #2563eb; flex-shrink: 0; cursor: pointer; }
.gw-icon          { font-size: 1.4rem; }
.gw-info          { flex: 1; }
.gw-name          { font-weight: 700; font-size: .9rem; }
.gw-desc          { margin-top: .1rem; }

.installments-section { margin: .75rem 0; }

/* Payment submit button */
.btn-payment-submit {
    width: 100%; padding: .95rem;
    font-size: 1rem; font-weight: 800;
    letter-spacing: .01em;
    position: relative;
}
.pay-btn-spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%,-50%);
    animation: spin .6s linear infinite;
}
.is-submitting .pay-btn-text   { visibility: hidden; }
.is-submitting .pay-btn-spinner { display: block; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.payment-security-note { text-align: center; font-size: .75rem; color: var(--tx-3, #94a3b8); margin-top: .75rem; }

/* ---- PAYMENT INSTRUCTION CARDS ------------------------------------------- */
.payment-instruction-card {
    background: var(--bg-white, #fff);
    border: 1px solid var(--bd, #e2e8f0);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.pic-icon  { font-size: 3rem; }
.payment-instruction-card h2 { font-size: 1.25rem; font-weight: 800; }

/* Bit specific */
.bit-amount-display {
    font-size: 2rem; font-weight: 900;
    color: #2563eb;
}
.bit-qr { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.bit-qr img { border-radius: 8px; border: 1px solid var(--bd); }
.bit-phone-display {
    font-size: .95rem; font-weight: 600;
}
.payment-instructions-text {
    font-size: .88rem; color: var(--tx-2, #334155);
    line-height: 1.9; text-align: right; white-space: pre-line;
    background: var(--bg-subtle, #f8fafc);
    border-radius: 8px; padding: .85rem 1rem;
    width: 100%; max-width: 360px;
}
.payment-ref-note {
    font-size: .9rem;
    background: #fef9c3; border: 1px solid #fcd34d;
    border-radius: 8px; padding: .5rem 1rem;
}
.payment-confirm-note { font-size: .8rem; color: var(--tx-3, #94a3b8); }

/* Phone */
.phone-number-display {
    font-size: 1.5rem; font-weight: 900;
    font-family: monospace;
    letter-spacing: .05em;
    color: #2563eb;
    padding: .65rem 1.5rem;
    background: #eff6ff; border-radius: 8px;
}

/* Bank */
.bank-details-table { width: 100%; max-width: 380px; border-collapse: collapse; }
.bdt-row {
    display: flex; justify-content: space-between;
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--bd, #e2e8f0);
    font-size: .88rem;
}
.bdt-row:last-child { border-bottom: none; }
.bdt-row span  { color: var(--tx-3, #94a3b8); }
.bdt-row strong { font-family: monospace; }
.bdt-amount { background: #f0fdf4; }
.bdt-amount span, .bdt-amount strong { color: #16a34a; font-weight: 800; }
.bdt-ref { background: #fef9c3; }
.bdt-ref strong { color: #92400e; }

.payment-back-btn { margin-top: 1rem; }

/* ---- PAYMENT SUMMARY SIDEBAR ---------------------------------------------- */
.payment-summary { position: sticky; top: calc(68px + 48px + 1rem); }
.payment-summary-card {
    background: var(--bg-white, #fff);
    border: 1px solid var(--bd, #e2e8f0);
    border-radius: 14px;
    padding: 1.25rem;
}
.payment-summary-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: .75rem; }
.payment-summary-row {
    display: flex; justify-content: space-between;
    font-size: .85rem; color: var(--tx-2, #334155);
    padding: .3rem 0;
    border-bottom: 1px solid var(--bg-subtle, #f1f5f9);
}
.payment-summary-total {
    display: flex; justify-content: space-between;
    font-size: 1rem; font-weight: 800;
    padding: .65rem 0 0;
    border-top: 2px solid var(--bd, #e2e8f0);
    margin-top: .35rem;
    color: #2563eb;
}

/* ---- PAYMENT RESULT (success / failed) ------------------------------------ */
.payment-result-wrap { padding: 3rem 1.25rem; display: flex; justify-content: center; }
.payment-result-card {
    max-width: 460px; width: 100%;
    text-align: center;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--bd, #e2e8f0);
}
.payment-result-success { background: linear-gradient(145deg, #f0fdf4, #fff); }
.payment-result-failed  { background: linear-gradient(145deg, #fef2f2, #fff); }
.prr-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    font-size: 2rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    animation: prPop .45s cubic-bezier(.34,1.56,.64,1);
}
.payment-result-success .prr-icon { background: #dcfce7; color: #16a34a; }
.payment-result-failed  .prr-icon { background: #fee2e2; color: #dc2626; }
@keyframes prPop { from{transform:scale(0);opacity:0;} to{transform:scale(1);opacity:1;} }
.payment-result-card h1 { font-size: 1.5rem; font-weight: 900; margin-bottom: .5rem; }
.payment-result-card p  { color: var(--tx-2, #334155); margin-bottom: .35rem; }
.prr-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---- RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 900px) {
    .payment-layout { grid-template-columns: 1fr; }
    .payment-summary { position: static; }
}
@media (max-width: 480px) {
    .payment-instruction-card { padding: 1.25rem 1rem; }
    .bdt-row { flex-direction: column; gap: .2rem; }
}


/* ========================================== */
/* FILE: cart.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Cart & Checkout CSS
   /assets/css/cart.css  (also used by checkout.css via @import in pages)
   RTL Hebrew | Mobile-first
   ============================================================================= */

/* ---- CART PAGE ------------------------------------------------------------- */
.cart-page-wrap { padding-bottom: 3rem; }

.empty-cart-state {
    text-align: center;
    padding: 5rem 2rem;
}
.empty-cart-icon  { font-size: 5rem; margin-bottom: 1.25rem; }
.empty-cart-state h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: .65rem; }
.empty-cart-state p  { color: var(--tx-3); margin-bottom: 1.5rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* Free shipping banner */
.free-ship-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--c-blue-bg);
    border: 1px solid var(--bd);
    border-radius: var(--r-md);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    font-size: .88rem;
    flex-wrap: wrap;
}
.free-ship-banner strong { color: var(--c-blue); }
.free-ship-icon { font-size: 1.1rem; }
.free-ship-achieved { background: #f0fdf4; border-color: #bbf7d0; }
.free-ship-achieved strong { color: #166534; }
.free-ship-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    flex: 1;
    min-width: 100px;
    overflow: hidden;
}
.free-ship-progress {
    height: 100%;
    background: var(--c-blue);
    border-radius: 3px;
    transition: width .4s ease;
}

/* Cart layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.75rem;
    align-items: start;
}

/* Cart table */
.cart-table-wrap { overflow-x: auto; }
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--bd);
}
.cart-table thead th {
    padding: .7rem 1rem;
    background: var(--bg-subtle);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tx-3);
    text-align: right;
    border-bottom: 1px solid var(--bd);
}
.cart-table tbody td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--bg-subtle);
    vertical-align: middle;
}
.cart-table tbody tr:last-child td { border-bottom: none; }
.cart-table tbody tr:hover { background: var(--bg-subtle); }
.cart-row-warning { background: #fffbeb; }
.cart-row-warning:hover { background: #fef3c7 !important; }

/* Column sizes */
.ct-img    { width: 70px; }
.ct-name   { min-width: 180px; }
.ct-price  { width: 110px; white-space: nowrap; }
.ct-qty    { width: 130px; }
.ct-total  { width: 110px; white-space: nowrap; font-weight: 700; }
.ct-remove { width: 44px; text-align: center; }

.cart-item-img {
    width: 56px; height: 56px;
    object-fit: contain;
    border-radius: var(--r-sm);
    background: #ffffff;
    border: 1px solid var(--bd);
    padding: .25rem;
}
.cart-item-img-ph {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: #ffffff;
    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    font-size: 1.5rem;
    color: var(--tx-3);
}

.cart-item-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--tx-1);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-item-name:hover { color: var(--c-blue); }
.cart-item-sku { font-size: .72rem; color: var(--tx-3); margin-top: .2rem; }
.cart-item-warning {
    font-size: .75rem;
    color: #92400e;
    background: #fef9c3;
    padding: .15rem .4rem;
    border-radius: 4px;
    margin-top: .3rem;
    display: inline-block;
}

.cart-price-current { font-weight: 700; }
.cart-price-original { font-size: .75rem; color: var(--tx-3); text-decoration: line-through; display: block; }

/* Qty selector */
.cart-qty-selector {
    display: flex;
    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    overflow: hidden;
    width: fit-content;
}
.cart-qty-btn {
    width: 28px; height: 32px;
    background: var(--bg-subtle);
    border: none; font-size: 1rem; font-weight: 700;
    color: var(--tx-2); cursor: pointer;
    transition: background var(--t), color var(--t);
    flex-shrink: 0;
}
.cart-qty-btn:hover { background: var(--c-blue-lt); color: #fff; }
.cart-qty-input {
    width: 44px; height: 32px;
    border: none;
    border-left: 1px solid var(--bd); border-right: 1px solid var(--bd);
    text-align: center;
    font-size: .88rem; font-weight: 700;
    background: var(--bg-white);
    color: var(--tx-1);
}
.cart-qty-input:focus { outline: none; background: var(--c-blue-bg); }

/* Remove button */
.cart-remove-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: none; border: 1px solid var(--bd);
    color: var(--tx-3); font-size: .8rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t);
}
.cart-remove-btn:hover { border-color: #ef4444; color: #ef4444; background: #fee2e2; }

/* Cart actions */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .75rem;
    gap: .75rem;
}
.btn-danger-outline { color: #ef4444; border-color: #fca5a5; }
.btn-danger-outline:hover { border-color: #ef4444; background: #fee2e2; }

/* ---- CART SUMMARY ---------------------------------------------------------- */
.cart-summary { position: sticky; top: calc(68px + 48px + 1rem); }
.cart-summary-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.cart-summary-title { font-size: 1rem; font-weight: 800; }

/* Coupon */
.coupon-section { }
.coupon-input-row { display: flex; gap: .5rem; }
.coupon-input {
    flex: 1;
    padding: .55rem .85rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-sm);
    font-size: .88rem; dir: ltr;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: border-color var(--t);
}
.coupon-input:focus { outline: none; border-color: var(--c-blue); }
.coupon-btn {
    padding: .55rem 1rem;
    background: var(--c-blue); color: #fff;
    border: none; border-radius: var(--r-sm);
    font-weight: 600; font-size: .85rem;
    cursor: pointer; white-space: nowrap;
    transition: background var(--t);
}
.coupon-btn:hover { background: var(--c-blue-lt); }
.coupon-applied {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: .5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--r-sm);
    padding: .4rem .65rem;
    font-size: .82rem;
}
.coupon-applied-code { color: #166534; font-weight: 600; }
.coupon-remove-btn {
    background: none; border: none;
    color: #6b7280; cursor: pointer; font-size: .85rem;
    padding: 0 .2rem;
}
.coupon-remove-btn:hover { color: #ef4444; }
.coupon-msg {
    font-size: .8rem;
    min-height: 1.1rem;
    margin-top: .3rem;
    transition: color .15s;
}

/* Totals */
.cart-totals-breakdown { display: flex; flex-direction: column; gap: .5rem; }
.totals-row {
    display: flex; justify-content: space-between;
    font-size: .88rem; color: var(--tx-2);
    padding: .25rem 0;
}
.totals-row-discount { color: #16a34a; font-weight: 500; }
.totals-row-discount .discount-amount { font-weight: 700; }
.totals-row-ship  { color: var(--tx-3); }
.shipping-estimate { font-style: italic; font-size: .8rem; }
.totals-row-total {
    font-size: 1.05rem; font-weight: 800;
    border-top: 2px solid var(--bd);
    padding-top: .65rem;
    margin-top: .25rem;
}
.total-amount { color: var(--c-blue); }
.totals-vat-note { font-size: .72rem; color: var(--tx-3); text-align: left; }

.btn-checkout {
    padding: .85rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.cart-security-note {
    text-align: center;
    font-size: .75rem;
    color: var(--tx-3);
}
.payment-icons { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.payment-badge {
    padding: .2rem .5rem;
    border: 1px solid var(--bd);
    border-radius: 4px;
    font-size: .65rem; font-weight: 700;
    color: var(--tx-3);
}

/* ---- CHECKOUT PAGE --------------------------------------------------------- */
.checkout-wrap { padding-bottom: 3rem; }

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.75rem;
    align-items: start;
    margin-top: 1rem;
}

/* Checkout card */
.checkout-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-md);
    margin-bottom: 1rem;
    overflow: hidden;
}
.checkout-card-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bd);
    background: var(--bg-subtle);
}
.checkout-card-head h2 { font-size: .95rem; font-weight: 700; margin: 0; }
.checkout-step-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--c-blue-lt); color: #fff;
    font-size: .78rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.optional-label { font-size: .78rem; font-weight: 400; color: var(--tx-3); }
.checkout-card-body { padding: 1.25rem 1.5rem; }

/* Form rows */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-street { display: grid; grid-template-columns: 1fr 100px; gap: 1rem; }

/* Shipping methods */
.shipping-methods-list { display: flex; flex-direction: column; gap: .6rem; }
.shipping-method-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
}
.shipping-method-option:hover { border-color: var(--c-blue-lt); background: var(--c-blue-bg); }
.shipping-method-option.selected,
.shipping-method-option:has(.shipping-radio:checked) {
    border-color: var(--c-blue-lt);
    background: var(--c-blue-bg);
}
.shipping-radio { width: 17px; height: 17px; accent-color: var(--c-blue); flex-shrink: 0; cursor: pointer; }
.shipping-method-info { flex: 1; min-width: 0; }
.shipping-method-name { font-weight: 700; font-size: .9rem; }
.shipping-method-desc { font-size: .78rem; color: var(--tx-3); margin-top: .15rem; }
.shipping-method-eta  { font-size: .75rem; color: var(--tx-3); margin-top: .15rem; }
.shipping-method-cost { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.shipping-free { color: #16a34a; }

/* Payment methods */
.payment-methods-list { display: flex; flex-direction: column; gap: .6rem; }
.payment-method-option {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
}
.payment-method-option:hover,
.payment-method-option:has(.payment-radio:checked) {
    border-color: var(--c-blue-lt);
    background: var(--c-blue-bg);
}
.payment-radio { width: 17px; height: 17px; accent-color: var(--c-blue); flex-shrink: 0; cursor: pointer; }
.payment-option-icon { font-size: 1.3rem; }
.payment-option-info { flex: 1; }
.payment-option-name { font-weight: 700; font-size: .9rem; }
.payment-option-desc { font-size: .78rem; color: var(--tx-3); margin-top: .15rem; }

.payment-future-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .65rem;
    border: 1.5px dashed var(--bd);
    border-radius: var(--r-md);
    opacity: .6;
}
.payment-future-item { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--tx-3); }
.future-badge {
    font-size: .62rem;
    background: var(--bg-subtle);
    color: var(--tx-3);
    padding: .1rem .4rem;
    border-radius: var(--r-full);
    font-weight: 600;
}

/* Checkout summary */
.checkout-summary-sticky { position: sticky; top: calc(68px + 48px + 1rem); }
.checkout-summary-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.summary-title { font-size: 1rem; font-weight: 800; }

/* Items in checkout summary */
.checkout-items-list { display: flex; flex-direction: column; gap: .65rem; max-height: 300px; overflow-y: auto; }
.checkout-item-row { display: flex; align-items: center; gap: .75rem; }
.checkout-item-img-wrap { position: relative; flex-shrink: 0; }
.checkout-item-img {
    width: 48px; height: 48px;
    object-fit: contain;
    border-radius: var(--r-sm);
    background: #ffffff;
    border: 1px solid var(--bd);
    padding: .2rem;
}
.checkout-item-img-ph {
    width: 48px; height: 48px;
    background: #ffffff;
    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--tx-3);
}
.checkout-item-qty-badge {
    position: absolute;
    top: -6px; left: -6px;
    width: 20px; height: 20px;
    background: var(--tx-3); color: #fff;
    border-radius: 50%;
    font-size: .65rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-white);
}
.checkout-item-name { flex: 1; font-size: .82rem; font-weight: 500; line-height: 1.4; }
.checkout-item-price { font-weight: 700; font-size: .88rem; white-space: nowrap; }

/* Summary totals */
.summary-totals { display: flex; flex-direction: column; gap: .4rem; border-top: 1px solid var(--bd); padding-top: .85rem; }
.summary-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--tx-2); }
.summary-row-discount { color: #16a34a; }
.discount-val { font-weight: 700; }
.summary-row-ship { color: var(--tx-3); }
.summary-total-row { font-size: 1rem; font-weight: 800; border-top: 2px solid var(--bd); padding-top: .65rem; margin-top: .25rem; }
.summary-total-val { color: var(--c-blue); }
.summary-vat { font-size: .72rem; color: var(--tx-3); text-align: left; }

/* Place order button */
.btn-place-order { padding: .95rem; font-size: 1rem; font-weight: 800; letter-spacing: .01em; position: relative; }
.btn-order-spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%,-50%);
}
.is-submitting .btn-order-text { visibility: hidden; }
.is-submitting .btn-order-spinner { display: block; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.checkout-security-note { text-align: center; font-size: .75rem; color: var(--tx-3); }

/* payment instructions */
.payment-instructions {
    margin-top: .75rem;
    padding: .75rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--r-sm);
    font-size: .82rem;
    line-height: 1.7;
}
.payment-instructions code {
    background: var(--bg-white, #fff);
    padding: .1rem .35rem;
    border-radius: 3px;
    font-family: monospace;
    font-weight: 700;
}

/* ---- ORDER SUCCESS --------------------------------------------------------- */
.order-success-wrap { padding-bottom: 3rem; }
.success-hero { text-align: center; padding: 2.5rem 1rem 2rem; }
.success-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 2.2rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    animation: successPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes successPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-title { font-size: 1.75rem; font-weight: 900; margin-bottom: .5rem; }
.order-number-display { color: var(--c-blue); }
.success-sub   { color: var(--tx-2); margin-bottom: .35rem; }
.success-email-note { font-size: .85rem; color: var(--tx-3); }

.order-success-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.75rem;
    align-items: start;
    margin-top: 1.5rem;
}

.order-detail-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-xl);
    overflow: hidden;
}
.order-card-title { font-size: 1rem; font-weight: 700; padding: 1rem 1.5rem; border-bottom: 1px solid var(--bd); background: var(--bg-subtle); }

.order-items-list { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: .85rem; }
.order-success-item { display: flex; align-items: center; gap: .85rem; }
.osi-img-wrap { flex-shrink: 0; }
.osi-img {
    width: 56px; height: 56px;
    object-fit: contain; border-radius: var(--r-sm);
    background: var(--bg-subtle); padding: .25rem;
}
.osi-img-ph { width: 56px; height: 56px; background: var(--bg-subtle); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--tx-3); }
.osi-info { flex: 1; min-width: 0; }
.osi-name { font-weight: 600; font-size: .9rem; }
.osi-price { font-weight: 800; font-size: .9rem; white-space: nowrap; }

.order-success-totals { padding: 1rem 1.5rem; border-top: 1px solid var(--bd); background: var(--bg-subtle); display: flex; flex-direction: column; gap: .4rem; }
.ost-row { display: flex; justify-content: space-between; font-size: .88rem; }
.ost-discount { color: #16a34a; }
.ost-total { font-size: 1rem; font-weight: 800; border-top: 1px solid var(--bd); padding-top: .5rem; margin-top: .2rem; }
.ost-total span:last-child { color: var(--c-blue); }

.order-info-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.order-info-card { background: var(--bg-white); border: 1px solid var(--bd); border-radius: var(--r-xl); overflow: hidden; }
.oic-title { font-size: .88rem; font-weight: 700; padding: .75rem 1rem; border-bottom: 1px solid var(--bd); background: var(--bg-subtle); }
.oic-table { width: 100%; border-collapse: collapse; }
.oic-table th, .oic-table td { padding: .5rem 1rem; font-size: .82rem; border-bottom: 1px solid var(--bd); }
.oic-table th { font-weight: 600; color: var(--tx-3); background: var(--bg-subtle); text-align: right; width: 35%; }
.oic-table tr:last-child th, .oic-table tr:last-child td { border-bottom: none; }
.badge-pending { background: #fef3c7; color: #92400e; font-size: .75rem; padding: .2rem .55rem; border-radius: var(--r-full); font-weight: 700; }

.order-success-actions { display: flex; flex-direction: column; gap: .6rem; }

/* ---- FORM HELPERS (used in checkout) --------------------------------------- */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--tx-2); margin-bottom: .4rem; }
.form-label.required::after { content: ' *'; color: #ef4444; }
.form-input {
    display: block; width: 100%;
    padding: .6rem .85rem;
    background: #ffffff;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-sm);
    font-size: .9rem; color: var(--tx-1);
    font-family: inherit;
    transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus { outline: none; border-color: var(--c-blue-lt); box-shadow: var(--sh-blue); background: var(--bg-white); }
.form-input.is-error { border-color: #ef4444; background: var(--bg-white, #fff5f5); }
.form-textarea-sm { height: 88px; resize: vertical; line-height: 1.65; }
.field-error { display: block; margin-top: .3rem; font-size: .75rem; color: #ef4444; font-weight: 500; }
.alert { display: flex; align-items: center; gap: .65rem; padding: .9rem 1.1rem; border-radius: var(--r-md); margin-bottom: 1.25rem; font-size: .875rem; font-weight: 500; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-icon { font-weight: 900; }

/* ---- RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 1023px) {
    .cart-layout,
    .checkout-layout,
    .order-success-layout {
        grid-template-columns: 1fr;
    }
    .cart-summary { position: static; }
    .checkout-summary-sticky { position: static; }
}

@media (max-width: 767px) {
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr {
        border: 1px solid var(--bd);
        border-radius: var(--r-md);
        margin-bottom: .75rem;
        padding: .75rem;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        align-items: flex-start;
    }
    .ct-img    { width: 64px; flex-shrink: 0; }
    .ct-name   { flex: 1; min-width: 0; }
    .ct-price, .ct-qty, .ct-total, .ct-remove { width: auto; padding: 0; border: none; }
    .ct-remove { position: absolute; top: .6rem; left: .6rem; }

    .form-row-2 { grid-template-columns: 1fr; }
    .form-row-street { grid-template-columns: 1fr 80px; }

    .checkout-items-list { max-height: 220px; }

    .payment-future-row { flex-direction: column; }
}

@media (max-width: 480px) {
    .cart-layout, .checkout-layout, .order-success-layout { gap: 1rem; }
    .checkout-card-body { padding: 1rem; }
    .cart-summary-card, .checkout-summary-card { padding: 1rem; }
}


/* ========================================== */
/* FILE: catalog.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Catalog Page CSS
   /assets/css/catalog.css
   Provides CSS variables and layout rules for the category/catalog page.
   Does NOT include a universal reset (that's handled by design-compiled.css).
   Applied: June 2026
   ============================================================================= */

/* Design system tokens inherited from frontend.css */

/* ---- CONTAINER ------------------------------------------------------------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- UTILITIES ------------------------------------------------------------- */
.text-sm   { font-size: .82rem; }
.text-muted { color: var(--tx-3); }

/* ---- BUTTONS (Catalog Context) --------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.5rem;
    background: var(--c-blue);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary:hover { background: var(--c-blue-lt); color: #fff; text-decoration: none; box-shadow: var(--sh-glow); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.5rem;
    background: transparent;
    color: var(--tx-2);
    border: 1.5px solid var(--bd-dark);
    border-radius: var(--r-md);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t);
    text-decoration: none;
}
.btn-outline:hover { border-color: var(--c-blue); color: var(--c-blue); background: var(--c-blue-bg); text-decoration: none; }

.btn-block { width: 100%; }
.btn-sm    { padding: .45rem 1rem; font-size: .84rem; }

/* ---- BREADCRUMB ------------------------------------------------------------ */
.page-breadcrumb { padding: 1rem 0; }
.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
    font-size: .84rem;
    color: var(--tx-3);
    list-style: none;
    margin: 0;
    padding: 0;
}
.breadcrumb-list a { color: var(--tx-3); transition: color var(--t); }
.breadcrumb-list a:hover { color: var(--c-blue); text-decoration: none; }
.breadcrumb-list [aria-current="page"] { color: var(--tx-1); font-weight: 600; }
.breadcrumb-sep { color: var(--bd-dark); font-size: .75rem; }

/* ---- CATALOG HEADER -------------------------------------------------------- */
.catalog-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.catalog-title  { font-size: 1.75rem; font-weight: 900; color: var(--tx-1); letter-spacing: -0.02em; margin: 0; }
.catalog-desc   { font-size: .9rem; color: var(--tx-3); margin-top: .35rem; line-height: 1.5; }
.catalog-result-count { font-size: .88rem; color: var(--tx-3); white-space: nowrap; font-weight: 500; }

/* ---- SUBCATEGORY CHIPS ----------------------------------------------------- */
.subcategory-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: 1.25rem;
}
.sub-chip {
    padding: .4rem 1rem;
    border: 1px solid var(--bd);
    border-radius: var(--r-full);
    font-size: .84rem;
    color: var(--tx-2);
    text-decoration: none;
    background: var(--bg-white);
    transition: all var(--t);
    box-shadow: var(--sh-sm);
    font-weight: 600;
    display: inline-block;
}
.sub-chip:hover {
    border-color: var(--c-blue);
    background: var(--c-blue-bg);
    color: var(--c-blue);
    text-decoration: none;
}

/* ---- CATALOG LAYOUT (2-column grid: sidebar + products) -------------------- */
.catalog-layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: 1.75rem;
    align-items: start;
}

/* ---- FILTERS SIDEBAR ------------------------------------------------------- */
.filters-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--radius-lg);
    padding: 1rem; /* tighter padding */
    box-shadow: var(--shadow-sm);
    /* Constrain height so it doesn't push product grid down */
    max-height: calc(100vh - var(--header-height) - 2rem);
    overflow-y: auto;
}

.filters-mobile-toggle { display: none; }
.catalog-loading {
    opacity: .55;
    pointer-events: none;
    transition: opacity .16s ease;
}

.filter-group {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--bg-subtle);
    padding-bottom: .75rem;
}
.filter-group:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }

.filter-group-title {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tx-1);
    margin-bottom: .85rem;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: .25rem; /* much denser */
    max-height: 200px;
    overflow-y: auto;
}
.filter-checkboxes::-webkit-scrollbar { width: 3px; }
.filter-checkboxes::-webkit-scrollbar-thumb { background: var(--bd); border-radius: var(--r-full); }

.filter-check-label {
    display: flex;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
    font-size: .86rem;
    color: var(--tx-2);
    padding: .12rem 0;
    transition: color var(--t);
}
.filter-check-label:hover { color: var(--c-blue); }

.filter-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--c-blue);
    cursor: pointer;
    flex-shrink: 0;
}

.filter-check-text  { flex: 1; }
.filter-check-count {
    font-size: .72rem;
    color: var(--tx-3);
    background: var(--bg-subtle);
    padding: .1rem .4rem;
    border-radius: var(--r-full);
    font-weight: 500;
}

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .5rem;
}
.filter-price-input {
    flex: 1;
    min-width: 0;
    padding: .5rem .65rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-md);
    font-size: .86rem;
    background: var(--bg);
    color: var(--tx-1);
    transition: all var(--t);
}
.filter-price-input:focus {
    outline: none;
    border-color: var(--c-blue);
    box-shadow: var(--sh-blue);
}
.price-range-sep { color: var(--tx-3); flex-shrink: 0; font-size: .9rem; }
.price-range-hint { font-size: .78rem; color: var(--tx-3); margin-top: .3rem; }

.filter-submit-btn { margin-top: 1rem; }
.filter-clear-btn  {
    margin-top: .5rem;
    font-size: .82rem;
    text-align: center;
    display: block;
    color: var(--tx-3);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--t);
}
.filter-clear-btn:hover { color: var(--c-red); text-decoration: none; }

/* ---- CATALOG PRODUCTS AREA ------------------------------------------------- */
.catalog-products-area {
    min-width: 0; /* prevent grid overflow */
}

/* ---- CATALOG TOOLBAR ------------------------------------------------------- */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    gap: 1rem;
}

.sort-select {
    padding: .5rem .9rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-md);
    font-size: .86rem;
    background: var(--bg-white);
    color: var(--tx-2);
    cursor: pointer;
    transition: all var(--t);
    outline: none;
    direction: rtl;
}
.sort-select:focus { border-color: var(--c-blue); box-shadow: var(--sh-blue); }

.view-toggle {
    display: flex;
    border: 1px solid var(--bd);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}
.view-toggle-btn {
    padding: .5rem .8rem;
    font-size: .95rem;
    background: var(--bg-white);
    color: var(--tx-3);
    text-decoration: none;
    border: none;
    transition: all var(--t);
    cursor: pointer;
    display: flex;
    align-items: center;
}
.view-toggle-btn.active,
.view-toggle-btn:hover {
    background: var(--c-blue);
    color: #fff;
    text-decoration: none;
}

/* ---- PRODUCT GRID ---------------------------------------------------------- */
.products-grid {
    display: grid;
    gap: 1rem;
}
.products-grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.products-grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---- PRODUCT LIST (Row View) ----------------------------------------------- */
.products-list { display: flex; flex-direction: column; gap: .85rem; }

.product-list-item {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-lg);
    display: grid;
    grid-template-columns: 130px 1fr 180px;
    gap: 1.25rem;
    padding: 1.1rem;
    transition: all var(--t);
    box-shadow: var(--sh-sm);
    align-items: center;
}
.product-list-item:hover {
    box-shadow: var(--sh-lg);
    border-color: var(--c-blue);
    transform: translateY(-2px);
    text-decoration: none;
}

.pli-img-wrap {
    width: 130px;
    height: 130px;
    background: var(--bg-white, #fff);
    border: 1px solid var(--bg-subtle);
    border-radius: var(--r-md);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pli-img {
    width: 82%;
    height: 82%;
    object-fit: contain;
    transition: transform var(--t);
}
.product-list-item:hover .pli-img { transform: scale(1.04); }
.pli-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: var(--tx-3);
}

.pli-body  { min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.pli-brand { font-size: .7rem; font-weight: 700; color: var(--tx-3); letter-spacing: .06em; text-transform: uppercase; }
.pli-name  { font-size: 1rem; font-weight: 800; color: var(--tx-1); line-height: 1.35; }
.pli-name a { color: inherit; text-decoration: none; }
.pli-name a:hover { color: var(--c-blue); }
.pli-desc  { font-size: .86rem; color: var(--tx-3); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pli-sku   { font-family: monospace; font-size: .73rem; color: var(--tx-3); margin-top: .2rem; }

.pli-side {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    align-items: flex-end;
    border-left: 1px solid var(--bg-subtle);
    padding-left: 1.25rem;
    min-height: 110px;
    justify-content: center;
}
.pli-price  { text-align: right; }
.pli-stock  { font-size: .78rem; font-weight: 700; }
.pli-actions { display: flex; gap: .4rem; width: 100%; }

/* ---- PAGINATION ------------------------------------------------------------ */
.pagination {
    display: flex;
    align-items: center;
    gap: .35rem;
    justify-content: center;
    padding: 2rem 0 1rem;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 .55rem;
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-md);
    font-size: .86rem;
    color: var(--tx-2);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--t);
    box-shadow: var(--sh-sm);
    cursor: pointer;
}
.page-btn:hover {
    border-color: var(--c-blue);
    color: var(--c-blue);
    text-decoration: none;
    background: var(--c-blue-bg);
}
.page-btn.active {
    background: var(--c-blue);
    color: #fff;
    border-color: var(--c-blue);
    box-shadow: 0 4px 10px rgba(59,130,246,0.3);
}
.page-info { font-size: .8rem; color: var(--tx-3); padding: 0 .6rem; font-weight: 500; }

/* ---- EMPTY RESULTS --------------------------------------------------------- */
.empty-results {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--tx-3);
    grid-column: 1 / -1;
}
.empty-icon { font-size: 3rem; margin-bottom: .75rem; opacity: .4; }
.empty-results h2 { font-size: 1.2rem; font-weight: 700; color: var(--tx-2); margin-bottom: .5rem; }
.empty-results p  { font-size: .9rem; }
.empty-results a  { color: var(--c-blue); font-weight: 600; }

/* ---- PRICE HELPERS --------------------------------------------------------- */
.price-current  { font-size: 1.4rem; font-weight: 800; color: var(--c-red); } /* massive red price */
.price-original { font-size: .95rem; color: var(--tx-3); text-decoration: line-through; }
.price-saved    { font-size: .8rem; color: var(--c-green); font-weight: 700; background: rgba(16,185,129,.1); padding: .1rem .4rem; border-radius: var(--r-sm); }

/* ---- STOCK BADGE ----------------------------------------------------------- */
.stock-in  { color: var(--c-green); font-size: .78rem; font-weight: 700; }
.stock-out { color: var(--c-red); font-size: .78rem; font-weight: 700; }

/* =============================================================================
   RESPONSIVE ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Catalog breakpoints
   ============================================================================= */

/* --- TABLET (max-width: 1100px) --------------------------------------------- */
@media (max-width: 1100px) {
    :root { --sidebar-w: 220px; }
}

/* --- TABLET/MOBILE (max-width: 900px) --------------------------------------- */
@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filters-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .filters-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: .75rem 1.1rem;
        background: var(--bg-white);
        border: 1px solid var(--bd);
        border-radius: var(--r-md);
        font-size: .92rem;
        font-weight: 700;
        cursor: pointer;
        margin-bottom: .75rem;
        color: var(--tx-1);
        box-shadow: var(--sh-sm);
    }

    .filters-body { display: none; }
    .filters-body.is-open { display: block; }
}

/* --- MOBILE (max-width: 600px) ---------------------------------------------- */
@media (max-width: 600px) {
    :root { --header-h: 120px; } /* topbar(32) + main-nav(56) + mobile search bar(~32) */

    .container { padding: 0 1rem; }

    #megaMenuBackdrop {
        background: rgba(0, 0, 0, .55);
    }

    #megaMenuContainer {
        max-height: calc(100vh - 88px);
        overflow-y: auto;
    }

    #megaMenuContainer #megaL1 {
        border-radius: 10px;
    }

    .mega-l1-item > .mega-l2-panel,
    .mega-l2-item > .mega-l3-panel {
        border-radius: 8px;
        border-color: #2D3348;
        background: #1A1D27;
        overflow: hidden;
    }

    .mega-l1-item > .mega-l2-panel a,
    .mega-l2-item > .mega-l3-panel a {
        min-height: 42px;
    }

    .catalog-layout { gap: .85rem; }

    .catalog-title { font-size: 1.4rem; }

    .products-grid-3,
    .products-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: .65rem;
    }

    .product-list-item {
        grid-template-columns: 90px 1fr;
        grid-template-rows: auto auto;
    }
    .pli-side {
        grid-column: 1 / -1;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--bg-subtle);
        padding-left: 0;
        padding-top: .85rem;
        align-items: center;
        justify-content: space-between;
        min-height: auto;
    }
}

/* =============================================================================
   RTL-SPECIFIC ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Catalog overrides
   ============================================================================= */
[dir="rtl"] .pli-side {
    border-left: none;
    border-right: 1px solid var(--bg-subtle);
    padding-left: 0;
    padding-right: 1.25rem;
    align-items: flex-start;
}
[dir="rtl"] .pli-price { text-align: right; }

[dir="rtl"] .sort-form { direction: rtl; }


/* ========================================== */
/* FILE: checkout.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Cart & Checkout CSS
   /assets/css/cart.css  (also used by checkout.css via @import in pages)
   RTL Hebrew | Mobile-first
   ============================================================================= */

/* ---- CART PAGE ------------------------------------------------------------- */
.cart-page-wrap { padding-bottom: 3rem; }

.empty-cart-state {
    text-align: center;
    padding: 5rem 2rem;
}
.empty-cart-icon  { font-size: 5rem; margin-bottom: 1.25rem; }
.empty-cart-state h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: .65rem; }
.empty-cart-state p  { color: var(--tx-3); margin-bottom: 1.5rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* Free shipping banner */
.free-ship-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--r-md);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    font-size: .88rem;
    flex-wrap: wrap;
}
.free-ship-banner strong { color: #1d4ed8; }
.free-ship-icon { font-size: 1.1rem; }
.free-ship-achieved { background: #f0fdf4; border-color: #bbf7d0; }
.free-ship-achieved strong { color: #166534; }
.free-ship-bar {
    height: 6px;
    background: #dbeafe;
    border-radius: 3px;
    flex: 1;
    min-width: 100px;
    overflow: hidden;
}
.free-ship-progress {
    height: 100%;
    background: #2563eb;
    border-radius: 3px;
    transition: width .4s ease;
}

/* Cart layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.75rem;
    align-items: start;
}

/* Cart table */
.cart-table-wrap { overflow-x: auto; }
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--bd);
}
.cart-table thead th {
    padding: .7rem 1rem;
    background: var(--bg-subtle);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tx-3);
    text-align: right;
    border-bottom: 1px solid var(--bd);
}
.cart-table tbody td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--bg-subtle);
    vertical-align: middle;
}
.cart-table tbody tr:last-child td { border-bottom: none; }
.cart-table tbody tr:hover { background: var(--bg-subtle); }
.cart-row-warning { background: #fffbeb; }
.cart-row-warning:hover { background: #fef3c7 !important; }

/* Column sizes */
.ct-img    { width: 70px; }
.ct-name   { min-width: 180px; }
.ct-price  { width: 110px; white-space: nowrap; }
.ct-qty    { width: 130px; }
.ct-total  { width: 110px; white-space: nowrap; font-weight: 700; }
.ct-remove { width: 44px; text-align: center; }

.cart-item-img {
    width: 56px; height: 56px;
    object-fit: contain;
    border-radius: var(--r-sm);
    background: var(--bg-subtle);
    padding: .25rem;
}
.cart-item-img-ph {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-subtle);
    border-radius: var(--r-sm);
    font-size: 1.5rem;
    color: var(--tx-3);
}

.cart-item-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--tx-1);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-item-name:hover { color: var(--c-blue); }
.cart-item-sku { font-size: .72rem; color: var(--tx-3); margin-top: .2rem; }
.cart-item-warning {
    font-size: .75rem;
    color: #92400e;
    background: #fef9c3;
    padding: .15rem .4rem;
    border-radius: 4px;
    margin-top: .3rem;
    display: inline-block;
}

.cart-price-current { font-weight: 700; }
.cart-price-original { font-size: .75rem; color: var(--tx-3); text-decoration: line-through; display: block; }

/* Qty selector */
.cart-qty-selector {
    display: flex;
    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    overflow: hidden;
    width: fit-content;
}
.cart-qty-btn {
    width: 28px; height: 32px;
    background: var(--bg-subtle);
    border: none; font-size: 1rem; font-weight: 700;
    color: var(--tx-2); cursor: pointer;
    transition: background var(--t), color var(--t);
    flex-shrink: 0;
}
.cart-qty-btn:hover { background: var(--c-blue); color: #fff; }
.cart-qty-input {
    width: 44px; height: 32px;
    border: none;
    border-left: 1px solid var(--bd); border-right: 1px solid var(--bd);
    text-align: center;
    font-size: .88rem; font-weight: 700;
    background: var(--bg-white);
    color: var(--tx-1);
}
.cart-qty-input:focus { outline: none; background: var(--c-blue-bg); }

/* Remove button */
.cart-remove-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: none; border: 1px solid var(--bd);
    color: var(--tx-3); font-size: .8rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t);
}
.cart-remove-btn:hover { border-color: #ef4444; color: #ef4444; background: #fee2e2; }

/* Cart actions */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .75rem;
    gap: .75rem;
}
.btn-danger-outline { color: #ef4444; border-color: #fca5a5; }
.btn-danger-outline:hover { border-color: #ef4444; background: #fee2e2; }

/* ---- CART SUMMARY ---------------------------------------------------------- */
.cart-summary { position: sticky; top: calc(68px + 48px + 1rem); }
.cart-summary-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.cart-summary-title { font-size: 1rem; font-weight: 800; }

/* Coupon */
.coupon-section { }
.coupon-input-row { display: flex; gap: .5rem; }
.coupon-input {
    flex: 1;
    padding: .55rem .85rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-sm);
    font-size: .88rem; dir: ltr;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: border-color var(--t);
}
.coupon-input:focus { outline: none; border-color: var(--c-blue); }
.coupon-btn {
    padding: .55rem 1rem;
    background: var(--c-blue); color: #fff;
    border: none; border-radius: var(--r-sm);
    font-weight: 600; font-size: .85rem;
    cursor: pointer; white-space: nowrap;
    transition: background var(--t);
}
.coupon-btn:hover { background: var(--c-blue-lt); }
.coupon-applied {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: .5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--r-sm);
    padding: .4rem .65rem;
    font-size: .82rem;
}
.coupon-applied-code { color: #166534; font-weight: 600; }
.coupon-remove-btn {
    background: none; border: none;
    color: #6b7280; cursor: pointer; font-size: .85rem;
    padding: 0 .2rem;
}
.coupon-remove-btn:hover { color: #ef4444; }
.coupon-msg {
    font-size: .8rem;
    min-height: 1.1rem;
    margin-top: .3rem;
    transition: color .15s;
}

/* Totals */
.cart-totals-breakdown { display: flex; flex-direction: column; gap: .5rem; }
.totals-row {
    display: flex; justify-content: space-between;
    font-size: .88rem; color: var(--tx-2);
    padding: .25rem 0;
}
.totals-row-discount { color: #16a34a; font-weight: 500; }
.totals-row-discount .discount-amount { font-weight: 700; }
.totals-row-ship  { color: var(--tx-3); }
.shipping-estimate { font-style: italic; font-size: .8rem; }
.totals-row-total {
    font-size: 1.05rem; font-weight: 800;
    border-top: 2px solid var(--bd);
    padding-top: .65rem;
    margin-top: .25rem;
}
.total-amount { color: var(--c-blue); }
.totals-vat-note { font-size: .72rem; color: var(--tx-3); text-align: left; }

.btn-checkout {
    padding: .85rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.cart-security-note {
    text-align: center;
    font-size: .75rem;
    color: var(--tx-3);
}
.payment-icons { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.payment-badge {
    padding: .2rem .5rem;
    border: 1px solid var(--bd);
    border-radius: 4px;
    font-size: .65rem; font-weight: 700;
    color: var(--tx-3);
}

/* ---- CHECKOUT PAGE --------------------------------------------------------- */
.checkout-wrap { padding-bottom: 3rem; }

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.75rem;
    align-items: start;
    margin-top: 1rem;
}

/* Checkout card */
.checkout-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-xl);
    margin-bottom: 1rem;
    overflow: hidden;
}
.checkout-card-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bd);
    background: var(--bg-subtle);
}
.checkout-card-head h2 { font-size: .95rem; font-weight: 700; margin: 0; }
.checkout-step-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--c-blue); color: #fff;
    font-size: .78rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.optional-label { font-size: .78rem; font-weight: 400; color: var(--tx-3); }
.checkout-card-body { padding: 1.25rem 1.5rem; }

/* Form rows */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-street { display: grid; grid-template-columns: 1fr 100px; gap: 1rem; }

/* Shipping methods */
.shipping-methods-list { display: flex; flex-direction: column; gap: .6rem; }
.shipping-method-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
}
.shipping-method-option:hover { border-color: var(--c-blue); background: var(--c-blue-bg); }
.shipping-method-option.selected,
.shipping-method-option:has(.shipping-radio:checked) {
    border-color: var(--c-blue);
    background: var(--c-blue-bg);
}
.shipping-radio { width: 17px; height: 17px; accent-color: var(--c-blue); flex-shrink: 0; cursor: pointer; }
.shipping-method-info { flex: 1; min-width: 0; }
.shipping-method-name { font-weight: 700; font-size: .9rem; }
.shipping-method-desc { font-size: .78rem; color: var(--tx-3); margin-top: .15rem; }
.shipping-method-eta  { font-size: .75rem; color: var(--tx-3); margin-top: .15rem; }
.shipping-method-cost { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.shipping-free { color: #16a34a; }

/* Payment methods */
.payment-methods-list { display: flex; flex-direction: column; gap: .6rem; }
.payment-method-option {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
}
.payment-method-option:hover,
.payment-method-option:has(.payment-radio:checked) {
    border-color: var(--c-blue);
    background: var(--c-blue-bg);
}
.payment-radio { width: 17px; height: 17px; accent-color: var(--c-blue); flex-shrink: 0; cursor: pointer; }
.payment-option-icon { font-size: 1.3rem; }
.payment-option-info { flex: 1; }
.payment-option-name { font-weight: 700; font-size: .9rem; }
.payment-option-desc { font-size: .78rem; color: var(--tx-3); margin-top: .15rem; }

.payment-future-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .65rem;
    border: 1.5px dashed var(--bd);
    border-radius: var(--r-md);
    opacity: .6;
}
.payment-future-item { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--tx-3); }
.future-badge {
    font-size: .62rem;
    background: var(--bg-subtle);
    color: var(--tx-3);
    padding: .1rem .4rem;
    border-radius: var(--r-full);
    font-weight: 600;
}

/* Checkout summary */
.checkout-summary-sticky { position: sticky; top: calc(68px + 48px + 1rem); }
.checkout-summary-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.summary-title { font-size: 1rem; font-weight: 800; }

/* Items in checkout summary */
.checkout-items-list { display: flex; flex-direction: column; gap: .65rem; max-height: 300px; overflow-y: auto; }
.checkout-item-row { display: flex; align-items: center; gap: .75rem; }
.checkout-item-img-wrap { position: relative; flex-shrink: 0; }
.checkout-item-img {
    width: 48px; height: 48px;
    object-fit: contain;
    border-radius: var(--r-sm);
    background: var(--bg-subtle);
    padding: .2rem;
}
.checkout-item-img-ph {
    width: 48px; height: 48px;
    background: var(--bg-subtle);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--tx-3);
}
.checkout-item-qty-badge {
    position: absolute;
    top: -6px; left: -6px;
    width: 20px; height: 20px;
    background: var(--tx-3); color: #fff;
    border-radius: 50%;
    font-size: .65rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-white);
}
.checkout-item-name { flex: 1; font-size: .82rem; font-weight: 500; line-height: 1.4; }
.checkout-item-price { font-weight: 700; font-size: .88rem; white-space: nowrap; }

/* Summary totals */
.summary-totals { display: flex; flex-direction: column; gap: .4rem; border-top: 1px solid var(--bd); padding-top: .85rem; }
.summary-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--tx-2); }
.summary-row-discount { color: #16a34a; }
.discount-val { font-weight: 700; }
.summary-row-ship { color: var(--tx-3); }
.summary-total-row { font-size: 1rem; font-weight: 800; border-top: 2px solid var(--bd); padding-top: .65rem; margin-top: .25rem; }
.summary-total-val { color: var(--c-blue); }
.summary-vat { font-size: .72rem; color: var(--tx-3); text-align: left; }

/* Place order button */
.btn-place-order { padding: .95rem; font-size: 1rem; font-weight: 800; letter-spacing: .01em; position: relative; }
.btn-order-spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%,-50%);
}
.is-submitting .btn-order-text { visibility: hidden; }
.is-submitting .btn-order-spinner { display: block; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.checkout-security-note { text-align: center; font-size: .75rem; color: var(--tx-3); }

/* payment instructions */
.payment-instructions {
    margin-top: .75rem;
    padding: .75rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--r-sm);
    font-size: .82rem;
    line-height: 1.7;
}
.payment-instructions code {
    background: var(--bg-white, #fff);
    padding: .1rem .35rem;
    border-radius: 3px;
    font-family: monospace;
    font-weight: 700;
}

/* ---- ORDER SUCCESS --------------------------------------------------------- */
.order-success-wrap { padding-bottom: 3rem; }
.success-hero { text-align: center; padding: 2.5rem 1rem 2rem; }
.success-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 2.2rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    animation: successPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes successPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-title { font-size: 1.75rem; font-weight: 900; margin-bottom: .5rem; }
.order-number-display { color: var(--c-blue); }
.success-sub   { color: var(--tx-2); margin-bottom: .35rem; }
.success-email-note { font-size: .85rem; color: var(--tx-3); }

.order-success-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.75rem;
    align-items: start;
    margin-top: 1.5rem;
}

.order-detail-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-xl);
    overflow: hidden;
}
.order-card-title { font-size: 1rem; font-weight: 700; padding: 1rem 1.5rem; border-bottom: 1px solid var(--bd); background: var(--bg-subtle); }

.order-items-list { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: .85rem; }
.order-success-item { display: flex; align-items: center; gap: .85rem; }
.osi-img-wrap { flex-shrink: 0; }
.osi-img {
    width: 56px; height: 56px;
    object-fit: contain; border-radius: var(--r-sm);
    background: var(--bg-subtle); padding: .25rem;
}
.osi-img-ph { width: 56px; height: 56px; background: var(--bg-subtle); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--tx-3); }
.osi-info { flex: 1; min-width: 0; }
.osi-name { font-weight: 600; font-size: .9rem; }
.osi-price { font-weight: 800; font-size: .9rem; white-space: nowrap; }

.order-success-totals { padding: 1rem 1.5rem; border-top: 1px solid var(--bd); background: var(--bg-subtle); display: flex; flex-direction: column; gap: .4rem; }
.ost-row { display: flex; justify-content: space-between; font-size: .88rem; }
.ost-discount { color: #16a34a; }
.ost-total { font-size: 1rem; font-weight: 800; border-top: 1px solid var(--bd); padding-top: .5rem; margin-top: .2rem; }
.ost-total span:last-child { color: var(--c-blue); }

.order-info-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.order-info-card { background: var(--bg-white); border: 1px solid var(--bd); border-radius: var(--r-xl); overflow: hidden; }
.oic-title { font-size: .88rem; font-weight: 700; padding: .75rem 1rem; border-bottom: 1px solid var(--bd); background: var(--bg-subtle); }
.oic-table { width: 100%; border-collapse: collapse; }
.oic-table th, .oic-table td { padding: .5rem 1rem; font-size: .82rem; border-bottom: 1px solid var(--bd); }
.oic-table th { font-weight: 600; color: var(--tx-3); background: var(--bg-subtle); text-align: right; width: 35%; }
.oic-table tr:last-child th, .oic-table tr:last-child td { border-bottom: none; }
.badge-pending { background: #fef3c7; color: #92400e; font-size: .75rem; padding: .2rem .55rem; border-radius: var(--r-full); font-weight: 700; }

.order-success-actions { display: flex; flex-direction: column; gap: .6rem; }

/* ---- FORM HELPERS (used in checkout) --------------------------------------- */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--tx-2); margin-bottom: .4rem; }
.form-label.required::after { content: ' *'; color: #ef4444; }
.form-input {
    display: block; width: 100%;
    padding: .6rem .85rem;
    background: var(--bg-subtle);
    border: 1.5px solid var(--bd);
    border-radius: var(--r-sm);
    font-size: .9rem; color: var(--tx-1);
    font-family: inherit;
    transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus { outline: none; border-color: var(--c-blue); box-shadow: var(--sh-blue); background: var(--bg-white); }
.form-input.is-error { border-color: #ef4444; background: var(--bg-white, #fff5f5); }
.form-textarea-sm { height: 88px; resize: vertical; line-height: 1.65; }
.field-error { display: block; margin-top: .3rem; font-size: .75rem; color: #ef4444; font-weight: 500; }
.alert { display: flex; align-items: center; gap: .65rem; padding: .9rem 1.1rem; border-radius: var(--r-md); margin-bottom: 1.25rem; font-size: .875rem; font-weight: 500; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-icon { font-weight: 900; }

/* ---- RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 1023px) {
    .cart-layout,
    .checkout-layout,
    .order-success-layout {
        grid-template-columns: 1fr;
    }
    .cart-summary { position: static; }
    .checkout-summary-sticky { position: static; }
}

@media (max-width: 767px) {
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr {
        border: 1px solid var(--bd);
        border-radius: var(--r-md);
        margin-bottom: .75rem;
        padding: .75rem;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        align-items: flex-start;
    }
    .ct-img    { width: 64px; flex-shrink: 0; }
    .ct-name   { flex: 1; min-width: 0; }
    .ct-price, .ct-qty, .ct-total, .ct-remove { width: auto; padding: 0; border: none; }
    .ct-remove { position: absolute; top: .6rem; left: .6rem; }

    .form-row-2 { grid-template-columns: 1fr; }
    .form-row-street { grid-template-columns: 1fr 80px; }

    .checkout-items-list { max-height: 220px; }

    .payment-future-row { flex-direction: column; }
}

@media (max-width: 480px) {
    .cart-layout, .checkout-layout, .order-success-layout { gap: 1rem; }
    .checkout-card-body { padding: 1rem; }
    .cart-summary-card, .checkout-summary-card { padding: 1rem; }
}


/* ========================================== */
/* FILE: pc-builder.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ PC Builder CSS
   /assets/css/pc-builder.css
   ============================================================================= */

/* ---- BUILDER LAYOUT -------------------------------------------------------- */
.pcb-wrapper {
    display: block;
    max-width: 1380px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}
.pcb-main {
    min-width: 0;
}

.pcb-header   { margin-bottom: 2rem; }
.pcb-title    { font-size: 1.8rem; font-weight: 900; color: var(--tx-1); letter-spacing: -0.02em; margin-bottom: .4rem; }
.pcb-subtitle { color: var(--tx-3); font-size: .95rem; font-weight: 500; }

/* ---- SUMMARY SIDEBAR ------------------------------------------------------- */
.pcb-summary-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-xl);
    padding: 1.5rem;
    position: static;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--sh-md);
    transition: all var(--t);
}
.pcb-summary-card:hover {
    box-shadow: var(--sh-lg);
}

.pcb-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--bg-subtle);
    padding-bottom: .85rem;
}
.pcb-summary-title { font-weight: 800; font-size: 1.1rem; color: var(--tx-1); }
.pcb-parts-count   { font-size: .78rem; color: var(--c-blue); font-weight: 700; background: var(--c-blue-bg); padding: .2rem .6rem; border-radius: var(--r-full); }

/* Compatibility status panel */
.pcb-compat-status { border-radius: var(--r-md); padding: .75rem 1rem; font-size: .88rem; font-weight: 700; display: flex; align-items: center; }
.compat-ok   { background: rgba(16, 185, 129, 0.14); color: #7dd3a8; }
.compat-warn { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.compat-error { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
.compat-neutral { background: var(--bg-subtle); color: var(--tx-3); }
.compat-ok span, .compat-warn span, .compat-error span, .compat-neutral span { margin-left: .5rem; font-size: 1.1rem; }

.compat-issues-list { display: flex; flex-direction: column; gap: .5rem; }
.compat-issue {
    font-size: .82rem;
    padding: .6rem .85rem;
    border-radius: var(--r-sm);
    line-height: 1.5;
    font-weight: 600;
}
.compat-issue.compat-error   { background: rgba(239, 68, 68, 0.14); color: #fca5a5; border-right: 3px solid #ef4444; }
.compat-issue.compat-warning { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border-right: 3px solid #f59e0b; }

/* Price block */
.pcb-price-block { display: flex; flex-direction: column; gap: .5rem; border-top: 1px solid var(--bg-subtle); border-bottom: 1px solid var(--bg-subtle); padding: 1rem 0; }
.pcb-price-row   { display: flex; justify-content: space-between; font-size: .9rem; color: var(--tx-2); font-weight: 500; }
.pcb-savings     { color: var(--c-green); font-weight: 700; }
.pcb-grand-total { font-size: 1.15rem; font-weight: 900; color: var(--tx-1); padding-top: .4rem; border-top: 1px dashed var(--bd); }

/* Sidebar actions */
.pcb-sidebar-actions { display: flex; flex-direction: column; gap: .6rem; }
.pcb-action-row      { display: flex; justify-content: space-between; gap: .5rem; padding-top: .25rem; }
.pcb-action-link {
    font-size: .82rem; color: var(--c-blue);
    background: none; border: none; cursor: pointer;
    text-decoration: underline; padding: 0; font-family: inherit; font-weight: 700;
}
.pcb-action-link:hover { color: var(--c-blue-lt); }
.pcb-add-cart-btn { box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3); }
.pcb-add-cart-btn:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5); }
.pcb-add-cart-btn:disabled, .pcb-sidebar-actions button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.pcb-summary-card > .pcb-price-block,
.pcb-summary-card > .pcb-sidebar-actions {
    display: none;
}

/* ---- COMPONENT SLOTS ------------------------------------------------------- */
.pcb-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1rem;
}

.pcb-slot {
    background: var(--bg-white);
    border: 1.5px solid var(--bd);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    transition: all var(--t);
    box-shadow: var(--sh-sm);
}
.pcb-slot.slot-filled { border-color: var(--c-blue); border-width: 2px; }
.pcb-slot:hover       { box-shadow: var(--sh-md); border-color: var(--bd-dark); }
.pcb-slot.slot-filled:hover { border-color: var(--c-blue-lt); }

.slot-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .85rem;
}
.slot-icon          { font-size: 1.4rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)); }
.slot-label-wrap    { flex: 1; }
.slot-label         { font-weight: 800; font-size: .95rem; color: var(--tx-1); }
.slot-optional      { display: block; font-size: .75rem; color: var(--tx-3); font-weight: 500; }
.slot-remove-btn {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(239, 68, 68, 0.14); border: none;
    color: #ef4444; font-size: .78rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t);
    flex-shrink: 0;
}
.slot-remove-btn:hover { background: #ef4444; color: #fff; }

/* Picker button */
.slot-picker-btn {
    width: 100%;
    display: flex; align-items: center; gap: .6rem;
    padding: .85rem 1.25rem;
    background: var(--bg);
    border: 2px dashed var(--bd);
    border-radius: var(--r-md);
    color: var(--tx-3);
    font-size: .9rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: all var(--t);
}
.slot-picker-btn:hover { border-color: var(--c-blue); color: var(--c-blue); background: var(--c-blue-bg); }
.slot-picker-icon { font-size: 1.2rem; font-weight: 800; }

/* Selected product in slot */
.slot-selected { display: flex; flex-direction: column; gap: .75rem; }
.slot-product-row  { display: flex; gap: .85rem; align-items: center; }
.slot-product-img  { width: 56px; height: 56px; object-fit: contain; border-radius: var(--r-md); background: var(--bg-subtle); border: 1px solid var(--bd); flex-shrink: 0; padding: .2rem; }
.slot-product-img-ph { width: 56px; height: 56px; background: var(--bg-subtle); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--tx-3); flex-shrink: 0; }
.slot-product-info { flex: 1; min-width: 0; }
.slot-product-name { font-weight: 700; font-size: .92rem; color: var(--tx-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-product-brand { margin-top: .15rem; font-weight: 600; font-size: .75rem; }
.slot-product-price { font-weight: 800; font-size: .95rem; color: var(--c-blue); margin-top: .25rem; }
.slot-price-orig    { font-size: .78rem; color: var(--tx-3); text-decoration: line-through; margin-right: .35rem; font-weight: 500; }
.slot-change-btn    { font-size: .82rem; font-weight: 700; align-self: flex-start; }

/* ---- BUILDER FOOTER TOTAL -------------------------------------------------- */
.pcb-footer-action {
    max-width: 1380px;
    margin: 0 auto 2rem;
    padding: .9rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--color-primary); /* KSP Blue Footer */
    color: #fff;
    border-radius: var(--r-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .15);
    z-index: 100;
}

@media (max-width: 768px) {
    .pcb-wrapper {
        padding-inline: .75rem;
    }
    .pcb-slots {
        grid-template-columns: minmax(0, 1fr);
    }
    .pcb-slot {
        padding: 1rem;
    }
    .slot-picker-btn {
        min-height: 48px;
        justify-content: center;
        position: relative;
        z-index: 2;
        touch-action: manipulation;
    }
    .slot-change-btn,
    .slot-remove-btn {
        touch-action: manipulation;
    }
    .pcb-footer-action {
        position: sticky;
        bottom: calc(var(--bottom-nav-height, 60px) + 10px);
        margin: 0 10px 10px;
        flex-direction: column;
        align-items: stretch;
        z-index: 50;
    }
    .pcb-footer-actions {
        justify-content: stretch;
    }
    .pcb-footer-cart {
        width: 100%;
    }
}
.pcb-footer-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}
.pcb-footer-prices {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.pcb-footer-price-row {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    color: rgba(255,255,255,.78);
    font-size: .86rem;
    white-space: nowrap;
}
.pcb-footer-price-row strong {
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
}
.pcb-footer-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.pcb-footer-cart {
    min-height: 42px;
    padding: 0 1.4rem;
    border: none;
    border-radius: var(--r-md);
    background: var(--color-secondary); /* KSP Orange/Red Action */
    color: #fff;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--t);
}
.pcb-footer-cart:hover:not(:disabled) {
    background: var(--color-secondary-hover);
    box-shadow: 0 8px 20px rgba(255, 153, 0, .32);
}
.pcb-footer-cart:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.pcb-footer-secondary {
    min-height: 42px;
    padding: 0 1.1rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: var(--r-md);
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--t);
}
.pcb-footer-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,.08);
}
.pcb-footer-secondary:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.pcb-footer-reset {
    border-color: rgba(239, 68, 68, .45);
    color: #fecaca;
}
.pcb-footer-reset:hover:not(:disabled) {
    background: rgba(239, 68, 68, .12);
    color: #fff;
}
.pcb-footer-link {
    border: none;
    background: transparent;
    color: rgba(255,255,255,.82);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}
.pcb-footer-link:hover:not(:disabled) {
    color: #fff;
}
.pcb-footer-link:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ---- PICKER MODAL Redesign -------------------------------------------------- */
.pcb-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}
.pcb-picker-modal[hidden] {
    display: none;
}
.pcb-picker-box {
    width: min(660px, calc(100vw - 4rem));
    min-width: 0;
    max-height: calc(100vh - 4rem);
    display: flex; flex-direction: column;
    position: relative;
    inset: auto !important;
    margin: 0 auto;
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: var(--bg-white) !important;
    color: var(--tx-1);
    opacity: 1 !important;
    animation: none;
    isolation: isolate;
}
.pcb-picker-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding: 1.6rem 2rem .75rem;
    border-bottom: none;
    background: var(--bg-white) !important;
    flex-shrink: 0;
}
.pcb-picker-head h2 { font-size: 1.45rem; font-weight: 800; color: var(--tx-1); margin: 0; letter-spacing: -0.01em; }
.pcb-picker-close {
    background: none; border: none;
    font-size: 1.45rem; color: var(--tx-1); cursor: pointer;
    transition: color var(--t);
    flex-shrink: 0;
}
.pcb-picker-close:hover { color: var(--c-red); }

.pcb-picker-filter {
    display: grid;
    grid-template-columns: auto 106px minmax(0, 1fr);
    align-items: center;
    gap: .9rem;
    padding: .75rem 2rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
    background: var(--bg-white) !important;
}
.pcb-picker-filter-label {
    font-size: .9rem;
    font-weight: 700;
    color: var(--tx-1);
    white-space: nowrap;
}
.pcb-picker-sort {
    width: 100%;
    min-height: 42px;
    padding: .65rem .8rem;
    border: 1px solid #b1b1b1;
    border-radius: var(--r-sm);
    background: var(--bg-subtle);
    color: var(--tx-1);
    font-family: inherit;
    font-size: .9rem;
}
.pcb-search-input  {
    width: 100%; padding: .8rem 1rem;
    border: 1px solid #b1b1b1; border-radius: var(--r-sm);
    font-size: .92rem; font-family: inherit;
    transition: all var(--t);
    background: var(--bg-subtle);
    color: var(--tx-1);
}
.pcb-search-input:focus { outline: none; border-color: var(--c-blue); background: var(--bg-white); box-shadow: var(--sh-blue); }

.pcb-picker-grid {
    flex: 1; overflow-y: auto;
    padding: 0 2rem 1rem;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-white) !important;
}
.pcb-picker-grid::-webkit-scrollbar { width: 6px; }
.pcb-picker-grid::-webkit-scrollbar-thumb { background: var(--bd); border-radius: var(--r-full); }

.pcb-loading { text-align: center; padding: 3rem 1rem; color: var(--tx-3); font-weight: 600; font-size: .95rem; }

/* Component Card in Picker */
.pcb-comp-card {
    width: 100%;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid var(--bd);
    border-radius: 0;
    padding: .75rem 0;
    cursor: pointer;
    transition: all var(--t);
    display: grid;
    grid-template-columns: 72px 54px minmax(0, 1fr) minmax(150px, auto);
    grid-template-areas: "brand image name price";
    align-items: center;
    gap: .85rem;
    direction: ltr;
    background: var(--bg-white) !important;
    box-shadow: none;
}
.pcb-comp-card:hover { border-color: var(--bd-dark); box-shadow: none; transform: none; background: var(--bg-subtle) !important; }
.pcb-comp-card.is-selected { border-color: var(--bd); background: var(--c-blue-bg); border-width: 0 0 1px; }

.pcb-comp-img-wrap  { grid-area: image; position: relative; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; background: var(--bg-subtle); border-radius: var(--r-sm); border: 1px solid var(--bd); overflow: hidden; }
.pcb-comp-img       { width: 90%; height: 90%; object-fit: contain; padding: .15rem; }
.pcb-comp-img-ph    { font-size: 1.4rem; color: var(--tx-3); }
.pcb-comp-avail     { display: none; }

.pcb-comp-brand     { grid-area: brand; min-width: 0; direction: rtl; font-size: .78rem; font-weight: 800; color: var(--tx-1); text-transform: uppercase; letter-spacing: .02em; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcb-comp-card.is-brand-repeat .pcb-comp-brand { visibility: hidden; }
.pcb-comp-name      { grid-area: name; min-width: 0; direction: rtl; font-size: .86rem; font-weight: 600; color: var(--tx-1); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: auto; text-align: right; }

.pcb-comp-specs     { display: none; }
.pcb-comp-spec-row  { display: flex; justify-content: space-between; font-size: .75rem; color: var(--tx-3); }
.pcb-comp-spec-val  { font-weight: 700; color: var(--tx-2); }

.pcb-comp-price-row { grid-area: price; min-width: 0; display: flex; align-items: baseline; justify-content: flex-start; gap: .35rem; margin-top: 0; direction: rtl; overflow: visible; flex-wrap: wrap; }
.pcb-comp-price     { font-size: .92rem; font-weight: 800; color: var(--tx-1); white-space: nowrap; }
.pcb-comp-orig      { font-size: .8rem; color: var(--tx-3); text-decoration: line-through; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcb-comp-sale-badge { flex: 0 0 auto; font-size: .68rem; font-weight: 800; background: rgba(239, 68, 68, 0.16); color: #f87171; padding: .1rem .4rem; border-radius: 4px; white-space: nowrap; }

.pcb-comp-select-btn {
    grid-area: action;
    width: 0; height: 0; padding: 0;
    background: transparent; color: transparent;
    border: none;
    font-size: 0;
    cursor: pointer;
    overflow: hidden;
    pointer-events: none;
}
.pcb-comp-select-btn::before {
    content: "";
}
.pcb-comp-select-btn:hover { background: transparent; box-shadow: none; }

.pcb-picker-pagination {
    padding: 1rem;
    border-top: 1px solid var(--bd);
    display: flex; justify-content: center; gap: .4rem;
    flex-shrink: 0;
    background: var(--bg-white) !important;
}

@media (max-width: 768px) {
    .pcb-picker-modal {
        align-items: flex-end;
        padding: .75rem;
    }
    .pcb-picker-box {
        width: 100%;
        max-height: calc(100vh - 1.5rem);
        border-radius: var(--r-lg);
    }
    .pcb-picker-head {
        padding: 1rem 1.1rem .5rem;
    }
    .pcb-picker-filter {
        grid-template-columns: auto minmax(86px, 106px);
        padding: .75rem 1.1rem 1rem;
    }
    .pcb-picker-filter .pcb-search-input {
        grid-column: 1 / -1;
    }
    .pcb-picker-grid {
        padding: 0 1.1rem 1rem;
    }
    .pcb-comp-card {
        grid-template-columns: 48px minmax(0, 1fr) 94px 34px;
        grid-template-areas: "image name price action";
        gap: .6rem;
        direction: rtl;
    }
    .pcb-comp-brand {
        display: none;
    }
    .pcb-comp-name {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .pcb-comp-img-wrap {
        width: 48px;
        height: 48px;
    }
    .pcb-comp-price-row {
        justify-content: flex-start;
    }
    .pcb-comp-select-btn {
        width: 34px;
        height: 34px;
    }
}

/* ---- SAVED BUILDS ---------------------------------------------------------- */
.saved-builds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: .75rem;
}
.saved-build-card {
    background: var(--bg-white);
    border: 1px solid var(--bd);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    box-shadow: var(--sh-sm);
    transition: all var(--t);
}
.saved-build-card:hover {
    box-shadow: var(--sh-md);
    border-color: var(--c-blue);
    transform: translateY(-2px);
}
.sbc-head     { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.sbc-name     { font-size: 1.05rem; font-weight: 800; color: var(--tx-1); margin: 0; }
.sbc-stats    { display: flex; justify-content: space-between; font-size: .88rem; color: var(--tx-2); font-weight: 500; border-top: 1px solid var(--bg-subtle); border-bottom: 1px solid var(--bg-subtle); padding: .6rem 0; }
.sbc-actions  { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }

/* ---- BUILD VIEW ------------------------------------------------------------ */
.build-view-header  { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.build-view-title   { font-size: 1.8rem; font-weight: 900; color: var(--tx-1); letter-spacing: -0.02em; }
.build-view-notes   { margin-top: .5rem; font-size: .9rem; color: var(--tx-3); line-height: 1.5; }
.build-view-actions { display: flex; gap: .6rem; flex-shrink: 0; }

.compat-issues-panel { padding: 1.25rem; border-radius: var(--r-lg); margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.compat-panel-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); }
.compat-panel-warn  { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); }

.build-view-items { background: var(--bg-white); border: 1px solid var(--bd); border-radius: var(--r-xl); overflow: hidden; margin-bottom: 1.5rem; box-shadow: var(--sh-sm); }
.bvi-row { display: grid; grid-template-columns: 60px 100px 1fr auto auto; gap: 1.25rem; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--bg-subtle); }
.bvi-row:last-child { border-bottom: none; }
.bvi-img  { width: 56px; height: 56px; object-fit: contain; border-radius: var(--r-md); background: var(--bg-subtle); border: 1px solid var(--bd); padding: .2rem; flex-shrink: 0; }
.bvi-img-ph { width: 56px; height: 56px; background: var(--bg-subtle); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--tx-3); flex-shrink: 0; }
.bvi-info  { min-width: 0; }
.bvi-type  { margin-bottom: .2rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--tx-3); letter-spacing: 0.05em; }
.bvi-name  { font-weight: 700; font-size: .92rem; color: var(--tx-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bvi-name a { color: inherit; text-decoration: none; transition: color var(--t); }
.bvi-name a:hover { color: var(--c-blue); }
.bvi-qty   { font-size: .88rem; color: var(--tx-2); font-weight: 600; }
.bvi-price { text-align: left; }
.bvi-orig  { font-size: .78rem; color: var(--tx-3); text-decoration: line-through; display: block; font-weight: 500; }
.bvi-line  { font-size: .95rem; font-weight: 800; color: var(--tx-1); white-space: nowrap; }

.build-view-summary { background: var(--bg-white); border: 1px solid var(--bd); border-radius: var(--r-xl); padding: 1.5rem; box-shadow: var(--sh-sm); }
.bvs-table { width: 100%; border-collapse: collapse; max-width: 340px; margin-right: auto; }
.bvs-table td { padding: .5rem .75rem; font-size: .9rem; color: var(--tx-2); font-weight: 500; }
.bvs-table td:last-child { text-align: left; }
.bvs-savings td { color: var(--c-green); font-weight: 700; }
.bvs-total td   { border-top: 2px solid var(--bd); padding-top: .85rem; font-size: 1.15rem; font-weight: 900; color: var(--tx-1); }
.bvs-power { margin-top: 1rem; font-size: .84rem; color: var(--tx-3); font-weight: 600; text-align: left; }

/* Share link row design */
.share-link-row { display: flex; gap: .6rem; }
.share-link-row .form-input { font-family: var(--font-mono); font-size: .82rem; background: var(--bg-subtle); color: var(--tx-2); }

/* Admin View */
.admin-pcb-view { max-width: 900px; }


/* ========================================== */
/* FILE: audit.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ Audit Dashboard CSS
   /assets/css/audit.css
   ============================================================================= */

/* Inherits from products.css admin theme */
/* Additional audit-specific overrides */

.audit-score-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 900;
    border: 4px solid;
    margin: 0 auto .5rem;
}
.audit-score-good  { border-color: #22c55e; color: #16a34a; }
.audit-score-warn  { border-color: #f59e0b; color: #92400e; }
.audit-score-fail  { border-color: #ef4444; color: #b91c1c; }

.audit-category-header {
    display: flex; justify-content: space-between; align-items: center;
}


/* ========================================== */
/* FILE: rtl-fixes.css */
/* ========================================== */

/* =============================================================================
   HES COMPUTERS ׳³ג€™׳’ג€ֲ¬׳’ג‚¬ֲ RTL Fixes Stylesheet
   /assets/css/rtl-fixes.css
   Fixes for Right-to-Left (Hebrew) language support
   Applied: June 2026
   ============================================================================= */

/* ---- UNIVERSAL RTL CORRECTIONS -------------------------------------------- */
html { direction: rtl; }

/* ---- FRONTEND LAYOUT -------- */
.nav-list { margin-left: .75rem; margin-right: 0; }
.mega-count { margin-left: .5rem; margin-right: 0; }

/* Navbar search input */
.search-input { text-align: right; padding-right: 0.85rem; padding-left: 2.2rem; }
.search-icon { left: .85rem; right: auto; }
.search-container-wrap .search-input-wrapper {
    transform: none !important;
}
.search-container-wrap .search-input-field,
.search-container-wrap .search-input-field:focus,
.search-container-wrap .search-input-field[aria-expanded="true"] {
    background-color: #F7FAFC;
    box-shadow: none !important;
}
.search-container-wrap .search-input-field:focus,
.search-container-wrap .search-input-field[aria-expanded="true"] {
    border-color: #E2E8F0;
}
.dark .search-container-wrap .search-input-field,
.dark .search-container-wrap .search-input-field:focus,
.dark .search-container-wrap .search-input-field[aria-expanded="true"] {
    background-color: #1A1D27;
    border-color: #2D3348;
}

/* Navbar navigation */
.nav-menu-toggle { border-left: 2px solid transparent; border-right: none; }
.nav-menu-toggle.active { border-left-color: var(--c-blue); border-right-color: transparent; }

/* ---- PRODUCT LISTINGS -------- */
.pli-side { 
    align-items: flex-start;
    border-left: 1px solid var(--bg-subtle); 
    border-right: none;
    padding-left: 1.5rem; 
    padding-right: 0;
}
.pli-price { text-align: right; }



/* Toasts/Notifications */
.toast-success { 
    border-left: 4px solid var(--c-green); 
    border-right: none;
}
.toast-error { 
    border-left: 4px solid var(--c-red); 
    border-right: none;
}
.toast-info { 
    border-left: 4px solid var(--c-blue); 
    border-right: none;
}

/* ---- CART & CHECKOUT -------- */
.cart-header { text-align: left; }
.totals-vat-note { text-align: right; }
.summary-vat { text-align: right; }

/* Order items cart table */
.oic-table th { 
    text-align: left; 
    width: 35%;
}

/* Quantity input */
.qty-input { 
    border-left: 1.5px solid var(--bd); 
    border-right: 1.5px solid var(--bd);
    text-align: center;
}

/* ---- ORDERS -------- */
.ostat { text-align: left; }
.ostat-warn { 
    border-left: 3px solid #f59e0b; 
    border-right: none;
}
.ostat-revenue { 
    border-left: 3px solid var(--brand-accent, #1d4ed8); 
    border-right: none;
}

.order-meta-item { 
    border-left: 2px solid #e2e8f0; 
    border-right: none;
    padding-left: .4rem;
    padding-right: 0;
}

/* ---- SPEC TABLES -------- */
.spec-table th { 
    text-align: left; 
    width: 40%;
}
.spec-unit { margin-left: .2rem; margin-right: 0; }
.spec-unit-input { text-align: right; }

/* ---- FORMS & INPUTS -------- */
input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    direction: rtl;
    text-align: right;
}

/* ---- MOBILE FIXES (600px) -------- */
@media (max-width: 600px) {
    .pli-side { 
        flex-direction: row; 
        border-left: none;
        border-top: 1px solid var(--bg-subtle); 
        padding-left: 0; 
        padding-top: 1rem;
        align-items: center;
        justify-content: space-between;
    }
    .modal-box { 
        border-radius: 14px 14px 0 0; 
        position: fixed; 
        bottom: 0;
        left: 0;
        right: 0;
    }
}

/* ---- ACCESSIBILITY -------- */
.skip-link { left: auto; right: 50%; transform: translateX(50%); }

/* ====================================================================== */

