/* Variables */
:root {
    --color-principal: #ff2b1c;
    --color-secundario: #333;
}

:root {
    --primary-color: #ff2b1c;
    --secondary-color: #e01810;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --radius: 8px;
    --header-height: 60px;
    --content-padding: 20px;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos generales */
body { 
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #f5f5f5;
    padding-top: 60px;
}

/* Header ajustado */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 15px; /* Reducido de 6px */
    z-index: 1000;
    height: 25px; /* Reducido de 40px */
    margin-bottom: 0; /* Eliminar margen inferior */
}

/* Estilos del header */
.header {
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

.header h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Ajuste específico para el botón volver en el header */
.header .btn-secondary {
    position: absolute;
    right: 1rem;
    padding: 4px 12px;
    font-size: 0.875rem;
    width: auto;
    min-width: 40px; /* Reducido de 80px */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.header .btn-secondary i {
    font-size: 0.875rem;
    margin-right: 4px;
}

.header .btn-secondary {
    position: absolute;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    width: fit-content; /* Ajustar al contenido */
    min-width: 80px; /* Ancho mínimo más pequeño */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem; /* Título más pequeño */
    color: var(--primary-color);
    font-weight: 500; /* Menos peso en la fuente */
}

/* Ajuste para botones en el header */
.header .btn {
    font-size: 0.85rem; /* Reducir tamaño del texto del botón */
    padding: 4px 10px;
    width: auto;
    margin: 0;
    height: 28px; /* Altura fija más pequeña para el botón */
}

.header .btn i {
    font-size: 0.85rem; /* Reducir tamaño del ícono */
}

/* Ajustes para botones secundarios en header */
.btn-secondary {
    background: var(--secondary-color);
    padding: 4px 10px;
    font-size: 0.85rem;
    width: auto;
    margin: 0;
    height: 26px; /* Altura más pequeña */
}

.btn-secondary i {
    font-size: 0.85rem;
}

/* Layout */
.main-container {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 60px); /* Ajusta según el alto de tu header */
    background-color: #f5f5f5;
    padding: 20px;
}

/* Formularios y controles */
.form-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    overflow: hidden;
}

.form-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 5px;
    font-size: 16px;
    background: #f8f9fa;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255,43,28,0.1);
}

/* Grupos de precios */
.price-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* Inputs y labels */
label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 500;
}

input.form-control,
select.form-control,
textarea.form-control {
    width: 100%;
    max-width: 100%;
}

/* Continuar con el resto de los estilos... */

/* Tabla responsive */
.table-container {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
}

.table-responsive {
    margin-top: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.table-responsive table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: auto;
    background: white;
}

.table-responsive th,
.table-responsive td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-responsive th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Estilos específicos para columnas numéricas */
.table-responsive td[align="right"],
.table-responsive th[align="right"] {
    text-align: right;
}

