/* ============================================================
   ARCTIC LEOPARD — FIND YOUR DISTRIBUTOR MODAL
   Dark theme, red accents, glassmorphism, fully responsive.
   All selectors are namespaced with .dist- to avoid conflicts.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
    --dist-bg-deep: #0d0d11;
    --dist-bg-modal: #111115;
    --dist-bg-card: #1a1a20;
    --dist-bg-select: #1e1e26;
    --dist-border: rgba(255, 255, 255, 0.08);
    --dist-border-red: rgba(229, 9, 20, 0.6);
    --dist-red: #e50914;
    --dist-red-hover: #ff1a24;
    --dist-red-glow: rgba(229, 9, 20, 0.35);
    --dist-text-white: #f0f0f5;
    --dist-text-muted: #8a8a9a;
    --dist-text-subtle: #555560;
    --dist-radius-lg: 16px;
    --dist-radius-md: 10px;
    --dist-radius-sm: 6px;
    --dist-shadow: 0 32px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --dist-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   OVERLAY
   ============================================================ */
.dist-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dist-transition), visibility var(--dist-transition);
}

.dist-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   MODAL CONTAINER
   ============================================================ */
.dist-modal-container {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--dist-bg-modal);
    border: 1px solid var(--dist-border);
    border-top: 2px solid var(--dist-red);
    border-radius: var(--dist-radius-lg);
    box-shadow: var(--dist-shadow);
    scrollbar-width: thin;
    scrollbar-color: var(--dist-red) transparent;
    transform: translateY(24px) scale(0.97);
    transition: transform var(--dist-transition);
}

.dist-modal-container::-webkit-scrollbar {
    width: 4px;
}

.dist-modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.dist-modal-container::-webkit-scrollbar-thumb {
    background: var(--dist-red);
    border-radius: 4px;
}

.dist-modal-overlay.is-open .dist-modal-container {
    transform: translateY(0) scale(1);
}

/* ============================================================
   CLOSE BUTTON
   ============================================================ */
.dist-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: var(--dist-text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background var(--dist-transition), color var(--dist-transition), transform 0.15s ease;
}

.dist-modal-close:hover,
.dist-modal-close:focus-visible {
    background: var(--dist-red);
    color: #fff;
    transform: rotate(90deg);
    outline: none;
}

/* ============================================================
   MODAL HEADER
   ============================================================ */
.dist-modal-header {
    padding: 36px 36px 20px;
    text-align: center;
}

.dist-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.12);
    border: 1px solid rgba(229, 9, 20, 0.3);
    color: var(--dist-red);
    margin-bottom: 14px;
}

.dist-modal-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--dist-text-white);
    margin: 0 0 10px;
    text-transform: uppercase;
}

.dist-modal-subtitle {
    font-size: 14px;
    color: var(--dist-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   MODAL BODY
   ============================================================ */
.dist-modal-body {
    padding: 0 28px 28px;
}

/* ============================================================
   COUNTRY SELECT
   ============================================================ */
.dist-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--dist-bg-select);
    border: 1px solid var(--dist-border);
    border-radius: var(--dist-radius-md);
    margin-bottom: 18px;
    transition: border-color var(--dist-transition), box-shadow var(--dist-transition);
}

.dist-select-wrapper:focus-within {
    border-color: var(--dist-border-red);
    box-shadow: 0 0 0 3px var(--dist-red-glow);
}

.dist-select-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px 0 16px;
    color: var(--dist-red);
}

.dist-country-select {
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    color: var(--dist-text-white);
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 15px 44px 15px 0;
    cursor: pointer;
    width: 100%;
}

.dist-country-select option {
    background: #1e1e26;
    color: #f0f0f5;
    font-weight: 500;
    text-transform: uppercase;
    padding: 8px 12px;
}

.dist-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--dist-text-muted);
    display: flex;
    align-items: center;
    transition: color var(--dist-transition);
}

.dist-select-wrapper:focus-within .dist-select-arrow {
    color: var(--dist-red);
}

/* ============================================================
   DISTRIBUTOR CARDS
   ============================================================ */
.dist-cards-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dist-card {
    background: var(--dist-bg-card);
    border: 1px solid var(--dist-border);
    border-radius: var(--dist-radius-md);
    overflow: hidden;
    animation: distCardIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.dist-card[hidden] {
    display: none !important;
}

@keyframes distCardIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dist-card-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--dist-border);
}

.dist-card-logo-wrap {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    background: #fff;
    border-radius: var(--dist-radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dist-card-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.dist-card-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--dist-red);
    background: #1a1a20;
}

.dist-card-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.dist-card-name {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--dist-text-white);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.dist-card-badge {
    font-size: 12px;
    font-weight: 500;
    color: var(--dist-text-muted);
    display: block;
}

