/* Heavy Equipment Module - Premium Glassmorphic UI
   Dark slate gradient scheme, optimized for luxury industrial aesthetics.
   Performance: Minimal repaints, GPU-accelerated transitions.
   Accessibility: WCAG 2.1 AA compliant colors and states.
*/

/* ========== Variables & Body Reset ========== */
:root {
    --he-accent: #ed8936;
    --he-accent-light: #f6ad55;
    --he-accent-gradient: linear-gradient(135deg, #ed8936, #f6ad55);
    --he-bg: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #0b0f19 100%);
    --he-card-bg: linear-gradient(145deg, rgba(22, 28, 41, 0.95) 0%, rgba(32, 40, 57, 0.9) 100%);
    --he-text: #ffffff;
    --he-muted: rgba(255, 255, 255, 0.72);
    --he-border: rgba(255, 255, 255, 0.08);
    --he-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    --he-shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 25px rgba(237, 137, 54, 0.15);
    --he-transition: 0.3s cubic-bezier(0.25, 1, 0.2, 1);
}

body.he-page {
    background: var(--he-bg);
    color: var(--he-text);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    margin: 0;
}

/* ========== Hero - Professional Design ========== */
.he-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    padding: 7rem 0 5rem;
    overflow: hidden;
    background: transparent;
}

.he-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(11, 15, 25, 0.95) 0%, rgba(22, 28, 41, 0.9) 50%, rgba(11, 15, 25, 0.95) 100%),
                url('../images/heavy-equipment/heavy_equipment.png') center/cover no-repeat;
    z-index: 0;
}

.he-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 20% 50%, rgba(237, 137, 54, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.he-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}

.he-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 900px) {
    .he-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .he-hero-visual { order: -1; }
}

.he-hero-content {
    color: #fff;
}

.he-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(237, 137, 54, 0.15);
    border: 1px solid rgba(237, 137, 54, 0.35);
    color: var(--he-accent-light);
    padding: 0.45rem 1.1rem;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.1);
}

.he-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.he-hero-title-line {
    display: block;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.he-hero-title-accent {
    display: block;
    background: linear-gradient(135deg, var(--he-accent-light), var(--he-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(237, 137, 54, 0.25);
}

.he-hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--he-muted);
    max-width: 520px;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .he-hero-subtitle { margin-left: auto; margin-right: auto; }
}

.he-hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
}

@media (max-width: 900px) {
    .he-hero-stats { justify-content: center; }
}

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

.he-stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: linear-gradient(135deg, #fff, var(--he-accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.he-stat-label {
    font-size: 0.8rem;
    color: var(--he-muted);
    font-weight: 600;
}

.he-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
}

.he-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

@media (max-width: 900px) {
    .he-hero-cta { justify-content: center; }
}

.he-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--he-accent), var(--he-accent-light));
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.35);
    transition: all var(--he-transition);
}

.he-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(237, 137, 54, 0.45);
    color: #fff;
}

.he-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--he-transition);
}

.he-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Hero Visual - Gallery */
.he-hero-visual {
    flex-shrink: 0;
    min-width: 280px;
}

.he-hero-gallery {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    max-width: 560px;
    height: 350px;
}

.he-hero-img-main {
    grid-row: span 2;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.he-hero-img-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1s ease;
}

.he-hero-img-main:hover img {
    transform: scale(1.05);
}

.he-hero-img-secondary {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.he-hero-img-secondary img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1s ease;
}

.he-hero-img-secondary:hover img {
    transform: scale(1.05);
}

.he-hero-img-main::after,
.he-hero-img-secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

@media (max-width: 900px) {
    .he-hero-gallery {
        max-width: 100%;
        aspect-ratio: 16/10;
        margin: 0 auto;
        height: auto;
    }
}

@media (max-width: 600px) {
    .he-hero-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 200px 140px 140px;
        height: auto;
        min-height: 480px;
    }
    .he-hero-img-main {
        grid-row: span 1;
    }
}

/* ========== Section Titles ========== */
.he-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.5px;
}

