/* ==========================================================================
   Estilos Premium para Buscador de Fichas TÃ©cnicas
   Cliente: Sierra Nevada Compost and Paper
   ========================================================================== */

/* ImportaciÃ³n de tipografÃ­as premium desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Paleta de colores ecolÃ³gica y profesional (HSL) */
    --color-primary: hsl(142, 60%, 25%);       /* Verde bosque principal */
    --color-primary-light: hsl(142, 50%, 35%); /* Verde bosque claro */
    --color-accent: hsl(145, 63%, 42%);        /* Verde ecolÃ³gico brillante */
    --color-accent-hover: hsl(145, 75%, 35%);
    --color-bg-base: hsl(40, 20%, 97%);        /* Fondo beige/marfil ecolÃ³gico */
    --color-bg-card: hsl(0, 0%, 100%);         /* Fondo de tarjetas puro */
    --color-text-dark: hsl(150, 30%, 12%);     /* Texto oscuro */
    --color-text-muted: hsl(150, 10%, 45%);    /* Texto atenuado */
    --color-border: hsl(140, 15%, 88%);        /* Bordes sutiles */
    
    /* Gradientes */
    --gradient-hero: linear-gradient(135deg, hsl(142, 60%, 20%) 0%, hsl(150, 45%, 12%) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary-light) 100%);

    /* TipografÃ­a */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Sombras y bordes */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(10, 45, 25, 0.08);
    --shadow-lg: 0 20px 50px rgba(10, 45, 25, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reseteo general y accesibilidad */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-base);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Contenedor principal */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Header & Hero Section (Branding)
   ========================================================================== */
.hero-section {
    background: var(--gradient-hero);
    color: #ffffff;
    padding: 3rem 1.5rem 6rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Hojas decorativas de fondo */
.hero-section::before, .hero-section::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background-image: url('https://www.sierranevadacompostandpaper.com/wp-content/themes/identotienda/img/hoja.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.06;
    pointer-events: none;
}
.hero-section::before {
    top: -50px;
    left: -50px;
    transform: rotate(45deg);
}
.hero-section::after {
    bottom: -100px;
    right: -50px;
    transform: rotate(-135deg);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.brand-logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Sección del Buscador (Main Content)
   ========================================================================== */
.search-container {
    max-width: 680px;
    width: calc(100% - 3rem);
    margin: -3.5rem auto 3rem auto;
    position: relative;
    z-index: 9999;
}

/* Estilo Glassmorphism para el buscador */
.search-card {
    position: relative;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.search-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    width: 20px;
    height: 20px;
    fill: var(--color-text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.25rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: hsl(140, 20%, 98%);
    color: var(--color-text-dark);
    outline: none;
    transition: var(--transition-fast);
}

.search-input:focus {
    border-color: var(--color-accent);
    background-color: var(--color-bg-card);
    box-shadow: 0 0 0 4px rgba(7, 180, 89, 0.15);
}
.clear-btn {
    position: absolute;
    right: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-text-dark);
}

.clear-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Botón Aceptar Sugerencia (Ghost Text)
   ========================================================================== */
.accept-ghost-btn {
    position: absolute;
    right: 3.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 5;
    background-color: rgba(7, 180, 89, 0.1);
}

.accept-ghost-btn:hover {
    background-color: rgba(7, 180, 89, 0.2);
}

.accept-ghost-btn.visible {
    opacity: 1;
    visibility: visible;
}
/* ==========================================================================
   Resultados y Tarjetas (Results Section)
   ========================================================================== */
.results-section {
    max-width: 1350px;
    width: calc(100% - 3rem);
    margin: 0 auto 4rem auto;
    flex-grow: 1;
}

.results-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.results-count {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.results-layout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.results-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.selection-sidebar {
    display: none; /* Oculto por defecto en mÃ³vil */
}

@media (min-width: 768px) {
    .results-layout-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .results-grid {
        min-width: 0; /* previene desbordamiento del grid */
    }

    .sidebar-wrapper {
        width: 320px;
        flex-shrink: 0;
        position: sticky;
        top: 20px;
    }
    
    .selection-sidebar {
        display: flex;
        flex-direction: column;
        background: var(--color-bg-card);
        border-radius: var(--radius-md);
        border: 1px solid var(--color-border);
        padding: 1.5rem;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }
}

.selection-sidebar-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.selection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Checkbox flotante para la tarjeta */
.ft-checkbox-container {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    z-index: 2;
}

.ft-card-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.ft-checkbox-custom {
    position: absolute;
    top: 0;
    right: 0;
    height: 24px;
    width: 24px;
    background-color: #f1f3f5;
    border: 2px solid #ced4da;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ft-checkbox-container:hover input ~ .ft-checkbox-custom {
    background-color: #e9ecef;
    border-color: var(--color-accent);
}

.ft-card-checkbox:checked ~ .ft-checkbox-custom {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.ft-checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
}

.ft-card-checkbox:checked ~ .ft-checkbox-custom:after {
    display: block;
}

.ft-checkbox-container .ft-checkbox-custom:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}


/* Tarjetas de Ficha TÃ©cnica */
.ft-card {
    position: relative;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    animation: fadeInUp 0.5s ease;
}

.ft-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.ft-card-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ft-icon-box {
    background-color: hsl(0, 80%, 96%);
    color: hsl(0, 75%, 50%);
    padding: 10px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ft-card-info {
    overflow: hidden;
}

.ft-code-badge {
    display: inline-block;
    background-color: hsl(142, 35%, 92%);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.ft-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ft-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 8px;
    display: flex;
    gap: 12px;
}

.ft-filename {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 8px;
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
    word-break: break-all;
    background: hsl(140, 20%, 96%);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    max-width: 100%;
    box-sizing: border-box;
}

.ft-filename svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-primary-light);
}

.ft-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gradient-accent);
    color: #ffffff;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(10, 80, 40, 0.15);
    transition: var(--transition-fast);
}

