/* ==========================================================================
   COTTIN ATELIER - NOMAD GOODS FLOATING HEADER (Pure Vanilla CSS)
   Inspired by nomadgoods.com - High Luxury Capsule Navbar
   ========================================================================== */

/* 1. SUPPRESS OLD DIVI THEME BUILDER & DEFAULT HEADERS */
header.et-l.et-l--header,
#main-header,
#top-header,
.et_pb_section_0_tb_header,
.et_pb_menu_0_tb_header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#page-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
}

html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* 2. TOP ANNOUNCEMENT TICKER (NOMAD STYLE) */
.cottin-nomad-announcement {
    background-color: #111111;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-align: center;
    padding: 7px 16px;
    width: 100%;
    max-width: 100vw;
    position: relative;
    z-index: 999995;
    box-sizing: border-box;
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cottin-nomad-announcement a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.cottin-nomad-announcement a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.cottin-ann-mobile {
    display: none;
}

@media (max-width: 680px) {
    .cottin-ann-desktop {
        display: none !important;
    }
    .cottin-ann-mobile {
        display: inline !important;
        font-size: 11px !important;
        letter-spacing: 0.2px !important;
    }
}

/* 3. FLOATING HEADER WRAPPER & CAPSULE PILL */
.cottin-nomad-header-wrapper {
    position: sticky;
    top: 10px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 999999;
    padding: 0 20px;
    box-sizing: border-box;
    pointer-events: none; /* allows clicking through around the capsule */
    background: transparent !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), top 0.25s ease;
}

.cottin-nomad-pill {
    pointer-events: auto; /* re-enable interaction inside pill */
    max-width: 1360px;
    margin: 8px auto;
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 9999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cottin-nomad-header-wrapper.is-scrolled .cottin-nomad-pill {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.11), 0 2px 6px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

/* 4. BRAND LOGO (LEFT) - STRICT DIMENSION LOCK */
.cottin-brand-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cottin-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: #111111;
    transition: opacity 0.2s ease;
}

.cottin-brand-link:hover {
    opacity: 0.8;
}

.cottin-brand-wrap img.cottin-brand-cat,
.cottin-brand-link img.cottin-brand-cat,
img.cottin-brand-cat {
    height: 26px !important;
    max-height: 26px !important;
    min-height: 26px !important;
    width: auto !important;
    max-width: 32px !important;
    min-width: 20px !important;
    display: inline-block !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    flex-shrink: 0 !important;
}

.cottin-brand-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #111111;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

/* 5. NAVIGATION LINKS (CENTER) */
.cottin-nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0 24px;
}

.cottin-nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cottin-nav-item,
.cottin-nav-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cottin-nav-item a,
.cottin-nav-menu li a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
    letter-spacing: -0.1px;
    position: relative;
    padding: 6px 2px;
    transition: color 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
    display: inline-block;
}

.cottin-nav-item a:hover,
.cottin-nav-menu li a:hover {
    color: #000000;
    opacity: 0.7;
}

.cottin-nav-item.is-active a,
.cottin-nav-menu li.current-menu-item a,
.cottin-nav-menu li.current_page_item a {
    color: #000000;
    font-weight: 700;
}

/* 6. RIGHT ACTIONS (SEARCH & CART ONLY - STRICTLY NO CLIENT/NOTIFICATIONS/COUNTRY) */
.cottin-actions-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cottin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #111111;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: background-color 0.2s ease, transform 0.15s ease;
    padding: 0;
    box-sizing: border-box;
}

.cottin-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000000;
    transform: scale(1.04);
}

.cottin-action-btn svg {
    display: block;
}

/* CART BADGE */
.cottin-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    padding: 0 4px;
    box-sizing: border-box;
    background: #111111;
    color: #ffffff;
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.cottin-cart-badge.is-zero {
    display: none !important;
}

/* MOBILE HAMBURGER BUTTON (Hidden on Desktop) */
.cottin-hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.cottin-hamburger-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.cottin-hamburger-btn span {
    display: block;
    width: 17px;
    height: 2px;
    background-color: #111111;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* 7. SEARCH MODAL OVERLAY */
.cottin-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    box-sizing: border-box;
    overflow: hidden;
}

.cottin-search-modal.is-open {
    display: flex;
}

.cottin-search-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cottin-search-card {
    position: relative;
    z-index: 2;
    background: #ffffff;
    width: 90%;
    max-width: 680px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    padding: 28px 32px;
    box-sizing: border-box;
    transform: translateY(-20px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cottin-search-modal.is-open .cottin-search-card {
    transform: translateY(0);
}

.cottin-search-form {
    margin: 0;
}

.cottin-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 2px solid #111111;
    padding-bottom: 12px;
}

.cottin-search-input-wrap svg {
    color: #111111;
    flex-shrink: 0;
}

.cottin-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #111111;
    background: transparent;
}

.cottin-search-input::placeholder {
    color: #888888;
}

.cottin-search-close-btn {
    background: #f0f0f2;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #555555;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cottin-search-close-btn:hover {
    background: #e2e2e5;
    color: #111111;
}