.he-section-desc {
    text-align: center;
    color: var(--he-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ========== Categories Grid - Compact Glass ========== */
.he-categories {
    padding: 3rem 0;
    background: transparent;
    border-top: 1px solid var(--he-border);
}

.he-categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
    max-width: 100%;
}

@media (max-width: 1100px) {
    .he-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .he-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.he-category-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 0.8rem 1rem;
    box-shadow: var(--he-shadow);
    border: 1px solid var(--he-border);
    transition: all var(--he-transition);
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.he-category-card:hover {
    transform: translateY(-4px);
    border-color: var(--he-accent);
    background: rgba(237, 137, 54, 0.08);
    box-shadow: var(--he-shadow-lg);
}

.he-category-card:focus-visible {
    outline: 2px solid var(--he-accent);
    outline-offset: 2px;
}

.he-category-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--he-accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(237, 137, 54, 0.3);
}

.he-category-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.he-category-desc {
    display: none;
}

/* Skeleton */
.he-category-skeleton {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
}

@media (max-width: 1100px) {
    .he-category-skeleton {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .he-category-skeleton {
        grid-template-columns: repeat(2, 1fr);
    }
}

.he-skeleton-card {
    height: 52px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: he-skeleton 1.5s ease-in-out infinite;
    border-radius: 16px;
    border: 1px solid var(--he-border);
}

@keyframes he-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .he-skeleton-card { animation: none; background: rgba(255,255,255,0.04); }
}

/* ========== Filters & Search ========== */
.he-filters {
    padding: 3rem 0;
    background: transparent;
    border-top: 1px solid var(--he-border);
}

.he-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--he-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.he-filter-search {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.he-filter-search i {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--he-accent);
    pointer-events: none;
}

.he-filter-search input {
    width: 100%;
    padding: 0.75rem 1.1rem 0.75rem 2.8rem;
    border: 1px solid var(--he-border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    transition: all var(--he-transition);
}

.he-filter-search input:focus {
    outline: none;
    border-color: var(--he-accent);
    box-shadow: 0 0 0 3px rgba(237, 137, 54, 0.15);
}

.he-filter-category,
.he-filter-sort {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--he-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.he-filter-category select,
.he-filter-sort select {
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--he-border);
    border-radius: 12px;
    font-size: 0.9rem;
    background: #111827;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    outline: none;
    cursor: pointer;
    transition: border-color var(--he-transition);
}

.he-filter-category select:focus,
.he-filter-sort select:focus {
    border-color: var(--he-accent);
}

/* ========== Products Grid & Cards ========== */
.he-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .he-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .he-products-grid {
        grid-template-columns: 1fr;
    }
}

.he-products-grid.he-loading { min-height: 200px; }

.he-products-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--he-muted);
    font-size: 1rem;
}

.he-products-loading i { margin-left: 0.5rem; color: var(--he-accent); }

/* ========== Product Card Glassmorphism ========== */
.he-product-card {
    background: var(--he-card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--he-border);
    box-shadow: var(--he-shadow);
    transition: all var(--he-transition);
    display: flex;
    flex-direction: column;
}

.he-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--he-shadow-lg);
    border-color: rgba(237, 137, 54, 0.35);
}

.he-product-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: #0b0f19;
}

.he-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.2, 1);
}

.he-product-card:hover .he-product-image img {
    transform: scale(1.08);
}

.he-product-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(237, 137, 54, 0.9);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.he-product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.he-product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}

.he-product-specs {
    font-size: 0.8rem;
    color: var(--he-accent-light);
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}

.he-product-rental {
    font-size: 0.82rem;
    font-weight: 700;
    color: #48bb78;
    margin: 0;
    background: rgba(72, 187, 120, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(72, 187, 120, 0.15);
    display: inline-block;
    align-self: flex-start;
}

.he-product-desc {
    font-size: 0.88rem;
    color: var(--he-muted);
    line-height: 1.6;
    margin: 0.4rem 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3.2em; /* Fallback for 2 lines */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.he-product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto; /* Aligns actions row to bottom */
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.he-product-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Cairo', sans-serif;
}

.he-product-actions .btn-primary {
    background: linear-gradient(135deg, var(--he-accent), var(--he-accent-light));
    color: #fff;
    box-shadow: 0 4px 10px rgba(237, 137, 54, 0.2);
}

.he-product-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(237, 137, 54, 0.35);
}

.he-product-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.he-product-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.he-product-actions .btn-outline-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.he-product-actions .btn-outline-secondary:hover {
    border-color: var(--he-accent);
    color: var(--he-accent);
}

