@font-face {
    font-family: 'Scene Pro';
    src: url('../fonts/ScenePro-Regular.woff2') format('woff2'),
        url('../fonts/ScenePro-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #6e2ff7;
    --secondary: #8155f8;
    --light: #f5f5f5;
    --dark: #333;
    --font-family: 'Scene Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

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

body {
    width: 100%;
    overflow-x: hidden;
    background-color: var(--light);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure specific elements use the font Scene Pro */
.category-button,
.content,
.search-box input,
.mobile-category-button,
.mobile-subcategories a,
.hero h1,
.hero p,
.card h3,
.card p,
.price,
.marketplace span,
.quality-label,
.mobile-accordion,
.mobile-menu-header,
.tag {
    font-family: var(--font-family);
}

.logo-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo {
    height: 80px;
    width: auto;
}

/* Contenido Banner Promos*/
.hero {
    margin-top: 80px;
    /* Coincide con la altura del header */
    padding: 3rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
    font-size: 1.1rem;
}

.content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-title {
    font-size: 1.8rem;
    margin: 2rem 0;
    color: var(--primary);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-content {
    padding: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card p {
    color: #666;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-image-container {
    text-align: center;
    margin-bottom: 1rem;
}

.product-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    /* Mantiene la proporción sin deformar la imagen */
}

.price {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.price-container {
    display: flex;
    align-items: center;
}

.price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 10px;
}

.original-price {
    text-decoration: line-through;
    text-decoration-color: rgb(80, 80, 80);
    text-decoration-thickness: 1px;
    color: rgb(118, 117, 117);
    font-size: 90%;
}

.promo-price {
    color: green;
    white-space: nowrap;
    font-size: clamp(0.8rem, 1.2rem, 1.2rem);
    /* Ajusta automáticamente el tamaño entre 0.8rem y 1.2rem */
    overflow: hidden;
    text-overflow: ellipsis;
}

.discount {
    color: purple;
    font-weight: bold;
    white-space: nowrap;
    /* No permite saltos de línea */
    font-size: clamp(0.9rem, 1.2rem, 1.6rem);
    /* Reducido el mínimo a 0.9rem para asegurar visibilidad */
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    /* Asegura que el texto pueda encogerse */
    flex-shrink: 1;
    /* Permite que el elemento se encoja si es necesario */
}

/* Clase para mantener el espacio pero ocultar el contenido */
.empty-price {
  color: transparent;
  user-select: none;
  pointer-events: none;
  height: 1rem; /* Altura fija para mantener el espacio */
  margin-bottom: 4px; /* Margen para mantener la separación */
  visibility: hidden; /* Ocultar pero mantener el espacio */
}

/* Asegurar altura mínima para el grupo de precios */
.price-group {
  min-height: 3.5rem; /* Ajusta según tu diseño */
}

.marketplace {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.marketplace-icon {
    width: 50px;
    /* Tamaño fijo para las imágenes del marketplace */
    height: 50px;
    /* Tamaño fijo para las imágenes del marketplace */
    vertical-align: middle;
    margin-right: 5px;
}

.tag {
    background: var(--secondary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 0.5rem;
}

.quality-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.quality-label {
    font-size: 0.9em;
    color: #666;
}

.stars-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stars {
    color: #FFD700;
    font-size: 1.2em;
}

.rating-number {
    font-size: 0.9em;
    color: #333;
}


/** Menu Category **/

.header-nav {
    background: white;
    position: fixed;
    padding: 0.5rem 1rem;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-header {
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
    background: white;
}

.main-categories {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-grow: 1;
}

.category-button {
    background: none;
    border: none;
    color: #5b5959;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 0;
    cursor: pointer;
    white-space: nowrap;
}

.category-button.active {
    color: #6e2ff7;
}

.submenu-nav {
    background: white;
    border-top: 1px solid #eee;
    position: fixed;
    width: 100%;
    left: 0;
    top: 80px; /* Changed from 90px to 70px to match header height */
    display: none;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 99;
    padding: 15px 0;
}

.submenu-nav.active {
    display: block;
}

.submenu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    gap: 40px;
    padding: 0 20px 0 140px;
    /* Ajustado el padding */
}

.submenu-nav a {
    padding: 5px 0;
    /* Reducido el padding */
    font-size: 14px;
    text-decoration: none;
    color: #333;
}

.submenu-nav a:hover {
    color: #6e2ff7;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Search box styles */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    font-size: 14px;
}

.search-box svg {
    position: absolute;
    right: 10px;
    color: var(--primary);
    cursor: pointer;
}

.nav-icons {
    display: flex;
    gap: 15px;
}

.nav-icons button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}



.no-results,
.error {
    text-align: center;
    padding: 2rem;
    color: var(--dark);
    width: 100%;
}

.error {
    color: #dc3545;
}

/* Hide mobile elements on desktop */
.menu-toggle,
.mobile-categories,
.mobile-subcategories,
.mobile-category-button {
    display: none;
}

/* Mobile Menu Styles */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px; /* Fuera de la pantalla */
  width: 280px;
  height: 100%;
  background-color: #fff;
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: none;
}

.mobile-menu.active {
  right: 0; /* Mostrar el menú */
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

/* Elementos que necesitan aparecer incluso en escritorio cuando están activos */
.mobile-menu.active,
.mobile-overlay.active {
    display: block !important;
}
  
  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px; /* Increased padding */
    border-bottom: 1px solid #eee;
    position: relative;
  }
  
  .mobile-logo {
    height: 40px;
    width: auto;
  }
  
  .close-mobile-menu {
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
    padding: 10px;
    font-size: 24px; /* Larger close button */
  }
  
  .mobile-search {
    position: relative;
    padding: 15px;
    border-bottom: 1px solid #eee;
  }
  
  .mobile-search input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
  }
  
  .mobile-search svg {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
  }
  
  .mobile-accordion {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
  }
  
  .accordion-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
  }
  
  .accordion-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    text-align: left;
    font-weight: 600;
    font-size: 14px; /* Larger font */
    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-family);
    color: #5b5959;
  }
  
  .accordion-button .icon {
    transition: transform 0.3s;
    font-size: 18px; /* Larger icon */
  }
  
  .accordion-button.active .icon {
    transform: rotate(180deg);
  }
  
  .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9f9f9;
  }
  
  /* Better styling for active states */
    .accordion-button.active {
        color: var(--primary);
        background-color: #f5f0ff;
    }

    .accordion-content.active {
        max-height: 500px;
        }
  
    .subcategory-list {
        padding: 10px 20px 15px 30px; /* Increased padding */
        }
  
    /* Increased spacing between subcategory items */
    .subcategory-item {
        padding: 12px 0; /* Increased padding */
    }
  
    .subcategory-link {
        color: var(--dark);
        text-decoration: none;
        display: block;
        font-size: 16px; /* Larger font */
        padding: 5px 0;
    }
  
  .subcategory-link:hover {
    color: var(--primary);
  }
  
 .mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
  
