/* =========================
   RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066cc;
    --secondary: #00b4d8;
    --success: #00a650;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f5f7fa;
    --white: #ffffff;
    --radius: 14px;
}

body {
    font-family: "Segoe UI", Roboto, system-ui, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.4;
}

/* =========================
   HEADER / NAV
========================= */
header {
    background: var(--white);
    box-shadow: 0 6px 25px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    max-width: 1400px;
    margin: auto;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary);
}

nav a {
    margin-left: 1.4rem;
    text-decoration: none;
    font-weight: 600;
    color: var(--dark);
    transition: 0.2s;
}

nav a:hover {
    color: var(--primary);
}

/* =========================
   MAIN CONTAINER
========================= */
.container {
    max-width: 1400px;
    margin: auto;
    padding: 2.5rem;
}

/* =========================
   PRODUCTS GRID
========================= */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 55px rgba(0,0,0,0.15);
}

.product-card img {
    height: 220px;
    object-fit: contain;
    padding: 1.2rem;
    background: #f8fafc;
}

.product-card h3 {
    padding: 1rem 1rem 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.product-card p {
    padding: 0 1rem;
    font-size: 0.85rem;
    color: var(--gray);
}

.price {
    padding: 1rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}

/* =========================
   ADD TO CART BUTTON
========================= */
.product-card button {
    margin: 1rem;
    margin-top: auto;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: 0.25s;
    position: relative;
    overflow: hidden;
}

.product-card button:hover {
    box-shadow: 0 12px 30px rgba(0,102,204,0.35);
    transform: translateY(-2px);
}

.product-card button.added::after {
    content: "✔ Añadido";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00c853, #009624);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   CART PANEL
========================= */
.cart-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    background: var(--white);
    box-shadow: -12px 0 40px rgba(0,0,0,0.2);
    padding: 1rem;
    transition: right 0.4s ease;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.cart-panel.open {
    right: 0;
}

.cart-panel h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

#cart-items {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.cart-total {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 1.25rem;
    font-weight: 800;
}

.cart-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-actions button {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--primary);
    background: white;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s ease;
}

.cart-item-actions button:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.cart-item-actions .qty {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.cart-item-actions .remove-btn {
    border: none;
    background: transparent;
    margin-left: auto;
    color: #ff4444;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 50%;
}

.cart-item-actions .remove-btn:hover {
    background: #fff5f5;
    color: #ff0000;
    transform: rotate(15deg) scale(1.2);
}
.cart-error {
    color: #ff4444;
    background: #ffebeb;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid #ffcccc;
}

/* Cart buttons */
#checkout-btn {
    background: linear-gradient(135deg, #00c853, #009624);
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 200, 83, 0.2);
}

#close-cart {
    background: #e5e7eb;
    border: none;
    padding: 0.7rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}
.cart-item-actions button:active {
    transform: scale(0.9);
}


#checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 200, 83, 0.3);
    filter: brightness(1.1);
}

#checkout-btn:active {
    transform: translateY(0);
}

/* Botón Cerrar */


#close-cart:hover {
    background: #d1d5db;
    color: #1f2937;
}

/* =========================
   CHECKOUT PAGES
========================= */
.checkout-header {
    background: var(--dark);
    color: white;
    padding: 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
}

.checkout-container,
.form-container,
.payment-container {
    max-width: 620px;
    margin: 2.5rem auto;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-summary {
    margin-top: 1.5rem;
    font-size: 1.3rem;
    font-weight: 800;
}

/* =========================
   FORMS
========================= */
input {
    width: 100%;
    padding: 0.85rem;
    margin-bottom: 0.9rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}



/* =========================
   SUCCESS PAGE
========================= */
.success-page {
    max-width: 500px;
    margin: 5rem auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
}

.success-page h1 {
    color: var(--success);
    margin-bottom: 1rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .container {
        padding: 1.5rem;
    }

    .cart-panel {
        width: 100%;
    }
}
/* ALERTA */
.checkout-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #000;
    color: #fff;
    padding: 14px 18px;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    font-size: 14px;
}

.checkout-alert.show {
    opacity: 1;
    transform: translateY(0);
}

