/* ============================================
   ESTILO MODERNO - FONDO BLANCO CON HEADER/FOOTER NEGRO
   MSDigital - Versión Clean & Professional - FULL RESPONSIVE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    color: #1a1a2e;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER (FONDO NEGRO) ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #000000;
    z-index: 1000;
    border-bottom: 1px solid rgba(227, 30, 36, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    gap: 15px;
}

.logo {
    font-size: clamp(22px, 5vw, 28px);
    font-weight: 800;
    text-decoration: none;
    color: #fff;
}

.logo span {
    color: #e31e24;
}

/* Menú desktop - visible por defecto */
.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #e31e24;
}

.user-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cart-icon, .user-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: #fff;
    transition: color 0.3s;
}

.cart-icon:hover, .user-icon:hover {
    color: #e31e24;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -12px;
    background: #e31e24;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-translate-btn {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.google-translate-btn:hover {
    background: #e31e24;
    color: #fff;
    border-color: #e31e24;
}

/* ========== SECCIONES ========== */
.section {
    display: none;
    padding: 100px 0 60px;
    min-height: 100vh;
}

.section.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== HERO ========== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f0f2f5 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(227,30,36,0.1), rgba(255,107,107,0.05));
    color: #e31e24;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 30px;
    border: 1px solid rgba(227,30,36,0.2);
}