.mobile-overlay.active {
  display: block;
}

  /* Footer */
footer {
    background-color: #2c2b2b;
    color: white;
    padding: 40px;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}
.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icons a {
    color: var(--primary);
    transition: color 0.2s ease;
}

.social-icons a:hover {
    color: var(--secondary);
}
.footer-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}
.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.footer-links button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
}
.footer-links button:hover {
    text-decoration: underline;
}
.email-form {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    max-width: 220px;
}
.email-form input[type="email"] {
    padding: 10px;
    flex: 1;
    border: none;
    border-radius: 5px 0 0 5px;
}
.email-form button {
    padding: 10px 20px;
    border: none;
    background-color: #6e2ff7;
    color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}
.email-form button:hover {
    background-color: #1a1a1a;
}
.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 24px;
}
.separator {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 30px 0;
}
.bottom-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}
.bottom-links button {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
}
.bottom-links button:hover {
    text-decoration: underline;
}
.footer-text {
    text-align: center;
    font-size: 14px;
}

.submenu-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 1.5rem;
    padding: 0;
    transition: transform 0.2s ease, color 0.2s ease;
    z-index: 10;
  }
  
  .submenu-close:hover {
    color: var(--primary);
    transform: scale(1.1);
  }
  
/* tooltips básicos en nav-icons */
    .nav-icons button {
        position: relative;
    }
  
  .nav-icons button::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
  }
  
  .nav-icons button:hover::after {
    opacity: 1;
    visibility: visible;
  }
  
  /* Triángulo pequeño encima del tooltip */
  .nav-icons button::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
  }
  
  .nav-icons button:hover::before {
    opacity: 1;
    visibility: visible;
  }  

/**
 * Mobile styles
 */

.mobile-user-section {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.mobile-user-link {
  display: flex;
  align-items: center;
  padding: 12px 5px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s ease;
}

.mobile-user-link:hover {
  color: var(--primary);
}

.mobile-user-link svg {
  margin-right: 15px;
  stroke: var(--primary);
}

.mobile-divider {
  height: 1px;
  background-color: #eee;
  margin: 0 0 10px 0;
}

/* Mejorar animación de cierre del menú */
.mobile-menu.closing {
  right: -100%;
  transition: right 0.3s ease;
}

@media (max-width: 768px) {

    .logo {
        margin-left: -20px;
    }

    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: white;
        z-index: 1000;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .main-header {
        display: flex;
        align-items: center;
        padding: 8px 15px;
        height: 70px;
        justify-content: space-between;
    }

    .submenu-close {
        top: 10px;
        right: 10px;
    }

    .close-menu span {
        position: absolute;
        width: 100%;
        height: 2px;
        background: var(--primary);
        left: 0;
    }

    .close-menu span:first-child {
        transform: rotate(45deg);
    }

    .close-menu span:last-child {
        transform: rotate(-45deg);
    }
    
    /* Add menu toggle button styles */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 10px;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--primary);
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Adjust hero spacing */
    .hero {
        margin-top: 80px;
        /* Match header height */
        padding: 1.5rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Hide desktop menus on mobile */
    .main-categories,
    .submenu-nav,
    .submenu-container,
    .submenu-nav.active,
    .nav-icons button::after,
    .nav-icons button::before, 
    .right-section .nav-icons {
        display: none;
    }

}

