* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #fff;
}

/* Header */
header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    background: #f8f8f8;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.icon {
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: #333;
}

.icon i {
    color: #333;
    transition: filter 0.3s;
}

.icon:hover i {
    filter: brightness(0.7);
}

/* Contenedor */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Banner promocional */
.promo-banner {
    border-radius: 20px;
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    max-height: 330px;
    height: 330px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.promo-text-content {
    padding: 0 40px;
    text-align: left;
    max-width: 45%;
    position: relative;
    z-index: 10;
}

.promo-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    display: block;
    z-index: 0;
    transform: none;
}

.promo-banner h2 {
    font-size: 32px;
    margin-bottom: 5px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.promo-banner p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 500;
}

.promo-button {
    background: black;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.promo-button:hover {
    background: #333;
}

/* Contenido principal */
.main-content {
    display: flex;
    gap: 30px;
}

/* Barra lateral */
.sidebar {
    width: 200px;
    flex-shrink: 0;
}

.sidebar-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
}

.sidebar-item:hover {
    background: #f0f0f0;
}

.sidebar-item.active {
    background: #7c5cff;
    color: white;
}

.sidebar-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-icon-sidebar {
    display: flex;
    justify-content: space-between;
}

.header-icons .cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Sección de productos */
.products-section {
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
    margin-top: -10px;
}

.view-more {
    color: #7c5cff;
    cursor: pointer;
    text-decoration: underline;
}

/* Productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 auto;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-info {
    padding: 15px;
    background: #f5f5f5;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    border-top: 1.5px solid #e0e0e0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Esto alinea el contenido */
    box-sizing: border-box;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price-container {
    margin-top: auto; /* Empuja el precio hacia abajo */
    padding-top: 6px; /* Más cerca del nombre */
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.product-price {
    font-size: 18px;
    font-weight: 900;
    color: #000;
}

.product-price.discounted {
    color: #d9534f; /* Un color rojo para el descuento */
}

.original-price {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
    margin-left: 0; /* usamos gap en el contenedor */
}

.discount-percent {
    font-size: 13px;
    color: #6b7280; /* gris medio agradable */
    font-weight: 700;
    background: #eef2f7;
    padding: 2px 6px;
    border-radius: 6px;
}

/* Alinear mejor verticalmente los elementos del precio */
.product-price, .original-price, .discount-percent {
    line-height: 1.1;
    display: inline-block;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: 900;
    color: #000;
    margin: 0;
    min-height: auto;
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.favorite-btn:hover {
    filter: brightness(70%);
}

/* Línea separadora */
.linea-separadora {
    width: 2px;
    height: 60%;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    margin: 0 20px;
    align-self: center;
    flex: 0 0 2px;
    display: block;
}

.producto-main {
    align-items: flex-start;
}

.producto-imagen img {
    border-radius: 12px;
}

/* Colores y tallas */
.colores-grid {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.color-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    background: #fff;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.color-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.color-label {
    font-size: 12px;
    color: #111;
    text-align: center;
    padding: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-thumb.selected {
    outline: 3px solid #111;
    outline-offset: -4px;
}

.tallas-grid {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.size-btn {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.size-btn:hover {
    border-color: #999;
}

.size-btn.selected {
    background: #111;
    color: #fff;
    border-color: #111;
}

.add-to-cart-btn {
    margin-top: 16px;
    background: #000;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
    width: 100%;
}

.add-to-cart-btn:hover {
    background: #333;
}

.selection-error {
    color: #d63333;
    font-size: 0.95rem;
    margin-top: 8px;
}

.success-msg {
    color: #fff;
    background: #2ecc71;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 8px;
}

.producto-precio {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 4px 0 0 0;
    letter-spacing: 0.5px;
}

.ver-mas {
    background: none;
    border: none;
    color: #111;
    text-decoration: underline;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 0;
    display: inline-block;
    text-align: left;
}

.cart-icon {
    position: relative;
}

.cart-badge {
    background: #000;
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .header-content {
        padding: 0 15px;
    }

    .search-bar {
        margin: 0 20px;
        max-width: 400px;
    }

    .logo {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .sidebar {
        width: 180px;
    }

    .product-info {
        min-height: 78px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MÓVIL
   ============================================ */
@media (max-width: 768px) {

    /* Header móvil */
    header {
        padding: 15px 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 12px;
    }

    .logo {
        font-size: 22px;
        order: 1;
    }

    .header-icons {
        order: 2;
        gap: 15px;
    }

    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .search-bar input {
        padding: 10px 16px;
        font-size: 16px;
        /* Evita zoom en iOS */
    }

    /* Container móvil */
    .container {
        padding: 12px;
    }

    /* Banner promocional móvil */
    .promo-banner {
        height: 250px;
        max-height: 250px;
        margin-bottom: 25px;
        border-radius: 15px;
    }

    .promo-banner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2));
        z-index: 1;
        border-radius: 15px;
    }

    .promo-text-content {
        padding: 20px;
        max-width: 75%;
    }

    .promo-banner h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .promo-banner p {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .promo-button {
        padding: 10px 30px;
        font-size: 14px;
    }

    /* Main content móvil */
    .main-content {
        flex-direction: column;
        gap: 20px;
    }

    /* Sidebar móvil - horizontal */
    .sidebar {
        width: 100%;
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    #category-list {
        display: flex;
        gap: 10px;
    }

    .sidebar-item {
        flex: 0 0 auto;
        min-width: 150px;
        margin-bottom: 0;
        padding: 12px 15px;
    }

    .sidebar-item span {
        font-size: 14px;
    }

    /* Productos móvil */
    .products-section {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-image-container {
        height: 200px;
    }

    .product-info {
        padding: 12px;
        min-height: 72px;
    }

    .product-name {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .product-price {
        font-size: 16px;
        margin: 6px 0;
    }

    .favorite-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }

    /* Página de producto móvil */
    .producto-main {
        flex-direction: column;
    }

    .producto-imagen {
        width: 100%;
        margin-bottom: 20px;
    }

    .producto-imagen img {
        width: 100%;
        height: auto;
    }

    .linea-separadora {
        display: none;
    }

    .colores-grid {
        justify-content: flex-start;
    }

    .color-thumb {
        width: 56px;
        height: 56px;
    }

    .size-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .add-to-cart-btn {
        padding: 14px;
        font-size: 15px;
    }

    /* Sugerencias de búsqueda móvil */
    #search-suggestions-list {
        max-height: 250px !important;
    }

    #search-suggestions-list>div {
        padding: 10px !important;
    }

    #search-suggestions-list img {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MÓVIL PEQUEÑO
   ============================================ */
@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .header-icons {
        gap: 12px;
    }

    .icon i {
        font-size: 18px;
    }

    .promo-banner {
        height: 200px;
        max-height: 200px;
        border-radius: 12px;
    }

    .promo-text-content {
        padding: 15px;
        max-width: 80%;
    }

    .promo-banner h2 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .promo-banner p {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .promo-button {
        padding: 8px 25px;
        font-size: 13px;
    }

    .products-grid {
        gap: 10px;
    }

    .product-image-container {
        height: 180px;
    }

    .product-info {
        padding: 10px;
        min-height: 64px;
    }

    .product-name {
        font-size: 13px;
    }

    .product-price {
        font-size: 15px;
    }

    .sidebar-item {
        min-width: 130px;
        padding: 10px 12px;
    }

    .color-thumb {
        width: 50px;
        height: 50px;
    }
}

/* ============================================
   MEJORAS TÁCTILES PARA MÓVIL
   ============================================ */
@media (hover: none) and (pointer: coarse) {

    /* Aumentar área táctil */
    .product-card,
    .sidebar-item,
    .promo-button,
    .favorite-btn,
    .size-btn,
    .color-thumb {
        min-height: 44px;
        min-width: 44px;
    }

    /* Feedback táctil */
    .product-card:active {
        opacity: 0.9;
    }

    .promo-button:active,
    .favorite-btn:active,
    .size-btn:active {
        transform: scale(0.95);
    }

    /* Mejorar contraste para exteriores */
    .promo-banner h2,
    .promo-banner p {
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    }
}

/* ============================================
   SCROLLBAR PERSONALIZADO PARA SIDEBAR MÓVIL
   ============================================ */
@media (max-width: 768px) {
    .sidebar::-webkit-scrollbar {
        height: 4px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* Estilos para productos sin stock */
.product-card.product-out-of-stock {
    cursor: not-allowed;
}

.product-card.product-out-of-stock:hover {
    transform: none;
    box-shadow: none;
}

.product-out-of-stock .product-image-container {
    opacity: 0.5;
}

.stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
    text-transform: uppercase;
}

/* Floating WhatsApp button */
.whatsapp-flotante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: pulse 2s infinite;
    transition: transform 0.3s;
    text-decoration: none;
}

.whatsapp-flotante:hover {
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* =========================
   Footer
   ========================= */
.site-footer {
    background: #1f1f1f;
    color: #ddd;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr; /* contacto un poco más a la izquierda */
    gap: 16px; /* menos separación horizontal */
}
.footer-col h4 {
    color: #cfcfcf; /* gris oscuro en lugar de naranja */
    margin-bottom: 12px;
    font-size: 16px;
}
.footer-col p,
.footer-col li,
.footer-col a {
    color: #ddd;
    font-size: 14px;
    text-decoration: none;
}
.footer-col a:hover { text-decoration: underline; }

.footer-col input[type="email"] {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #eee;
    margin: 8px 0;
}
.policy-check { font-size: 12px; color: #bbb; display: block; margin: 6px 0; }
.subscribe-btn {
    background: #ffa000;
    color: #111;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}
.subscribe-btn:hover { filter: brightness(0.95); }

.map-wrap { width: 100%; height: 160px; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.address { margin-bottom: 10px; }
.hours { list-style: none; display: grid; gap: 6px; padding-left: 0; margin: 0; }
.policies { list-style: none; display: grid; gap: 6px; }
.contact-list { list-style: none; display: grid; gap: 8px; padding-left: 0; margin: 0; }
.contact-list a { color: #ddd; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* Horarios en dos líneas, compacto */
.hours li { margin-bottom: 12px; } /* más separación vertical */
.hours-label { font-weight: 700; }
.hours-time { color: #ddd; }

.footer-bottom {
    border-top: 1px solid #2a2a2a;
    text-align: center;
    padding: 12px 10px;
    color: #aaa;
}

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .footer-inner { grid-template-columns: 1fr; gap: 12px; padding: 20px 14px; }
    .site-footer { margin-top: 24px; }
    .footer-col h4 { font-size: 15px; margin-bottom: 8px; }
    .footer-col p, .footer-col li, .footer-col a { font-size: 13px; }
    .map-wrap { height: 140px; }
    .hours li { margin-bottom: 10px; }
    .footer-bottom { font-size: 12px; padding: 10px; }
}

@media (max-width: 768px) {
    .whatsapp-flotante {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}