/* ==========================================================================
   ANDREWJOSEPPHONE - ESTILOS GLOBALES & HEADER
   ========================================================================== */

/* 1. VARIABLES & PALETA DE COLORES */


:root[data-theme="light"] {
    --bg-color: #f8f9fa;
    --surface-color: #ffffff;
    --surface-border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --gold-primary: #d4af37;
    --gold-hover: #b89628;
    --gold-light: rgba(212, 175, 55, 0.1);
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #fef1ac 50%, #b89628 100%);
    --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
    --bg-color: #0b0f17;
    --surface-color: #151c28;
    --surface-border: #232d3f;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gold-primary: #f1c40f;
    --gold-hover: #d4af37;
    --gold-light: rgba(241, 196, 15, 0.12);
    --gold-gradient: linear-gradient(135deg, #f1c40f 0%, #fff3a1 50%, #d4af37 100%);
    --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* 2. RESETEO BASE */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.5;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* 3. ESTRUCTURA DEL HEADER */

/* ==========================================================================
   HEADER REDISTRIBUIDO (ESTILO DE LA IMAGEN)
   ========================================================================== */

.site-header {
    /* Utiliza la variable del tema. Si tu clase de fondo es --bg-secondary o --card-bg, úsala aquí */
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border, #f0f0f0);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* 1. Izquierda - Badge Logo */
.header-left {
    display: flex;
    align-items: center;
}

.brand-badge {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
}

.brand-badge img.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. Centro - Marca y Tagline */
.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.brand-text-link {
    text-decoration: none;
    color: inherit;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #000000);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-title span {
    color:var(--gold-primary); /* Tono dorado/marrón para "Phone" según la imagen */
}

.brand-tagline {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* 3. Derecha - Acciones e Iconos */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Botón de Búsqueda */
.search-toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--text-primary, #374151);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
}

/* Divisor Vertical */
.header-divider {
    width: 1px;
    height: 18px;
    background-color: var(--border, #d1d5db);
    display: inline-block;
}

/* Dropdown Selector de Idioma (Estilo Píldora) */
.custom-lang-selector .lang-dropdown option {
    background-color: var(--bg-color);
    color: var(--text-primary, #000000);
}

/* Botón de Modo Oscuro (Estilo Píldora) */
.theme-toggle-btn {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    color:var(--gold-primary); /* Tono dorado/marrón para "Phone" según la imagen */
    border-radius: 20px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: #fef3c7;
}

/* Ocultar elementos de menú hamburguesa en escritorio por defecto */
.menu-toggle-btn, .drawer-header, .drawer-overlay {
    display: none;
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVA (MÓVIL < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .header-center {
        position: static;
        transform: none;
    }

    .menu-toggle-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .header-actions-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -4px 0 15px rgba(0,0,0,0.1);
        padding: 1.5rem;
        transition: right 0.3s ease;
        z-index: 200;
    }

    .header-actions-wrapper.active {
        right: 0;
    }

    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .header-divider {
        display: none;
    }

    .drawer-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 150;
    }
}

/* ==========================================================================
   SECCIÓN 2: HERO
   ========================================================================== */

.hero-section {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem 1rem;
  border-radius: 18px;
  overflow: hidden;
  background-image: url('../img/banner1.webp');
  background-size: cover;
  background-position: left center; /* Fija la alineación a la izquierda y recorta la zona derecha */
  background-repeat: no-repeat;
  box-sizing: border-box;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg, 
    rgba(0, 0, 0, 0.10) 0%, 
    rgba(0, 0, 0, 0.35) 50%, 
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 650px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-bottom: 0.75rem;
  max-width: 100%;
}

.hero-title {
  font-size: clamp(1.65rem, 5.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  word-break: break-word;
  color: #f6d35e;
}

.hero-subtitle {
  font-size: clamp(0.88rem, 2.5vw, 1.1rem);
  line-height: 1.45;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-wallapop {
  background-color: #13c1ac;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(19, 193, 172, 0.35);
}

.btn-wallapop:active {
  background-color: #0fa492;
  transform: scale(0.98);
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:active {
  background-color: #1da851;
  transform: scale(0.98);
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 480px;
    align-items: center;
    padding: 3rem 2.5rem;
  }

  .hero-buttons {
    flex-direction: row;
    width: auto;
  }

  .btn {
    width: auto;
    padding: 0.85rem 1.6rem;
  }

  .btn:hover {
    transform: translateY(-2px);
  }
}


/* ==========================================================================
   SECCIÓN 3: BUSCADOR Y FILTROS POR MARCA/MODELO
   ========================================================================== */
.search-section {
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* CAMPO DE ENTRADA PRINCIPAL */
.search-box {
    position: relative;
    width: 100%;
    max-width: 680px;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background-color: var(--surface-color);
    border: 2px solid var(--surface-border);
    border-radius: 16px;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.search-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 4px var(--gold-light);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.25rem;
    pointer-events: none;
}

/* CHIPS DE FILTRO RÁPIDO POR MARCA */
.brand-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.brand-chip {
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.brand-chip:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.brand-chip.active {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
    color: #0b0f17;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--gold-light);
}

@media (max-width: 576px) {
    .search-section {
        padding: 24px 16px;
    }
    
    .search-input {
        font-size: 0.95rem;
        padding: 14px 16px 14px 46px;
    }

    .brand-chip {
        padding: 6px 14px;
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   SECCIÓN 4: GRID DE PRODUCTOS & MODAL FLOTANTE
   ========================================================================== */
.products-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 64px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* TARJETA DE PRODUCTO */
.product-card {
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.product-badge-condition {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-image-wrapper {
    width: 100%;
    height: 220px;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 12px;
}

.product-brand {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gold-primary);
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-specs-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.spec-pill {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.product-price-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--surface-border);
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.product-vat {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ESTADO SIN RESULTADOS */
.no-results {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
    display: none;
}

/* MODAL DETALLE */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-gallery {
    width: 100%;
    height: 260px;
    background-color: var(--bg-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-gallery img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.modal-detail-card {
    background-color: var(--bg-color);
    padding: 12px 16px;
    border-radius: 12px;
}

.modal-detail-card span.label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.modal-detail-card span.val {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

@media (max-width: 576px) {
    .modal-content {
        padding: 20px;
    }
    .modal-details-grid {
        grid-template-columns: 1fr;
    }
    .modal-actions {
        flex-direction: column;
    }
}
/* ==========================================================================
   SECCIÓN 5: FOOTER & BANNER DE COOKIES (EU COMPLIANCE)
   ========================================================================== */
/* ==========================================================================
   FOOTER (REDISTRIBUIDO Y CON REDES SOCIALES)
   ========================================================================== */

.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    color: var(--text-primary);
    padding: 3rem 1.5rem 1.5rem 1.5rem;
    margin-top: 3rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 1.1fr 1fr;
    gap: 2.5rem;
}

/* Columna Branding */
.brand-logo-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.footer-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.footer-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #d97706; /* Tono dorado/marrón al pasar el mouse */
}

/* Botones de Redes Sociales */
.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn:hover {
    transform: translateY(-3px);
    color: #ffffff;
}

/* Colores Hover específicos por red */
.social-btn.instagram:hover { background-color: #e1306c; border-color: #e1306c; }
.social-btn.facebook:hover  { background-color: #1877f2; border-color: #1877f2; }
.social-btn.tiktok:hover    { background-color: #000000; border-color: #000000; }
.social-btn.email:hover     { background-color: #d97706; border-color: #d97706; }

/* Badges de Garantía */
.footer-badges {
    font-size: 1.3rem;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* Copyright e Información Inferior */
.footer-bottom {
    max-width: 1280px;
    margin: 2.5rem auto 0 auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   RESPONSIVO MÓVIL (< 900px)
   ========================================================================== */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 550px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* BANNER FLOTANTE DE COOKIES (RGPD / ePrivacy) */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 480px;
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translateY(150%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.cookie-text a {
    color: var(--gold-primary);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    flex: 1;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.cookie-btn-accept {
    background-color: var(--gold-primary);
    color: #0b0f17;
}

.cookie-btn-accept:hover {
    background-color: var(--gold-hover);
}

.cookie-btn-reject {
    background-color: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}


/* ==========================================================================
   PERSONALIZACIÓN DE GOOGLE TRANSLATE
   ========================================================================== */

.lang-dropdown {
    background-color: var(--surface-color, #1e1e1e);
    color: var(--text-primary, #ffffff);
    border: 1px solid var(--surface-border, #333333);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.25s ease;
}

.lang-dropdown:hover {
    border-color: var(--gold-primary, #d4af37);
}

/* Ocultar la barra/banner superior de Google Translate */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* Evitar que Google empuje la página hacia abajo */
body {
    top: 0px !important;
    position: static !important;
}

/* Ocultar el resaltado que aparece al pasar el cursor sobre texto traducido */
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   HEADER & MENÚ LATERAL RESPONSIVO
   ========================================================================== */

/* Comportamiento por defecto (Escritorio) */
.menu-toggle-btn, 
.drawer-header, 
.drawer-overlay {
    display: none;
}

.header-actions-wrapper {
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Adaptación para Dispositivos Móviles (pantallas menores a 768px) */
@media (max-width: 768px) {
    .menu-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 1px solid var(--surface-border);
        color: var(--text-primary);
        font-size: 1.4rem;
        padding: 6px 12px;
        border-radius: 8px;
        cursor: pointer;
    }

    /* Transformar el contenedor en un panel lateral deslizante */
    .header-actions-wrapper {
        position: fixed;
        top: 0;
        right: -100%; /* Oculto fuera de pantalla por defecto */
        width: 280px;
        height: 100vh;
        background-color: var(--surface-color);
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        transition: right 0.3s ease-in-out;
    }

    .header-actions-wrapper.active {
        right: 0; /* Deslizar hacia adentro */
    }

    /* Cabecera interna del menú lateral */
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 15px;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--surface-border);
    }

    .drawer-title {
        font-weight: 700;
        color: var(--text-primary);
    }

    .drawer-close-btn {
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--text-secondary);
        cursor: pointer;
    }

    /* Apilar los controles verticalmente en móvil */
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .theme-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    #google_translate_element {
        width: 100%;
    }

    .goog-te-gadget-simple {
        width: 100%;
        justify-content: center;
    }

    /* Fondo semitransparente detrás del menú */
    .drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .drawer-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

/* ==========================================================================
   SLIDER DE ÚLTIMOS PRODUCTOS
   ========================================================================== */

.latest-products-section {
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.section-badge {
  color: var(--gold-primary, #d4af37);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 800;
  margin-top: 0.25rem;
  color: var(--text-primary, #ffffff);
}

.slider-controls {
  display: none; /* Se activa en escritorio */
  gap: 0.5rem;
}

.slider-arrow {
  background: var(--surface-color, #1e1e1e);
  border: 1px solid var(--surface-border, #333333);
  color: var(--text-primary, #ffffff);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.slider-arrow:hover {
  border-color: var(--gold-primary, #d4af37);
  color: var(--gold-primary, #d4af37);
}

/* Contenedor Scroll Snap */
.products-slider {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 0.5rem 1.5rem 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.products-slider::-webkit-scrollbar {
  height: 6px;
}

.products-slider::-webkit-scrollbar-thumb {
  background: var(--surface-border, #333333);
  border-radius: 10px;
}

/* Tarjeta del Slider */
.slider-card {
  flex: 0 0 240px; /* Ancho fijo en móviles */
  scroll-snap-align: start;
  background-color: var(--surface-color, #1e1e1e);
  border: 1px solid var(--surface-border, #333333);
  border-radius: 16px;
  padding: 1rem;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
  box-sizing: border-box;
}

.slider-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary, #d4af37);
}

.card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  z-index: 2;
}

.card-image-wrapper {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price-group {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.card-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-primary, #d4af37);
}

.card-vat {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Botón Ver Todos */
.view-all-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  background-color: transparent;
  color: var(#ffffff, --text-primary);
  border: 2px solid var(--surface-border, #ffffff);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-view-all:hover {
  border-color: var(--gold-primary, #d4af37);
  color: var(--gold-primary, #d4af37);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .slider-controls {
    display: flex;
  }
  .slider-card {
    flex: 0 0 260px;
  }
}

/* ==========================================================================
   SECCIÓN ENVÍOS A EUROPA
   ========================================================================== */

.shipping-section {
  padding: 3rem 1.5rem;
  background-color: #77693b;
  border: 1px solid var(--surface-border, #333333);
  border-radius: 20px;
  margin-bottom: 2.5rem;
}

.shipping-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.shipping-badge {
  display: inline-block;
  color: var(--gold-primary, #d4af37);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.shipping-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary, #ffffff);
  margin-bottom: 0.75rem;
}

.shipping-subtitle {
  font-size: 0.95rem;
  color: var(--text-primary, #a0a0a0);
  max-width: 600px;
  margin: 0 auto 2rem auto;
  line-height: 1.5;
}

/* Tarjetas Informativas */
.shipping-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.shipping-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border, #ffffff);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.shipping-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-primary, #d4af37);
}

.shipping-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.shipping-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin-bottom: 0.5rem;
}

.shipping-card p {
  font-size: 0.88rem;
  color: var(--text-primary, #ffffff);
  line-height: 1.4;
}

/* CTA WhatsApp */
.shipping-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-border, #333333);
}

.shipping-cta p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
}

.btn-shipping-wa {
  max-width: 320px;
}

/* Responsivo */
@media (min-width: 768px) {
  .shipping-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* Oculta el contenedor de Google Translate sin destruir su funcionalidad */
.hidden-translate {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ocultar la barra superior inyectada por Google en el body */
.goog-te-banner-frame,
iframe[id^=":"] {
    display: none !important;
}

body {
    top: 0px !important;
    position: static !important;
}

/* ==========================================================================
   SECCIÓN BANNER DE REDES SOCIALES (COMPACTO Y ELEGANTE)
   ========================================================================== */

.social-banner-section {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.5rem;
    margin: 3rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.social-banner-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Texto Informativo */
.social-banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.banner-subtitle {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #d97706; /* Dorado de la marca */
    text-transform: uppercase;
}

.banner-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Lista de Píldoras para Redes */
.social-banner-links {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    border-radius: 30px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-pill i {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

/* Animación Hover sobria */
.social-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Ajustes de color por marca al hacer Hover */
.social-pill.instagram:hover {
    border-color: #e1306c;
    color: #e1306c;
    background-color: rgba(225, 48, 108, 0.08);
}

.social-pill.facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
    background-color: rgba(24, 119, 242, 0.08);
}

.social-pill.tiktok:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
}

.social-pill.email:hover {
    border-color: #d97706;
    color: #d97706;
    background-color: rgba(217, 119, 6, 0.08);
}

/* ==========================================================================
   ADAPTACIÓN MÓVIL (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .social-banner-container {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .social-banner-links {
        justify-content: center;
    }
}

/* ==========================================================================
   SECCIÓN UBICACIÓN & CONFIANZA
   ========================================================================== */

.location-section {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 3.5rem 1.5rem;
    margin: 3rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.location-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Columna Izquierda: Contenido */
.location-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.location-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.location-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Lista de Beneficios / Confianza */
.trust-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.trust-features li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.trust-features li i {
    font-size: 1.3rem;
    color:var(--gold-primary);
    background-color: rgba(217, 119, 6, 0.1);
    padding: 0.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trust-features li strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.trust-features li span {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: block;
}

/* Columna Derecha: Contenedor del Mapa */
.location-map-wrapper {
    width: 100%;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-primary);
}

.location-map {
    width: 100%;
    height: 100%;
    border: 0;
    /* Inversión sutil del header superior del mapa de Google si lo requiere */
    margin-top: -45px; 
    height: calc(100% + 45px);
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVA (MÓVIL < 900px)
   ========================================================================== */
@media (max-width: 900px) {
    .location-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .location-map-wrapper {
        height: 320px;
    }

    .location-title {
        font-size: 1.4rem;
    }
}