/* ============================================
   HEADER STYLE - OPTIMIZADO
   Mantiene funcionalidad actual
   ============================================ */

:root {
    --cc-primary: #F7B5CD;
    --cc-primary-dark: #d56d98;
    --cc-primary-soft: #fff4f8;
    --cc-text: #2f3142;
    --cc-text-dark: #111111;
    --cc-line: #ece7eb;
    --cc-bg: #ffffff;
    --cc-soft: #f5f5f7;
    --cc-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
    --cc-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --cc-transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body.cc-body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: var(--cc-text);
}

body.cc-mobile-lock {
    overflow: hidden;
}

.cc-container {
    width: min(1400px, calc(100% - 24px));
    margin: 0 auto;
}

/* ============================================
   TOPBAR
   ============================================ */
.cc-topbar {
    background: var(--cc-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10120;
    overflow: visible;
}

.cc-topbar-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
    overflow: visible;
}

/* ============================================
   LOGO
   ============================================ */
.cc-logo {
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

.cc-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.cc-logo img {
    display: block;
    width: auto;
    height: 52px;
    max-height: 52px;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.cc-logo img:hover {
    opacity: 0.9;
}

/* ============================================
   SEARCH
   ============================================ */
.cc-search,
.cc-smart-search-form {
    flex: 1;
    position: relative;
    z-index: 10130;
    overflow: visible;
}

.cc-search form {
    width: 100%;
    position: relative;
}

.cc-search input {
    width: 100%;
    height: 52px;
    border: none;
    outline: none;
    border-radius: 60px;
    background: #ffffff;
    padding: 0 120px 0 24px;
    font-size: 1rem;
    font-family: inherit;
    box-shadow: var(--cc-shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.cc-search input:focus {
    border-color: var(--cc-primary-dark);
    box-shadow: 0 0 0 3px rgba(213, 109, 152, 0.1);
}

.cc-search button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
    height: 44px;
    min-width: 44px;
    border-radius: 44px;
    background: #fff;
    color: var(--cc-text);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.cc-search .cc-search-submit {
    right: 6px;
    padding: 0 24px;
    background: var(--cc-primary-dark);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.cc-search .cc-search-submit i {
    font-size: 16px;
}

.cc-search .cc-search-submit:hover {
    background: #c25a86;
    transform: translateY(-50%) scale(0.98);
}

/* Results container */
.cc-smart-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10140;
}

.cc-smart-search-panel {
    background: #ffffff;
    border: 1px solid #f1d6e1;
    border-radius: 20px;
    box-shadow: var(--cc-shadow);
    overflow: hidden;
    animation: ccSearchFade 0.18s ease;
    z-index: 10140;
}

@keyframes ccSearchFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cc-smart-search-section {
    padding: 14px 18px;
}

.cc-smart-search-section-products {
    border-top: 1px solid #f3e3ea;
}

.cc-smart-search-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: #d94f8a;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cc-smart-search-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cc-smart-search-cat {
    display: grid;
    grid-template-columns: 34px 1fr 16px;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #fff2f7 0%, #fbe3ed 100%);
    color: #111111;
    border: 1px solid #f3bfd3;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(247, 181, 205, 0.14);
}

.cc-smart-search-cat:hover {
    background: #f7b5cd;
    border-color: #ec9bbb;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(247, 181, 205, 0.22);
}

.cc-smart-search-cat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #f3c5d6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-smart-search-cat-icon i {
    color: #d94f8a;
    font-size: 14px;
}

.cc-smart-search-cat-text {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.cc-smart-search-cat-arrow i {
    color: #c85a8c;
    font-size: 14px;
}

.cc-smart-search-cat:hover .cc-smart-search-cat-icon i,
.cc-smart-search-cat:hover .cc-smart-search-cat-arrow i {
    color: #111111;
}

.cc-smart-search-products {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-smart-search-product {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px 6px;
    border-radius: 14px;
    text-decoration: none;
    color: #111111;
    transition: background 0.18s ease, transform 0.18s ease;
}

.cc-smart-search-product:hover {
    background: #fff6fa;
    transform: translateX(2px);
}

.cc-smart-search-thumb-wrap {
    width: 62px;
    height: 62px;
    border: 1px solid #f2d9e3;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

.cc-smart-search-thumb {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cc-smart-search-info {
    min-width: 0;
}

.cc-smart-search-name {
    font-size: 14px;
    font-weight: 800;
    color: #111111;
    line-height: 1.25;
    margin-bottom: 4px;
}

.cc-smart-search-meta {
    font-size: 12px;
    color: #777777;
    margin-bottom: 4px;
}

.cc-smart-search-price {
    font-size: 14px;
    font-weight: 900;
    color: #111111;
}

.cc-smart-search-footer {
    padding: 14px 18px 18px;
    border-top: 1px solid #f3e3ea;
    background: #ffffff;
}

.cc-smart-search-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    border-radius: 16px;
    background: #111111;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cc-smart-search-more:hover {
    background: #d94f8a;
    transform: translateY(-1px);
}

.cc-smart-search-empty {
    padding: 18px;
    font-size: 14px;
    color: #555555;
}

/* ============================================
   TOP ACTIONS
   ============================================ */
.cc-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

.cc-top-actions a {
    text-decoration: none;
    color: var(--cc-text);
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 40px;
    transition: background 0.2s ease, transform 0.2s ease;
    background: rgba(255, 255, 255, 0.2);
}

.cc-top-actions a:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.cc-top-actions a i {
    font-size: 16px;
}

/* ============================================
   MENÚ DESKTOP
   ============================================ */
.cc-menu {
    background: #fff;
    border-bottom: 1px solid var(--cc-line);
    position: relative;
    z-index: 10070;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    overflow: visible;
}

.cc-menu-inner,
.cc-menu-desktop {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    position: relative;
    overflow: visible;
}

.cc-menu-desktop > a,
.cc-nav-item > button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0;
    text-decoration: none;
    color: var(--cc-text);
    font-weight: 700;
    font-size: 0.94rem;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.cc-menu-desktop > a i,
.cc-nav-item > button i {
    font-size: 14px;
    color: #d56d98;
    transition: transform 0.2s ease, color 0.2s ease;
}

.cc-menu-desktop > a span,
.cc-nav-item > button span {
    line-height: 1;
}

.cc-menu-desktop > a::after,
.cc-nav-item > button::after {
    content: "";
    position: absolute;
    left: -12px;
    top: 100%;
    width: calc(100% + 24px);
    height: 34px;
}

.cc-menu-desktop > a:hover,
.cc-nav-item > button:hover {
    color: #111827;
}

.cc-menu-desktop > a:hover i,
.cc-nav-item > button:hover i {
    color: #b84f7c;
    transform: translateY(-1px);
}

.cc-menu-desktop > a.active {
    color: #b84f7c;
}

.cc-menu-desktop > a.active i {
    color: #b84f7c;
}

/* SUBMENÚ */
.cc-nav-item {
    position: relative;
    z-index: 10080;
    overflow: visible;
}

.cc-submenu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 290px;
    max-width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid #f0e8ec;
    border-radius: 20px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.12);
    padding: 12px;
    z-index: 10150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    display: block;
}

.cc-submenu::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 24px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid #f0e8ec;
    border-top: 1px solid #f0e8ec;
    transform: rotate(45deg);
}

.cc-nav-item:hover .cc-submenu,
.cc-nav-item:focus-within .cc-submenu,
.cc-submenu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0s;
}

.cc-submenu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--cc-text);
    font-size: 0.94rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cc-submenu a + a {
    margin-top: 4px;
}

