/* ===================================================================
   Vendex Archive Page
   =================================================================== */
.vx-archive {
    background: #FDFBF8;
    min-height: 60vh;
}

/* ---- Hero ---- */
.vx-archive-hero {
    background: linear-gradient(135deg, #00184a 0%, #002266 100%);
    padding: 26px 20px 22px;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vx-archive-hero--image {
    background-size: cover;
    background-position: center;
    position: relative;
}
.vx-archive-hero--image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,24,74,0.72);
}
.vx-archive-hero-inner {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}
.vx-archive-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}
.vx-archive-hero p {
    color: rgba(255,255,255,0.8);
    margin: 6px 0 0;
    font-size: 0.9rem;
}

/* ---- Category filter bar ---- */
.vx-cat-bar-wrap {
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.vx-cat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    max-width: 1400px;
    margin: 0 auto;
    direction: rtl;
    flex-wrap: wrap;
    row-gap: 8px;
}
.vx-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    background: #F7F4EF;
    color: #444;
    border: 2px solid transparent;
    flex-shrink: 0;
}
.vx-cat-pill:hover {
    background: #FFE8D5;
    color: #FF6B00;
    border-color: #FF6B00;
    text-decoration: none;
}
.vx-cat-pill--active {
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(255,107,0,0.3);
}
.vx-pill-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.vx-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(0,0,0,0.12);
    color: inherit;
}
.vx-cat-pill--active .vx-cat-count { background: rgba(255,255,255,0.3); }

/* Special filter pills */
.vx-cat-pill--special {
    background: #FFF4E8;
    color: #CC5500;
    border-color: #FFD5A8;
}
.vx-cat-pill--special:hover {
    background: #FFE8D0;
    color: #FF6B00;
    border-color: #FF6B00;
}
.vx-cat-pill--special.vx-cat-pill--active {
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: #fff !important;
    border-color: transparent;
}

/* ---- Body ---- */
.vx-archive-body {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 16px 80px;
}

/* ---- Toolbar ---- */
.vx-archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    direction: rtl;
}
.vx-archive-count .woocommerce-result-count {
    font-size: 13px;
    color: #888;
    margin: 0;
    white-space: nowrap;
}

/* Filter toggle button */
.vx-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff;
    border: 2px solid #00184a;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 700;
    color: #00184a;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    position: relative;
    font-family: inherit;
    direction: rtl;
    white-space: nowrap;
    flex-shrink: 0;
}
.vx-filter-toggle > svg:first-child { width: 14px; height: 14px; flex-shrink: 0; }
.vx-filter-toggle:hover,
.vx-filter-toggle.is-active {
    background: #00184a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,24,74,0.25);
}
.vx-filter-chevron {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}
.vx-filter-toggle.is-active .vx-filter-chevron { transform: rotate(180deg); }
.vx-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: #FF6B00;
    border-radius: 50%;
    border: 2px solid #FDFBF8;
}

/* ---- Filter panel ---- */
.vx-filter-panel {
    background: #fff;
    border: 1.5px solid #EAE7E2;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.09);
    overflow: hidden;
}
.vx-filter-panel-inner {
    padding: 22px 24px 20px;
}
.vx-filter-section { margin-bottom: 0; }
.vx-filter-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    color: #00184a;
    margin: 0 0 14px;
    direction: rtl;
}
.vx-filter-section-title svg { width: 16px; height: 16px; flex-shrink: 0; }
.vx-filter-divider {
    height: 1px;
    background: #F0EDEA;
    margin: 20px -24px;
}

/* Sort options grid */
.vx-sort-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    direction: rtl;
}
.vx-sort-option {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 22px;
    background: #F7F4EF;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.18s ease;
    user-select: none;
    white-space: nowrap;
}
.vx-sort-option:hover {
    border-color: #FF6B00;
    color: #FF6B00;
    background: #FFF8F2;
}
.vx-sort-option.is-active {
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(255,107,0,0.3);
}