.cottin-search-quick-tags {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cottin-quick-label {
    font-size: 12px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.cottin-quick-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f4f4f6;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cottin-quick-tag:hover {
    background: #111111;
    color: #ffffff;
}

/* 8. MOBILE DRAWER */
.cottin-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 10000000;
    display: none;
    justify-content: flex-end;
    overflow: hidden;
}

.cottin-mobile-drawer.is-open {
    display: flex;
}

.cottin-drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cottin-drawer-panel {
    position: relative;
    z-index: 2;
    background: #ffffff;
    width: 82%;
    max-width: 360px;
    height: 100%;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cottin-mobile-drawer.is-open .cottin-drawer-panel {
    transform: translateX(0);
}

.cottin-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid #eeeeee;
}

.cottin-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f4f4f6;
    border: none;
    font-size: 16px;
    color: #333333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cottin-drawer-nav {
    flex: 1;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.cottin-drawer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cottin-drawer-nav ul li {
    margin: 0;
    padding: 0;
}

.cottin-drawer-nav a,
.cottin-drawer-nav ul li a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111111;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    display: block;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cottin-drawer-nav a:hover,
.cottin-drawer-nav a.highlight,
.cottin-drawer-nav ul li a:hover {
    background: #f4f4f6;
    color: #000000;
}

.cottin-drawer-footer {
    padding-top: 18px;
    border-top: 1px solid #eeeeee;
}

.cottin-drawer-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}

.cottin-drawer-shipping {
    font-size: 11.5px;
    color: #777777;
    text-align: center;
    margin: 0;
}

/* 9. PAGE-SPECIFIC INTEGRATIONS & FLOATING OVERLAY */

/* Global floating overlay: header hovers gracefully without creating artificial white blocks */
.cottin-nomad-header-wrapper {
    margin-bottom: -72px;
}

body.home #et-main-area {
    margin-top: -24px;
}

/* Divi standard pages (Nosotros, Corporativos, etc.): add top padding to the first section so content is not obscured */
body.page:not(.home):not(.page-id-426) #main-content .et_pb_section:first-child,
body.page:not(.home):not(.page-id-426) #et-main-area .et_pb_section:first-child {
    padding-top: 100px !important;
}

/* Shop & Product Pages: ensure html, body, page-container, et-boc and et-main-area seamlessly carry the nomad background */
html.single-product,
html.post-type-archive-product,
body.post-type-archive-product,
body.tax-product_cat,
body.single-product,
body.page-template-cottin-shop-nomad,
body.page-id-426,
body.woocommerce-cart,
body.woocommerce-checkout,
body.single-product #page-container,
body.single-product #et-boc,
body.single-product #et-main-area,
body.single-product #main-content,
body.post-type-archive-product #page-container,
body.post-type-archive-product #et-boc,
body.post-type-archive-product #et-main-area,
body.post-type-archive-product #main-content,
body.tax-product_cat #page-container,
body.tax-product_cat #et-boc,
body.tax-product_cat #et-main-area,
body.tax-product_cat #main-content,
body.page-template-cottin-shop-nomad #page-container,
body.page-template-cottin-shop-nomad #et-boc,
body.page-template-cottin-shop-nomad #et-main-area,
body.page-template-cottin-shop-nomad #main-content,
body.page-id-426 #page-container,
body.page-id-426 #et-boc,
body.page-id-426 #et-main-area,
body.page-id-426 #main-content,
body.woocommerce-cart #page-container,
body.woocommerce-cart #et-boc,
body.woocommerce-checkout #page-container,
body.woocommerce-checkout #et-boc {
    background-color: #F4F3F1 !important;
}

/* 10. RESPONSIVE BREAKPOINTS & MOBILE OVERFLOW FIXES */
@media (max-width: 1080px) {
    .cottin-nav-menu {
        gap: 16px;
    }
    .cottin-nav-item a {
        font-size: 12.5px;
    }
}

@media (max-width: 960px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    #page-container {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    .cottin-nav-center {
        display: none !important; /* hide desktop links on mobile */
    }
    .cottin-hamburger-btn {
        display: flex !important; /* show hamburger */
    }
    .cottin-nomad-header-wrapper {
        position: fixed !important;
        top: 34px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
        z-index: 9999999 !important;
        pointer-events: none !important;
        margin-bottom: 0 !important;
        background: transparent !important;
        transition: top 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s ease !important;
    }
    .cottin-nomad-header-wrapper.is-scrolled {
        top: 8px !important;
    }
    .cottin-nomad-pill {
        height: 50px !important;
        padding: 0 12px !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        pointer-events: auto !important;
    }
    .cottin-brand-wrap {
        flex: 0 0 auto !important;
    }
    .cottin-brand-link {
        gap: 6px !important;
    }
    .cottin-brand-wrap img.cottin-brand-cat {
        height: 20px !important;
        max-height: 20px !important;
        max-width: 24px !important;
    }
    .cottin-brand-text {
        font-size: 14.5px !important;
        letter-spacing: 1.2px !important;
    }
    .cottin-actions-right {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
    }
    .cottin-action-btn,
    .cottin-hamburger-btn {
        width: 30px !important;
        height: 30px !important;
    }
    .cottin-action-btn svg,
    .cottin-hamburger-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    body.home .cottin-nomad-header-wrapper {
        margin-bottom: 0 !important;
    }
    body.home #et-main-area {
        margin-top: 0 !important;
    }
    body.page:not(.home):not(.page-id-426) #main-content .et_pb_section:first-child,
    body.page:not(.home):not(.page-id-426) #et-main-area .et_pb_section:first-child {
        padding-top: 75px !important;
    }
}

/* Fix mobile viewport blowout caused by hero title at 48px with 15vw padding */
@media (max-width: 767px) {
    body.home .et_pb_section_0.et_pb_section {
        padding-left: 16px !important;
        padding-right: 16px !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    body.home .et_pb_text_0 h1 {
        font-size: 30px !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
    }
    body.home .et_pb_row_0 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}