.cc-submenu a i {
    font-size: 12px;
    color: #c88aa5;
    width: 14px;
    text-align: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cc-submenu a:hover {
    background: #fff4f8;
    color: #111827;
    transform: translateX(2px);
}

.cc-submenu a:hover i {
    color: #b84f7c;
    transform: translateX(1px);
}

.cc-submenu::-webkit-scrollbar {
    width: 6px;
}

.cc-submenu::-webkit-scrollbar-thumb {
    background: #e4c1d0;
    border-radius: 999px;
}

.cc-submenu::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================
   MENÚ MÓVIL
   ============================================ */
.cc-mobile-drawer {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 9999;
}

.cc-mobile-drawer.open {
    display: block;
    pointer-events: auto;
}

.cc-mobile-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: min(92vw, 380px);
    max-width: 380px;
    height: 100vh;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

.cc-mobile-drawer.open .cc-mobile-panel {
    transform: translateX(0);
}

.cc-mobile-head-pro {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--cc-line);
    background: #fff;
}

.cc-mobile-head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cc-mobile-user-box-pro {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.cc-mobile-avatar-pro {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #b84f7c;
    flex-shrink: 0;
}

.cc-mobile-auth-buttons-pro {
    display: flex;
    gap: 10px;
    flex: 1;
}

.cc-mobile-auth-buttons-pro a {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 1px solid #d7dbe5;
    border-radius: 14px;
    text-decoration: none;
    color: #1f2742;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10px;
    background: #fff;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cc-mobile-auth-buttons-pro a:hover {
    background: var(--cc-primary-soft);
    border-color: var(--cc-primary-dark);
}

.cc-mobile-close-pro {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--cc-primary);
    color: #2f3142;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.cc-mobile-close-pro:hover {
    background: var(--cc-primary-dark);
    color: #fff;
}

.cc-mobile-search-pro {
    position: relative;
    padding: 14px 16px;
    border-bottom: 1px solid var(--cc-line);
    background: #fff;
}

.cc-mobile-search-pro input {
    width: 100%;
    height: 44px;
    border: none;
    outline: none;
    border-radius: 60px;
    background: var(--cc-soft);
    padding: 0 50px 0 18px;
    font-size: 0.93rem;
    color: #2f3142;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cc-mobile-search-pro input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(213, 109, 152, 0.2);
}