/* FADE IN */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-error {
    border: 1px solid red;
}

.pay-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section .logo {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--dark);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%; /* Los hace circulares */
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-links img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

.social-links a:hover {
    transform: translateY(-5px);
}

.social-links a:hover img {
    transform: scale(1.1) rotate(5deg);
    filter: none;
}

.social-links .whatsapp-logo img {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .footer-container {
        text-align: center;
    }
    .footer-section h4 {
        display: block;
        width: fit-content;
        margin: 0 auto 20px;
    }

    .social-links {
        justify-content: center;
    }
}

.faq-page {
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-content h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.faq-item {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 5px solid var(--secondary);
    transition: transform 0.2s;
}

.faq-item:hover {
    transform: translateY(-3px);
}

.faq-item h3 {
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 1rem;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: all 0.3s ease-out;
    opacity: 0;
}

.faq-item.active {
    border-left-color: var(--primary);
}

.faq-item.active p {
    max-height: 200px; /* Ajustar según largo del texto */
    margin-top: 12px;
    opacity: 1;
}

.faq-item h3::after {
    content: '+';
    float: right;
    transition: transform 0.3s;
}

.faq-item.active h3::after {
    content: '-';
    transform: rotate(180deg);
}
/* payment */

.payment-box {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.transfer-details {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.total-section {
    text-align: center;
    margin: 20px 0;
}

.total-section .price {
    font-size: 2rem;
    color: var(--primary);
    font-weight: bold;
}

.user-input {
    margin: 20px 0;
}

.user-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}

.user-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.info-note {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 5px;
}

.payment-methods-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.method-item {
    padding: 5px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 55px;
}

.mercado-pago {
    height: 37px;
}

.method-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Ajuste para que los legales no queden apretados si quitamos una sección */
@media (max-width: 768px) {
    .payment-methods-footer {
        justify-content: center;
    }
}

/* search input */

.search-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: var(--primary);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 1.2rem;
}


.main-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 30px;
    align-items: start;
}

.sidebar {
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--radius);
    position: sticky;
    top: 20px;
}

.search-box h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--dark);
}

#search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

#search-input:focus {
    border-color: var(--primary);
}

.content-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Responsive: en móviles vuelve a ser una sola columna */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
}

/* cart responsive */

@media (max-width: 768px) {
    .cart-panel {
        width: 100%; /* Ocupa toda la pantalla en mobile */
        right: -100%; /* Se asegura de estar totalmente afuera */
    }

    .cart-panel.open {
        right: 0;
    }
}

/* css content  header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

#sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: var(--white);
    outline: none;
    cursor: pointer;
}

#sort-select:focus {
    border-color: var(--primary);
}
/* WhatsApp Floating Button */
.wsp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: Arial, sans-serif;
}

.wsp-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wsp-circle img {
  width: 32px;
  height: 32px;
}

.wsp-box {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 260px;
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.wsp-box p {
  font-size: 14px;
  margin-bottom: 10px;
  color: #333;
}

.wsp-btn-chat {
  display: block;
  text-align: center;
  background: #25d366;
  color: white;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s;
}

.wsp-btn-chat:hover {
  background: #1ebe5d;
}

.wsp-box.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* WhatsApp Floating Pro - Small */
.wsp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;        /* más chico */
    height: 52px;
    background: #25d366;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    text-decoration: none;
    transition: 0.25s ease;
  }
  
  .wsp-float img {
    width: 28px;       /* icono más chico */
    height: 28px;
  }
  
  .wsp-float:hover {
    transform: scale(1.05);
  }
  
  /* Tooltip */
  .wsp-tooltip {
    position: absolute;
    right: 65px;       /* más cerca */
    bottom: 50%;
    transform: translateY(50%) translateX(8px);
    background: #111;
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12.5px; /* texto más fino */
    width: 240px;      /* más compacto */
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
    box-shadow: 0 5px 16px rgba(0,0,0,0.35);
  }
  
  /* Flechita */
  .wsp-tooltip::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #111;
  }
  
  /* Hover show */
  .wsp-float:hover .wsp-tooltip {
    opacity: 1;
    transform: translateY(50%) translateX(0);
  }
  