/* ============================================================
   CTA BUTTON
   ============================================================ */
.dist-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--dist-red);
    color: #fff;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 0 0 var(--dist-radius-md) var(--dist-radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background var(--dist-transition), box-shadow var(--dist-transition), transform 0.15s ease;
}

.dist-card-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.55s ease;
}

.dist-card-cta:hover::before {
    left: 160%;
}

.dist-card-cta:hover,
.dist-card-cta:focus-visible {
    background: var(--dist-red-hover);
    box-shadow: 0 6px 24px var(--dist-red-glow);
    transform: translateY(-1px);
    outline: none;
    color: #fff;
    text-decoration: none;
}

.dist-cta-domain {
    font-weight: 500;
    opacity: 0.85;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

/* ============================================================
   REDIRECT NOTE
   ============================================================ */
.dist-modal-note {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--dist-text-subtle);
    text-align: center;
    line-height: 1.5;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.dist-no-data {
    text-align: center;
    padding: 32px 20px;
    color: var(--dist-text-muted);
}

.dist-no-data svg {
    color: var(--dist-red);
    opacity: 0.4;
    margin-bottom: 12px;
}

.dist-no-data p {
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   FLOATING TRIGGER BUTTON
   ============================================================ */
.dist-floating-btn {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    background: rgba(17, 17, 21, 0.92);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(229, 9, 20, 0.25);
    transition: transform var(--dist-transition), box-shadow var(--dist-transition),
        background var(--dist-transition), border-color var(--dist-transition);
}

.dist-floating-btn svg {
    color: var(--dist-red);
    flex-shrink: 0;
}

.dist-floating-btn:hover,
.dist-floating-btn:focus-visible {
    background: rgba(229, 9, 20, 0.12);
    border-color: var(--dist-red);
    box-shadow: 0 12px 40px rgba(229, 9, 20, 0.3), 0 0 0 1px var(--dist-red);
    transform: translateX(-50%) translateY(-3px);
    outline: none;
}

.dist-floating-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(229, 9, 20, 0.4);
    animation: distPulse 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes distPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(1.12);
    }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 600px) {
    .dist-modal-overlay {
        padding: 12px;
        align-items: center;
        /* vertically centered, NOT bottom-docked */
    }

    .dist-modal-container {
        border-radius: var(--dist-radius-lg);
        /* full rounded corners on all sides */
        max-height: 88vh;
    }

    .dist-modal-header {
        padding: 28px 20px 16px;
    }

    .dist-modal-body {
        padding: 0 16px 24px;
    }

    .dist-card-info {
        padding: 14px 16px 12px;
    }

    .dist-card-logo-wrap {
        width: 60px;
        height: 48px;
    }

    .dist-floating-btn {
        bottom: 20px;
        font-size: 11px;
        padding: 11px 20px;
    }

    /* ── CTA button: stack label + domain vertically on small screens ── */
    .dist-card-cta {
        flex-direction: column;
        gap: 4px;
        padding: 12px 18px;
        text-align: center;
    }

    /* Domain URL: allow it to wrap onto its own line without overflow */
    .dist-cta-domain {
        word-break: break-all;
        font-size: 11px;
        opacity: 0.8;
        line-height: 1.4;
    }
}

/* ============================================================
   BODY LOCK when modal is open
   ============================================================ */
body.dist-modal-open {
    overflow: hidden;
}

/* ============================================================
   HEADER — Standalone User Icon
   Replaces the old "ACCOUNT" button label; icon-only link.
   ============================================================ */
.header-user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: inherit;
    /* inherits header text colour */
    font-size: 20px;
    text-decoration: none;
    transition: color var(--dist-transition), background var(--dist-transition);
    flex-shrink: 0;
    color: #ffffff;
}

.header-user-icon:hover,
.header-user-icon:focus-visible {
    color: var(--dist-red);
    background: rgba(229, 9, 20, 0.08);
    outline: none;
}

.header-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: inherit;
    /* inherits header text colour */
    font-size: 20px;
    text-decoration: none;
    transition: color var(--dist-transition), background var(--dist-transition);
    flex-shrink: 0;
    color: #ffffff;
}

.header-search-icon:hover,
.header-search-icon:focus-visible {
    color: var(--dist-red);
    background: rgba(229, 9, 20, 0.08);
    outline: none;
}

.header-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: inherit;
    /* inherits header text colour */
    font-size: 20px;
    text-decoration: none;
    transition: color var(--dist-transition), background var(--dist-transition);
    flex-shrink: 0;
    color: #ffffff;
}

.header-cart-icon:hover,
.header-seacartrch-icon:focus-visible {
    color: var(--dist-red);
    background: rgba(229, 9, 20, 0.08);
    outline: none;
}

