/* Sushell SaaS Header - white card, brand purple #5a5ce6 / #5A52FF, max-width 1320px */
:root {
  --sh-brand: #5a5ce6;
  --sh-brand-alt: #5A52FF;
}

/* Compra directa: sin carrito en el menú (ni Astra/Woo leftovers) */
.sh-cart-wrapper,
.sh-cart-bridge,
.sh-cart-dropdown,
.ast-site-header-cart,
.ast-header-woo-cart,
.astra-cart-drawer,
.astra-mobile-cart-overlay,
#astra-mobile-cart-drawer,
.woocommerce-mini-cart,
.widget_shopping_cart,
.ast-cart-menu-wrap,
.ast-above-header-cart,
.ast-builder-menu-cart {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

.ast-builder-menu, .ast-mobile-menu-buttons, .ast-mobile-header-content,
.ast-main-header-bar-alignment, .elementor-widget-nav-menu, .menu-toggle { display: none !important; }

.sh-header-wrapper {
    background-color: #ffffff; width: 100%; max-width: 1320px; 
    margin: 15px auto; border-radius: 20px; font-family: 'Inter', -apple-system, sans-serif;
    border: 1px solid #e2e8f0; box-shadow: 0 4px 20px rgba(0,0,0,0.06); 
    position: relative; z-index: 999; box-sizing: border-box;
}

.sh-top-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 24px; }
.sh-logo-col { flex: 1; display: flex; justify-content: flex-start; align-items: center; }
.sh-logo-col picture { display: contents; }
.sh-logo-col img { height: 42px; width: auto; object-fit: contain; } 
.sh-mobile-hamburger { display: none; } 

.sh-greeting-col { flex: 2; display: flex; justify-content: center; align-items: center; text-align: center; }
.sh-greeting-text { 
    font-size: 13.5px; font-weight: 500; color: #475569; background: #f8fafc; 
    padding: 8px 24px; border-radius: 50px; border: 1px solid #e2e8f0; 
    display: inline-flex; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,0.02); letter-spacing: -0.2px;
}

.sh-actions-col { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 24px; }

