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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    min-height: 100vh;
}

.header {
    background: #8B0000;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    max-height: 60px;
    object-fit: contain;
}

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

.download-app-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    transition: all 0.3s;
}

.download-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.admin-btn {
    background: white;
    color: #8B0000;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.banners-container {
    width: 100%;
    margin-bottom: 2rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner {
    width: 100%;
    overflow: hidden;
}

.banner img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.search-bar {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    border: 3px solid #DC143C;
    border-radius: 50px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
    transition: all 0.3s;
}

.search-bar:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.3);
}

.categories-section {
    margin-bottom: 2rem;
}

.categories-title {
    font-size: 1.5rem;
    color: #8B0000;
    margin-bottom: 1rem;
    font-weight: bold;
}

.categories {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-btn {
    padding: 0.8rem 1.8rem;
    border: 2px solid #DC143C;
    background: white;
    color: #DC143C;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.category-btn.active {
    background: linear-gradient(135deg, #DC143C, #8B0000);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4);
}

.category-btn:hover {
    background: linear-gradient(135deg, #DC143C, #8B0000);
    color: white;
    transform: translateY(-2px);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 1.2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    min-height: 40px;
}

.product-price {
    font-size: 1.5rem;
    color: #28a745;
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: stretch;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: 2px solid #DC143C;
    background: white;
    color: #DC143C;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #DC143C;
    color: white;
}

.qty-input {
    width: 60px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0.4rem;
    font-size: 1rem;
    font-weight: bold;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.cart-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #DC143C, #8B0000);
    color: white;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.5);
    cursor: pointer;
    font-weight: bold;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s;
}

.cart-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(220, 20, 60, 0.6);
}

.cart-icon {
    font-size: 1.8rem;
}

.cart-count {
    background: white;
    color: #DC143C;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cart-text {
    font-size: 1.1rem;
}

.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #DC143C;
    margin-bottom: 1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.social-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(220, 20, 60, 0.8);
    border-radius: 8px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #DC143C;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #DC143C;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8B0000;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #DC143C;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #DC143C;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.btn-primary {
    background: linear-gradient(135deg, #DC143C, #8B0000);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 20, 60, 0.4);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #000;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

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

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

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #333;
}

.cart-item-price {
    color: #28a745;
    font-weight: 600;
}

.cart-total {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 1.5rem 0;
    text-align: right;
    color: #DC143C;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.admin-panel {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-products-list {
    margin-top: 2rem;
}

.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.admin-product-item:hover {
    border-color: #DC143C;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.admin-product-info {
    flex: 1;
}

.admin-product-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-message {
    text-align: center;
    color: #666;
    padding: 3rem;
    font-size: 1.2rem;
}

.logout-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 1rem;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive móvil */
@media (max-width: 768px) {
    .header {
        padding: 0.8rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .logo {
        max-height: 40px;
    }
    
    .header-buttons {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .download-app-btn,
    .admin-btn,
    .logout-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
    
    .container {
        padding: 1rem 0.5rem;
    }
    
    .search-bar {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .categories {
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .product-card {
        padding: 0.8rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .qty-input {
        width: 50px;
    }
    
    .add-to-cart-btn {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    .cart-float {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .cart-icon {
        font-size: 1.5rem;
    }
    
    .cart-count {
        width: 25px;
        height: 25px;
        font-size: 0.85rem;
    }
    
    .cart-text {
        font-size: 0.95rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .admin-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .admin-header h2 {
        text-align: center;
        font-size: 1.3rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
}
