/* ==========================================================
   GLOBAL COMPONENTS — Header / Nav + WhatsApp + Newsletter
   Loaded on all pages
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600&display=swap');

/* ════════════════════════════════════════════════════════════
   SHARED HEADER / TOP NAV
   Now rendered by the unified Coco_Nav plugin
   ════════════════════════════════════════════════════════════ */

.coco-haus-page .coco-nav-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 22px 60px;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    z-index: 10;
    font-family: 'Sora', -apple-system, sans-serif;
}

/* Legacy: kept for any remaining old markup */
.chp-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 60px;
    z-index: 10;
    font-family: 'Sora', -apple-system, sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.chp-nav-left .chp-logo {
    text-decoration: none;
}

.chp-nav-left .chp-logo img {
    height: 55px;
    width: auto;
    display: block;
}

.chp-nav-left .chp-logo-text {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.28em;
    color: #fff;
    text-transform: uppercase;
}

.chp-nav-center {
    display: flex;
    align-items: center;
    gap: 26px;
}

.chp-nav-center a {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.chp-nav-center a:hover {
    opacity: 1;
}

/* Dropdown */
.chp-nav-dropdown {
    position: relative;
}

.chp-nav-dropdown-trigger {
    cursor: pointer;
}

.chp-nav-dropdown-trigger::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255,255,255,0.6);
    margin-left: 6px;
    vertical-align: middle;
}

.chp-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 20;
}

.chp-nav-dropdown:hover .chp-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.chp-nav-dropdown-menu a {
    display: block;
    padding: 10px 22px;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #fff !important;
    opacity: 0.8;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
}

.chp-nav-dropdown-menu a:hover {
    background: rgba(212, 175, 55, 0.1);
    opacity: 1;
}

.chp-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chp-nav-pill {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 0.14em;
    transition: all 0.2s ease;
}

.chp-nav-pill:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
    color: #fff;
}

/* Hamburger icon */
.chp-hamburger {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chp-hamburger::before,
.chp-hamburger::after {
    content: "";
    width: 16px;
    height: 1.5px;
    background: #fff;
    position: absolute;
}

.chp-hamburger::before { transform: translateY(-3px); }
.chp-hamburger::after  { transform: translateY(3px); }

.chp-hamburger:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

/* ── Drawer Overlay ─────────────────────────────────────── */

.chp-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 40;
}

/* ── Drawer Panel ───────────────────────────────────────── */

.chp-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 80vw;
    height: 100vh;
    background: radial-gradient(circle at top, #050509 0, #020206 40%, #000 100%);
    padding: 34px 26px 40px;
    box-shadow: -18px 0 60px rgba(0, 0, 0, 0.9);
    border-left: 1px solid rgba(212, 175, 55, 0.25);
    color: #fff;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 50;
    box-sizing: border-box;
    overflow-y: auto;
    font-family: 'Sora', -apple-system, sans-serif;
}

.chp-menu-open .chp-drawer {
    transform: translateX(0);
}

.chp-menu-open .chp-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer header */
.chp-drawer-header {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.22em;
    margin-bottom: 22px;
    text-transform: uppercase;
}

.chp-drawer-header span {
    display: block;
    font-size: 10px;
    opacity: 0.6;
    letter-spacing: 0.18em;
    margin-top: 6px;
}

/* Close button */
.chp-drawer-close {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chp-drawer-close::before,
.chp-drawer-close::after {
    content: "";
    width: 14px;
    height: 1px;
    background: #e5e7eb;
    position: absolute;
}

.chp-drawer-close::before { transform: rotate(45deg); }
.chp-drawer-close::after  { transform: rotate(-45deg); }

/* Section labels */
.chp-drawer-label {
    margin-top: 22px;
    margin-bottom: 6px;
    font-size: 10px;
    letter-spacing: 0.16em;
    opacity: 0.55;
    text-transform: uppercase;
}

/* Menu items */
.chp-drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
    letter-spacing: 0.04em;
    opacity: 0.9;
    border-bottom: 1px solid rgba(212, 175, 55, 0.28);
    text-decoration: none;
    color: #fff;
}

.chp-drawer-item:last-of-type {
    border-bottom: none;
}

