:root {
    --primary-color: #b4d8c3;        /* Verde menta principal */
    --secondary-color: #d4e8f0;      /* Azul pastel suave */
    --background-color: #f8fdf9;     /* Blanco menta muy suave */
    --card-color: #FFFFFF;           /* Blanco puro para cards */
    --text-color: #6b7b73;           /* Verde grisáceo muted */
    --price-color: #8fb091;          /* Verde menta oscuro */
    --notice-color: #f0e6d2;         /* Crema suave */
    --category-active: #b4d8c3;      /* Mismo que primario */
    --category-inactive: #e8f4ea;    /* Verde menta muy claro */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Evitar double-tap zoom en iOS (mantiene scroll y gestos básicos) */
html, body {
  -ms-touch-action: manipulation; /* IE/Edge legacy */
  touch-action: manipulation;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.company-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-quick-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: width 0.3s ease;
  max-width: 320px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.nav-search-toggle {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-search-toggle:hover,
.nav-quick-search.open .nav-search-toggle {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.nav-search-form {
  position: relative;
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s ease, opacity 0.2s ease;
  overflow: hidden;
}

.nav-quick-search.open .nav-search-form {
  width: 260px;
  opacity: 1;
  pointer-events: auto;
}

.nav-search-form input {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
  color: #2c3e36;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-search-results {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
  display: none;
  flex-direction: column;
  z-index: 120;
  max-height: 400px;
  overflow-y: auto;
}

.nav-quick-search.show-results .nav-search-results {
  display: flex;
}

.nav-search-result-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: #2c3e36;
  transition: background 0.2s ease;
}

.nav-search-result-item:hover,
.nav-search-result-item:focus {
  background: rgba(180, 216, 195, 0.18);
}

.nav-search-result-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #f4f6f5;
}

.nav-search-result-title {
  font-weight: 600;
  color: #1f2d27;
  line-height: 1.2;
}

.nav-search-result-subtitle {
  font-size: 0.85rem;
  color: #51645a;
  margin-top: 0.2rem;
}

.nav-search-result-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--price-color);
  margin-top: 0.25rem;
}

.nav-search-result-offer {
  display: inline-block;
  background: #ff6f61;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-search-empty {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #6b7b73;
}

@media (max-width: 992px) {
  .header-container {
    gap: 0.75rem;
  }

  .nav-quick-search.open .nav-search-form {
    width: min(240px, 60vw);
  }
}

@media (max-width: 768px) {
  .nav-quick-search {
    flex: 0 0 auto;
  }

  .nav-quick-search.open .nav-search-form {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-40%);
    right: auto;
    width: min(380px);
  }

  .nav-search-results {
    width: 90%;
  }

  .page-tienda .nav-quick-search,
  .page-tienda_categoria .nav-quick-search,
  .page-tienda_marca .nav-quick-search,
  .page-tienda_categoria_marca .nav-quick-search {
    display: none;
  }
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.language-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.language-code {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.language-toggle i {
    font-size: 0.8rem;
    opacity: 0.8;
}



/* Estilos para el Modal de Idioma */
.language-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 1001;
    display: none;
    animation: fadeInModal 0.3s ease;
}

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

.language-modal.open {
    display: block;
}

.language-modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.language-modal-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), #A66B5A);
    color: white;
}

.language-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-language-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-language-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.language-modal-body {
    padding: 1.5rem;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
}

.language-option:hover {
    background: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(190, 124, 105, 0.2);
}

.language-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.language-flag {
    font-size: 1.5rem;
    line-height: 1;
    min-width: 28px;
    text-align: center;
}

.language-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.language-name {
    font-weight: 600;
    font-size: 1rem;
}

.language-code-small {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: normal;
    text-transform: uppercase;
}

.language-option.active .language-code-small {
    opacity: 0.9;
}

