/* ============================
   ESTILOS GENERALES
   ============================ */

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

body {
   font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
}

/* ============================
   HEADER
   ============================ */

#header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.logo img {
    height: 50px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: #000;
}

/* ============================
   ICONO CARRITO
   ============================ */

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    color: #1a1a1a;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    z-index: 1003;
}

.cart-icon:hover {
    color: #000;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* ============================
   OVERLAY PARA CARRITO
   ============================ */

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================
   ICONOS SOCIALES
   ============================ */

.social-icons {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.social-icons a svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.social-icons a:hover {
    background: #000;
    color: white;
    border-color: #000;
    transform: translateY(-2px);
}

/* ============================
   SECCIÓN TEXTILES
   ============================ */

.textiles-section {
    padding: 120px 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.textiles-header {
    text-align: center;
    margin-bottom: 3rem;
}

.textiles-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.textiles-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* ============================
   GRID DE PRODUCTOS
   ============================ */

.textiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.producto-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #f5f5f5;
    overflow: hidden;
    transition: all 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

.producto-imagen-container {
    position: relative;
    height: 0;
    padding-bottom: 75%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.producto-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.producto-card:hover .producto-img {
    transform: scale(1.05);
}

.carrusel-indicador {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 0.8rem;
    z-index: 1;
}

.producto-info {
    padding: 1.5rem;
}

.producto-nombre {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.producto-precio {
    margin-bottom: 1rem;
}

.precio-base {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.producto-tallas,
.producto-cantidad {
    margin-bottom: 1rem;
}

.producto-tallas label,
.producto-cantidad label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.producto-talla,
.cantidad-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    background: #fafafa;
    transition: border-color 0.3s ease;
}

.producto-talla:focus,
.cantidad-input:focus {
    outline: none;
    border-color: #000;
    background: #ffffff;
}

.add-to-cart-btn {
    width: 100%;
    padding: 1rem;
    background: #000;
    color: white;
    border: 2px solid #000;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: #ffffff;
    color: #000;
}

/* ============================
   PANEL CARRITO
   ============================ */

.cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-panel.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.cart-header h3 {
    margin: 0;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.cart-close:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

.cart-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-items {
    flex: 1;
    list-style: none;
    padding: 1rem;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.cart-item:hover {
    background: #fafafa;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-nombre {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.item-talla {
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-weight: 500;
}

.item-precio {
    font-weight: 600;
    color: #1a1a1a;
}

/* CONTROLES DE CANTIDAD */
.cantidad-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cantidad-btn {
    background: #000;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cantidad-btn:hover {
    background: #333;
    transform: scale(1.1);
}

.cantidad-numero {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 100px;
}

.item-subtotal {
    display: block;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
}

.remove-btn {
    background: transparent;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    transform: scale(1.1);
}

.cart-empty {
    text-align: center;
    color: #666;
    padding: 3rem 1rem;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
    opacity: 0.7;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.cart-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #000, #333);
    color: white;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: 0.5px;
}

.cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cart-btn:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* ============================
   BADGE PARA PRODUCTOS NUEVOS
   ============================ */

.producto-nuevo {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ============================
   NOTIFICACIONES
   ============================ */

.notificacion {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: #000;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
    border-left: 4px solid #000;
}

.notificacion.success {
    border-left-color: #4864ff;
}

.notificacion.error {
    border-left-color: #f44336;
}

.notificacion.info {
    border-left-color: #2196F3;
}

.notificacion.fade-out {
    animation: slideOutRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================
   FOOTER
   ============================ */

.footer {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    color: #666;
    border-top: 2px solid #e0e0e0;
}

/* ============================
   LOGIN HEADER
   ============================ */

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

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 768px) {
    #header {
        padding: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .textiles-section {
        padding: 100px 1rem 2rem;
    }
    
    .textiles-header h1 {
        font-size: 2rem;
    }
    
    .textiles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .social-icons {
        left: 1rem;
    }
    
    .cart-panel {
        width: 100%;
        right: -100%;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .item-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        align-items: center;
        min-width: auto;
    }
    
    .item-info {
        justify-content: space-between;
        width: 100%;
    }
    
    .header-actions {
        gap: 0.5rem;
        order: 3;
    }
    
    .cart-icon {
        margin-right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .textiles-header h1 {
        font-size: 1.7rem;
    }
    
    .producto-info {
        padding: 1rem;
    }
    
    .cart-header,
    .cart-footer {
        padding: 1rem;
    }
    
    .item-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .producto-nuevo {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}