.he-product-actions .btn-warning {
    background: #ecc94b;
    color: #1a202c;
    box-shadow: 0 4px 10px rgba(236, 201, 75, 0.2);
}

.he-product-actions .btn-warning:hover {
    background: #d69e2e;
    transform: translateY(-1px);
}

.he-product-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #25d366;
    color: #fff !important;
    border-radius: 8px;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
    margin-right: auto; /* Aligns WhatsApp button to the left (far side in RTL) */
}

.he-product-cta:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    opacity: 1;
}

.he-empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--he-muted);
    font-size: 1.1rem;
}

.he-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--he-accent);
    opacity: 0.7;
}

.he-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding: 0.5rem 0;
}

.he-load-more-btn {
    padding: 0.75rem 2rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all var(--he-transition);
}

.he-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== Tracking Section ========== */
.he-track-section {
    padding: 3rem 0;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--he-border);
}

.he-track-box {
    display: flex;
    gap: 0.6rem;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.he-track-input {
    flex: 1;
    padding: 0.75rem 1.1rem;
    border: 1px solid var(--he-border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    font-family: 'Cairo', sans-serif;
    transition: border-color var(--he-transition);
}

.he-track-input:focus {
    border-color: var(--he-accent);
}

.he-track-result {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 16px;
    background: var(--he-card-bg);
    border: 1px solid var(--he-border);
    box-shadow: var(--he-shadow);
    color: #fff;
    line-height: 1.7;
}

/* ========== Compare Bar ========== */
.he-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #111827, #0b0f19);
    color: #fff;
    padding: 1rem 1.25rem;
    z-index: 1000;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.he-compare-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.he-compare-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--he-accent-light);
}

.he-compare-btn {
    background: var(--he-accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.35);
    transition: all 0.2s ease;
}

.he-compare-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(237, 137, 54, 0.45);
}

.he-compare-clear {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.he-compare-clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #e53e3e;
}

/* ========== Modals (Glassmorphism & Darkness) ========== */
.he-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.he-modal.is-open {
    display: flex !important;
}

.he-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 16, 0.85);
}

.he-modal-content {
    position: relative;
    background: linear-gradient(145deg, #111827 0%, #0b0f19 100%);
    border-radius: 24px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.he-compare-modal-content {
    max-width: 95%;
    max-height: 85vh;
}

.he-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.he-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.he-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.he-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: rotate(90deg);
}

.he-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.he-order-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.he-order-type-tab {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: transparent;
    color: var(--he-muted);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.he-order-type-tab.active {
    background: var(--he-accent);
    color: #fff;
    box-shadow: 0 4px 10px rgba(237, 137, 54, 0.25);
}

.he-rental-options {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.he-rental-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--he-muted);
}

.he-rental-options select {
    width: 100%;
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #111827;
    color: #fff;
    outline: none;
    font-family: 'Cairo', sans-serif;
}

.he-rental-estimate {
    font-weight: 700;
    color: var(--he-accent-light);
}

.he-modal-body .form-group {
    margin-bottom: 1.25rem;
}

.he-modal-body .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--he-muted);
}

.he-modal-body .form-group input,
.he-modal-body .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    outline: none;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s;
}

.he-modal-body .form-group input:focus,
.he-modal-body .form-group textarea:focus {
    border-color: var(--he-accent);
}

.he-modal-body button[type="submit"] {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--he-accent), var(--he-accent-light));
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
}

.he-modal-body button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.45);
}

.he-order-success {
    padding: 1.25rem;
    background: rgba(72, 187, 120, 0.15);
    color: #48bb78;
    border-radius: 12px;
    border: 1px solid rgba(72, 187, 120, 0.25);
    margin-top: 1rem;
    line-height: 1.6;
}

/* ========== Compare Table inside modal ========== */
.he-compare-table-wrap {
    overflow-x: auto;
    padding: 1.5rem;
}

.he-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    color: #fff;
}

.he-compare-table th, 
.he-compare-table td {
    padding: 0.8rem 1rem;
    text-align: right;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.he-compare-table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 700;
    vertical-align: top;
    color: #fff;
}

.he-compare-thumb {
    display: block;
    max-width: 150px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========== CTA Section ========== */
.he-cta {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.he-cta-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #111827 0%, #1a202c 100%);
    z-index: 0;
}

.he-cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.he-cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}