/* Botones de acción en tabla */
.actions-container {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.action-btn {
    padding: 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.edit-btn {
    background-color: #2196F3;
}

.delete-btn {
    background-color: #dc3545;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Modal y galería - Versión simplificada */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    touch-action: none;
}

.modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.modal-main-image {
    max-height: calc(100vh - 120px);
    max-width: 100vw;
    object-fit: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.3s ease;
    transform-origin: center;
    will-change: transform;
    touch-action: none;
}

.modal-main-image.zoomed {
    cursor: move;
}

.modal-main-image.grabbing,
.modal-main-image.zoomed:active {
    cursor: grabbing;
}

.zoom-controls {
    position: fixed;
    bottom: 120px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1010;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 80px;
    cursor: pointer;
    z-index: 1010;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev { left: 10px; border-radius: 0 5px 5px 0; }
.modal-next { right: 10px; border-radius: 5px 0 0 5px; }

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.modal-thumbnails {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    gap: 10px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
}

.modal-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.modal-thumbnail:hover {
    opacity: 0.8;
}

.modal-thumbnail.active {
    opacity: 1;
    border: 2px solid white;
}

/* Control de imágenes */
.image-upload-container {
    border: 2px dashed var(--border-color);
    padding: 30px 20px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.image-upload-container:hover {
    border-color: var(--primary-color);
    background: white;
}

.image-upload-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.image-upload-container:hover .upload-icon {
    transform: translateY(-5px);
}

.upload-text {
    color: var(--text-color);
    font-size: 1.1em;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    color: #666;
    font-size: 0.9em;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.preview-item:hover {
    transform: translateY(-3px);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 14px;
    opacity: 0;
    transition: all 0.2s ease;
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

.preview-remove:hover {
    background: white;
    transform: scale(1.1);
}

.delete-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-image:hover {
    background: rgba(255, 0, 0, 1);
}

/* Media queries */
@media (min-width: 1200px) {
    .main-container {
        grid-template-columns: 400px 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --content-padding: 10px; /* Reducido de 15px */
    }
    
    .main-container {
        padding: 10px; /* Reducido de var(--content-padding) */
        width: calc(100% - 10px); /* Ajuste para evitar scroll horizontal */
    }

    .form-card {
        margin: 0 -5px; /* Reducido de -15px */
        padding: 15px; /* Reducido de 20px */
        border-radius: 0;
        margin: 0 -10px 20px -10px;
        width: calc(100% + 20px);
    }

    .price-group {
        grid-template-columns: 1fr;
        gap: 10px; /* Reducido de 15px */
    }

    .table-responsive {
        margin: 0 -5px; /* Reducido de -15px */
    }

    .table-responsive td,
    .table-responsive th {
        padding: 8px 10px; /* Reducido de 12px 15px */
    }

    .form-control {
        padding: 8px; /* Reducido de 10px */
    }

    .form-section {
        padding: 15px; /* Reducido de 20px */
    }

    .modal-thumbnails {
        padding: 10px;
    }
    
    .hide-mobile {
        display: none;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .image-upload-container {
        padding: 20px 15px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* Reducido de 100px */
        gap: 10px; /* Reducido de 15px */
    }

    .preview-remove {
        opacity: 1;
        width: 30px;
        height: 30px;
    }
}

/* Ajuste adicional para pantallas muy pequeñas */
@media (max-width: 375px) {
    .main-container {
        padding: 8px; /* Aún más reducido */
    }

    .form-card {
        padding: 12px; /* Aún más reducido */
    }
    
    .btn {
        padding: 10px 15px; /* Botones más compactos */
    }
}

/* Ajustes adicionales */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 43, 28, 0.2);
}

.btn i {
    font-size: 18px;
}

.upload-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* ...existing code... */

.table-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center; /* Centrar el título */
}

.table-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

/* Ajustar tamaño de miniaturas */
.product-thumbnail {
    width: 40px; /* Reducido de 50px */
    height: 40px; /* Reducido de 50px */
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

/* Asegurar que los controles permanezcan visibles */
.modal-close,
.modal-thumbnails,
.zoom-controls {
    position: fixed;
    z-index: 1100;
}

/* ...resto del código existente... */

/* Estilos para el formulario en grid */
.form-columns {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

/* Layout para PC */
@media (min-width: 992px) {
    .form-columns {
        grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr); /* Reducido de 400px */
    }
    
    .form-column {
        min-width: 300px; /* Reducido de 400px */
        width: 100%;
    }
}

/* Layout para móvil */
@media (max-width: 991px) {
    .form-columns {
        grid-template-columns: 1fr;
    }
}

/* ...existing code... */

/* Ajuste para el botón submit */
form > .btn {
    width: 100%;
    margin: 20px auto;
    display: block;
}

/* Ajuste específico para PC */
@media (min-width: 768px) {
    form > .btn {
        width: auto;
        min-width: 180px;
        max-width: 250px;
    }
}

/* Ajuste para el botón submit */
form > .text-center {
    text-align: center;
}

form > .text-center .btn {
    width: 100%;
    margin: 20px auto;
    display: inline-block;
}

/* Ajuste específico para PC */
@media (min-width: 768px) {
    form > .text-center .btn {
        width: auto;
        min-width: 150px;  /* Reducido de 180px */
        max-width: 200px;  /* Reducido de 250px */
        padding: 10px 20px; /* Padding más compacto */
    }
}

/* Ajustes para la tabla de productos */
.table-container {
    margin: 20px 0;
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.table-responsive {
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.table-responsive table {
    width: 100%;
    min-width: auto; /* Eliminar el min-width fijo */
    background: white;
}

/* Ajustes específicos para PC */
@media (min-width: 768px) {
    .main-container {
        padding: var(--content-padding);
        max-width: 1200px;
        margin: 0 auto;
    }

    .table-responsive td,
    .table-responsive th {
        padding: 12px 15px;
        font-size: 14px;
    }

    .product-thumbnail {
        width: 50px;
        height: 50px;
    }

    .actions-container {
        gap: 8px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
    }
}

/* Ajuste del layout para PC */
@media (min-width: 992px) {
    .form-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .table-header {
        padding: 20px;
        margin-bottom: 0;
    }

    .table-header h3 {
        font-size: 1.4rem;
    }
}

/* ...existing code... */

/* Nuevos estilos */
.content-section {
    width: 100%;
    max-width: 1400px; /* o el ancho que prefieras */
    margin: 0 auto;
    padding: 20px;
}

.full-width {
    width: 100%;
    margin-bottom: 2rem;
}

.form-card, .table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

/* Revisar los estilos aplicados a los h1 */
h1 {
    color: #333333;  /* Este es probablemente el color que estás viendo */
    /* ...otros estilos... */
}

/* Estilos para elementos compartidos */

/* Estructura básica */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
    padding-top: 60px;
}

/* Header y navegación */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    border-bottom: 3px solid var(--color-principal);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    height: 50px;
}

/* Buscador */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

/* Contenido principal */
#wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

#central {
    display: flex;
    gap: 20px;
}

/* Barra lateral */
#secondary {
    width: 250px;
    flex-shrink: 0;
}

.blk {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Área principal */
#main {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
}

/* Títulos y encabezados */
.hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hdr h1 {
    color: var(--color-principal);
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

/* Grid de productos */
.articleList {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Tarjetas de producto */
.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.2s;
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-title {
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.footer {
    background: #555;
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Responsive para footer content */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
    
    .footer {
        padding: 30px 0;
    }
}

/* Media queries */
@media (max-width: 768px) {
    .articleList {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-header {
        height: 50px;
    }
    
    .nav-logo {
        height: 40px;
    }

    #central {
        flex-direction: column;
    }

    #secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .articleList {
        grid-template-columns: 1fr;
    }
    
    #wrapper {
        padding: 10px;
    }
}

/* ===== BANNER DE MÉTODOS DE PAGO ===== */
.payment-methods-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden; /* Prevenir overflow */
}

.payment-methods-banner:hover {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.payment-methods-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.payment-methods-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* FORZAR LAYOUT HORIZONTAL CON FLEXBOX */
.payment-methods-banner .payment-methods-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 25px;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

/* Cada método de pago en flexbox - SELECTOR MUY ESPECÍFICO */
.payment-methods-banner .payment-methods-grid .payment-method {
    flex: 0 0 auto !important;
    width: calc(12.5% - 15px) !important; /* 8 elementos por fila */
    min-width: 80px !important;
    max-width: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* FALLBACK - Si todo falla, usar inline-block */
.payment-methods-banner .payment-methods-grid .payment-method {
    display: inline-block !important;
    vertical-align: top !important;
}

.payment-method {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: 55px;
    border: 1px solid #e9ecef;
    /* Removido width: 100% y max-width que conflictuaban */
}

.payment-method:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: #007bff;
}

.payment-method img {
    max-width: 100%;
    max-height: 45px;
    height: auto;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: filter 0.3s ease;
    width: auto; /* Asegurar que mantenga proporción */
}

.payment-method:hover img {
    filter: brightness(1.2) contrast(1.2);
}

.payment-method.powered-by {
    grid-column: span 2;
    max-width: 250px;
    margin: 15px auto 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
}

.payment-method.powered-by img {
    max-height: 40px;
}

.payment-methods-security {
    font-size: 1rem;
    color: #28a745;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.payment-methods-security i {
    font-size: 1.2rem;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Desktop grande */
@media (min-width: 1200px) {
    .payment-methods-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 25px !important;
    }
    
    .payment-method {
        flex: 0 0 auto !important;
        width: calc(12.5% - 25px) !important; /* 8 elementos por fila */
        min-width: 100px !important;
        max-width: 140px !important;
        min-height: 65px;
        padding: 12px;
    }
    
    .payment-method img {
        max-height: 50px;
    }
}

/* Desktop mediano */
@media (max-width: 1199px) and (min-width: 992px) {
    .payment-methods-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 20px !important;
    }
    
    .payment-method {
        flex: 0 0 auto !important;
        width: calc(16.66% - 20px) !important; /* 6 elementos por fila */
        min-width: 90px !important;
        max-width: 130px !important;
        min-height: 60px;
        padding: 10px;
    }
    
    .payment-method img {
        max-height: 45px;
    }
    
    .payment-method.powered-by {
        width: calc(33.33% - 20px) !important; /* Span 2 */
        max-width: 220px;
    }
}

/* Tablet */
@media (max-width: 991px) and (min-width: 768px) {
    .payment-methods-banner {
        padding: 25px 20px;
        margin: 25px 0;
    }
    
    .payment-methods-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .payment-methods-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 15px !important;
    }
    
    .payment-method {
        flex: 0 0 auto !important;
        width: calc(25% - 15px) !important; /* 4 elementos por fila */
        min-width: 80px !important;
        max-width: 120px !important;
        min-height: 50px;
        padding: 8px;
    }
    
    .payment-method img {
        max-height: 35px;
    }
    
    .payment-method.powered-by {
        width: calc(50% - 15px) !important; /* Span 2 */
        max-width: 180px;
    }
}

/* Móvil */
@media (max-width: 767px) {
    .payment-methods-banner {
        padding: 20px 15px;
        margin: 20px 0;
        border-radius: 10px;
    }
    
    .payment-methods-title {
        font-size: 1.1rem;
        margin-bottom: 18px;
    }
    
    .payment-methods-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
    }
    
    .payment-method {
        flex: 0 0 auto !important;
        width: calc(33.33% - 12px) !important; /* 3 elementos por fila */
        min-width: 70px !important;
        max-width: 100px !important;
        min-height: 45px;
        padding: 6px;
        border-radius: 8px;
    }
    
    .payment-method img {
        max-height: 30px;
    }
    
    .payment-method.powered-by {
        width: 100% !important; /* Full width */
        max-width: 160px;
        margin: 12px auto 0;
    }
    
    .payment-method.powered-by img {
        max-height: 28px;
    }
    
    .payment-methods-security {
        font-size: 0.9rem;
        gap: 6px;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .payment-methods-banner {
        padding: 15px 10px;
        margin: 15px 0;
    }
    
    .payment-methods-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .payment-methods-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    
    .payment-method {
        flex: 0 0 auto !important;
        width: calc(50% - 10px) !important; /* 2 elementos por fila */
        min-width: 60px !important;
        max-width: 90px !important;
        min-height: 40px;
        padding: 5px;
    }
    
    .payment-method img {
        max-height: 25px;
    }
    
    .payment-method.powered-by {
        width: 100% !important; /* Full width */
        max-width: 140px;
        margin: 10px auto 0;
    }
    
    .payment-method.powered-by img {
        max-height: 25px;
    }
    
    .payment-methods-security {
        font-size: 0.85rem;
    }
}

/* ===== INTEGRACIÓN EN FOOTER ===== */
.footer .payment-methods-banner {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    margin-top: 30px;
    margin-bottom: 0;
    width: 100%;
    grid-column: 1 / -1; /* Ocupar todo el ancho del footer */
}

.footer .payment-methods-container {
    max-width: 100%;
    width: 100%;
}

.footer .payment-methods-title {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.footer .payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* 8 columnas en desktop */
    gap: 15px;
    justify-items: center;
    align-items: center;
    margin-bottom: 20px;
    max-width: 100%;
    width: 100%;
}

.footer .payment-methods-security {
    color: #ffc107;
    justify-content: center;
}

.footer .payment-method {
    background: rgba(255, 255, 255, 0.95);
    min-height: 50px;
    padding: 8px;
    width: 100%;
    max-width: 100px;
    border-radius: 8px;
}

.footer .payment-method img {
    max-height: 40px;
    width: auto;
    max-width: 100%;
}

.footer .payment-method.powered-by {
    grid-column: span 2; /* Ocupa 2 columnas */
    max-width: 200px;
    margin: 10px auto 0;
    justify-self: center;
}

.footer .payment-method.powered-by img {
    max-height: 35px;
}

/* Responsive para footer - Desktop a Tablet grande */
@media (max-width: 1200px) and (min-width: 769px) {
    .footer .payment-methods-grid {
        grid-template-columns: repeat(6, 1fr); /* 6 columnas en tablet grande */
        gap: 12px;
    }
    
    .footer .payment-method {
        min-height: 45px;
        padding: 6px;
        max-width: 90px;
    }
    
    .footer .payment-method img {
        max-height: 35px;
    }
    
    .footer .payment-method.powered-by {
        grid-column: span 2;
        max-width: 180px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .footer .payment-methods-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .footer .payment-methods-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas en tablet */
        gap: 10px;
    }
    
    .footer .payment-method {
        min-height: 40px;
        padding: 5px;
        max-width: 80px;
    }
    
    .footer .payment-method img {
        max-height: 30px;
    }
    
    .footer .payment-method.powered-by {
        grid-column: span 2;
        max-width: 160px;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .footer .payment-methods-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en móvil */
        gap: 8px;
    }
    
    .footer .payment-method {
        min-height: 35px;
        padding: 4px;
        max-width: 70px;
    }
    
    .footer .payment-method img {
        max-height: 25px;
    }
    
    .footer .payment-method.powered-by {
        grid-column: 1 / -1; /* Ocupa toda la fila en móvil */
        max-width: 140px;
        margin: 8px auto 0;
    }
    
    .footer .payment-method.powered-by img {
        max-height: 25px;
    }
}

/* ===== TEMA OSCURO ===== */
[data-theme="dark"] .payment-methods-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-color: #495057;
}

[data-theme="dark"] .payment-methods-title {
    color: #e9ecef;
}

[data-theme="dark"] .payment-method {
    background: #495057;
    border-color: #6c757d;
}

[data-theme="dark"] .payment-method:hover {
    border-color: #007bff;
    background: #5a6268;
}

[data-theme="dark"] .payment-methods-security {
    color: #20c997;
}

/* ===== BANNER COMPACTO DE MÉTODOS DE PAGO ===== */
.payment-methods-compact {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 15px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-methods-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
    border-radius: 12px 12px 0 0;
}

.payment-methods-compact:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.payment-compact-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-compact-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.payment-header-icon {
    color: #007bff;
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.payment-compact-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    background: linear-gradient(45deg, #495057, #6c757d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.payment-compact-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 0;
    position: relative;
}

/* Pseudo-element para el contador - solo aparece cuando hay elementos ocultos */
.payment-compact-logos::after {
    content: "";
    display: none;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: #fff;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-style: italic;
}

.payment-compact-logos img {
    height: 22px;
    max-width: 38px;
    object-fit: contain;
    background: #fff;
    padding: 2px 4px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.payment-compact-logos img:hover {
    transform: scale(1.1) translateY(-2px);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
    z-index: 10;
    position: relative;
}

.payment-compact-logos img.payment-brand {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 3px 6px;
}

.payment-compact-logos img.payment-powered {
    border-color: #17a2b8;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    padding: 3px 8px;
    max-width: 60px;
    height: 24px;
}

/* Visibility classes para responsive */
.payment-extra {
    display: inline-block;
}

.payment-compact-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.payment-security-icon {
    color: #28a745;
    font-size: 1rem;
    animation: shield-glow 3s infinite;
}

@keyframes shield-glow {
    0%, 100% { 
        color: #28a745;
        text-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
    }
    50% { 
        color: #20c997;
        text-shadow: 0 0 10px rgba(32, 201, 151, 0.5);
    }
}

.payment-compact-security {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: linear-gradient(45deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== RESPONSIVE PARA BANNER COMPACTO ===== */
/* Desktop - Muestra todos los métodos, no necesita contador */
@media (min-width: 1025px) {
    .payment-extra.payment-desktop {
        display: inline-block;
    }
    
    /* No mostrar contador en desktop */
    .payment-compact-logos::after {
        display: none !important;
    }
}

/* Tablet grande - Oculta algunos métodos, muestra contador */
@media (max-width: 1024px) and (min-width: 769px) {
    .payment-compact-logos img.payment-desktop {
        display: none;
    }
    
    /* Mostrar contador en tablet */
    .payment-compact-logos::after {
        content: "+9 más";
        display: inline-flex;
    }
}

/* Tablet y móvil - Oculta más métodos, muestra contador móvil */
@media (max-width: 768px) {
    .payment-methods-compact {
        padding: 14px 16px;
        margin: 12px 0;
        border-radius: 10px;
    }
    
    .payment-compact-container {
        gap: 10px;
    }
    
    .payment-compact-text {
        font-size: 0.9rem;
    }
    
    .payment-compact-logos {
        gap: 5px;
        padding: 6px 0;
    }
    
    .payment-compact-logos img {
        height: 20px;
        max-width: 34px;
        padding: 2px 3px;
    }
    
    .payment-compact-logos img.payment-tablet,
    .payment-compact-logos img.payment-desktop {
        display: none; /* Ocultar métodos extras */
    }
    
    /* Mostrar contador en móvil */
    .payment-compact-logos::after {
        content: "+12 más";
        display: inline-flex;
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .payment-compact-security {
        font-size: 0.8rem;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .payment-methods-compact {
        padding: 12px 14px;
        margin: 10px 0;
    }
    
    .payment-compact-container {
        gap: 8px;
    }
    
    .payment-compact-text {
        font-size: 0.85rem;
    }
    
    .payment-compact-logos {
        gap: 4px;
        padding: 4px 0;
    }
    
    .payment-compact-logos img {
        height: 18px;
        max-width: 30px;
        padding: 1px 2px;
    }
    
    .payment-compact-more {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    .payment-compact-security {
        font-size: 0.75rem;
    }
}

/* ===== TEMA OSCURO PARA BANNER COMPACTO ===== */
[data-theme="dark"] .payment-methods-compact {
    background: linear-gradient(135deg, #495057 0%, #6c757d 50%, #5a6268 100%);
    border-color: #6c757d;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .payment-methods-compact::before {
    background: linear-gradient(90deg, #0d6efd, #20c997, #ffc107, #dc3545);
}

[data-theme="dark"] .payment-header-icon {
    color: #79c0ff;
}

[data-theme="dark"] .payment-compact-text {
    color: #e9ecef;
    background: linear-gradient(45deg, #e9ecef, #adb5bd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .payment-compact-logos img {
    background: #f8f9fa;
    border-color: #495057;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .payment-compact-logos img:hover {
    border-color: #79c0ff;
    box-shadow: 0 4px 12px rgba(121, 192, 255, 0.3);
}

[data-theme="dark"] .payment-compact-logos img.payment-brand {
    border-color: #79c0ff;
    background: linear-gradient(135deg, #1e2a3a 0%, #2a3f5f 100%);
}

[data-theme="dark"] .payment-compact-logos img.payment-powered {
    border-color: #17a2b8;
    background: linear-gradient(135deg, #1a2e35 0%, #1e3a40 100%);
}

[data-theme="dark"] .payment-compact-more {
    background: linear-gradient(135deg, #343a40, #495057);
    color: #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .payment-compact-more:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .payment-security-icon {
    color: #20c997;
    animation: shield-glow-dark 3s infinite;
}

@keyframes shield-glow-dark {
    0%, 100% { 
        color: #20c997;
        text-shadow: 0 0 5px rgba(32, 201, 151, 0.4);
    }
    50% { 
        color: #17a2b8;
        text-shadow: 0 0 10px rgba(23, 162, 184, 0.6);
    }
}

[data-theme="dark"] .payment-compact-security {
    color: #20c997;
    background: linear-gradient(45deg, #20c997, #17a2b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SISTEMA DINÁMICO DE PRODUCTOS ===== */
/* Solo para escritorio - min-width: 992px */
@media (min-width: 992px) {
    .dynamic-loading {
        grid-column: 1 / -1; /* Ocupar todo el ancho del grid */
        text-align: center;
        padding: 20px;
        color: #666;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        margin: 20px 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .dynamic-loading i {
        font-size: 1.2rem;
        margin-right: 8px;
        color: #007bff;
    }
    
    /* Animación suave para productos cargados dinámicamente */
    .product-card.dynamic-loaded {
        opacity: 0;
        transform: translateY(20px);
        animation: slideInUp 0.5s ease forwards;
    }
    
    @keyframes slideInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Asegurar que el sidebar y el contenido principal mantengan su altura */
    .content-wrapper {
        display: flex;
        align-items: flex-start;
        min-height: 100vh;
    }
    
    #secondary {
        position: sticky;
        top: 20px;
        flex-shrink: 0;
    }
    
    .main-content {
        flex-grow: 1;
        min-height: 100vh;
    }
}
