/* AUTOÉLITE MOROCCO - Premium Automotive E-Commerce CSS System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --bg-dark: #0B0E14;
    --bg-card: #131722;
    --bg-card-hover: #1B202E;
    --bg-surface: #171C28;
    --border-color: #242A38;
    --border-light: #2D3546;
    
    --primary: #FF5500;
    --primary-hover: #E04B00;
    --primary-glow: rgba(255, 85, 0, 0.25);

    --accent-blue: #0088FF;
    --accent-green: #10B981;
    --accent-red: #EF4444;

    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;

    --font-heading: 'Outfit', 'Tajawal', sans-serif;
    --font-body: 'Inter', 'Tajawal', sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px var(--primary-glow);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* RTL Layout Enhancements */
[dir="rtl"] {
    text-align: right;
}
[dir="rtl"] .font-heading {
    font-family: 'Tajawal', sans-serif;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Navigation */
.header-top {
    background: #07090D;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.header-top-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-contact-info {
    display: flex;
    gap: 1.5rem;
}
.header-main {
    background: rgba(19, 23, 34, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
    gap: 1.5rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: #FFF;
}
.logo span {
    color: var(--primary);
}
.logo-badge {
    background: var(--primary);
    color: #FFF;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* Vehicle Selector Pill in Header */
.garage-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}
.garage-pill:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}
.garage-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

/* Search Bar */
.search-form {
    position: relative;
    flex: 1;
    max-width: 420px;
}
.search-input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.55rem 1.25rem;
    padding-right: 2.75rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}
[dir="rtl"] .search-input {
    padding-right: 1.25rem;
    padding-left: 2.75rem;
}
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
[dir="rtl"] .search-btn {
    right: auto;
    left: 10px;
}
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 6px;
    box-shadow: var(--shadow-card);
    z-index: 100;
    display: none;
    overflow: hidden;
}

/* Action Icons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.action-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}
.badge-count {
    background: var(--primary);
    color: #FFF;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Sub-nav / Categories Bar */
.cat-nav {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
}
.cat-nav-flex {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 0;
}
.cat-nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.cat-nav-link:hover, .cat-nav-link.active {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-primary {
    background: var(--primary);
    color: #FFF;
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-glow);
}
.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}
.btn-whatsapp {
    background: #25D366;
    color: #FFF;
}
.btn-whatsapp:hover {
    background: #1EBE5D;
}
.btn-block {
    width: 100%;
}
.btn-lg {
    padding: 0.85rem 1.8rem;
    font-size: 1.05rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 4rem 0 5rem 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 85, 0, 0.12) 0%, transparent 60%);
    border-bottom: 1px solid var(--border-color);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: #FFF;
}
.hero-title span {
    color: var(--primary);
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Cards & Product Grid */
.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.product-thumb {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-surface);
    overflow: hidden;
}
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.product-card:hover .product-thumb img {
    transform: scale(1.05);
}
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
[dir="rtl"] .product-badges {
    left: auto;
    right: 10px;
}
.badge {
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}
.badge-danger { background: var(--accent-red); color: #FFF; }
.badge-success { background: var(--accent-green); color: #FFF; }
.badge-primary { background: var(--primary); color: #FFF; }
.badge-blue { background: var(--accent-blue); color: #FFF; }

.product-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-cat {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.product-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    color: #FFF;
}
.product-compatibility-pill {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}
.fit-verified { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.fit-universal { background: rgba(0, 136, 255, 0.15); color: var(--accent-blue); border: 1px solid rgba(0, 136, 255, 0.3); }
.fit-incompatible { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.3); }

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}
.price-box {
    display: flex;
    flex-direction: column;
}
.price-current {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}
.price-old {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: line-through;
}

/* Modals & Slide-overs */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 550px;
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-card);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
[dir="rtl"] .modal-close { right: auto; left: 1rem; }

/* Sticky WhatsApp Floating Button */
.whatsapp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 990;
    transition: var(--transition);
}
[dir="rtl"] .whatsapp-fab { right: auto; left: 24px; }
.whatsapp-fab:hover {
    transform: scale(1.1);
}

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
}
.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.table th, .table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
[dir="rtl"] .table th, [dir="rtl"] .table td {
    text-align: right;
}
.table th {
    background: var(--bg-surface);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.alert-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); border: 1px solid var(--accent-green); }
.alert-danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid var(--accent-red); }

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.5rem;
    background: var(--primary);
    border-radius: var(--radius-sm);
}

/* Footer */
.footer {
    background: #06080B;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem 0;
    margin-top: 5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .header-top { display: none; }
    .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-title { font-size: 2.1rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .search-form { display: none; }
}