.chp-drawer-bullet {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.chp-drawer-bullet::before {
    content: "";
    width: 8px;
    height: 1px;
    background: rgba(212, 175, 55, 0.9);
}

/* ── Nav Mobile ─────────────────────────────────────────── */

@media (max-width: 1024px) {
    .chp-nav-center {
        display: none;
    }

    .chp-nav {
        padding: 18px 24px;
    }
}

@media (max-width: 768px) {
    .chp-nav {
        padding: 16px 20px;
    }

    .chp-nav-pill {
        display: none;
    }

    .chp-nav-left .chp-logo img {
        height: 40px;
    }

    .chp-drawer {
        width: 280px;
        padding: 30px 22px 34px;
    }

    .coco-haus-page .coco-nav-bar {
        padding: 16px 20px;
    }
}

/* Override link colors from haus-pages theme */
.coco-haus-page .coco-nav-bar a,
.coco-haus-page .coco-nav-drawer a {
    color: #fff !important;
    opacity: 1;
}

/* Legacy */
.coco-haus-page .chp-nav a,
.coco-haus-page .chp-drawer a {
    color: #fff;
    opacity: 1;
}

.coco-haus-page .chp-nav a:hover,
.coco-haus-page .chp-drawer a:hover {
    opacity: 0.8;
}

/* ── Floating WhatsApp Chat Button ─────────────────────── */
/* Green pill with icon + "Chat with us" label.
   The WhatsApp Channel "Follow" pill sits above this (dark bg, green border).
   The two are visually distinct: this one = solid green = "talk to someone",
   the one above = dark pill = "follow our channel". */

.coco-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    height: auto;
    width: auto;
    background: #25D366;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none !important;
}

.coco-whatsapp-float:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.coco-whatsapp-float .coco-wa-icon {
    width: 22px;
    height: 22px;
    fill: #fff;
    flex-shrink: 0;
}

.coco-whatsapp-float .coco-wa-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
}

/* Pulse animation on load */
@keyframes wa-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.coco-whatsapp-float {
    animation: wa-pulse 2.5s ease-out 3s 3;
}

/* ── Newsletter Footer Bar ─────────────────────────────── */

.coco-newsletter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: #0D0D0D;
    border-top: 1px solid rgba(201, 162, 39, 0.15);
    padding: 20px 40px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.coco-newsletter-bar.is-visible {
    transform: translateY(0);
}

.coco-newsletter-bar.has-basket {
    bottom: 80px;
}

.coco-newsletter-dismiss {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(250, 247, 240, 0.4);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.coco-newsletter-dismiss:hover {
    color: #FAF7F0;
}

.coco-newsletter-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.coco-newsletter-text {
    flex: 1;
}

.coco-newsletter-text strong {
    display: block;
    font-family: 'Sora', -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #FAF7F0;
    margin-bottom: 4px;
}

.coco-newsletter-text span {
    font-family: 'Sora', -apple-system, sans-serif;
    font-size: 13px;
    color: rgba(250, 247, 240, 0.6);
}

.coco-newsletter-form {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.coco-newsletter-form input[type="text"],
.coco-newsletter-form input[type="email"] {
    background: #1A1A1A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 12px 20px;
    color: #FAF7F0;
    font-family: 'Sora', -apple-system, sans-serif;
    font-size: 14px;
    width: 280px;
    outline: none;
    transition: border-color 0.3s ease;
}

.coco-newsletter-form input[type="text"]:focus,
.coco-newsletter-form input[type="email"]:focus {
    border-color: rgba(201, 162, 39, 0.5);
}

.coco-newsletter-form input[type="text"]::placeholder,
.coco-newsletter-form input[type="email"]::placeholder {
    color: rgba(250, 247, 240, 0.4);
}

.coco-newsletter-form button {
    background: linear-gradient(135deg, #C9A227, #B8960C);
    color: #0D0D0D;
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-family: 'Sora', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.coco-newsletter-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.3);
}

/* Newsletter status messages */
.coco-newsletter-msg {
    font-family: 'Sora', -apple-system, sans-serif;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 999px;
    display: none;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.coco-newsletter-msg.is-success {
    display: inline-flex;
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.coco-newsletter-msg.is-error {
    display: inline-flex;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.coco-newsletter-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .coco-newsletter-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .coco-newsletter-form {
        width: 100%;
        flex-direction: column;
    }

    .coco-newsletter-form input[type="text"],
    .coco-newsletter-form input[type="email"] {
        width: 100%;
    }

    .coco-newsletter-form button {
        width: 100%;
    }

    .coco-whatsapp-float {
        bottom: 16px;
        right: 16px;
        padding: 10px 14px;
        border-radius: 24px;
        /* Smooth transition when the channel bar pushes us up */
        transition: bottom 0.4s cubic-bezier(0.16,1,0.3,1),
                    transform 0.25s ease, box-shadow 0.25s ease;
    }
    .coco-whatsapp-float .coco-wa-icon {
        width: 20px;
        height: 20px;
    }
    .coco-whatsapp-float .coco-wa-label {
        font-size: 12px;
    }
}
