
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f4f4f4;
       --accent-color: #fec102;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fafafa;
}

/* HEADER */
.header {
    background: var(--primary-color);
    color: var(--text-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-top {
    background: #0f0f0f;
    padding: 8px 0;
    font-size: 14px;
}

.header-main {
    padding: 15px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-gif {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;

}

.nav-menu li {
    margin: 0 20px;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-box input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    width: 250px;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

.cart-icon, .user-icon {
    position: relative;
    color: var(--text-light);
    font-size: 20px;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

/* MAIN CONTENT */
.main-content {
    margin-top: 120px; /* Para compensar header fijo */
}

/* HERO SECTION */
.hero-section {
    position: relative;
    margin-bottom: 60px;
}

.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: none;
    align-items: center;
}

.hero-slide.active {
    display: flex;
}

.hero-content {
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 500px;
    margin-left: 50px;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.hero-content p {
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

/* CATEGORÍAS */
.categories-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-dark);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* CONTADOR DE PROMOCIÓN */
.promo-banner {
    background: linear-gradient(135deg, var(--accent-color), #e55a2b);
    color: white;
    text-align: center;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.promo-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.promo-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.countdown-item {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 10px;
    min-width: 80px;
}

.countdown-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.countdown-label {
    font-size: 12px;
    text-transform: uppercase;
}

/* PRODUCTOS */
.products-section {
    margin-bottom: 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.old-price {
    font-size: 16px;
    color: #888;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    flex: 1;
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

.btn-cart {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-cart:hover {
    background: #333;
}

/* FOOTER */
.footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #888;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .hero-content {
        margin-left: 20px;
        padding: 30px 20px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .countdown-timer {
        gap: 10px;
    }
    
    .countdown-item {
        min-width: 60px;
        padding: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ADMIN STYLES */
.admin-header {
    background: #2c3e50;
    color: white;
    padding: 15px 0;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.admin-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-menu a:hover {
    background: rgba(255,255,255,0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.table tr:hover {
    background: #f8f9fa;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    margin: 0 2px;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-view {
    background: #007bff;
    color: white;
}



/* responsive */
@media (max-width: 968px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    /* Botón hamburguesa visible en móvil */
    .menu-toggle {
        display: block;
        order: 3;
    }
    
    /* Logo en móvil */
    .logo {
        font-size: 24px;
        order: 1;
    }
    
    .logo-gif {
        width: 100px;
        height: 100px;
    }
    
    /* Header actions en móvil */
    .header-actions {
        order: 2;
        margin-left: auto;
        margin-right: 150px;
    }
    
    /* Search box oculto por defecto en móvil */
    .header-actions .search-box {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 15px;
        box-shadow: var(--shadow);
    }
    
    .header-actions .search-box.active {
        display: block;
    }
    
    .header-actions .search-box input {
        width: 100%;
    }
    
    /* Menú de navegación en móvil */
    nav {
        order: 4;
        width: 100%;
        background-color: #0f0f0f;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    nav.active {
        max-height: 500px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        padding: 15px 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu a {
        display: block;
        padding: 12px 20px;
    }
    
    /* Iconos de búsqueda y carrito */
    .search-icon-mobile {
        display: inline-block;
        color: white;
        font-size: 20px;
        cursor: pointer;
        padding: 5px;
    }
    
    .cart-icon, .user-icon {
        font-size: 20px;
    }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 968px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-menu li {
        margin: 5px 10px;
    }
    
    .search-box input {
        width: 180px;
    }
}

/* DESKTOP */
@media (min-width: 969px) {
    .search-icon-mobile {
        display: none;
    }
    
    .header-actions .search-box {
        display: block !important;
    }
}

/* Header top responsivo */
@media (max-width: 768px) {
    .header-top {
        font-size: 12px;
        padding: 5px 0;
    }
    
    .header-top > div > div {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}


@media (max-width: 768px) {
    .main-content {
        margin-top: 10px;
    }
    
    .hero-slider {
        height: 350px;
    }
    
    .hero-content {
        margin-left: 15px;
        margin-right: 15px;
        padding: 25px 20px;
        max-width: 90%;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content h2 {
        font-size: 18px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
}
