@import url("design-tokens.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    }
    
    body {
    font-family: var(--font-sans);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--gradient-page);
  }
    
    /* Header Styles */
    .header {
    background: var(--gradient-header-main);
    padding: 15px 0;
    border-bottom: 1px solid var(--color-header-border);
    }
    
    .header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--layout-header-inline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
    }
    
    .logo {
    width: min(200px, 42vw);
    max-width: 100%;
    flex-shrink: 0;
    }

    .logo img {
    max-width: 100%;
    height: auto;
    display: block;
    }
    
    
    .search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--color-border);
    font-size: 14px;
    }
    
    .search-bar button {
    background: var(--gradient-search-tech);
    color: var(--color-header-on-dark);
    border: none;
    padding: 10px 22px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0 999px 999px 0;
    box-shadow: var(--shadow-search-glow);
    transition: filter 0.2s ease, box-shadow 0.2s ease;
    }
    .search-bar button:hover {
    filter: brightness(1.08);
    box-shadow: var(--shadow-search-glow-hover);
    }
    
    /* Tu barra de búsqueda original */
    .search-bar {
      flex: 1;
      min-width: 0;
      max-width: 600px;
      display: flex;
      position: relative; /* necesario para posicionar el dropdown */
    }
    
    /* === Resultados desplegables === */
    .search-results {
      position: absolute;
      top: 100%; /* justo debajo del input */
      left: 0;
      width: 100%;
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: 10px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
      max-height: 350px;
      overflow-y: auto;
      z-index: 9999;
      margin-top: 5px;
      display: none;
      animation: fadeIn 0.2s ease-in-out;
    }
    
    /* Animación suave al aparecer */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-5px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    /* Cada ítem de resultado */
    .result-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 14px;
      cursor: pointer;
      transition: background 0.2s ease;
    }
    
    .result-item:hover {
      background: var(--color-search-row-hover);
    }
    
    /* Imagen del producto */
    .result-item img {
      width: 55px;
      height: 55px;
      object-fit: cover;
      border-radius: 8px;
      border: 1px solid var(--color-border);
      background-color: #fafafa;
    }
    
    /* Información del producto */
    .result-info {
      display: flex;
      flex-direction: column;
      justify-content: center;
      line-height: 1.3;
    }
    
    .result-info strong {
      font-size: 15px;
      color: var(--color-text);
      font-weight: 600;
    }
    
    .result-info span {
      font-size: 13px;
      color: var(--color-text-muted);
    }
    
    /* Scrollbar más discreta */
    .search-results::-webkit-scrollbar {
      width: 6px;
    }
    
    .search-results::-webkit-scrollbar-thumb {
      background-color: #ccc;
      border-radius: 10px;
    }
    
    
    .header-right {
    display: flex;
    align-items: center;
    gap: 30px;
    }

    .menu-toggle {
      display: none;
      font-size: 1rem;
      color: white;
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.18);
      padding: 0.65rem 0.9rem;
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.2s ease, transform 0.2s ease;
    }

    .menu-toggle:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: translateY(-1px);
    }
    
    .contact-info {
    text-align: right;
    }
    
    .phone {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-text);
    text-decoration: none;
    }
    
    .email {
    font-size: 12px;
    color: var(--color-interactive);
    text-decoration: none;
    }
    
    .account-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--color-interactive);
    }
    
    .cart-link {
    text-decoration: none;
    color: var(--color-text);
    font-size: 18px;
    }
    
    /* Navigation Styles */
    .nav {
        background: linear-gradient(135deg, #004a99 0%, var(--color-interactive) 100%);
        padding: 0;
    }
    
    .nav-container {
        max-width: 1400px;
        margin: 0 auto;
        display: flex;
        align-items: center;
    }
    
    .nav-item {
        position: relative;
    }
    
    .nav-link {
        display: block;
        padding: 15px 20px;
        color: white;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: background 0.3s;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link.promotions {
        background: var(--color-price);
    }
    
    .nav-link.promotions:hover {
        background: #aa0000;
    }
    
    .member-price {
        margin-left: auto;
        padding: 15px 20px;
        color: white;
        font-size: 12px;
    }
    
    .member-price .inactive {
        background: var(--color-price);
        padding: 3px 8px;
        border-radius: 3px;
        margin-left: 5px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        max-width: 1400px;
        margin: 20px auto;
        padding: 0 var(--layout-header-inline);
        font-size: 13px;
        color: var(--color-text-muted);
    }
    
    .breadcrumb a {
        color: var(--color-interactive);
        text-decoration: none;
    }
    
    .breadcrumb a:hover {
        text-decoration: underline;
    }
    
    /* Main Content */
    .main-content {
        max-width: 1400px;
        margin: 0 auto;
        padding: clamp(1.25rem, 4vw, 1.875rem) var(--layout-header-inline);
    }
    
    .back-link {
        color: var(--color-interactive);
        text-decoration: none;
        font-size: 14px;
        display: inline-block;
        margin-bottom: 20px;
    }
    
    .back-link:hover {
        text-decoration: underline;
    }
    
    .configurator-container {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: var(--layout-section-gap);
    }
    .options-panel {
      background: linear-gradient(135deg, var(--color-category-surface) 0%, #e8ecf1 100%);
      padding: 30px;
      border-radius: 5px;
    }
    
    .options-panel h1 {
      font-size: 32px;
      margin-bottom: 30px;
      color: white;
      /* Updated header with gradient and orange accent */
      background: var(--gradient-interactive-deep);
      padding: 15px 20px;
      border-radius: 8px;
      box-shadow: 0 4px 15px rgba(0, 82, 163, 0.3);
    }
    
    /* Added animation and styling for progressive reveal of option sections */
    .option-section {
      background: white;
      padding: 20px;
      margin-bottom: 20px;
      border-radius: 8px;
      border-left: 5px solid #ff8c00;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      animation: slideInUp 0.6s ease-out backwards;
      transition: all 0.3s ease, transform 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    
    /* Staggered animations for each section */
    .option-section:nth-child(1) {
      animation-delay: 0.1s;
    }
    .option-section:nth-child(2) {
      animation-delay: 0.3s;
    }
    .option-section:nth-child(3) {
      animation-delay: 0.5s;
    }
    .option-section:nth-child(4) {
      animation-delay: 0.7s;
    }
    .option-section:nth-child(5) {
      animation-delay: 0.9s;
    }
    .option-section:nth-child(6) {
      animation-delay: 1.1s;
    }
    
    .option-section:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 20px rgba(0, 82, 163, 0.2);
      border-left-color: var(--color-interactive-hover);
    }
    
    /* Enhanced h3 styling with orange accent */
    .option-section h3 {
      font-size: 18px;
      margin-bottom: 15px;
      color: var(--color-interactive-hover);
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    
    .option-section h3::before {
      content: "";
      width: 4px;
      height: 20px;
      background: linear-gradient(180deg, #ff8c00, var(--color-interactive-hover));
      border-radius: 2px;
    }
    
    /* Improved option items with better spacing and hover effects */
    /* Updated option-item with individual staggered animations */
    .option-item {
      margin-bottom: 12px;
      padding: 10px;
      border-radius: 6px;
      transition: all 0.2s ease;
      /* Animation for each item to appear progressively */
      animation: slideInFromLeft 0.5s ease-out backwards;
      position: relative;
      border-left: 3px solid transparent;
    }
    
    /* Dynamic color coding for items - rotate through blue, orange, gray */
    .option-item[data-index="0"],
    .option-item[data-index="3"],
    .option-item[data-index="6"] {
      border-left-color: var(--color-interactive-hover);
    }
    
    .option-item[data-index="1"],
    .option-item[data-index="4"],
    .option-item[data-index="7"] {
      border-left-color: #ff8c00;
    }
    
    .option-item[data-index="2"],
    .option-item[data-index="5"],
    .option-item[data-index="8"] {
      border-left-color: #888888;
    }
    
    /* Apply animation delays based on data-delay attribute */
    .option-item[data-delay="0"] {
      animation-delay: 0.1s;
    }
    .option-item[data-delay="1"] {
      animation-delay: 0.25s;
    }
    .option-item[data-delay="2"] {
      animation-delay: 0.4s;
    }
    .option-item[data-delay="3"] {
      animation-delay: 0.55s;
    }
    .option-item[data-delay="4"] {
      animation-delay: 0.7s;
    }
    .option-item[data-delay="5"] {
      animation-delay: 0.85s;
    }
    .option-item[data-delay="6"] {
      animation-delay: 1s;
    }
    .option-item[data-delay="7"] {
      animation-delay: 1.15s;
    }
    .option-item[data-delay="8"] {
      animation-delay: 1.3s;
    }
    .option-item[data-delay="9"] {
      animation-delay: 1.45s;
    }
    .option-item[data-delay="10"] {
      animation-delay: 1.6s;
    }
    .option-item[data-delay="11"] {
      animation-delay: 1.75s;
    }
    .option-item[data-delay="12"] {
      animation-delay: 1.9s;
    }
    .option-item[data-delay="13"] {
      animation-delay: 2.05s;
    }
    .option-item[data-delay="14"] {
      animation-delay: 2.2s;
    }
    .option-item[data-delay="15"] {
      animation-delay: 2.35s;
    }
    
    .option-item:hover {
      background: linear-gradient(135deg, rgba(0, 82, 163, 0.08), rgba(255, 140, 0, 0.08));
      transform: translateX(8px);
      border-left-width: 5px;
    }
    
    .option-item label {
      display: flex;
      align-items: center;
      cursor: pointer;
      font-size: 14px;
      color: var(--color-text);
      transition: color 0.2s ease;
    }
    
    .option-item label:hover {
      color: var(--color-interactive-hover);
    }
    
    .option-item input[type="radio"] {
      margin-right: 10px;
      cursor: pointer;
      accent-color: #ff8c00;
      width: 18px;
      height: 18px;
    }
    
    /* Enhanced price styling with orange color */
    .option-price {
      color: var(--color-interactive-hover);
      font-weight: 500;
      margin-left: 5px;
      background: #f0f4f8;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 12px;
    }
    
    .option-price.positive {
      color: white;
      background: linear-gradient(135deg, #ff8c00, #ff7300);
      font-weight: 600;
    }
    
    .option-link {
      color: var(--color-interactive-hover);
      text-decoration: none;
      font-weight: 500;
      transition: all 0.2s ease;
    }
    
    .option-group {
      display: flex;
      flex-direction: column; /* pone los labels uno debajo del otro */
      gap: 8px; /* espacio entre opciones */
      margin-top: 10px;
    }
    
    .option-group label {
      display: flex;
      align-items: center;
      gap: 6px; /* espacio entre el radio y el texto */
      font-size: 16px;
      cursor: pointer;
    }
    .option-link:hover {
      color: #ff8c00;
      text-decoration: underline;
    }
    
    /* Added keyframe animations for progressive reveal */
    @keyframes slideInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    @keyframes shimmer {
      0% {
        background-position: -1000px 0;
      }
      100% {
        background-position: 1000px 0;
      }
    }
    
    /* New keyframe for left-to-right slide animation */
    @keyframes slideInFromLeft {
      from {
        opacity: 0;
        transform: translateX(-30px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }
    
    .product-summary {
      background: white;
      border: 3px solid var(--color-interactive-hover);
      border-radius: 8px;
      padding: 25px;
      box-shadow: 0 8px 25px rgba(0, 82, 163, 0.15);
    }
    
    .product-title {
      font-size: 18px;
      font-weight: bold;
      margin-bottom: 20px;
      text-align: center;
      color: var(--color-interactive-hover);
    }
    
    .configured-part {
      background: linear-gradient(135deg, #f0f7ff 0%, #e8ecf1 100%);
      padding: 15px;
      margin-bottom: 20px;
      border-radius: 6px;
      border-left: 4px solid #ff8c00;
    }
    
    .configured-part label {
      font-size: 12px;
      color: var(--color-text-muted);
      display: block;
      margin-bottom: 5px;
      font-weight: 600;
    }
    
    .part-number {
      background: linear-gradient(135deg, #ff8c00, #ff7300);
      padding: 10px 12px;
      border-radius: 6px;
      font-weight: bold;
      font-size: 14px;
      display: inline-block;
      margin-bottom: 8px;
      color: black;
      box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    }
    
    .availability-link {
      color: var(--color-interactive-hover);
      text-decoration: none;
      font-size: 13px;
      font-weight: 500;
      transition: all 0.2s ease;
    }
    
    .availability-link:hover {
      color: #ff8c00;
      text-decoration: underline;
    }
    
    .price-breakdown {
      margin-bottom: 20px;
      padding: 15px;
      background: var(--color-category-surface);
      border-radius: 6px;
    }
    
    .price-row {
      display: flex;
      justify-content: space-between;
      padding: 8px 0;
      font-size: 14px;
      color: var(--color-text);
    }
    
    .price-row.total {
      border-top: 3px solid #ff8c00;
      padding-top: 12px;
      margin-top: 8px;
      font-size: 18px;
      font-weight: bold;
      color: var(--color-interactive-hover);
    }
    
    /* Enhanced buttons with orange and blue colors */
    .add-to-cart-btn {
      width: 100%;
      padding: 15px;
      background: linear-gradient(135deg, #ff8c00, #ff7300);
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      margin-bottom: 15px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    }
    
    .add-to-cart-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
    }
    
    .add-to-cart-btn:active {
      transform: translateY(0);
    }
    .action-btn {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #1f1f1f, #2c2c2c);
        color: #ffffff;
        border: 2px solid #0077ff;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 12px;
        transition: all 0.25s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 6px 16px rgba(0, 119, 255, 0.25);
    }
    
    /* Hover */
    .action-btn:hover {
        background: linear-gradient(135deg, #0077ff, #00c6ff);
        color: #0e0e0e;
        transform: translateY(-2px);
    }
    
    /* Click (ya NO se pone blanco) */
    .action-btn:active {
        background: linear-gradient(135deg, #005fd1, #009fe3);
        transform: scale(0.98);
        box-shadow: 0 4px 10px rgba(0, 119, 255, 0.4);
    }
    
    /* Focus (cuando hace click) */
    .action-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.4);
    }
    
    
    /* Summary Panel */
    .summary-panel {
        position: sticky;
        top: 20px;
        height: fit-content;
    }
    
    .product-summary {
        background: white;
        border: 2px solid #ddd;
        border-radius: 5px;
        padding: 25px;
    }
    
    .product-image {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .product-image img {
        max-width: 150px;
        height: auto;
    }
    
    .product-title {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 20px;
        text-align: center;
        color: var(--color-text);
    }
    
    .configured-part {
        background: #f9f9f9;
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 3px;
        border: 1px solid var(--color-category-border);
    }
    
    .configured-part label {
        font-size: 12px;
        color: var(--color-text-muted);
        display: block;
        margin-bottom: 5px;
    }
    
    .part-number {
        background: #fff3cd;
        padding: 8px 12px;
        border-radius: 3px;
        font-weight: bold;
        font-size: 14px;
        display: inline-block;
        margin-bottom: 8px;
    }
    
    .availability-link {
        color: var(--color-interactive);
        text-decoration: none;
        font-size: 13px;
    }
    
    .availability-link:hover {
        text-decoration: underline;
    }
    
    .price-breakdown {
        margin-bottom: 20px;
    }
    
    .price-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        font-size: 14px;
    }
    
    .price-row.total {
        border-top: 2px solid #333;
        padding-top: 12px;
        margin-top: 8px;
        font-size: 18px;
        font-weight: bold;
    }
    
    .add-to-cart-btn {
        width: 100%;
        padding: 15px;
        background: #ff6600;
        color: white;
        border: none;
        border-radius: 5px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        margin-bottom: 15px;
        transition: background 0.3s;
    }
    
    .add-to-cart-btn:hover {
        background: #e55a00;
    }
    
    .action-btn {
        width: 100%;
        padding: 12px;
        background: white;
        color: var(--color-text);
        border: 2px solid #333;
        border-radius: 5px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        margin-bottom: 10px;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .action-btn:hover {
        background: #f5f5f5;
    }
    
    .need-help {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--color-category-border);
        font-size: 13px;
        text-align: center;
    }
    
    .need-help strong {
        display: block;
        margin-bottom: 5px;
    }
    
    .need-help a {
        color: var(--color-interactive);
        text-decoration: none;
        font-weight: bold;
    }
    
    /* Footer */
    .contact-section {
        background: #f5f5f5;
        padding: var(--layout-section-padding);
        border-top: 1px solid var(--color-border);
    }
    
    .contact-container {
        max-width: 1400px;
        margin: 0 auto;
        text-align: center;
    }
    
    .contact-container h2 {
        font-size: 32px;
        margin-bottom: 40px;
        color: var(--color-text);
    }
    
    .contact-methods {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--layout-contact-row-gap);
        margin-bottom: 40px;
    }
    
    .contact-method h3 {
        font-size: 24px;
        color: var(--color-interactive);
        margin-bottom: 5px;
    }
    
    .contact-method p {
        color: var(--color-text-muted);
        font-size: 14px;
    }
    
    .footer {
        background: white;
        padding: var(--layout-section-padding);
        border-top: 1px solid var(--color-border);
    }
    
    .footer-container {
        max-width: 1400px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--layout-section-gap);
    }
    
    .footer-column h4 {
        font-size: 16px;
        margin-bottom: 20px;
        color: var(--color-text);
        padding-bottom: 10px;
        border-bottom: 2px solid var(--color-interactive);
    }
    
    .footer-column ul {
        list-style: none;
    }
    
    .footer-column ul li {
        margin-bottom: 10px;
    }
    
    .footer-column ul li a {
        color: var(--color-interactive);
        text-decoration: none;
        font-size: 14px;
    }
    
    .footer-column ul li a:hover {
        text-decoration: underline;
    }
    
    .footer-logo {
        margin-top: 20px;
    }
    
    .footer-logo img {
        max-width: 200px;
    }
    
    .company-info {
        margin-top: 15px;
        font-size: 13px;
        color: var(--color-text-muted);
        line-height: 1.8;
    }
    
    @media (max-width: 1024px) {
        .configurator-container {
            grid-template-columns: 1fr;
        }
    
        .summary-panel {
            position: static;
        }
    
        .footer-container {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 768px) {
      .header { padding: 0.6rem 0; }
      .header-container {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        padding: 0 0.75rem;
        position: relative;
      }
      .logo,
      .logo img,
      .logo img[style] {
        width: 110px !important;
      }

      .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        color: #fff;
        background: rgba(255,255,255,0.10);
        border-radius: 8px;
        cursor: pointer;
        margin-left: auto;
        order: 2;
      }

      .search-bar {
        order: 5;
        flex-basis: 100% !important;
        max-width: 100% !important;
        margin-top: 0.25rem;
      }
      .search-bar input  { font-size: 0.9rem; padding: 0.6rem 0.75rem; }
      .search-bar button { padding: 0.6rem 0.9rem; font-size: 0.9rem; min-height: 40px; }

      .header-right {
        order: 4;
        display: none !important;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        position: absolute;
        top: 55px;
        right: 10px;
        width: 280px;
        z-index: 9999;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
        background: rgb(2, 55, 115);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,.2);
        animation: none;
      }

      .header-right.active,
      .header-right.is-open {
        display: flex !important;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        animation: menuDrop .25s ease;
      }

      .contact-info,
      .contact-info a { font-size: 0.82rem; line-height: 1.4; }
      .cart-link { font-size: 0.85rem; }

      .nav-container {
        flex-direction: column;
      }

      .contact-methods {
        flex-direction: column;
        gap: 30px;
      }

      .footer-container {
        grid-template-columns: 1fr;
      }
    }

    @keyframes menuDrop {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @media (max-width: 768px) {
      .navbar {
      display: flex !important;
      flex-wrap: nowrap;
      flex-direction: row;
      justify-content: flex-start;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      gap: 0.25rem;
      padding: 0.4rem 0.5rem;
      width: 100%;
      }
      .navbar::-webkit-scrollbar { display: none; }
      .nav-item {
      flex: 0 0 auto;
      font-size: 0.78rem;
      padding: 0.55rem 0.85rem;
      white-space: nowrap;
      border-bottom: none;
      width: auto;
      }
    }
    
    .navbar {
        background: var(--gradient-nav);
        display: flex;
        align-items: center;
        padding: 0 var(--layout-navbar-inline);
        position: relative;
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 0.25rem;
        column-gap: clamp(0.2rem, 1.2vw, 1rem);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar::-webkit-scrollbar {
        height: 6px;
    }

    .navbar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.22);
        border-radius: 999px;
    }

    .nav-item {
        flex: 0 0 auto;
    }
    
    .nav-item {
        position: relative;
        color: white;
        padding: 15px 20px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        border: none;
        background: none;
        margin-left: 0;
    }
    
    .navbar.fixed {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    
    
    .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-item.promotions {
    background:var(--color-promo);
    border-radius: var(--radius-sm);
    }
    
    .nav-item.promotions:hover {
    background: var(--color-promo-hover);
    }
    
    .member-price {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 12px;
    }
    
    .member-price .star {
    color: var(--color-member-star);
    }
    
    .inactive-badge {
    background: var(--color-danger);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    }
    
    /* Improved dropdown menu styles with better organization and collapsible categories */
    .dropdown {
      position: static; /* 🔥 clave */
    }
    .dropdown-content {
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%) translateY(10px); /* empieza un poco abajo */
      width: min(1200px, calc(100vw - 24px));
      max-width: 100%;
      max-height: 600px;
      overflow-y: auto;
      background: white;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
      z-index: 1000;
      padding: 30px;
      border-radius: 0 0 8px 8px;
    
      /* 🔥 IMPORTANTE */
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    
      transition: all 0.25s ease;
    }
    
    /* estado visible */
    .dropdown:hover .dropdown-content {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0);
    }
    
    
    .dropdown-content h3 {
      color: var(--color-interactive-hover);
      font-size: 20px;
      margin-bottom: 25px;
      padding-bottom: 15px;
      border-bottom: 3px solid var(--color-interactive-hover);
    }
    
    /* Category list styles */
    .category-list {
      list-style: none;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
    }
    
    .category-item {
      background: var(--color-category-surface);
      border-radius: 8px;
      overflow: visible;
      transition: all 0.3s ease;
      border: 1px solid var(--color-category-border);
      position: relative;
      z-index: 1; /* Added z-index for proper layering */
    }
    
    /* Increase z-index when category is active to appear above others */
    .category-item.active {
      z-index: 200;
    }
    
    .category-item:hover {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      transform: translateY(-2px);
    }
    
    .category-item > span {
      display: block;
      padding: 15px 20px;
      font-weight: 600;
      font-size: 14px;
      color: var(--color-interactive-hover);
      background: var(--gradient-category-tab);
      cursor: pointer;
      position: relative;
      transition: all 0.3s ease;
      border-radius: 8px; /* Added border radius to match container */
    }
    
    .category-item > span::after {
      content: "▼";
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 10px;
      transition: transform 0.3s ease;
      color: var(--color-interactive-hover); /* Added color for better visibility */
    }
    
    /* Change background when active */
    .category-item.active > span {
      background: var(--gradient-interactive-deep);
      color: white;
      border-radius: 8px 8px 0 0;
    }
    
    .category-item.active > span::after {
      transform: translateY(-50%) rotate(180deg);
      color: white; /* White arrow when active */
    }
    
    .category-item > span:hover {
      background: linear-gradient(135deg, #e8eef3 0%, #d8e3ed 100%);
      padding-left: 25px;
    }
    
    /* Override hover when active */
    .category-item.active > span:hover {
      background: var(--gradient-interactive-deep);
      padding-left: 20px;
    }
    
    /* Subcategory list styles */
    .subcategory-list {
      list-style: none;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
      background: white;
      position: absolute;
      left: 0;
      top: 100%;
      width: 100%;
      z-index: 250; /* Increased z-index to appear above everything */
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); /* Enhanced shadow for better depth */
      border-radius: 0 0 8px 8px;
      opacity: 0;
      pointer-events: none;
      border: 2px solid var(--color-interactive-hover); /* Better border styling */
      border-top: none;
    }
    
    .category-item.active .subcategory-list {
      max-height: 600px;
      padding: 10px 0; /* Added padding for better spacing */
      opacity: 1;
      pointer-events: auto;
      margin-top: 0;
    }
    
    .subcategory-list li {
      padding: 12px 25px;
      font-size: 14px;
      color: #555;
      cursor: pointer;
      transition: all 0.2s ease;
      border-left: 3px solid transparent;
      background: white;
      position: relative;
    }
    
    /* Added icon before each subcategory item */
    .subcategory-list li::before {
      content: "›";
      position: absolute;
      left: 12px;
      color: var(--color-interactive-hover);
      font-size: 18px;
      font-weight: bold;
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    
    .subcategory-list li:hover::before {
      opacity: 1;
    }
    
    .subcategory-list li:hover {
      background: linear-gradient(90deg, #f0f7ff 0%, #ffffff 100%); /* Enhanced hover effect with gradient */
      color: var(--color-interactive-hover);
      padding-left: 30px;
      border-left-color: var(--color-interactive-hover);
      font-weight: 500;
    }
    
    .subcategory-list li:first-child {
      padding-top: 15px;
    }
    
    .subcategory-list li:last-child {
      padding-bottom: 15px;
      border-radius: 0 0 6px 6px;
    }
    
    /* Brands dropdown */
    .brand-link
    .brand-link {
      font-size: 12.5px;
      color: #444;
      cursor: pointer; /* 🔥 CLAVE */
      display: inline-block;
      padding: 3px 0;
      transition: all 0.2s ease;
    }
    
    /* HOVER */
    .brand-link:hover {
      color: var(--color-interactive-hover);
      padding-left: 6px;
    }
    
    /* EFECTO MÁS PRO */
    .brand-link::after {
      content: "";
      display: block;
      width: 0%;
      height: 1px;
      background: var(--color-interactive-hover);
      transition: width 0.2s ease;
    }
    
    .brand-link:hover::after {
      width: 100%;
    } 
    
    .brands-dropdown
    .brands-dropdown {
      width: min(950px, calc(100vw - 24px));
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      overflow-x: auto;
      padding: 15px 20px;
    }

    .brands-dropdown .dropdown-grid {
      grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr));
    }
    
    /* LOGOS más compactos */
    .brand-logos {
      display: flex;
      gap: 10px;
      margin-bottom: 15px;
      padding-bottom: 10px;
      border-bottom: 1px solid #eee;
    }
    
    .brand-logo {
      height: 40px;
      padding: 5px 10px;
      border-radius: 6px;
    }
    
    /* GRID más compacto */
    .dropdown-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 15px;
    }
    
    /* LETRAS */
    .letter-title {
      font-size: 12px;
      margin-bottom: 5px;
      padding-bottom: 3px;
    }
    
    /* LISTA */
    .dropdown-column li {
      margin: 2px 0;
    }
    
    /* TEXTO */
    .brand-link {
      font-size: 12.5px;
      line-height: 1.2;
    } 
    /* Scrollbar styling for dropdown */
    .dropdown-content::-webkit-scrollbar {
      width: 8px;
    }
    
    .dropdown-content::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 4px;
    }
    
    .dropdown-content::-webkit-scrollbar-thumb {
      background: var(--color-interactive-hover);
      border-radius: 4px;
    }
    
    .dropdown-content::-webkit-scrollbar-thumb:hover {
      background: #003d7a;
    }
    
    .option-section {
      display: none;
      animation: fadeIn 0.4s ease-in-out;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    .config-navigation {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
    }
    
    .config-navigation button {
      background-color: var(--color-interactive-hover);
      color: white;
      border: none;
      padding: 10px 18px;
      border-radius: 6px;
      cursor: pointer;
      transition: 0.3s;
    }
    
    .config-navigation button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    
    .config-navigation button:hover:not(:disabled) {
      background-color: #0073e6;
    }
    
    
    /* Fondo translúcido oscuro */
    .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      padding-top: 120px;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background: rgba(10, 10, 10, 0.8);
      backdrop-filter: blur(4px);
      animation: fadeIn 0.6s ease;
    }
    
    /* Contenedor central */
    .modal-content {
      background: linear-gradient(160deg, #1f1f1f, #2c2c2c);
      border: 2px solid #0077ff;
      margin: auto;
      padding: 30px;
      border-radius: 18px;
      width: 50%;
      color: #f5f5f5;
      text-align: center;
      box-shadow: 0 0 25px rgba(0, 119, 255, 0.3);
      font-family: "Poppins", sans-serif;
      animation: slideUp 0.6s ease;
    }
    
    /* Botón Aceptar Configuración */
    .modal-accept-btn {
      margin-top: 20px;
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg, #0077ff, #00c6ff);
      color: #ffffff;
      border: none;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      letter-spacing: 0.5px;
      box-shadow: 0 8px 20px rgba(0, 119, 255, 0.4);
      transition: all 0.3s ease;
    }
    
    .modal-accept-btn:hover {
      background: linear-gradient(135deg, #005fd1, #009fe3);
      box-shadow: 0 10px 25px rgba(0, 119, 255, 0.6);
      transform: translateY(-2px);
    }
    
    .modal-accept-btn:active {
      transform: scale(0.98);
      box-shadow: 0 5px 12px rgba(0, 119, 255, 0.4);
    }
    
    
    /* Botón de cerrar */
    .close {
      color: #ccc;
      float: right;
      font-size: 28px;
      font-weight: bold;
      cursor: pointer;
      transition: color 0.3s;
    }
    
    .close:hover {
      color: #ff7b00;
    }
    
    /* Títulos */
    .modal-content h2 {
      font-size: 22px;
      color:  #eeeeee;
      margin-bottom: 8px;
      letter-spacing: 0.5px;
    }
    
    .modal-content h3 {
      font-size: 18px;
      color: #eeeeee;
      margin-bottom: 20px;
    }
    
    /* Campo de búsqueda */
    #productSearchInput {
      width: 80%;
      padding: 12px;
      border: 2px solid #0077ff;
      border-radius: 10px;
      font-size: 16px;
      background-color: #2b2b2b;
      color: #fff;
      text-align: center;
      transition: all 0.3s ease;
    }
    
    #productSearchInput::placeholder {
      color: #aaa;
    }
    
    #productSearchInput:focus {
      outline: none;
      border-color: #ff7b00;
      box-shadow: 0 0 10px #ff7b00;
    }
    
    /* Animaciones suaves */
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    @keyframes slideUp {
      from { transform: translateY(30px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    
    
    .optional-select {
      width: 100%;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid #ccc;
      background: #fff;
      font-size: 15px;
      cursor: pointer;
      transition: 0.2s ease;
      margin-bottom: 15px;
    }
    
    .optional-select:focus {
      border-color: #4a90e2;
      outline: none;
      box-shadow: 0 0 3px rgba(74, 144, 226, 0.4);
    }
    
    .optional-group h4 {
      margin-bottom: 6px;
      font-weight: 600;
    }
    
    .cart-count {
      background: var(--color-promo);
      color: #fff;
      padding: 8px 16px;
      border-radius: 20px;
      cursor: pointer;
      font-weight: bold;
      font-size: 0.9rem;
      line-height: 1;
      transition: background 0.3s, transform 0.2s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-right: 10px;
    }
    
    .cart-count:hover {
      background: var(--color-promo-hover);
      transform: translateY(-2px);
    }
    
    
    /* === Resultados desplegables === */
    .search-results {
      position: absolute;
      top: 100%; /* justo debajo del input */
      left: 0;
      width: 100%;
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: 10px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
      max-height: 350px;
      overflow-y: auto;
      z-index: 9999;
      margin-top: 5px;
      display: none;
      animation: fadeIn 0.2s ease-in-out;
    }
    
    /* Animación suave al aparecer */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-5px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    /* Cada ítem de resultado */
    .result-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 14px;
      cursor: pointer;
      transition: background 0.2s ease;
    }
    
    .result-item:hover {
      background: var(--color-search-row-hover);
    }
    
    /* Imagen del producto */
    .result-item img {
      width: 55px;
      height: 55px;
      object-fit: cover;
      border-radius: 8px;
      border: 1px solid var(--color-border);
      background-color: #fafafa;
    }
    
    /* Información del producto */
    .result-info {
      display: flex;
      flex-direction: column;
      justify-content: center;
      line-height: 1.3;
    }
    
    .result-info strong {
      font-size: 15px;
      color: var(--color-text);
      font-weight: 600;
    }
    
    .result-info span {
      font-size: 13px;
      color: var(--color-text-muted);
    }
    
    /* Scrollbar más discreta */
    .search-results::-webkit-scrollbar {
      width: 6px;
    }
    
    .search-results::-webkit-scrollbar-thumb {
      background-color: #ccc;
      border-radius: 10px;
    }
    
    
    /* ================================= */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 80px;
  right: 10px;
  background-color: #25D366;
  color: white;
  font-size: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 999;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite, pulse 2s infinite;
}

    
    .whatsapp-float:hover {
      background-color: #1ebe5d;
      transform: scale(1.1);
    }

/* Tablas más legibles (jerarquía visual clara; excluye tablas de maquetación si usas .layout-table) */
table:not(.layout-table) {
  border-collapse: collapse;
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table:not(.layout-table) caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0;
  color: var(--color-text);
}
table:not(.layout-table) thead th {
  background: var(--gradient-table-header);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 2px solid var(--color-border-strong);
}
table:not(.layout-table) tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  color: var(--color-text);
}

@media (max-width: 768px) {
  /* Mueve el botón de WhatsApp más arriba para dejar espacio al chat */
  .whatsapp-float {
    bottom: 150px !important; /* Ajusta este valor según cuánto espacio necesites */
  }

  /* Si el chat de Zoho también tiene una posición fija, 
     asegúrate de que el chat se quede abajo y WhatsApp arriba */
  #zoho-chat-id, /* Cambia esto por el selector real de tu chat */
  .zsalesiq { 
    bottom: 20px !important;
  }
}

/* Para pantallas muy pequeñas, ajusta el tamaño si es necesario */
@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 140px !important;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
}
table:not(.layout-table) tbody tr:nth-child(even) { background: var(--color-surface-muted); }
table:not(.layout-table) tbody tr:hover { background: var(--color-interactive-soft); }
table:not(.layout-table) tbody tr:last-child td { border-bottom: none; }
