/**
 * Desktop CSS - Estilos para pantallas grandes
 * Diseño basado en Hostinger Builder
 * NO MODIFICAR - El diseño desktop funciona perfectamente
 */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --color-primary: #000000;
    --color-secondary: #ffffff;
    --color-accent: #2a2a2a;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e5e5e5;
    --color-bg: #ffffff;
    --color-bg-light: #f9f9f9;
    --color-bg-dark: #1a1a1a;
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --transition: all 0.3s ease;
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevenir overflow horizontal en toda la página */
*,
*::before,
*::after {
    max-width: 100%;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: calc(36px + 140px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding-bottom: 0;
    width: 100%;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

/* ============================================
   CONTAINER Y LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ============================================
   BARRA PROMOCIONAL SUPERIOR - DESKTOP
   ============================================ */
.promo-bar {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 4px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    z-index: 1001;
}

.promo-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Versión Desktop/Tablet */
.promo-bar-desktop {
    display: flex;
}

.promo-bar-mobile {
    display: none;
}

.promo-text-mobile {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-align: center;
}

.promo-slide {
    position: absolute;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.promo-slide-active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.promo-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.promo-text {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .promo-text {
        font-size: 12px;
    }
    
    .promo-text-mobile {
        font-size: 12px;
    }
}

/* ============================================
   HEADER - DESKTOP
   Solo se aplica en pantallas >= 769px
   ============================================ */
/* Íconos del Header adaptables en RTL para pantallas desktop/laptop */
@media (min-width: 769px) {
  header {
    background-color: var(--color-secondary);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    direction: rtl; /* RTL global */
  }

  .header-container {
    display: flex;
    flex-direction: row; /* Orden normal: Logo (izq) → Nav (centro) → Iconos (der) */
    direction: ltr; /* Forzar dirección LTR */
    align-items: center;
    justify-content: space-between; /* logo fijo, menú+íconos se adaptan */
    padding: 0.75rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 140px;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
  }

  /* Logo fijo - Izquierda con padding */
  .logo-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto; /* no se mueve ni se adapta */
    height: 100%;
    direction: ltr; /* Forzar dirección LTR */
    padding-left: 1.5rem; /* Padding para separar del borde */
  }

  .logo-img {
    max-width: 252px;
    max-height: 81px;
    object-fit: contain;
    display: block;
  }

  /* Menú adaptable - Derecha */
  .nav-menu {
    display: flex;
    flex-direction: row; /* Orden normal: Inicio, Tienda, Contacto */
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    margin-right: 1.5rem; /* Espacio entre menú e iconos */
    padding: 0;
    direction: ltr; /* Forzar dirección LTR */
    flex: 0 0 auto; /* Tamaño fijo, no se expande */
    justify-content: flex-end; /* Alinear a la derecha */
  }
  
  .nav-menu ul {
    display: flex;
    flex-direction: row; /* Orden normal: Inicio, Tienda, Contacto */
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
    direction: ltr; /* Forzar dirección LTR */
    justify-content: flex-end; /* Alinear items a la derecha */
  }

  .nav-menu li a {
    color: var(--color-text);
    font-weight: 400;
    padding: 0.5rem 1rem;
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.3s ease;
    border-radius: 4px;
    font-size: 1rem;
  }

  .nav-menu li a:hover,
  .nav-menu li a:focus {
    color: var(--color-primary, #E07A5F);
    background-color: rgba(0, 0, 0, 0.05);
  }

  .nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
  }

  .nav-menu li a:hover::after {
    width: 100%;
  }

  /* Íconos adaptables - Derecha con padding */
  .desktop-icons-container {
    display: flex;
    flex-direction: row; /* Orden normal */
    direction: ltr; /* Forzar dirección LTR */
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    flex: 0 0 auto; /* se mueven junto con el menú */
    padding-right: 1.5rem; /* Padding para separar del borde */
  }

  .cart-icon-link,
  .desktop-user-menu-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, 4vw, 44px);
    height: clamp(36px, 4vw, 44px);
    background: transparent;
    border: 2px solid #333;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0;
    cursor: pointer;
  }

  .cart-icon-link:hover,
  .desktop-user-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #E07A5F;
    color: #E07A5F;
  }

  .cart-icon,
  .desktop-user-icon {
    width: 60%;
    height: 60%;
    max-width: 24px;
    max-height: 24px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
  }

  .cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #000000;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    transform: translate(25%, -25%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 0 4px;
    border: 2px solid #fff;
    box-sizing: border-box;
  }

  .cart-badge:not(:empty) {
    display: flex;
  }

  .cart-badge:empty {
    display: none !important;
  }

  @media (max-width: 1024px) {
    .cart-icon-link,
    .desktop-user-menu-btn {
      width: 38px;
      height: 38px;
    }

    .cart-icon,
    .desktop-user-icon {
      width: 20px;
      height: 20px;
    }
  }
}