.ft-download-btn:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 6px 18px rgba(10, 80, 40, 0.25);
    transform: translateY(-1px);
}

.ft-download-btn svg {
    transition: transform var(--transition-fast);
}

.ft-download-btn:hover svg {
    transform: translateY(2px);
}

/* Estado VacÃ­o (Sin Resultados) */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px dashed var(--color-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.empty-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-desc {
    color: var(--color-text-muted);
    max-width: 420px;
    font-size: 0.95rem;
}
html {
    scroll-behavior: smooth;
}

/* Estado de Carga (Spinner) */
.loader-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--color-border);
    border-bottom-color: var(--color-accent);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   SecciÃ³n QR e InformaciÃ³n FacturaciÃ³n
   ========================================================================== */
.qr-info-section {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 3rem 1.5rem;
    position: relative;
    z-index: 2;
}

.qr-info-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .qr-info-container {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
}

.qr-text {
    flex: 1;
}

.qr-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.qr-desc {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.5;
    max-width: 580px;
}

.qr-card-wrapper {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.qr-code-placeholder {
    width: 150px;
    height: 150px;
    background-color: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qr-code-placeholder canvas {
    width: 100%;
    height: 100%;
}

.qr-download-link {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.qr-download-link:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background-color: hsl(150, 45%, 9%);
    color: #ffffff;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-logo {
    max-height: 40px;
    opacity: 0.8;
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-links a:hover {
    color: var(--color-accent);
    opacity: 1;
}

/* ==========================================================================
   Animaciones CSS
   ========================================================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Contenedor de IFrame (Looker Studio)
   ========================================================================== */
.embed-container {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.embed-iframe-wrapper {
    position: relative;
    width: 100%;
    height: 300px; /* Altura compacta de 300px */
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: hsl(140, 10%, 96%);
    border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .embed-iframe-wrapper {
        height: 300px; /* Misma altura compacta en escritorio */
    }
}

.embed-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   BotÃ³n de Descarga ZIP MÃºltiple
   ========================================================================== */
.download-zip-btn {
    display: inline-flex;
    align-items: center;
    background: var(--color-accent);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(10, 80, 40, 0.15);
    transition: var(--transition-fast);
    text-transform: none;
}

.download-zip-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 80, 40, 0.25);
}

.download-zip-btn:active {
    transform: translateY(0);
}

.open-drive-btn {
    display: inline-flex;
    align-items: center;
    background: hsl(142, 35%, 95%);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: none;
}

.open-drive-btn:hover {
    background: hsl(142, 35%, 90%);
    color: var(--color-primary-light);
    border-color: var(--color-primary-light);
    transform: translateY(-1px);
}

.open-drive-btn:active {
    transform: translateY(0);
}

.results-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==========================================================================
   SecciÃ³n de Solicitud de Ficha TÃ©cnica (Forms)
   ========================================================================== */
.request-section {
    max-width: 800px; /* Ancho elegante para formulario */
    width: calc(100% - 3rem);
    margin: 0 auto 4rem auto;
}

.request-container {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.request-container:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.request-header-form {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.request-title-form {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.request-subtitle-form {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Rejilla del formulario */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .full-width {
        grid-column: span 2;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-dark);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-input {
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: hsl(140, 20%, 98%);
    color: var(--color-text-dark);
    outline: none;
    transition: var(--transition-fast);
}

.form-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.form-input:focus {
    border-color: var(--color-accent);
    background-color: var(--color-bg-card);
    box-shadow: 0 0 0 4px rgba(7, 180, 89, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* BotÃ³n de EnvÃ­o */
.request-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gradient-accent);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(10, 80, 40, 0.15);
    transition: var(--transition-fast);
    width: 100%;
}

@media (min-width: 600px) {
    .request-submit-btn {
        width: auto;
    }
}

.request-submit-btn:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 6px 18px rgba(10, 80, 40, 0.25);
    transform: translateY(-1px);
}

.request-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* AnimaciÃ³n de carga en botÃ³n */
.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin-loader 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin-loader {
    to { transform: rotate(360deg); }
}

/* Tarjeta de Ã‰xito */
.success-card {
    text-align: center;
    padding: 1.5rem 0;
    animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: hsl(142, 35%, 92%);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 10px rgba(7, 180, 89, 0.1);
}

.success-icon {
    width: 32px;
    height: 32px;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.success-text {
    color: var(--color-text-muted);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

.btn-reset-form {
    background-color: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-reset-form:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background-color: hsl(142, 40%, 97%);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   Avisos de cÃ³digos de bÃºsqueda no encontrados
   ========================================================================== */
.search-warnings {
    background-color: hsl(35, 100%, 96%);
    border: 1px solid hsl(35, 80%, 80%);
    border-left: 5px solid hsl(35, 90%, 50%);
    color: hsl(35, 80%, 25%);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    animation: zoomIn 0.3s ease;
    text-align: left;
}

.search-warnings-icon {
    color: hsl(35, 90%, 50%);
    flex-shrink: 0;
    margin-top: 2px;
}

.search-warnings-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-family: var(--font-heading);
}

.search-warnings-list {
    font-weight: 700;
    background: hsla(35, 90%, 50%, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    color: hsl(35, 90%, 35%);
    font-family: var(--font-heading);
    margin: 0 2px;
    display: inline-block;
}

.search-warnings-action-btn {
    background-color: hsl(35, 90%, 50%);
    color: #ffffff !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    flex-shrink: 0;
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(220, 120, 0, 0.2);
}

.search-warnings-action-btn:hover {
    background-color: hsl(35, 95%, 42%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 120, 0, 0.35);
}

.search-warnings-action-btn:active {
    transform: translateY(0);
}

.empty-state-action-btn {
    background: var(--gradient-accent);
    color: #ffffff !important;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(10, 80, 40, 0.15);
    display: inline-flex;
    align-items: center;
}

.empty-state-action-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 80, 40, 0.25);
}

.empty-state-action-btn:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .search-warnings {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .search-warnings-action-btn {
        margin-left: 0 !important;
        width: 100%;
        justify-content: center;
    }
}


/* Ocultar botones de compartir en escritorio */
@media (min-width: 768px) {
    .ft-share-btn,
    .ft-whatsapp-btn, .ft-mail-btn {
        display: none !important;
    }
}

/* ==========================================================================
   Mobile Cart & Floating Action Button (FAB)
   ========================================================================== */

.mobile-cart-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.mobile-cart-btn:active {
    transform: scale(0.95);
}

.mobile-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ea4335;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.close-mobile-cart-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 5px;
}

.sidebar-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-icon-btn:hover {
    background: rgba(10, 80, 40, 0.1);
}

@media (max-width: 767px) {
    .selection-sidebar.mobile-active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        z-index: 10000;
        background: white;
        padding: 20px;
        box-sizing: border-box;
        border-radius: 0;
        overflow-y: auto;
        animation: slideInRight 0.3s forwards;
        margin: 0;
    }

    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }

    .close-mobile-cart-btn {
        display: block;
    }
}

@media (min-width: 768px) { .mobile-cart-btn { display: none !important; } }

/* ==========================================================================
   Ghost Input (Autocomplete Inline)
   ========================================================================== */
.real-input {
    background-color: transparent !important;
    position: relative;
    z-index: 2;
}

.real-input:focus {
    border-color: transparent !important;
    box-shadow: none !important;
}

.ghost-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    color: var(--color-text-muted) !important;
    -webkit-text-fill-color: var(--color-text-muted) !important;
    opacity: 1 !important;
    pointer-events: none;
}

.search-field-wrapper:focus-within .ghost-input {
    border-color: var(--color-accent);
    background-color: var(--color-bg-card);
    box-shadow: 0 0 0 4px rgba(7, 180, 89, 0.15);
}


.main-content-wrapper {
    flex: 1;
    min-width: 0;
}