.language-option .fas.fa-check {
    color: white;
    font-size: 1.1rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.language-options {
    padding: 1rem;
    display: grid;
    gap: 0.5rem;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.language-option:hover {
    background-color: var(--background-color);
    border-color: var(--primary-color);
}

.language-option .flag {
    font-size: 1.5rem;
}

.language-option .lang-name {
    font-size: 1rem;
    color: var(--text-color);
}

.language-option[data-lang="${currentLanguage}"] {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    font-weight: bold;
}



.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
}

main {
    max-width: 1200px; /* Este es el ancho del contenedor */
    margin: 2rem auto; /* Esto lo centra */
    padding: 0 1rem;   /* Estos son los márgenes laterales */
}
.layout-full_width main {
    max-width: none;  /* Eliminamos el ancho máximo */
    margin: 0;        /* Eliminamos el centrado */
    padding: 0;       /* Eliminamos los márgenes laterales del contenedor principal */
}

.notice-banner {
    background-color: var(--notice-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

/* Category Navigation */
.category-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.category-nav::-webkit-scrollbar {
    height: 4px;
}

.category-nav::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 4px;
}

.category-btn {
    background-color: var(--category-inactive);
    color: var(--text-color);
    border: 2px solid transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(232, 213, 232, 0.3);
}

.category-btn.active {
    background-color: var(--category-active);
    color: white;
    border-color: var(--category-active);
    box-shadow: 0 4px 8px rgba(255, 179, 186, 0.3);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.product-card {
  background-color: var(--card-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 8px 8px 16px #f0f0f0, -8px -8px 16px #ffffff;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

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

.product-card .product-link:hover {
    text-decoration: none;
    color: inherit;
}

.quantity-selector {
display: flex;
align-items: center;
gap: 0;
width: fit-content;
border: 1px solid var(--border-color);
border-radius: 4px;
overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: var(--background-color);
    cursor: pointer;
    font-size: 18px;
    color: var(--text-color);
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    color: var(--text-color);
    background-color: white;
}

.quantity-input:focus {
    outline: none;
    background-color: #f9f9f9;
}

.product-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 12px 12px 24px #e0e0e0, -12px -12px 24px #ffffff;
}

/* Imagen con aspect ratio (mejor para espacio del contenido) */
.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* Cambia a 1/1 si quieres cuadradas */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  overflow: hidden;
}
.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* cover si prefieres llenar */
  background: #f3f4f6;
  display: block;
}

.product-info {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-name {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.product-description {
  color: #666;
  font-size: 0.85rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

.product-details {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.detail-label {
  font-weight: 700;
  color: #444;
}
.detail-value { font-weight: 600; color: #555; }

/* Variant chips */
.variant-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}
.variant-label { font-weight: 700; color: #444; font-size: 0.85rem; }
.chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chip {
  background: #f1f3f5;
  color: #333;
  border: 1px solid #e9ecef;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.chip.more { background: #fff3cd; border-color: #ffe69c; color: #9a6d00; }

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
     color: var(--price-color);
  margin-bottom: 0.25rem;
}

.stock-info {
    display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  background-color: #f8f9fa;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
}
.stock-info.compact { margin-top: 0.25rem; }

.stock-available {
    font-weight: bold;
    color: #2a9d8f;
}

.add-to-cart {
     background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
     color: white;
     border: none;
   padding: 0.8rem 1rem;
   border-radius: 12px;
     cursor: pointer;
     width: 100%;
   font-weight: 600;
   transition: all 0.3s ease;
   box-shadow: 0 4px 8px rgba(186, 225, 255, 0.3);
 }

.add-to-cart:hover {
     transform: translateY(-2px);
     box-shadow: 0 6px 12px rgba(186, 225, 255, 0.4);
}
.add-to-cart:active { transform: translateY(0px); }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.open {
    display: block;
}

/* Store Modal Styles */
.store-modal {
  position: fixed;
  top: 5vh; /* margen superior para evitar corte */
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 520px;
  max-height: 90vh; /* altura máxima en viewport */
  background-color: var(--card-color);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  z-index: 1001;
  display: none;
  display: none;
  overflow: hidden; /* header fijo, body scroll */
}

.store-modal.open {
    display: block;
}

.store-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
}

.store-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.store-modal-body {
    padding: 1.25rem 1.5rem 1.75rem;
    overflow-y: auto;
    max-height: calc(90vh - 70px); /* restar alto header */
    scrollbar-width: thin;
}
@supports (-webkit-touch-callout: none) {
  .store-modal-body { -webkit-overflow-scrolling: touch; }
}

.store-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.store-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-color);
}

.store-option:hover {
    background-color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.store-info {
    flex: 1;
}

.store-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.store-address {
    font-size: 0.9rem;
    color: #666;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 600px) {
    .products-grid {
   grid-template-columns: repeat(2, 1fr);
   gap: 1rem;
    }

  .product-image { height: 160px; }

  .product-name { font-size: 1rem; }

  .product-price { font-size: 1.2rem; }

  .product-details { font-size: 0.85rem; }

  .add-to-cart {
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem;
  }

}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 50px;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #20b358;
    transform: scale(1.1);
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

/* Estilos adicionales para asegurar responsive en móviles */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    /* Asegurar que las grillas de categorías y galerías mantengan 2 columnas */
    .cat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .gallery-grid.uniform {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* Ajustes para productos en móviles muy pequeños */
    .product-card {
        font-size: 0.85rem;
    }
    
    .product-name {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
}


/* Agregar estos estilos al final de tu archivo styles.css existente */

/* ===== ESTILOS PARA MODALES DE PEDIDOS ===== */

/* Modal de Mis Pedidos */
.pedidos-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.pedidos-modal.open {
  display: flex;
}

.pedidos-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.pedidos-modal-header {
  background: linear-gradient(135deg, var(--primary-color, #e63946), #d63384);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pedidos-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-pedidos-modal {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.close-pedidos-modal:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pedidos-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* NUEVO: Botón Mis Pedidos en el nav */
.mis-pedidos-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
}

.mis-pedidos-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.mis-pedidos-btn i {
  font-size: 1rem;
}

/* Ajustar el user-menu para que funcione con el nuevo botón */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

/* Loading */
.loading-pedidos {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.loading-pedidos i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color, #e63946);
}

/* Lista de pedidos en modal */
.pedidos-lista-modal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pedido-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.pedido-item:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pedido-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.pedido-numero {
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
}

.pedido-fecha {
  color: #666;
  font-size: 0.9rem;
}

.pedido-total {
  font-weight: 600;
  color: var(--primary-color, #e63946);
  font-size: 1.1rem;
}

.pedido-productos-resumen {
  margin-bottom: 0.75rem;
}

.pedido-productos-resumen h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #333;
}

.productos-lista-corta {
  list-style: none;
  padding: 0;
  margin: 0;
}

.productos-lista-corta li {
  font-size: 0.85rem;
  color: #666;
  padding: 0.125rem 0;
}

.pedido-acciones {
  display: flex;
  gap: 0.5rem;
}

.btn-ver-detalle {
  background: var(--primary-color, #e63946);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-ver-detalle:hover {
  background: #d63384;
  transform: translateY(-1px);
}

/* No pedidos */
.no-pedidos-modal {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.no-pedidos-modal i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ccc;
}

.no-pedidos-modal h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
}

/* Modal de Detalle del Pedido */
.pedido-detalle-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.pedido-detalle-modal.open {
  display: flex;
}

.pedido-detalle-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.pedido-detalle-header {
  background: #f8f9fa;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pedido-detalle-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.3rem;
}

.close-pedido-detalle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-pedido-detalle:hover {
  background: #e9ecef;
  color: #333;
}

.pedido-detalle-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.detalle-section {
  margin-bottom: 1.5rem;
}

.detalle-section h3 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detalle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.detalle-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detalle-item strong {
  color: #333;
  font-size: 0.9rem;
}

.detalle-item span {
  color: #666;
  font-size: 0.9rem;
}

.precio-total {
  color: var(--primary-color, #e63946) !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
}

.productos-detalle {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.producto-detalle {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.producto-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.producto-info strong {
  color: #333;
  font-size: 0.95rem;
}

.producto-cantidad {
  color: #666;
  font-size: 0.85rem;
}

.producto-precios {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 0.25rem;
}

.precio-unitario {
  color: #666;
  font-size: 0.85rem;
}

.precio-subtotal {
  color: var(--primary-color, #e63946);
  font-weight: 600;
  font-size: 0.95rem;
}

.total-productos {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #e9ecef;
  text-align: right;
}

.total-productos strong {
  color: var(--primary-color, #e63946);
  font-size: 1.2rem;
}

/* Responsive para modales de pedidos */
@media (max-width: 768px) {
  .pedidos-modal-content,
  .pedido-detalle-content {
    width: 95%;
    max-height: 90vh;
  }

  .pedido-item-header {
    flex-direction: column;
    align-items: start;
    gap: 0.5rem;
  }

  .detalle-grid {
    grid-template-columns: 1fr;
  }

  .producto-detalle {
    flex-direction: column;
    align-items: start;
    gap: 0.75rem;
  }

  .producto-precios {
    align-items: start;
  }

  .pedidos-modal-header,
  .pedido-detalle-header {
    padding: 1rem;
  }

  .pedidos-modal-body,
  .pedido-detalle-body {
    padding: 1rem;
  }

  /* Responsive para el botón en móviles */
  .mis-pedidos-text {
    display: none;
  }

  .mis-pedidos-btn {
    padding: 0.5rem;
    margin-right: 0.5rem;
  }
  #registerBtn {
    display: none; /* Ocultar el botón de registro en móviles */
  }
}

@media (max-width: 480px) {
  .pedidos-modal-content,
  .pedido-detalle-content {
    width: 98%;
    max-height: 95vh;
  }

  .pedidos-modal-header h2,
  .pedido-detalle-header h2 {
    font-size: 1.2rem;
  }

  .pedido-item {
    padding: 0.75rem;
  }

  .btn-ver-detalle {
    width: 100%;
    justify-content: center;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* En móviles muy pequeños, solo mostrar el ícono */
  .mis-pedidos-btn {
    min-width: 40px;
    justify-content: center;
  }
}


.add-to-cart.added {
    background-color: #28a745 !important; /* Verde éxito */
    color: white !important;
    cursor: default;
}


/* --- ESTILOS PARA LA FUNCIONALIDAD DE OFERTAS --- */

/* Para que la etiqueta de oferta se posicione correctamente */
.product-card {
    position: relative; 
}

/* Etiqueta de "OFERTA" en la esquina */
.offer-badge {
  position: absolute;
  top: 10px;
  right: -8px;
  background-color: #e63946;
  color: white;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  transform: rotate(20deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 3;
}

/* Badge de producto popular */
.popular-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(238, 90, 111, 0.4);
  z-index: 3;
  animation: pulse-popular 2s ease-in-out infinite;
}

@keyframes pulse-popular {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Contenedor para alinear precios */
.price-container {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  background: #f0f0f0;
  border: 1px solid #d9d9d9;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Overlay de precios sobre la imagen */
.price-overlay {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #d4d4d4;
  padding: 4px 6px;
  border-radius: 6px;
  max-width: 70%;
  line-height: 1.05;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  text-align: right;
}
.price-overlay .price-main { font-weight: 700; font-size: 0.95rem; color: var(--price-color); }
.price-overlay .price-original { text-decoration: line-through; color: #999; font-size: 0.65rem; }
.price-overlay .price-box { font-size: 0.6rem; color: #555; font-weight: 600; }
.price-overlay.has-offer .price-main { color: var(--price-color); }

/* Precio de oferta (más grande y prominente) */
.product-price.offer-price {
  font-size: 1.35rem;
    font-weight: bold;
    color: var(--price-color); /* Usa el color de precio principal */
}

/* Precio original (tachado y más pequeño) */
.product-price.original-price {
  font-size: 0.95rem;
    color: #999; /* Un color gris para que sea menos importante */
    text-decoration: line-through; /* ¡El tachado! */
}

/* --- Selector widgets (talle/color/mode) --- */
.selector-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.selector-label {
  font-weight: 700; /* bold */
  color: var(--secondary-color);
  min-width: 90px;
}

.selector-select {
  height: 40px;
  padding: 6px 12px;
  border: 2px solid var(--border-color, #dcdcdc);
  border-radius: 8px;
  background: #fff;
  color: var(--text-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.selector-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(190,124,105,0.12);
}

.selector-select.small {
  height: 32px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.92em;
}

/* Responsive adjustments for card controls */
.product-card .card-cart-controls {
  flex-wrap: wrap;
  justify-content: space-between;
}

/* ==============================================
   RESPONSIVE STYLES FOR LANGUAGE SELECTOR
   ============================================== */

@media (max-width: 768px) {
  .language-toggle {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }
  
  .language-toggle .language-code {
    font-size: 0.8rem;
  }
  
  .language-toggle i {
    font-size: 0.7rem;
  }
  
  .language-modal {
    width: 95%;
    max-width: 350px;
  }
  
  .language-modal-header {
    padding: 1.25rem;
  }
  
  .language-modal-header h2 {
    font-size: 1.2rem;
  }
  
  .language-modal-body {
    padding: 1.25rem;
  }
  
  .language-option {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }
  
  .language-flag {
    font-size: 1.3rem;
    min-width: 24px;
  }
  
  .language-name {
    font-size: 0.95rem;
  }
  
  .language-code-small {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .language-toggle {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.3rem;
  }
  
  .language-toggle .language-code {
    font-size: 0.75rem;
  }
  
  .language-modal {
    width: 98%;
    max-width: 320px;
  }
  
  .language-modal-header {
    padding: 1rem;
  }
  
  .language-modal-header h2 {
    font-size: 1.1rem;
  }
  
  .language-modal-body {
    padding: 1rem;
  }
  
  .language-option {
    padding: 0.8rem 0.9rem;
    gap: 0.8rem;
  }
  
  .language-flag {
    font-size: 1.2rem;
    min-width: 22px;
  }
  
  .language-name {
    font-size: 0.9rem;
  }
  
  .language-code-small {
    font-size: 0.7rem;
  }
}
.product-card .card-cart-controls .quantity-input { width: 52px; }
.product-card .card-cart-controls .selector-select.small { min-width: 110px; }