.he-cta-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--he-muted);
}

.he-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.he-cta-buttons .action-btn,
.he-cta-buttons .cta-primary,
.he-cta-buttons .cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.he-cta-buttons .cta-primary,
.he-cta-buttons .action-btn {
    background: linear-gradient(135deg, var(--he-accent), var(--he-accent-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

.he-cta-buttons .cta-primary:hover,
.he-cta-buttons .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 137, 54, 0.45);
    color: #fff;
}

.he-cta-buttons .cta-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.he-cta-buttons .cta-secondary:hover {
    border-color: var(--he-accent);
    color: var(--he-accent);
    background: rgba(255, 255, 255, 0.08);
}

/* ========== SEO Blocks ========== */
.he-seo-blocks {
    padding: 3rem 0;
    background: transparent;
    border-top: 1px solid var(--he-border);
}

.he-seo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .he-seo-grid {
        grid-template-columns: 1fr;
    }
}

.he-seo-card {
    background: var(--he-card-bg);
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px solid var(--he-border);
    box-shadow: var(--he-shadow);
    color: #fff;
}

.he-seo-card i {
    font-size: 1.8rem;
    color: var(--he-accent);
    margin-bottom: 0.75rem;
}

.he-seo-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.he-seo-card p {
    font-size: 0.88rem;
    color: var(--he-muted);
    line-height: 1.6;
}

/* ========== Utilities ========== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ========== Condition Select Dropdown ========== */
.he-filter-condition {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--he-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.he-filter-condition select {
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--he-border);
    border-radius: 12px;
    font-size: 0.9rem;
    background: #111827;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    outline: none;
    cursor: pointer;
    transition: border-color var(--he-transition);
}

.he-filter-condition select:focus {
    border-color: var(--he-accent);
}

/* ========== Condition Badge ========== */
.he-cond-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    align-self: flex-start;
}
.he-cond-badge.cond-new {
    background: rgba(72, 187, 120, 0.15);
    color: #48bb78;
    border: 1px solid rgba(72, 187, 120, 0.25);
}
.he-cond-badge.cond-used {
    background: rgba(66, 153, 225, 0.15);
    color: #4299e1;
    border: 1px solid rgba(66, 153, 225, 0.25);
}

/* ========== Pagination ========== */
.he-pagination-wrap {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}
.he-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.he-pagination a,
.he-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s cubic-bezier(0.25, 1, 0.2, 1);
    cursor: pointer;
}
.he-pagination a:hover {
    border-color: var(--he-accent);
    color: var(--he-accent-light);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}
.he-pagination .page-current {
    background: var(--he-accent);
    color: #fff;
    border-color: var(--he-accent);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.35);
}
.he-pagination .page-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}

/* ========== Detail Modal Content ========== */
.he-detail-wrap {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .he-detail-wrap {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.he-detail-media {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    background: #0b0f19;
    aspect-ratio: 1.3;
}

.he-detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.he-detail-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.he-detail-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.he-detail-badge {
    background: rgba(237, 137, 54, 0.15);
    border: 1px solid rgba(237, 137, 54, 0.3);
    color: var(--he-accent-light);
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.he-detail-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.35;
}

.he-detail-desc {
    font-size: 0.92rem;
    color: var(--he-muted);
    line-height: 1.6;
    margin: 0;
}

.he-detail-specs-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.4rem;
    margin-top: 0.5rem;
}

.he-detail-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

@media (max-width: 480px) {
    .he-detail-specs-grid {
        grid-template-columns: 1fr;
    }
}

.he-detail-spec-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.he-detail-spec-label {
    color: var(--he-muted);
    font-weight: 600;
}

.he-detail-spec-val {
    color: #fff;
    font-weight: 700;
}

.he-detail-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #48bb78;
    background: rgba(72, 187, 120, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(72, 187, 120, 0.25);
    display: inline-flex;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.he-detail-actions-modal {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.he-detail-actions-modal .btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.he-detail-actions-modal .btn-primary {
    background: linear-gradient(135deg, var(--he-accent), var(--he-accent-light));
    color: #fff;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.25);
}

.he-detail-actions-modal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(237, 137, 54, 0.45);
}

.he-detail-actions-modal .btn-secondary {
    background: #25d366;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.he-detail-actions-modal .btn-secondary:hover {
    background: #20ba56;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}