.cc-mobile-search-pro button {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    color: #d56d98;
}

.cc-mobile-nav-pro {
    padding: 0;
    background: #fff;
}

.cc-mobile-section-pro {
    padding: 8px 0;
    border-bottom: 1px solid var(--cc-line);
}

.cc-mobile-link-pro,
.cc-mobile-group-btn-pro {
    width: 100%;
    border: none;
    background: #fff;
    text-decoration: none;
    color: #20253d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.cc-mobile-link-pro:hover,
.cc-mobile-group-btn-pro:hover {
    background: #fff4f8;
}

.cc-mobile-link-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cc-mobile-link-left i {
    width: 22px;
    text-align: center;
    color: #d56d98;
    font-size: 19px;
}

.cc-mobile-arrow-pro {
    color: #7e8390;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.cc-mobile-group-btn-pro.open .cc-mobile-arrow-pro {
    transform: rotate(90deg);
}

.cc-mobile-submenu-pro {
    display: none;
    padding: 0 0 12px 56px;
    background: #fff;
}

.cc-mobile-submenu-pro.open {
    display: block;
}

.cc-mobile-submenu-pro a {
    display: block;
    text-decoration: none;
    color: #4b5563;
    font-size: 0.91rem;
    font-weight: 400;
    padding: 10px 0;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.cc-mobile-submenu-pro a:hover {
    color: #d56d98;
    padding-left: 4px;
}

.cc-mobile-empty {
    display: block;
    padding: 10px 0;
    color: #999;
    font-size: 0.85rem;
}

/* ============================================
   BURGER
   ============================================ */
.cc-burger {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.cc-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cc-text);
    border-radius: 999px;
    transition: all 0.2s ease;
}

.cc-burger:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   FIXS NECESARIOS PARA DROPDOWN / SEARCH
   ============================================ */
.cc-topbar,
.cc-topbar-inner,
.cc-menu,
.cc-menu-inner,
.cc-menu-desktop,
.cc-nav-item,
.cc-search,
.cc-smart-search-form {
    overflow: visible;
}

.cc-smart-search-results,
.cc-smart-search-panel {
    z-index: 10140;
}

body.cc-body,
body.cc-body .cc-category-page,
body.cc-body .cc-breadcrumb-wrap,
body.cc-body .cc-section,
body.cc-body .category-layout,
body.cc-body .category-content,
body.cc-body .category-header,
body.cc-body .category-header-top {
    overflow: visible;
}

body.cc-body .category-content,
body.cc-body .category-header {
    position: relative;
    z-index: 1;
}

body.cc-body .category-rail-shell {
    overflow: hidden;
    position: relative;
    z-index: 1;
}

body.cc-body .category-subcats,
body.cc-body .category-brands {
    overflow: visible;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .cc-nav-item::after {
        display: none;
    }

    .cc-submenu {
        display: none !important;
    }

    .cc-topbar-inner {
        display: grid;
        grid-template-columns: 42px auto 1fr auto;
        min-height: 64px;
        gap: 12px;
    }

    .cc-burger {
        display: flex;
    }

    .cc-top-actions a span {
        display: none;
    }

    .cc-top-actions a {
        padding: 8px;
    }

    .cc-menu {
        display: none;
    }

    .cc-logo img {
        height: 44px;
        max-height: 44px;
    }

    .cc-search {
        flex: none;
        width: 100%;
    }

    .cc-search input {
        height: 44px;
        padding: 0 100px 0 18px;
        font-size: 0.9rem;
    }

    .cc-search .cc-search-submit {
        padding: 0 18px;
        font-size: 0.85rem;
    }

    body.cc-body {
        overflow-x: hidden;
    }

    .cc-menu,
    .cc-menu-inner,
    .cc-menu-desktop,
    .cc-nav-item,
    .cc-submenu {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .cc-topbar-inner {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .cc-search {
        display: none;
    }

    .cc-top-actions {
        gap: 6px;
    }

    .cc-top-actions a {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
    }

    .cc-top-actions a i {
        margin: 0;
        font-size: 16px;
    }

    .cc-logo img {
        height: 36px;
        max-height: 36px;
    }

    .cc-mobile-panel {
        width: 350px;
        max-width: 92vw;
    }

    .cc-mobile-auth-buttons-pro {
        gap: 8px;
    }

    .cc-mobile-auth-buttons-pro a {
        height: 44px;
        font-size: 0.82rem;
        padding: 0 8px;
    }

    .cc-mobile-link-pro,
    .cc-mobile-group-btn-pro {
        padding: 13px 16px;
        font-size: 0.95rem;
    }

    .cc-mobile-link-left {
        gap: 14px;
    }

    .cc-mobile-link-left i {
        font-size: 18px;
    }
}

@media (min-width: 901px) {
    .cc-mobile-drawer {
        display: none !important;
    }

    .cc-burger {
        display: none !important;
    }
}