.sticky.header-1 .header-main .header-cart-icon {
    color: #222222 !important;
    transition: color var(--dist-transition), background var(--dist-transition);
}

.sticky.header-1 .header-main .header-user-icon {
    color: #222222 !important;
    transition: color var(--dist-transition), background var(--dist-transition);
}

.sticky.header-1 .header-main .header-search-icon {
    color: #222222 !important;
    transition: color var(--dist-transition), background var(--dist-transition);
}


/* ============================================================
   HEADER — Distributor Pill Button  (.dist-header-btn)
   Same visual DNA as .dist-floating-btn but:
     • position: static  (inline in header flow, not fixed)
     • slightly smaller  (fits header height)
     • no pulse ring animation (less intrusive in nav)
     • inherits dark bg from the page but keeps the glow
   ============================================================ */
.dist-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    flex-shrink: 0;

    /* Dark pill matching the floating button style */
    background: rgba(17, 17, 21, 0.88);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1;

    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(229, 9, 20, 0.22);

    transition: transform var(--dist-transition),
        box-shadow var(--dist-transition),
        background var(--dist-transition),
        border-color var(--dist-transition);
}

/* Red pin icon — same colour as floating version */
.dist-header-btn svg {
    color: var(--dist-red);
    flex-shrink: 0;
}

.dist-header-btn:hover,
.dist-header-btn:focus-visible {
    background: rgba(229, 9, 20, 0.12);
    border-color: var(--dist-red);
    box-shadow: 0 8px 28px rgba(229, 9, 20, 0.32),
        0 0 0 1px var(--dist-red);
    transform: translateY(-2px);
    outline: none;
    color: #fff;
}

/* ── When the header is in its "scrolled / white background" state ──
   The theme typically adds a class like .sticky-header or changes
   background to white. Override to keep the dark pill readable.      */
.header-scrolled .dist-header-btn,
.sticky-header .dist-header-btn,
.header-1.sticky .dist-header-btn {
    background: rgba(13, 13, 17, 0.95);
    border-color: rgba(229, 9, 20, 0.4);
}

/* ── Responsive: hide text label on small screens, keep icon only ── */
@media (max-width: 1199px) {
    .dist-header-btn {
        padding: 9px 14px;
        font-size: 11px;
        letter-spacing: 0.07em;
    }
}



/* ============================================================
   MOBILE — Red location-pin trigger button  (.mob-dist-pin)
   Only visible on the slim top bar at ≤991px (xl breakpoint).
   Icon-only, no text — punchy red glow to draw the eye.
   ============================================================ */
.mob-dist-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--dist-red);
    font-size: 20px;
    cursor: pointer;
    position: relative;
    transition: color var(--dist-transition), background var(--dist-transition),
        box-shadow var(--dist-transition), transform 0.15s ease;
}

/* Subtle ambient glow ring around the pin */
.mob-dist-pin::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(229, 9, 20, 0.45);
    animation: distPulse 2.4s ease-in-out infinite;
    pointer-events: none;
}

.mob-dist-pin:hover,
.mob-dist-pin:focus-visible {
    background: rgba(229, 9, 20, 0.12);
    box-shadow: 0 0 16px rgba(229, 9, 20, 0.4);
    transform: scale(1.1);
    outline: none;
}

/* ── When header is scrolled/sticky and bg turns light ── */
.sticky.header-1 .mob-dist-pin,
.header-scrolled .mob-dist-pin {
    color: var(--dist-red);
    /* keep red regardless of header bg */
}

/* ============================================================
   OFF-CANVAS DRAWER — Quick-Actions bar (.offcanvas__quick-actions)
   Horizontal row of Cart / Search / Account icons shown only
   inside the mobile drawer (hidden on ≥xl via d-xl-none).
   ============================================================ */
.offcanvas__quick-actions {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin: 0 0 20px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

/* Each icon button/link in the quick-actions bar */
.oqa-icon {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 8px;
    border-radius: 8px;
    color: #c0c0cc;
    text-decoration: none;
    font-size: 18px;
    position: relative;
    cursor: pointer;
    transition: color var(--dist-transition), background var(--dist-transition);
}

.oqa-icon:hover,
.oqa-icon:focus-visible {
    color: var(--dist-red);
    background: rgba(229, 9, 20, 0.08);
    outline: none;
    text-decoration: none;
}

/* Text label below each icon */
.oqa-label {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    color: inherit;
}

/* Cart item count badge */
.oqa-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 16px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 50px;
    background: var(--dist-red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

/* ============================================================
   UTILITY — hide floating footer button on desktop (optional)
   Uncomment if you want the floating pill only on mobile.
   ============================================================ */
/*
@media (min-width: 1200px) {
    .dist-floating-btn { display: none; }
}
*/