/* =========================================
   BASE & RESET (From base.css)
   ========================================= */
/* Webkit Browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

:root {
    /* Dimensiones */
    --nav-w-closed: 80px;
    --nav-w-open: 280px;
    --mobile-nav-h: 70px;

    /* Colores */
    --bg-body: #f9f9f9;
    --bg-card: #ffffff;
    --text-main: #202322;
    --text-muted: #666666;
    --accent-gradient: linear-gradient(345deg, #FFFFFF 42%, #E4C8C4 100%);
    --accent-solid: #E4C8C4;
    --whatsapp: #25D366;

    /* Tipografía */
    --font: 'Poppins', sans-serif;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font) !important;
    background-color: var(--bg-body);
    color: var(--text-main);
    padding-bottom: calc(var(--mobile-nav-h) + 20px);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

ul,
li {
    list-style: none;
    padding: 0;
    margin: 0;
}

button,
select {
    font-family: inherit;
    outline: none;
}

/* Layout Principal */
.main-wrapper {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden; /* Prevent horizontal scroll from children */
}

/* Custom Elements base */
app-navbar, 
app-footer {
    display: block;
}

@media (min-width: 900px) and (orientation: landscape) {
    body {
        padding-bottom: 0;
        padding-left: var(--nav-w-closed);
    }

    body:has(.app-nav:hover) {
        padding-left: var(--nav-w-open);
    }

    .main-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        padding-top: 60px;
    }
}

/* =========================================
   ACCESIBILIDAD / UTILIDADES
   ========================================= */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================
   COMPONENTES REUTILIZABLES (From components.css)
   ========================================= */

/* Botón CTA Universal */
.btn-cta {
    display: inline-block;
    background: #202322;
    color: #fff;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-cta:hover {
    transform: scale(1.02);
    background: #000;
}

/* Badge de Estado Animado (Estilo Refinado) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f0f0; /* Color sutil y neutro */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: rgba(32, 35, 34, 0.85); /* Negro no tan sólido */
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: none; /* Sin bordes como solicitado */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: default;
    user-select: none;
}

.status-badge .badge-icon {
    font-size: 14px;
    display: inline-block;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.status-badge.badge-fade-out {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
}

.status-badge.badge-fade-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Loaders y Estados Vacíos */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    width: 100%;
}

.animate-spin {
    animation: spin 1s linear infinite;
    color: #202322;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-msg {
    text-align: center;
    width: 100%;
    padding: 40px;
    color: var(--text-muted);
    display: none;
}

/* Wishlist / Favoritos Base */
.wishlist-wrapper {
    max-width: 900px;
    margin: 0 auto;
    min-height: 50vh;
}

.empty-state-box {
    background: #fff;
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    border: 2px dashed #eee;
    margin-top: 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
/* =========================================
   FOOTER GLOBAL
   ========================================= */
.app-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    color: var(--text-muted);
    padding-bottom: 40px;
    width: 100%;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent;
    border: none;
    padding: 10px;
}

.social-btn:hover {
    transform: scale(1.2);
    color: #e91e8c !important; /* Brand pink on hover */
}

.social-btn svg {
    width: 20px;
    height: 20px;
    transition: color 0.3s;
}

