/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background: linear-gradient(90deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #3498db;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.8rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
    url('https://images.unsplash.com/photo-1521369909029-2afed882baee?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80') center/cover no-repeat;
    height: 400px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    position: relative;
    color: white;
    max-width: 600px;
    padding: 2rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Productos */
.section-title {
    text-align: center;
    margin: 2.5rem 0;
    font-size: 2.2rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #3498db;
    margin: 0.5rem auto;
    border-radius: 2px;
}

.gorras-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 1rem 0 3rem;
}

.gorra {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.gorra:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.gorra-img {
    height: 220px;
    overflow: hidden;
}

.gorra-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gorra:hover .gorra-img img {
    transform: scale(1.05);
}

.gorra-info {
    padding: 1.5rem;
}

.gorra-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.gorra-info p {
    margin-bottom: 1rem;
    color: #7f8c8d;
    min-height: 60px;
}

.precio {
    font-size: 1.4rem;
    font-weight: bold;
    color: #e74c3c;
    display: block;
    margin: 0.8rem 0;
}

.add-to-cart {
    width: 100%;
    background: #2ecc71;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: #27ae60;
}

/* Carrito de Compras */
.cart-container {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.cart-container.active {
    right: 0;
}

.cart-header {
    background: #2c3e50;
    color: white;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
}

.cart-item {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #e74c3c;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    background: #f1f1f1;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.quantity-input {
    width: 40px;
    height: 28px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    margin-top: 8px;
    font-size: 0.9rem;
}

.cart-footer {
    padding: 1.2rem;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #2980b9;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #3498db;
}

/* Clase para el perfil de usuario */
.perfil-usuario {
    min-width: 120px;
    margin-right: 20px;
    color: #2c3e50;
    font-size: 1rem;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .gorras-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cart-container {
        width: 320px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero {
        height: 300px;
    }
    
    .cart-container {
        width: 100%;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
}

/* Mensaje de carrito vacío */
.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}