/* ===== VARIABLES Y RESET ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--secondary-color);
}

.admin-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.admin-btn:hover {
    background: var(--secondary-color);
}

/* ===== CARRUSEL ===== */
.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    background: rgba(0,0,0,0.5);
    padding: 2rem 3rem;
    border-radius: 10px;
}

.carousel-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.carousel-content p {
    font-size: 1.2rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--white);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: var(--white);
}

/* ===== PRODUCTOS ===== */
.products-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.product-category {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* ===== INFO SECTION ===== */
.info-section {
    padding: 4rem 0;
    background: var(--white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
}

.info-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* ===== CONTACTO ===== */
.contact-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content.product-detail {
    max-width: 800px;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    width: 100%;
}

.btn-primary:hover {
    background: #c0392b;
}

.error-message {
    color: var(--secondary-color);
    margin-top: 1rem;
    text-align: center;
}

/* ===== ADMIN STYLES ===== */
.admin-body {
    background: var(--light-bg);
}

.admin-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .logo {
    color: var(--white);
}

.admin-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-user {
    color: var(--white);
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #2980b9;
}

.btn-danger {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c0392b;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 250px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.admin-nav {
    padding: 2rem 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--light-bg);
    color: var(--secondary-color);
}

.admin-main {
    flex: 1;
    padding: 2rem;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
}

.form-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.form-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
}

.sizes-selector {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sizes-selector label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    width: auto;
}

.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.admin-product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.admin-product-info {
    padding: 1rem;
}

.admin-product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-edit {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
}

.btn-delete {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
}

.slides-list {
    display: grid;
    gap: 1rem;
}

.slide-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.slide-item img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.slide-info {
    flex: 1;
}

.slide-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav {
        gap: 1rem;
    }
    
    .carousel-content h2 {
        font-size: 1.5rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-detail-image {
    width: 100%;
    border-radius: 10px;
}

.product-sizes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.size-badge {
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}