/* Filter panel footer */
.vx-filter-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    direction: rtl;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #F0EDEA;
}
.vx-filter-reset-btn {
    padding: 10px 20px;
    border: 1.5px solid #D0CBC4;
    background: #fff;
    color: #777;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.18s, color 0.18s;
}
.vx-filter-reset-btn:hover { border-color: #FF6B00; color: #FF6B00; }
.vx-filter-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(255,107,0,0.35);
    transition: transform 0.18s, box-shadow 0.18s;
}
.vx-filter-apply-btn svg { width: 16px; height: 16px; }
.vx-filter-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,107,0,0.45);
}

/* ---- Products Grid (Homepage style) ---- */
.hp-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.hp-product-card {
    background: var(--vx-white, #fff);
    border-radius: var(--vx-radius, 12px);
    box-shadow: var(--vx-shadow, 0 4px 15px rgba(0,0,0,0.08));
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
.hp-product-card:hover {
    box-shadow: var(--vx-shadow-hover, 0 8px 25px rgba(0,0,0,0.12));
    transform: translateY(-5px);
}
.hp-product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--vx-gray-light, #F7F4EF);
}
.hp-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}
.hp-product-image.hp-hover-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}
.hp-product-card:hover .hp-product-image.hp-main-image { opacity: 0; }
.hp-product-card:hover .hp-product-image.hp-hover-image { opacity: 1; }
.hp-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--vx-primary, #FF6B00);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.hp-product-badge.hp-out-of-stock { background: var(--vx-dark, #00184a); }
.hp-product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.hp-product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--vx-text, #333);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
    direction: ltr;
    text-align: left;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}