.sh-btn-pago { 
    background: #ffffff; color: #5a5ce6; border: 1.5px solid #5a5ce6; 
    padding: 8px 22px; border-radius: 50px; font-size: 13px; font-weight: 600; 
    text-decoration: none; transition: all 0.2s; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center;
}
.sh-btn-pago:hover { background: #f8faff; box-shadow: 0 2px 8px rgba(90,92,230,0.15); }

.sh-user-box { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.sh-avatar-wrapper { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; padding: 2px; background: transparent; }
.sh-avatar-wrapper.is-pro { background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #8b5cf6 100%); box-shadow: 0 0 12px rgba(79, 172, 254, 0.6); }
.sh-avatar { width: 40px; height: 40px; border-radius: 50% !important; object-fit: cover; background: #1e293b; border: 2px solid #ffffff; box-shadow: 0 2px 4px rgba(0,0,0,0.08); flex-shrink: 0; }
.sh-avatar-wrapper.is-pro .sh-avatar { border-color: #0f172a; }
.sh-avatar.initials { display: flex; align-items: center; justify-content: center; color: #ffffff; font-weight: bold; font-size: 14px; }
.sh-user-details { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.2; }
.sh-user-name { font-size: 14px; font-weight: 700; color: #0f172a; text-transform: capitalize; margin-bottom: 2px; }
.sh-badge { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; display: inline-block; }
.sh-badge.mayorista { background: #d1fae5; color: #059669; }
.sh-badge.admin { background: #fee2e2; color: #b91c1c; }

.sh-cart-wrapper { position: relative; padding-left: 12px; border-left: 1px solid #e2e8f0; display: flex; align-items: center; }
.sh-cart-box { display: flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; }
.sh-cart-icon-wrapper { position: relative; width: 40px; height: 40px; background: #f8fafc; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #5a5ce6; transition: background 0.2s; }
.sh-cart-box:hover .sh-cart-icon-wrapper { background: #f1f5f9; }
.sh-cart-count { position: absolute; top: -4px; right: -4px; background: #ef4444; color: #ffffff; border: 2px solid #ffffff; font-size: 10px; font-weight: 800; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; }
.sh-cart-total { font-size: 15px; font-weight: 800; color: #0f172a; }

.sh-cart-dropdown {
    position: absolute; top: 100%; right: 0; width: 340px; background: #ffffff;
    border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 20px; z-index: 1000; margin-top: 15px;
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.25s ease;
    box-sizing: border-box; text-align: left;
}
.sh-cart-dropdown::before {
    content: ''; position: absolute; top: -6px; right: 20px; width: 12px; height: 12px; background: #ffffff;
    border-left: 1px solid #e2e8f0; border-top: 1px solid #e2e8f0; transform: rotate(45deg);
}
.sh-cart-wrapper:hover .sh-cart-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.sh-cart-items { list-style: none !important; margin: 0 !important; padding: 0 !important; max-height: 300px; overflow-y: auto; }
.sh-cart-items::-webkit-scrollbar { width: 6px; }
.sh-cart-items::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.sh-cart-item { display: flex !important; align-items: center !important; gap: 14px; padding: 12px 0 !important; border-bottom: 1px solid #f1f5f9; position: relative; margin: 0 !important; }
.sh-cart-item-img img { width: 48px !important; height: 48px !important; border-radius: 8px !important; object-fit: cover; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
.sh-cart-item-info { display: flex; flex-direction: column; flex: 1; padding-right: 32px; }
.sh-cart-item-title { font-size: 13.5px !important; font-weight: 600 !important; color: #0f172a !important; line-height: 1.3 !important; margin-bottom: 4px !important; display: block; }
.sh-cart-item-qty { font-size: 12px !important; color: #64748b !important; font-weight: 500 !important; }
.sh-cart-dropdown a.remove.sh-remove-item { position: absolute !important; right: 0 !important; top: 50% !important; transform: translateY(-50%) !important; width: 28px !important; height: 28px !important; background: #f8fafc !important; color: #94a3b8 !important; border-radius: 8px !important; display: flex !important; align-items: center !important; justify-content: center !important; border: 1px solid #e2e8f0 !important; font-size: 0 !important; transition: all 0.2s !important; padding: 0 !important; margin: 0 !important; }
.sh-cart-dropdown a.remove.sh-remove-item:hover { background: #fee2e2 !important; border-color: #fca5a5 !important; color: #ef4444 !important; }
.sh-cart-dropdown-footer { margin-top: 10px; border-top: 1px solid #e2e8f0; padding-top: 16px; }
.sh-cart-dropdown-total { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 16px; }
.sh-cart-dropdown-total strong { color: #0f172a; font-size: 16px; font-weight: 800; }
.sh-cart-buttons { display: flex; flex-direction: column; gap: 8px; }
.sh-btn-cart, .sh-btn-checkout { display: block !important; text-align: center !important; padding: 12px 16px !important; border-radius: 8px !important; font-size: 14px !important; font-weight: 600 !important; text-decoration: none !important; transition: all 0.2s !important; line-height: 1 !important; border: none !important; }
.sh-btn-cart { background: #f1f5f9 !important; color: #475569 !important; }
.sh-btn-cart:hover { background: #e2e8f0 !important; color: #0f172a !important; }
.sh-btn-checkout { background: #5a5ce6 !important; color: #ffffff !important; }
.sh-btn-checkout:hover { background: #4338ca !important; color: #ffffff !important; }
.sh-cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 0; color: #64748b; font-size: 14px; font-weight: 500; text-align: center; }
.sh-cart-empty p { margin: 0; }

.sh-bottom-bar { border-top: 1px solid #e2e8f0; padding: 0 24px; }
.sh-nav-container { display: flex; align-items: center; }
.sh-nav-menu { display: flex; align-items: center; gap: 30px; list-style: none !important; margin: 0; padding: 0; }
.sh-nav-menu > li { position: relative; margin: 0; padding: 16px 0; }
.sh-nav-menu a { text-decoration: none; color: #475569; font-size: 14px; font-weight: 500; transition: color 0.2s; display: flex; align-items: center; gap: 6px; }
.sh-nav-menu a:hover { color: #5a5ce6; }
.sh-nav-menu > li.menu-item-has-children > a::after {
  content: "";
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #94a3b8;
  margin-left: 2px;
  transition: border-color .2s, transform .2s;
}
.sh-nav-menu > li.menu-item-has-children:hover > a::after { border-top-color: #5a5ce6; }
.sh-nav-menu ul.sub-menu {
    position: absolute; top: 100%; left: 0; background: #ffffff;
    border: 1px solid #e2e8f0; box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-radius: 12px;
    padding: 8px 0; min-width: 220px; list-style: none !important;
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.25s ease; z-index: 1000;
}
.sh-nav-menu > li:hover > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sh-nav-menu ul.sub-menu li { padding: 0; margin: 0; }
.sh-nav-menu ul.sub-menu a { padding: 10px 20px; font-size: 13.5px; color: #475569; font-weight: 500; border-radius: 0; }
.sh-nav-menu ul.sub-menu a:hover { background-color: #f8fafc; color: #5a5ce6; padding-left: 24px; }

.sh-mobile-dropdown { display: none; }

@media (max-width: 900px) {
    .sh-greeting-col { display: none !important; } 
}

@media (max-width: 768px) {
    .sh-header-wrapper { margin: 0; border-radius: 0; border: none; border-bottom: 1px solid #e2e8f0; width: 100%; }
    .sh-top-bar { padding: 12px 14px; gap: 10px; flex-wrap: nowrap; }

    .sh-logo-col { flex: 1; min-width: 80px; }
    .sh-logo-col img { height: 32px; }

    .sh-btn-pago {
        padding: 6px 12px !important;
        font-size: 12px !important;
        border-width: 1px !important;
        letter-spacing: -0.3px;
    }

    .sh-greeting-col, .sh-bottom-bar, .sh-user-details { display: none !important; }

    .sh-actions-col { flex: unset; gap: 8px; display: flex !important; margin-left: auto; }

    .sh-avatar { width: 34px; height: 34px; }

    .sh-mobile-hamburger {
        display: flex; align-items: center; justify-content: center; cursor: pointer;
        color: #0f172a; margin-left: 4px; padding-left: 10px; border-left: 1px solid #e2e8f0;
        min-width: 44px; min-height: 44px;
    }

    .sh-mobile-dropdown {
        display: block; position: absolute; top: 100%; left: 0; width: 100%;
        background: #ffffff; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        border-top: 1px solid #e2e8f0; opacity: 0; visibility: hidden;
        transform: translateY(-10px); transition: all 0.25s ease; z-index: 999;
        max-height: min(70vh, 520px); overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .sh-mobile-dropdown.sh-active { opacity: 1; visibility: visible; transform: translateY(0); }

    .sh-mobile-dropdown .sh-nav-menu { flex-direction: column; gap: 0; padding: 0; width: 100%; }
    .sh-mobile-dropdown .sh-nav-menu > li { width: 100%; padding: 0; border-bottom: 1px solid #f1f5f9; }
    .sh-mobile-dropdown .sh-nav-menu > li > a {
        padding: 14px 24px; font-size: 15px; font-weight: 600; color: #0f172a;
        display: flex; justify-content: space-between; align-items: center;
    }
    .sh-mobile-arrow {
        display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
        background: #f8fafc; border-radius: 8px; color: #5a5ce6;
        transition: transform 0.3s ease, background 0.3s;
    }
    .sh-submenu-open > a > .sh-mobile-arrow { transform: rotate(180deg); background: #e0e7ff; }
    .sh-mobile-dropdown .sh-nav-menu ul.sub-menu {
        display: none !important; position: relative; top: 0; left: 0; box-shadow: none; border: none;
        border-radius: 0; opacity: 1; visibility: visible; transform: none; min-width: 100%;
        background: #f8fafc; padding: 0; margin: 0;
    }
    .sh-mobile-dropdown .sh-nav-menu li.sh-submenu-open > ul.sub-menu { display: block !important; border-top: 1px solid #e2e8f0; }
    .sh-mobile-dropdown .sh-nav-menu ul.sub-menu a {
        padding: 12px 24px 12px 40px; font-size: 14px; color: #475569; font-weight: 500;
        border-bottom: 1px solid #e2e8f0;
    }
}
@media (max-width: 420px) {
    .sh-btn-pago { display: none !important; }
}