/* ============================================
   HERO SECTION - DESKTOP
   ============================================ */
.hero-section {
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 54vh;
    min-height: 715px;
    max-height: 998px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5.83%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1649423247507-666b30d4f5fb?w=1920&h=1080&fit=crop&q=80&auto=format');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.7rem var(--spacing-md) 2rem var(--spacing-md);
    width: 100%;
    transform: translateY(-10%);
}

.hero-search-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.hero-search-container {
    display: flex;
    align-items: center;
    background-color: var(--color-secondary);
    border-radius: 30px;
    padding: 0.875rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    gap: 0.75rem;
}

.hero-search-icon {
    color: #999999;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 300;
    font-family: var(--font-primary);
}

.hero-search-input::placeholder {
    color: #999999;
    font-weight: 300;
}

.hero-tagline {
    font-size: 1rem;
    color: #554030;
    margin-bottom: 0.5rem;
    font-weight: 300;
    opacity: 1;
}

.hero-title {
    font-size: 6rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--color-secondary);
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hero-subtitle {
    font-size: 1rem;
    color: #554030;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    opacity: 1;
    font-weight: 300;
}

.hero-cta {
    display: inline-block;
    background-color: var(--color-secondary);
    color: #333333;
    padding: 0.875rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-cta:hover {
    background-color: rgba(255, 255, 255, 0.98);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    color: #000000;
}

/* ============================================
   CATEGORÍAS SECTION - DESKTOP
   ============================================ */
.categorias-section {
    padding: 2rem 0;
    background-color: var(--color-bg);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.categorias-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-top: 0;
    margin-bottom: 0;
    align-items: stretch;
}

.categoria-hero-main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    height: 100%;
    min-height: 712px;
    display: flex;
    align-items: stretch;
}

.categoria-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.categoria-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 2rem;
    text-align: left;
    z-index: 2;
}

.categoria-hero-subtitle {
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.75rem;
    text-shadow: none;
}

.categoria-hero-title {
    font-size: 3rem;
    font-weight: 300;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: -1px;
}

.categoria-hero-btn {
    display: inline-block;
    background-color: var(--color-secondary);
    color: rgba(0, 0, 0, 0.7);
    padding: 0.875rem 2.5rem;
    border-radius: 25px;
    font-weight: 400;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.categoria-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.98);
    color: rgba(0, 0, 0, 0.8);
}

.categorias-hero-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.categoria-side-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    flex: 1;
    min-height: 0;
    height: calc(50% - 0.5rem);
    display: flex;
    align-items: stretch;
}

.categoria-side-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: transform 0.3s ease;
}

.categoria-side-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 1.25rem;
    z-index: 2;
}

.categoria-side-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-secondary);
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.categoria-side-card a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.categoria-side-card:hover .categoria-side-image {
    transform: scale(1.05);
}

/* ============================================
   PRODUCTOS SECTION - DESKTOP
   ============================================ */
.productos-section {
    padding: 3rem 0;
    background-color: #ffffff;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: var(--spacing-md);
}

.producto-card {
    background-color: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.producto-imagen {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background-color: #f8f9fa;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.producto-card:hover .producto-imagen img {
    transform: scale(1.05);
}

.producto-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: #000000;
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    line-height: 1.2;
}

.badge-stock {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #e74c3c;
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    border-radius: 2px;
}

.producto-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.producto-categoria {
    display: none;
}

.producto-nombre {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem;
}

.producto-nombre a {
    color: inherit;
    text-decoration: none;
}

.producto-nombre a:hover {
    color: var(--color-accent);
}

.producto-descripcion {
    display: none;
}

.producto-precio {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.producto-info .btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    margin-top: auto;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.btn-primary:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

footer {
    background-color: var(--color-bg-dark);
    color: var(--color-secondary);
    padding: var(--spacing-lg) 0;
    margin-top: auto;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.footer-copyright {
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.8);
}

.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.social-icon {
    color: var(--color-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icon:hover {
    opacity: 0.7;
    transform: translateY(-2px);
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.hidden {
    display: none;
}