.hp-product-title a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.hp-product-title a:hover { color: var(--vx-dark, #00184a); }
.hp-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--vx-primary, #FF6B00);
    margin-bottom: 15px;
}
.hp-product-price del { color: var(--vx-text-muted, #666); font-size: 14px; font-weight: 400; margin-left: 8px; }
.hp-product-price ins { text-decoration: none; }
.hp-product-actions { display: flex; gap: 10px; margin-top: auto; direction: rtl; }
.hp-btn-buy {
    flex: 1;
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(255,107,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hp-btn-buy:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(255,107,0,0.45); color: #fff; }
.hp-btn-cart {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid var(--vx-gray, #E5E5E5);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--vx-dark, #00184a);
    cursor: pointer;
    transition: all 0.2s ease;
}
.hp-btn-cart svg { width: 30px; height: 30px; }
.hp-btn-cart:hover { border-color: var(--vx-primary, #FF6B00); color: var(--vx-primary, #FF6B00); }
.hp-btn-out-of-stock {
    flex: 1; text-align: center; padding: 10px 12px;
    border-radius: 8px; background: #F3F4F6; color: #666;
    font-size: 13px; font-weight: 700;
}

/* ---- Load-more button ---- */
.vx-lm-wrap { display: flex; justify-content: center; margin-top: 44px; }
.vx-lm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 48px;
    background: #fff;
    color: #00184a;
    border: 2px solid #00184a;
    border-radius: 50px;
    font-size: 15.5px;
    font-weight: 700;
    font-family: "Metropolis", "IBM Plex Sans Arabic", "Cairo", sans-serif;
    cursor: pointer;
    transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.18s, box-shadow 0.22s;
    direction: rtl;
}
.vx-lm-btn:hover:not(:disabled) {
    background: #00184a;
    color: #fff;
    border-color: #00184a;
    box-shadow: 0 6px 22px rgba(0,24,74,0.25);
    transform: translateY(-2px);
}
.vx-lm-count {
    font-size: 0.85em;
    opacity: 0.7;
    font-weight: 500;
}
.vx-lm-btn:disabled { opacity: 0.6; cursor: wait; }
.vx-lm-icon svg  { width: 18px; height: 18px; }
.vx-lm-spinner svg { width: 18px; height: 18px; animation: vxSpin 0.75s linear infinite; }
@keyframes vxSpin { to { transform: rotate(360deg); } }

/* ---- Empty state ---- */
.vx-archive-empty { text-align: center; padding: 80px 20px; }
.vx-archive-empty-icon {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    background: #F7F4EF;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #999;
}
.vx-archive-empty-icon svg { width: 36px; height: 36px; }
.vx-archive-empty h2 { font-size: 1.3rem; color: #00184a; margin: 0 0 8px; }
.vx-archive-empty p  { font-size: 14px; color: #666; margin: 0 0 24px; }
.vx-archive-empty-btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #FF8C00, #FF6B00);
    color: #fff;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255,107,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vx-archive-empty-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,0,0.45); color: #fff; }

/* ---- Price range slider ---- */
.vx-price-section-body {
    max-width: 300px;
    direction: rtl;
}
.vx-price-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    direction: rtl;
}
.vx-price-display-chip {
    display: flex;
    align-items: baseline;
    gap: 3px;
    background: #fff;
    border: 1.5px solid #E5E2DC;
    border-radius: 8px;
    padding: 7px 10px;
    flex: 1;
    min-width: 0;
}
.vx-price-display-label {
    font-size: 10px;
    color: #aaa;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 2px;
}
.vx-price-display-val {
    font-size: 14px;
    font-weight: 700;
    color: #00184a;
    flex: 1;
    text-align: center;
    min-width: 0;
}
.vx-price-display-unit {
    font-size: 10px;
    color: #aaa;
    font-weight: 600;
}
.vx-price-display-sep {
    color: #ddd;
    font-size: 13px;
    flex-shrink: 0;
}

/* Track + fill */
.vx-range-wrap {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
}
.vx-range-track {
    position: absolute;
    left: 0; right: 0;
    height: 10px;
    border-radius: 99px;
    background-color: #E2DED8;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent 17px,
        rgba(255,255,255,0.7) 17px,
        rgba(255,255,255,0.7) 19px
    );
    overflow: hidden;
}
.vx-range-fill {
    position: absolute;
    height: 100%;
    right: 0;
    background: #FF6B00;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent 17px,
        rgba(255,255,255,0.25) 17px,
        rgba(255,255,255,0.25) 19px
    );
}

/* Range inputs */
.vx-range-input {
    position: absolute;
    left: 0; right: 0; width: 100%;
    height: 10px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    outline: none;
    margin: 0;
}
/* Webkit thumb */
.vx-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.20), 0 0 0 2px rgba(255,107,0,0.25);
    cursor: grab;
    pointer-events: all;
    transition: box-shadow 0.15s, transform 0.15s;
}
.vx-range-input::-webkit-slider-thumb:active { cursor: grabbing; }
.vx-range-input:active::-webkit-slider-thumb,
.vx-range-input:focus::-webkit-slider-thumb {
    box-shadow: 0 3px 10px rgba(0,0,0,0.22), 0 0 0 3px rgba(255,107,0,0.40);
    transform: scale(1.1);
}
/* Firefox thumb */
.vx-range-input::-moz-range-thumb {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.20), 0 0 0 2px rgba(255,107,0,0.25);
    cursor: grab;
    pointer-events: all;
}
.vx-range-input::-moz-range-thumb:active { cursor: grabbing; }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 1200px) {
    .hp-products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .hp-products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .hp-products-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .vx-archive-title  { font-size: 1.35rem; }
    .vx-archive-body   { padding: 20px 10px 80px; }
    .vx-cat-bar-wrap {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 44px, #000 calc(100% - 12px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 44px, #000 calc(100% - 12px), transparent 100%);
    }
    .vx-cat-bar {
        padding: 10px 16px 10px 4px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        max-width: none;
    }
    .vx-cat-bar::-webkit-scrollbar { display: none; }
    .vx-cat-pill { padding: 6px 13px; font-size: 12px; }
    .vx-filter-panel-inner { padding: 16px 16px 14px; }
    .vx-filter-divider { margin: 16px -16px; }
    .vx-sort-grid      { gap: 6px; }
    .vx-sort-option    { padding: 7px 13px; font-size: 12.5px; }
    .vx-price-display  { gap: 8px; }
    .vx-price-display-chip { padding: 7px 10px; }
    .vx-price-display-val  { font-size: 13.5px; }
    .vx-lm-btn         { padding: 13px 36px; font-size: 14.5px; }
    .vx-filter-footer  { flex-wrap: wrap; }
    .vx-filter-apply-btn { flex: 1; justify-content: center; }
}