/* Specific hover colors for extra premium touch */
.social-btn[aria-label="Instagram"]:hover { color: #E1306C !important; }
.social-btn[aria-label="TikTok"]:hover { color: #000 !important; }
.social-btn[aria-label="WhatsApp"]:hover { color: #25D366 !important; }

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    margin-bottom: 20px;
}

.footer-link {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-link:hover {
    text-decoration: underline;
    color: #000;
}

.footer-copy {
    font-size: 11px;
    opacity: 0.95; /* Increased opacity for better contrast (Passes AA) */
}

/* Toasts / Notificaciones */
.rr-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--text-main);
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(228, 200, 196, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    display: none;
    animation: toastPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastPopIn {
    from { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* =========================================
   GLOBAL SHELL & NAVIGATION (From global.css)
   ========================================= */
.mobile-logo {
    height: 28px;
    width: auto;
    display: none;
}

.app-nav {
    position: fixed;
    z-index: 9999;
    background: #ffffff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- MÓVIL Y ESC_VERTICAL (Barra Inferior) --- */
@media (max-width: 899px),
(orientation: portrait) {
    .app-nav {
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-nav-h);
        display: flex;
        align-items: center;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding: 0 10px;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: transform;
    }

    .app-nav.nav-hidden {
        transform: translateY(102%);
    }

    .desktop-logo-container,
    .sidebar-bottom,
    .link-text {
        display: none !important;
    }

    .nav-list-container {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        height: 100%;
    }

    .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        width: 60px;
        height: 100%;
    }

    .icon-box svg {
        display: block;
        width: 24px;
        height: 24px;
        stroke-width: 2px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-link.active {
        color: var(--text-main);
        font-weight: 700;
    }

    .nav-link.active .icon-box svg {
        transform: scale(1.3);
        stroke: var(--text-main);
        stroke-width: 2.2px;
        fill: var(--text-main);
    }

    /* Logo central exclusivo para móvil */
    .nav-center-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 100%;
    }

    .nav-center-logo img {
        height: 47px;
        width: auto;
        object-fit: contain;
    }
}

/* --- ESCRITORIO (Sidebar Lateral) --- */
@media (min-width: 900px) and (orientation: landscape) {
    .app-nav {
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--nav-w-closed);
        background: #fff;
        display: flex;
        flex-direction: column;
        padding: 30px 0;
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        overflow: hidden;
        white-space: nowrap;
    }

    .app-nav:hover {
        width: var(--nav-w-open);
    }

    .desktop-logo-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 30px;
        width: 100%;
        min-height: 80px;
        position: relative;
    }

    .logo-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* Logo Corto (Visible por defecto) */
    .logo-icon-only {
        width: 40px;
        height: auto;
        display: block;
    }

    /* Logo Largo (Visible en Hover) */
    .desktop-logo {
        width: 210px;
        height: auto;
        display: none;
    }

    /* Subtítulo debajo del logo */
    .nav-subtitle {
        font-size: 12px;
        color: var(--text-muted);
        margin-top: 5px;
        display: none;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
        padding: 0 10px;
        letter-spacing: 0.2px;
    }

    .app-nav:hover .desktop-logo,
    .app-nav:hover .nav-subtitle {
        display: block;
    }

    .app-nav:hover .logo-icon-only {
        display: none;
    }

    .nav-list-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        flex-grow: 1;
    }

    .nav-link {
        display: flex;
        align-items: center;
        height: 50px;
        padding-left: calc((var(--nav-w-closed) - 28px) / 2);
        padding-right: 20px;
        color: #737373;
        transition: all 0.2s ease;
        text-decoration: none;
    }

    .nav-link.active {
        color: var(--text-main);
        font-weight: 700;
    }

    /* Ocultar logo central en escritorio */
    .nav-center-logo {
        display: none;
    }

    .nav-separator {
        height: 1px;
        background: rgba(0, 0, 0, 0.05);
        margin: 15px 20px;
        width: calc(100% - 40px);
        flex-shrink: 0;
    }

    .icon-box {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .icon-box svg {
        width: 24px;
        height: 24px;
        stroke-width: 2px;
    }

    .link-text {
        margin-left: 20px;
        font-size: 15px;
        font-weight: 500;
        display: none;
    }

    .app-nav:hover .link-text {
        display: block;
    }

    #nav-account-link {
        margin-top: auto;
    }

    .sidebar-bottom {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-bottom: 20px;
    }

    .nav-socials {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .social-link {
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding-left: calc((var(--nav-w-closed) - 22px) / 2);
        color: #737373;
        transition: all 0.2s ease;
    }

    .social-link .icon-box {
        width: 22px;
        height: 22px;
    }

    .social-link .icon-box svg {
        width: 17px;
        height: 17px;
    }

    .social-link .link-text {
        font-size: 13.5px;
        opacity: 0.85;
    }
}

/* =========================================
   3. ESTILOS BASE PARA LOGOS CENTRALES
   ========================================= */
.mobile-only-logo {
    display: block;
    height: 50px !important;
    width: auto !important;
    object-fit: contain;
    margin-bottom: 12px !important;
}

.desktop-only-icon,
.desktop-only {
    display: none !important;
}

@media (min-width: 900px) and (orientation: landscape) {
    .mobile-only-logo {
        display: none !important;
    }

    .desktop-only-icon,
    .desktop-only {
        display: flex !important;
    }
}

/* =========================================
   4. PROTECCIÓN DE CONTENIDO
   ========================================= */
img {
    -webkit-user-select: none;
    -webkit-user-drag: none;
    user-select: none;
}

/* =========================================
   5. UNIFIED PAGE HEADERS (Premium Style)
   ========================================= */
.page-header {
    text-align: center;
    padding: 60px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.page-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 899px),
(orientation: portrait) {
    .page-header {
        padding: 40px 15px 30px;
    }

    .page-title {
        font-size: 32px;
    }

    .page-subtitle {
        font-size: 14.5px;
    }
}

/* =========================================
   HOME PAGE (From index.css)
   ========================================= */
.hero {
    position: relative;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: clip;
    text-align: center;
    margin-bottom: 60px;
    width: 100%;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem) !important;
    max-width: 950px;
    margin: 15px auto 10px;
    font-weight: 700;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    max-width: 650px;
    margin: 15px auto 0;
    color: var(--text-muted);
}

.mascot-container {
    position: absolute;
    bottom: -15px;
    left: calc(50% + 290px);
    width: 170px;
    z-index: -1;
    pointer-events: none;
    user-select: none;
    display: none;
}

@media (min-width: 1200px) {
    .mascot-container {
        display: block;
    }
}

.hero-mascot {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.rrp-search-container {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 30px auto 0;
}

.rrp-search-box {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 6px;
    transition: all 0.3s ease;
}

.rrp-search-box:focus-within {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
    transform: translateY(-2px);
}

.rrp-search-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rrp-search-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

.rrp-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 16px;
    color: var(--text-main);
    padding: 12px 0;
}

.rrp-search-clear {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
    pointer-events: none;
}

.rrp-search-clear.visible {
    opacity: 1;
    pointer-events: auto;
}

.rrp-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    max-height: 420px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.rrp-search-results.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rrp-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 15px;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.rrp-result-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
}

.rrp-result-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.rrp-result-category {
    color: var(--text-muted);
    opacity: 0.95;
    font-size: 11px;
}

.rrp-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--accent-solid);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: rrp-spin 0.8s linear infinite;
}

@keyframes rrp-spin {
    to { transform: rotate(360deg); }
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 60px;
    padding: 0 15px;
    margin-top: 50px;
    width: 100%;
}

@media (min-width: 600px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 950px) {
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
}

.benefit-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s cubic-bezier(0.1, 0, 0.2, 1);
}

.b-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 15px;
}

.b-title {
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.b-text {
    font-size: clamp(13px, 1.5vw, 14.5px);
    color: #666;
    line-height: 1.5;
}

@media (max-width: 850px) {
    .hero h1 { font-size: 1.8rem !important; }
    .benefits-grid { grid-template-columns: 1fr !important; }
    .b-icon { width: 70px !important; height: 70px !important; }
}