.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #e31e24 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: clamp(14px, 4vw, 18px);
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.btn {
    padding: clamp(10px, 3vw, 14px) clamp(24px, 5vw, 32px);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #e31e24, #c41a1f);
    color: #fff;
    box-shadow: 0 4px 15px rgba(227,30,36,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(227,30,36,0.4);
}

.btn-secondary {
    background: transparent;
    color: #1a1a2e;
    border: 2px solid #e31e24;
}

.btn-secondary:hover {
    background: rgba(227,30,36,0.05);
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(30px, 8vw, 60px);
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 800;
    background: linear-gradient(135deg, #e31e24, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== PRODUCTOS ========== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: clamp(28px, 6vw, 42px);
    margin-bottom: 10px;
    color: #1a1a2e;
}

.section-header .highlight {
    background: linear-gradient(135deg, #e31e24, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-header p {
    color: #64748b;
    font-size: clamp(13px, 3.5vw, 16px);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 8px 20px;
    border-radius: 50px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(135deg, #e31e24, #c41a1f);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s;
    border: 1px solid #eef2f6;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
}

.product-image {
    background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
    padding: 30px;
    text-align: center;
    position: relative;
}

.product-image i {
    font-size: 60px;
    background: linear-gradient(135deg, #e31e24, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #e31e24, #ff6b6b);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 11px;
    color: #e31e24;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 700;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1a1a2e;
    font-weight: 700;
}

.product-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.product-price {
    font-weight: 800;
    color: #1a1a2e;
}

.product-price span:last-child {
    background: linear-gradient(135deg, #e31e24, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 18px;
}

.product-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.product-card-image {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    margin: 10px auto;
    display: block;
    border: 2px solid #eef2f6;
    cursor: pointer;
}

.product-image-container {
    text-align: center;
}

.demo-link {
    background: #f1f3f5;
    color: #1a1a2e;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.demo-link:hover {
    background: #e31e24;
    color: #fff;
}

.add-to-cart {
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, #e31e24, #c41a1f);
}

.btn-view-details {
    background: linear-gradient(135deg, #f1f3f5, #e9ecef);
    color: #1a1a2e;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view-details:hover {
    background: linear-gradient(135deg, #e31e24, #c41a1f);
    color: #fff;
}

/* ========== ABOUT ========== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.about-card {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid #eef2f6;
    transition: all 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.about-card i {
    font-size: 45px;
    background: linear-gradient(135deg, #e31e24, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
}

.about-card h3 {
    color: #1a1a2e;
    margin-bottom: 15px;
    font-size: 22px;
}

.about-card p {
    color: #64748b;
    line-height: 1.6;
    font-size: 14px;
}

/* ========== STATS ========== */
.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    background: #000000;
    border-radius: 30px;
    padding: 50px 30px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    flex: 1;
    min-width: 180px;
}

.stat-card .stat-number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #e31e24, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-card .stat-label {
    color: #94a3b8;
    font-size: 14px;
    margin-top: 5px;
}

/* ========== CONTACTO ========== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
}

.contact-info {
    background: #ffffff;
    padding: 35px;
    border-radius: 24px;
    border: 1px solid #eef2f6;
}

.contact-info h3 {
    color: #1a1a2e;
    margin-bottom: 25px;
    font-size: 24px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s;
}

.info-item:hover {
    background: #f8f9fa;
}

.info-item i {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(227,30,36,0.1), rgba(255,107,107,0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #e31e24;
}

.info-item span {
    color: #4a5568;
    font-size: 14px;
}

.contact-form {
    background: #ffffff;
    padding: 35px;
    border-radius: 24px;
    border: 1px solid #eef2f6;
}

/* ========== BIBLIOTECA ========== */
.biblioteca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.biblioteca-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    border: 1px solid #eef2f6;
    transition: all 0.3s;
}

.biblioteca-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.folder-tree, .files-list {
    margin-top: 20px;
}

.folder-item, .file-card {
    background: #f8f9fa;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #eef2f6;
}

.folder-item i, .file-card i {
    font-size: 18px;
    width: 24px;
    color: #e31e24;
}

.folder-item:hover, .file-card:hover {
    background: linear-gradient(135deg, rgba(227,30,36,0.05), rgba(255,107,107,0.02));
    border-color: rgba(227,30,36,0.3);
}

/* ========== ADMIN PANEL ========== */
.admin-form-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid #eef2f6;
    display: none;
}

.admin-form-container.active {
    display: block;
}

.admin-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-form-header h3 {
    color: #1a1a2e;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.admin-form-header h3 i {
    color: #e31e24;
}

.btn-back {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.form-group-admin {
    margin-bottom: 20px;
}

.form-group-admin label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.form-group-admin input,
.form-group-admin select,
.form-group-admin textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group-admin input:focus,
.form-group-admin select:focus,
.form-group-admin textarea:focus {
    outline: none;
    border-color: #e31e24;
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.form-group-admin textarea {
    resize: vertical;
    min-height: 80px;
}

.specs-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.spec-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.spec-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
}

.spec-input button {
    background: #e31e24;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.spec-input button:hover {
    background: #c41a1f;
}

.image-preview-admin {
    margin-top: 10px;
    min-height: 80px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #e2e8f0;
}

.image-preview-admin img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 12px;
    object-fit: cover;
}

.admin-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-admin-save {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-admin-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-admin-cancel {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-admin-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-admin-edit {
    background: linear-gradient(135deg, #e31e24, #c41a1f);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-admin-edit:hover {
    transform: translateY(-2px);
}

.btn-admin-delete {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-admin-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.admin-products-list {
    margin-top: 40px;
}

.admin-products-list h3 {
    color: #1a1a2e;
    margin-bottom: 20px;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-products-list h3 i {
    color: #e31e24;
}

.admin-product-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eef2f6;
    transition: all 0.3s;
}

.admin-product-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.product-price-admin {
    font-size: 18px;
    font-weight: 800;
    color: #e31e24;
    margin: 10px 0;
}

.product-actions-admin {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* ========== FOOTER ========== */
.footer {
    background: #0a0a0a;
    padding: 60px 0 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(227, 30, 36, 0.3);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer .footer-col:first-child h4 {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer .footer-col:first-child h4 span {
    color: #e31e24;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: #e31e24;
    font-size: 18px;
    font-weight: 700;
}

.footer-col p {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: #e31e24;
    padding-left: 5px;
}

.payment-methods-footer {
    list-style: none;
    padding: 0;
}

.payment-methods-footer li {
    margin-bottom: 12px;
}

.payment-methods-footer li a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    text-decoration: none;
    color: #ffffff !important;
    font-size: 14px;
}

.payment-methods-footer li a i {
    color: #e31e24 !important;
    font-size: 18px;
    width: 24px;
}

.payment-methods-footer li a:hover {
    color: #ffffff !important;
    padding-left: 0 !important;
}

.social-links-footer {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-links-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links-footer a:hover {
    background: #e31e24;
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 13px;
}

/* ========== MODALES ========== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90%;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    transition: right 0.4s;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eef2f6;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image i {
    font-size: 24px;
    color: #e31e24;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 13px;
    color: #e31e24;
    font-weight: 600;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eef2f6;
    background: #f8f9fa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 15px;
}

.auth-modal, .demo-modal, .details-modal, .confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 4000;
    display: none;
    justify-content: center;
    align-items: center;
}

.auth-modal.open, .demo-modal.open, .details-modal.open, .confirm-modal.open {
    display: flex;
}

.auth-modal-content, .demo-modal-content, .details-modal-content, .confirm-modal-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 35px;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 10px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #e31e24;
    border-bottom: 2px solid #e31e24;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e31e24, #c41a1f);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.demo-credentials {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
}

.demo-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.demo-buttons .btn-primary {
    text-decoration: none;
    display: inline-block;
}

.details-modal-content {
    max-width: 550px;
}

.details-modal-image {
    text-align: center;
    margin-bottom: 20px;
}

.details-modal-image img {
    max-width: 150px;
    border-radius: 16px;
}

.details-modal-description {
    margin: 20px 0;
    line-height: 1.6;
    color: #4a5568;
}

.details-modal-specs h4 {
    margin: 15px 0 10px;
    color: #1a1a2e;
}

.details-modal-specs ul {
    list-style: none;
    padding: 0;
}

.details-modal-specs ul li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-modal-specs ul li i {
    color: #28a745;
}

.details-modal-price {
    margin: 20px 0;
    font-size: 24px;
    font-weight: 800;
}

.details-modal-price .original {
    text-decoration: line-through;
    font-size: 16px;
    color: #94a3b8;
    margin-right: 10px;
}

.details-modal-price .current {
    color: #e31e24;
}

.details-modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.close-modal {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
}

.confirm-modal-content {
    text-align: center;
}

.confirm-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-confirm-yes {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
}

.btn-confirm-no {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a2e;
    color: #fff;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 10000;
    transition: transform 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ========== MENÚ HAMBURGUESA ========== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

.mobile-menu-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 1003;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    display: none;
}

.nav-overlay.active {
    display: block;
}

/* ========== MEDIA QUERY PARA MÓVILES ========== */
@media (max-width: 768px) {
    .nav {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        max-width: 85% !important;
        height: 100vh !important;
        background: #1a1a2e !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 80px 25px 30px !important;
        z-index: 1002 !important;
        transition: left 0.3s ease !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
        gap: 15px !important;
        display: flex !important;
        overflow-y: auto !important;
    }

    .nav.open {
        left: 0 !important;
        display: flex !important;
    }

    .nav.open .mobile-menu-close {
        display: block !important;
    }

    .nav .nav-link {
        font-size: 18px !important;
        padding: 12px 0 !important;
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        text-align: left !important;
        color: #fff !important;
        display: block !important;
    }

    .nav .nav-link:last-child {
        border-bottom: none !important;
    }

    .header-content {
        justify-content: space-between !important;
        padding: 12px 0 !important;
    }

    .logo {
        font-size: 20px !important;
    }

    .user-actions {
        gap: 12px !important;
    }

    .google-translate-btn span {
        display: none !important;
    }

    .google-translate-btn {
        padding: 8px 10px !important;
        font-size: 16px !important;
    }

    .products-grid, .about-grid, .biblioteca-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-container {
        flex-direction: column !important;
        align-items: center !important;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }

    .social-links-footer {
        justify-content: center !important;
    }

    .hero-title {
        font-size: 28px !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
    }

    .section {
        padding: 90px 0 50px !important;
    }

    .admin-buttons {
        flex-direction: column !important;
    }
    
    .btn-admin-save, .btn-admin-cancel, .btn-back {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
    
    .product-actions-admin {
        flex-direction: column !important;
    }
    
    .product-actions-admin button {
        width: 100% !important;
    }

    .admin-form-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

@media (max-width: 480px) {
    .nav {
        width: 85% !important;
        padding: 70px 20px 20px !important;
    }

    .nav .nav-link {
        font-size: 16px !important;
        padding: 10px 0 !important;
    }

    .hero-title {
        font-size: 24px !important;
    }
}

/* ========== UTILIDADES ========== */
html {
    scroll-behavior: smooth;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8f9fa;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e31e24;
}

/* ========== IDIOMAS DROPDOWN ========== */
.language-selector-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 15px;
    width: 280px;
    z-index: 1001;
    display: none;
}

.language-selector-dropdown.visible {
    display: block;
}

.language-selector-dropdown h4 {
    margin-bottom: 10px;
    color: #1a1a2e;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-option {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.language-option:hover {
    background: #f1f3f5;
}

.language-option i {
    font-size: 18px;
    color: #e31e24;
}

.language-option span {
    font-size: 14px;
    color: #1a1a2e;
}

/* ========== IMAGE PREVIEW ========== */
.image-preview-large {
    position: fixed;
    z-index: 10000;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.image-preview-large.show {
    opacity: 1;
}

.image-preview-large img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 12px;
    object-fit: contain;
}

/* ========== LOADING ========== */
.biblioteca-loading, .image-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}