/* =========================================================
   ARC · Shop Bar (Navegación secundaria de tienda)
   ========================================================= */

.shop-bar {
    background: var(--color-dark);
    color: var(--brand-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 84px; /* Altura del header principal */
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shop-bar .container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 24px;
}

.shop-bar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: 60px;
}

/* ===== NAVEGACIÓN IZQUIERDA ===== */
.shop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: var(--font-family);
}

.shop-nav-link:hover {
    background: rgba(255, 205, 53, 0.1);
    color: var(--brand-gold);
}

.shop-nav-link.active {
    /* background: var(--brand-gold); */
    /* color: var(--brand-black); */
    color: var(--brand-gold);
}

.shop-nav-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ===== DROPDOWN GENÉRICO ===== */
.shop-nav-dropdown,
.shop-user-menu {
    position: relative;
}

.shop-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--brand-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-gray-border);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    color: var(--color-dark);
}

.shop-nav-dropdown:hover .shop-dropdown-menu,
.shop-user-menu .shop-dropdown-menu.open,
.shop-nav-dropdown.open .shop-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.shop-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--color-dark);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.shop-dropdown-menu a:hover {
    background: var(--color-light);
    color: var(--brand-black);
}

.shop-dropdown-menu .cat-count {
    margin-left: auto;
    color: var(--color-gray);
    font-size: 0.78rem;
}

/* ===== BUSCADOR CENTRAL ===== */
.shop-search {
    display: flex;
    justify-content: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.shop-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    transition: var(--transition);
}

.shop-search-form:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(255, 205, 53, 0.15);
}

.shop-search-form .search-icon {
    position: absolute;
    height: 24px;
    left: 16px;
    font-size: 0.95rem;
    opacity: 0.6;
    pointer-events: none;
}

.shop-search-field {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--brand-white);
    padding: 12px 16px 12px 44px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    outline: none;
    width: 100%;
}

.shop-search-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== ACCIONES DE USUARIO ===== */
.shop-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-white);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-family: var(--font-family);
    white-space: nowrap;
}

.shop-action-btn:hover {
    background: rgba(255, 205, 53, 0.15);
    color: var(--brand-gold);
}

.shop-action-btn.active {
    border: solid 1px var(--brand-gold);
    color: var(--brand-gold);
}

.shop-action-btn .shop-nav-icon {
    font-size: 1rem;
}

/* ===== USUARIO ===== */
.user-avatar-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--brand-gold);
    color: var(--brand-black);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
}

.user-name-label {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: var(--transition);
}

.shop-user-menu .shop-dropdown-menu,
.shop-cart-dropdown {
    left: auto;
    right: 0;
}

.user-dropdown-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-gray-border);
    margin-bottom: 4px;
}

.user-dropdown-header strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.92rem;
    color: var(--ink);
    margin-bottom: 2px;
}

.user-dropdown-header span {
    display: block;
    font-size: 0.78rem;
    color: var(--color-gray);
    word-break: break-all;
}

.dropdown-divider {
    height: 1px;
    background: var(--color-gray-border);
    margin: 6px 0;
}

.shop-dropdown-menu .menu-icon {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.shop-dropdown-menu .logout-link {
    color: #c0392b;
}

.shop-dropdown-menu .logout-link:hover {
    background: #fdf0f0;
}

/* ===== CARRITO ===== */
.cart-btn .cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    color: var(--brand-black);
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.cart-btn .cart-total {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
}

.cart-btn:hover .cart-total {
    color: var(--brand-gold);
}

/* ===== MINI CARRITO DROPDOWN ===== */
.shop-cart-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--brand-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-gray-border);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    color: var(--color-dark);
}

.shop-cart-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mini carrito estilos */
.shop-cart-dropdown .widget_shopping_cart_content {
    color: var(--color-dark);
}

.shop-cart-dropdown .cart_list {
    list-style: none;
    margin: 0 0 15px;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.shop-cart-dropdown .cart_list li {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-gray-border);
    position: relative;
}

.shop-cart-dropdown .cart_list li a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.shop-cart-dropdown .cart_list li a:hover {
    color: var(--gold-deep);
}

.shop-cart-dropdown .cart_list li img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.shop-cart-dropdown .cart_list li .quantity {
    display: block;
    color: var(--color-gray);
    font-size: 0.78rem;
    margin-top: 4px;
}

.shop-cart-dropdown .cart_list li a.remove {
    position: absolute;
    top: 10px;
    right: 0;
    width: 20px;
    height: 20px;
    background: #fbe7e5;
    color: #c0392b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.shop-cart-dropdown .total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--color-gray-border);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 12px;
}

.shop-cart-dropdown .buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-cart-dropdown .buttons a {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.shop-cart-dropdown .buttons .button.view-cart {
    background: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-gray-border);
}

.shop-cart-dropdown .buttons .button.view-cart:hover {
    border-color: var(--brand-gold);
    background: var(--color-light);
}

.shop-cart-dropdown .buttons .button.checkout {
    background: var(--brand-gold);
    color: var(--brand-black);
    border: 2px solid var(--brand-gold);
}

.shop-cart-dropdown .buttons .button.checkout:hover {
    background: transparent;
    color: var(--gold-deep);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .shop-bar-inner {
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 10px 0;
    }

    .shop-search {
        order: 3;
        grid-column: 1 / -1;
        max-width: 100%;
    }

    .shop-user-actions {
        justify-self: end;
    }

    .shop-action-btn .user-name-label,
    .shop-action-btn .cart-label {
        display: none;
    }

    .shop-action-btn {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .shop-bar {
        top: 70px;
    }

    .shop-cart-dropdown {
        width: 320px;
        right: 0;
    }
}

@media (max-width: 480px) {
    .shop-bar {
        top: 64px;
    }

    .shop-bar-inner {
        gap: 8px;
        min-height: 56px;
    }

    .shop-action-btn {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    .cart-btn .cart-total {
        display: none;
    }

    .shop-cart-dropdown {
        width: calc(100vw - 32px);
        right: 0;
    }
}