/* ============================================================
   Hvision.ma – components.css
   Custom UI Components — CSS pur (compatible CDN Tailwind)
   ============================================================ */

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f59e0b;
    color: #0f0f1a;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-default);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3), 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.btn-primary:hover {
    background: #fbbf24;
    transform: translateY(-2px);
    color: #0f0f1a;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.45), 0 4px 12px rgba(0,0,0,0.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-default);
    text-decoration: none;
    backdrop-filter: blur(12px);
}
.btn-secondary:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-default);
    text-decoration: none;
}
.btn-outline:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
    text-decoration: none;
}

/* ── Cards ───────────────────────────────────────────────── */
.vision-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: var(--transition-default);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(6px);
}
.vision-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 158, 11, 0.15);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(245, 158, 11, 0.2);
    transform: translateY(-4px);
}

/* ── Form Elements ───────────────────────────────────────── */
.form-input {
    display: block;
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition-default);
    box-sizing: border-box;
}
.form-input::placeholder { color: #8892a4; }
.form-input:focus {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.04);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%238892a4' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}
select.form-input option { background: #0f0f1a; color: #ffffff; }

.form-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 10px;
    color: #c8d0e0;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 10;
}
.badge-best  { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #0f0f1a; }
.badge-new   { background: rgba(255,255,255,0.92); color: #0f0f1a; }
.badge-promo { background: linear-gradient(135deg, #dc2626, #ef4444); color: #ffffff; }

/* ── Filter Pills ────────────────────────────────────────── */
.filter-pill {
    display: inline-flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #8892a4;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-pill:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.07);
}
.filter-pill.active-filter,
.active-filter {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.5);
    color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

/* ── Range Slider ────────────────────────────────────────── */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    transition: transform 0.2s;
}
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    cursor: pointer;
    border: none;
}

/* ── No-scrollbar utility (horizontal scroll filters) ────── */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ── Section titles ──────────────────────────────────────── */
.section-label {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
}

/* ── Category Cards ──────────────────────────────────────── */
.cat-card {
    aspect-ratio: 3 / 4;
    min-height: 160px;
}
@media (min-width: 640px) {
    .cat-card {
        aspect-ratio: 3 / 4;
        min-height: 220px;
    }
}
@media (min-width: 1024px) {
    .cat-card {
        aspect-ratio: 2 / 3;
        min-height: 320px;
    }
}

/* ── Review cards — padding réduit sur mobile ────────────── */
@media (max-width: 639px) {
    .vision-card.review-card { padding: 1.5rem !important; }
}

/* ── Quick view modal — full screen sur mobile ───────────── */
@media (max-width: 639px) {
    #quickview-modal > div {
        flex-direction: column;
        max-height: 95vh;
        border-radius: 1rem;
        overflow-y: auto;
    }
    #quickview-modal > div > div:first-child {
        width: 100%;
        max-height: 45vh;
        aspect-ratio: auto;
    }
    #quickview-modal > div > div:last-child {
        padding: 1.5rem;
    }
}

/* ── No underline ────────────────────────────────────────── */
.no-underline { text-decoration: none !important; }

/* ── Hamburger button ────────────────────────────────────── */
#hamburger-btn {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
@media (max-width: 767px) {
    #hamburger-btn { display: flex; }
}
#hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 9999px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ── Vision Card Info Area ───────────────────────────────── */
.vision-card-info {
    padding: 0 0.875rem 1rem;
}
@media (min-width: 640px) {
    .vision-card-info { padding: 0 1.25rem 1.5rem; }
}

/* ── Mobile Bottom Navigation ────────────────────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(15, 15, 26, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(245, 158, 11, 0.18);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (max-width: 767px) {
    .mobile-bottom-nav { display: flex; }
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.625rem 0.25rem;
    color: #9aa1af;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}
.mobile-nav-item.active,
.mobile-nav-item:hover { color: #f59e0b; }
.mobile-nav-item i { font-size: 1.125rem; display: block; }
.mobile-nav-item.whatsapp { color: #7fc9a7; }
.mobile-nav-item.whatsapp:hover { color: #a5f3ca; }

#mobile-cart-count {
    position: absolute;
    top: 6px;
    right: calc(50% - 20px);
    width: 16px;
    height: 16px;
    background: #f59e0b;
    color: #0f0f1a;
    border-radius: 9999px;
    font-size: 8px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Floating WhatsApp Button (desktop only) ─────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 70;
    width: 52px;
    height: 52px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(45, 106, 79, 0.85);
    border: 1px solid rgba(127, 201, 167, 0.3);
    box-shadow: 0 8px 24px rgba(45, 106, 79, 0.4);
    color: #7fc9a7;
    font-size: 1.375rem;
}
.whatsapp-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 16px 40px rgba(45, 106, 79, 0.55);
    color: #ffffff;
    text-decoration: none;
}
@media (max-width: 767px) {
    .whatsapp-float { display: none; }
}

/* ── Product card action buttons (eye / cart) ────────────── */
.product-action-btn {
    background: #f59e0b;
    color: #0f0f1a !important;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.product-action-btn:hover {
    background: #fbbf24;
    transform: scale(1.1);
    color: #0f0f1a !important;
    text-decoration: none;
}
