/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    color: #333;
    overflow-x: hidden;
}

nav {
    background-color: #000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 0.4rem 0;
    transition: color 0.3s ease;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: #c8d96f;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: #c8d96f;
}

@media (max-width: 600px) {
    nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* theme-mode-style */
.mode+.container {
    --color-pure: #000;
    --color-primary: #f5f5f5;
    --color-secondary: #212121;
    --muted: #c8d96f;
}

.mode:checked+.container {
    --color-pure: #fff;
    --color-primary: #212121;
    --color-secondary: #fff;
    --muted: #c8d96f;
}

.container {
    background-color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* main style */
.wrap {
    --round: 10px;
    --p-x: clamp(3rem, 8vw, 10vh);
    --p-y: 2%;
    --w-label: clamp(7rem, 12vw, 10rem);

    display: flex;
    align-items: center;
    padding: var(--p-y) var(--p-x);
    position: relative;
    background: var(--color-primary);
    border-radius: var(--round);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    top: 0;
    z-index: 1;
}

.wrap input {
    height: 0;
    width: 0;
    position: absolute;
    overflow: hidden;
    display: none;
    visibility: hidden;
}

.label {
    cursor: pointer;
    outline: none;
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    letter-spacing: initial;
    font-weight: 600;
    color: var(--color-secondary);
    background: transparent;
    padding: clamp(8px, 1vw, 12px) clamp(12px, 1.5vw, 16px);
    width: var(--w-label);
    min-width: var(--w-label);
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
    transition: color 0.25s ease;
    outline-offset: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.label span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.wrap input[class*="rd-"]:checked+label {
    color: var(--color-pure);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    transform-origin: 0 0 0;
    height: 100%;
    width: var(--w-label);
    z-index: 0;
    transition: transform 0.5s cubic-bezier(0.33, 0.83, 0.99, 0.98);
}

.bar::before,
.bar::after {
    content: "";
    position: absolute;
    height: 4px;
    width: 100%;
    background: var(--color-secondary);
}

.bar::before {
    top: 0;
    border-radius: 0 0 9999px 9999px;
}

.bar::after {
    bottom: 0;
    border-radius: 9999px 9999px 0 0;
}

.slidebar {
    position: absolute;
    height: calc(100% - (var(--p-y) * 4));
    width: var(--w-label);
    border-radius: calc(var(--round) - var(--p-y));
    background: var(--muted);
    transform-origin: 0 0 0;
    z-index: 0;
    transition: transform 0.5s cubic-bezier(0.33, 0.83, 0.99, 0.98);
}

.rd-1:checked~.bar,
.rd-1:checked~.slidebar,
.rd-1+label:hover~.slidebar {
    transform: translateX(0) scaleX(1);
}

.rd-2:checked~.bar,
.rd-2:checked~.slidebar,
.rd-2+label:hover~.slidebar {
    transform: translateX(100%) scaleX(1);
}

.rd-3:checked~.bar,
.rd-3:checked~.slidebar,
.rd-3+label:hover~.slidebar {
    transform: translateX(200%) scaleX(1);
}

.rd-4:checked~.bar,
.rd-4:checked~.slidebar,
.rd-4+label:hover~.slidebar {
    transform: translateX(300%) scaleX(1);
}

/* responsive soft tweak */
@media (max-width: 600px) {
    .wrap {
        --p-x: 1rem;
    }
}

/* SECCIÓN PRINCIPAL MEJORADA */
#seccionPrincipal {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #c8d96f 0%, #a8c95a 100%);
    padding: 3rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contenedorprincipal {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* HERO SECTION */
.hero-section {
    margin-bottom: 4rem;
    animation: fadeInDown 1s ease-out;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.hero-section p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: #2a2a2a;
    margin-bottom: 2rem;
    font-weight: 500;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #2a2a2a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* GALERÍA DE IMÁGENES */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    animation: fadeInUp 1s ease-out;
}

.gallery-item:nth-child(1) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.4s;
}

.gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    color: #c8d96f;
    font-size: 1rem;
}

/* SECCIÓN DE CARACTERÍSTICAS */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    animation: fadeInUp 1s ease-out 0.5s backwards;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ANIMACIONES */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FOOTER */
footer {
    background-color: #000;
    color: #fff;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #c8d96f;
}

.footer-content p {
    margin-bottom: 1.5rem;
    color: #ccc;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #c8d96f;
    transform: scale(1.2);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #888;
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 300px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    #seccionPrincipal {
        padding: 2rem 1rem;
    }
}

/* ==================== ESTILOS DEL CATÁLOGO ==================== */

#seccionCatalogo {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 3rem 1rem;
}

.catalogo-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Encabezado del Catálogo */
.catalogo-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.catalogo-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.catalogo-header p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #666;
}

/* Buscador */
.search-bar {
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fff;
}

.search-bar input:focus {
    border-color: #c8d96f;
    box-shadow: 0 0 0 3px rgba(200, 217, 111, 0.1);
}

/* Categorías */
.categorias {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.categoria-btn {
    padding: 0.8rem 1.8rem;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.categoria-btn:hover {
    border-color: #c8d96f;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.categoria-btn.active {
    background-color: #c8d96f;
    border-color: #c8d96f;
    color: #fff;
}

/* Grid de Productos */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Tarjeta de Producto */
.producto-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
    opacity: 1;
    transform: translateY(0);
}

.producto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Badge de Producto */
.producto-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #c8d96f;
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.producto-badge.nueva {
    background-color: #ff6b6b;
}

/* Imagen del Producto */
.producto-imagen {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.producto-card:hover .producto-imagen img {
    transform: scale(1.1);
}

/* Overlay de la Imagen */
.producto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.producto-card:hover .producto-overlay {
    opacity: 1;
}

.btn-ver-detalle {
    padding: 0.8rem 1.5rem;
    background-color: #fff;
    color: #333;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ver-detalle:hover {
    background-color: #c8d96f;
    color: #fff;
    transform: scale(1.05);
}

/* Información del Producto */
.producto-info {
    padding: 1.5rem;
}

.producto-info h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.producto-descripcion {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Footer del Producto */
.producto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.producto-precio {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}

.btn-agregar {
    padding: 0.7rem 1.3rem;
    background-color: #c8d96f;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-agregar:hover {
    background-color: #b5c45e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 217, 111, 0.4);
}

.btn-agregar:active {
    transform: translateY(0);
}

/* Mensaje Sin Resultados */
.no-resultados {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.no-resultados p {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.no-resultados span {
    color: #999;
    font-size: 1rem;
}

/* Responsive Catálogo */
@media (max-width: 768px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .categorias {
        gap: 0.5rem;
    }

    .categoria-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .producto-imagen {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }

    #seccionCatalogo {
        padding: 2rem 1rem;
    }
}

/* ==================== ESTILOS DEL PANEL ADMIN ==================== */

#seccionAdmin {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    padding: 3rem 1rem;
}

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.admin-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.admin-header p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #666;
}

/* Admin Card */
.admin-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.8s ease-out;
}

.admin-card h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Formulario de Producto */
.producto-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.9rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c8d96f;
    box-shadow: 0 0 0 3px rgba(200, 217, 111, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover .file-upload-display {
    border-color: #c8d96f;
    background-color: #f5f8ea;
}

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

.upload-text {
    color: #666;
    font-weight: 500;
}

/* Preview Container */
.preview-container {
    position: relative;
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    max-width: 300px;
}

.preview-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.btn-remove-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.8);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-preview:hover {
    background-color: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-submit {
    flex: 1;
    padding: 1rem 2rem;
    background-color: #c8d96f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: #b5c45e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 217, 111, 0.4);
}

.btn-cancel {
    padding: 1rem 2rem;
    background-color: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background-color: #e0e0e0;
}

/* Productos Header */
.productos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-clear-all {
    padding: 0.7rem 1.3rem;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear-all:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
}

/* Lista de Productos */
.productos-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.producto-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.producto-item:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
}

.producto-item-imagen {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
}

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

.mini-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #c8d96f;
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.producto-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.producto-item-info h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.3rem;
}

.producto-item-categoria {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.producto-item-descripcion {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.producto-item-precio {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
}

.producto-item-acciones {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

.btn-editar,
.btn-eliminar {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-editar {
    background-color: #c8d96f;
    color: #fff;
}

.btn-editar:hover {
    background-color: #b5c45e;
    transform: scale(1.05);
}

.btn-eliminar {
    background-color: #ff6b6b;
    color: #fff;
}

.btn-eliminar:hover {
    background-color: #ff5252;
    transform: scale(1.05);
}

/* Mensaje Vacío */
.mensaje-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.mensaje-vacio p {
    font-size: 1.5rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.mensaje-vacio span {
    color: #bbb;
    font-size: 1rem;
}

/* Notificaciones */
.notificacion {
    position: fixed;
    top: 100px;
    right: -400px;
    background-color: #333;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: right 0.3s ease;
    font-weight: 600;
}

.notificacion.show {
    right: 20px;
}

/* ========================================================
   RESPONSIVE ADMIN - Mobile First
   ======================================================== */

@media (max-width: 768px) {

    /* Container principal del admin */
    .admin-container {
        padding: 0 0.8rem;
    }

    /* Cards más compactas en móvil */
    .admin-card {
        padding: 1.2rem;
        margin-bottom: 1.2rem;
        border-radius: 12px;
    }

    .admin-card h2 {
        font-size: 1.3rem;
    }

    /* Header del admin */
    .admin-header {
        margin-bottom: 1.5rem;
    }

    .admin-header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }

    .btn-logout {
        width: 100%;
        text-align: center;
    }

    /* Form rows: todo en una columna */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Inputs más cómodos para tocar */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 16px;
        /* Evita zoom automático en iOS */
    }

    /* Botones del formulario apilados */
    .form-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .form-actions button {
        width: 100%;
        padding: 0.9rem;
    }

    /* Nueva categoría: wrapper más compacto */
    .nueva-categoria-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nueva-categoria-wrapper input {
        flex: 1;
    }

    .btn-add-categoria {
        width: 100%;
        padding: 0.7rem;
    }

    /* Header de productos */
    .productos-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: stretch;
    }

    .btn-clear-all {
        width: 100%;
    }

    /* Lista de productos: una tarjeta por vez */
    .producto-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .producto-item-imagen {
        width: 100%;
        height: 180px;
        border-radius: 8px;
    }

    .producto-item-info {
        padding: 0;
    }

    .producto-item-acciones {
        flex-direction: column;
        gap: 0.6rem;
    }

    .producto-item-acciones button {
        width: 100%;
        padding: 0.7rem;
    }

    /* Categorías en lista */
    .categorias-lista {
        grid-template-columns: 1fr;
    }

    .categoria-item {
        padding: 0.8rem;
    }

    /* Filtro de pedidos */
    .filtro-pedidos {
        flex-direction: column;
        gap: 0.6rem;
    }

    .filtro-pedidos label {
        margin-bottom: 0.3rem;
    }

    .filtro-pedidos select {
        width: 100%;
        font-size: 16px;
    }

    /* Tarjetas de pedidos */
    .pedido-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .pedido-card-header {
        gap: 0.6rem;
    }

    .pedido-id {
        font-size: 1rem;
    }

    .pedido-estado-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    .pedido-cliente {
        padding: 0.7rem 0.8rem;
    }

    .pedido-cliente p {
        font-size: 0.82rem;
        word-break: break-word;
    }

    /* Productos dentro del pedido */
    .pedido-producto {
        grid-template-columns: 1fr;
        gap: 0.3rem;
        padding: 0.5rem 0;
    }

    .pedido-prod-nombre {
        font-size: 0.88rem;
    }

    .pedido-prod-detalle,
    .pedido-prod-subtotal {
        font-size: 0.8rem;
        text-align: left;
    }

    /* Acciones del pedido */
    .pedido-acciones {
        flex-direction: column;
        gap: 0.7rem;
    }

    .select-estado-pedido,
    .btn-whatsapp-pedido {
        width: 100%;
        font-size: 16px;
        padding: 0.7rem;
    }

    /* Códigos de descuento */
    .codigo-form-admin {
        gap: 1rem;
    }

    .codigo-form-admin .form-row {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .codigo-form-admin button {
        width: 100%;
        padding: 0.8rem;
    }

    .codigos-tabla-header,
    .codigo-item {
        grid-template-columns: 1.5fr 1fr auto;
        gap: 0.5rem;
        font-size: 0.82rem;
    }

    .codigo-tipo {
        display: none;
        /* Ocultar tipo en móvil para ahorrar espacio */
    }

    .btn-eliminar-codigo {
        padding: 0.4rem 0.7rem;
        font-size: 1rem;
    }
}

/* Extra small devices (muy pequeños) */
@media (max-width: 480px) {
    .admin-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .admin-card h2 {
        font-size: 1.2rem;
    }

    /* Imágenes en grid: 3 columnas compactas */
    .imagenes-grid {
        gap: 0.4rem;
    }

    .imagen-slot {
        min-height: 90px;
    }

    .slot-label {
        font-size: 0.7rem;
    }

    /* Productos: imagen más pequeña */
    .producto-item-imagen {
        height: 150px;
    }

    /* Pedidos: tipografía más pequeña */
    .pedido-card {
        padding: 0.8rem;
    }

    .pedido-id {
        font-size: 0.95rem;
    }

    .pedido-fecha {
        font-size: 0.7rem;
    }

    .pedido-cliente p {
        font-size: 0.78rem;
    }

    .pedido-total-linea {
        font-size: 0.8rem;
    }

    .pedido-total-linea.total {
        font-size: 0.95rem;
    }
}

/* ==================== ESTILOS DE LOGIN ==================== */

#seccionLogin {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.login-card {
    background: #fff;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.login-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.toggle-password:hover {
    transform: scale(1.2);
}

.error-message {
    background-color: #ffe6e6;
    color: #d32f2f;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #d32f2f;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-login {
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.login-info {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.info-card h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    color: #555;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.info-card code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    color: #667eea;
    font-weight: 600;
    font-family: monospace;
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* Admin Header con botón logout */
.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.btn-logout {
    padding: 0.8rem 1.5rem;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-logout:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Responsive Login */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
    }

    .login-info {
        order: 2;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
    }

    .admin-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .btn-logout {
        width: 100%;
    }
}

/* ==================== ESTILOS DEL CARRITO DE COMPRAS ==================== */

#seccionCarrito {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 3rem 1rem;
}

.carrito-container {
    max-width: 1400px;
    margin: 0 auto;
}

.carrito-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.carrito-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.carrito-header p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #666;
}

.carrito-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

/* Items del Carrito */
.carrito-items-container {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.carrito-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.carrito-items-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.btn-vaciar-carrito {
    padding: 0.6rem 1.2rem;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-vaciar-carrito:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
}

.carrito-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carrito-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 15px;
    align-items: center;
    transition: all 0.3s ease;
}

.carrito-item:hover {
    background-color: #f0f0f0;
}

.item-imagen {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
}

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

.item-info h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.3rem;
}

.item-categoria {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.item-precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: #666;
}

.item-cantidad {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background-color: #fff;
    padding: 0.5rem;
    border-radius: 10px;
}

.btn-cantidad {
    width: 36px;
    height: 36px;
    border: none;
    background-color: #c8d96f;
    color: #fff;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.btn-cantidad:hover {
    background-color: #b5c45e;
    transform: scale(1.1);
}

.cantidad-valor {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.item-total {
    text-align: right;
}

.subtotal-item {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 0.5rem;
}

.btn-eliminar-item {
    padding: 0.5rem 1rem;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-eliminar-item:hover {
    background-color: #ff5252;
}

/* Carrito Vacío */
.carrito-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.vacio-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.carrito-vacio h3 {
    font-size: 1.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.carrito-vacio p {
    color: #999;
    margin-bottom: 2rem;
}

.btn-ir-catalogo {
    padding: 1rem 2rem;
    background-color: #c8d96f;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-ir-catalogo:hover {
    background-color: #b5c45e;
    transform: translateY(-2px);
}

/* Resumen del Pedido */
.carrito-resumen {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.carrito-resumen h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.carrito-resumen h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.resumen-detalle {
    margin-bottom: 2rem;
}

.resumen-linea {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    color: #666;
}

.resumen-linea hr {
    margin: 1rem 0;
    border: none;
    border-top: 2px solid #f0f0f0;
}

.total-linea {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
    margin-top: 1rem;
}

.descuento-linea {
    color: #ff6b6b;
}

.texto-descuento {
    font-weight: 700;
}

/* Código de Descuento */
.codigo-descuento {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.input-codigo {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.input-codigo input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
}

.input-codigo button {
    padding: 0.8rem 1.5rem;
    background-color: #c8d96f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-codigo button:hover {
    background-color: #b5c45e;
}

.mensaje-codigo {
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.mensaje-codigo.success {
    background-color: #d4edda;
    color: #155724;
}

.mensaje-codigo.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Información de Contacto */
.info-contacto {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 10px;
}

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

.info-contacto label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-contacto input,
.info-contacto textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.info-contacto input:focus,
.info-contacto textarea:focus {
    outline: none;
    border-color: #c8d96f;
}

.info-contacto textarea {
    resize: vertical;
}

/* Botones de Acción */
.carrito-acciones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-finalizar,
.btn-pagar {
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-finalizar:hover,
.btn-pagar:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.btn-pagar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-seguir-comprando {
    padding: 1rem 2rem;
    background-color: #f0f0f0;
    color: #666;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-seguir-comprando:hover {
    background-color: #e0e0e0;
}

/* Responsive Carrito */
@media (max-width: 968px) {
    .carrito-content {
        grid-template-columns: 1fr;
    }

    .carrito-resumen {
        position: static;
    }

    .carrito-item {
        grid-template-columns: 90px 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.8rem 1rem;
    }

    /* imagen: col1 fila1 */
    .carrito-item .item-imagen {
        grid-column: 1;
        grid-row: 1;
    }

    /* info: col2 fila1 */
    .carrito-item .item-info {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    /* cantidad: ambas columnas, fila2 */
    .carrito-item .item-cantidad {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
    }

    /* total + botón eliminar: ambas columnas, fila3 */
    .carrito-item .item-total {
        grid-column: 1 / -1;
        grid-row: 3;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .carrito-item .btn-eliminar-item {
        width: auto;
    }
}

@media (max-width: 480px) {
    .carrito-items-container {
        padding: 1rem;
    }

    .carrito-resumen {
        padding: 1.5rem;
    }

    .input-codigo {
        flex-direction: column;
    }

    .btn-cantidad {
        width: 44px;
        height: 44px;
    }
}

/* ==================== ESTILOS DEL CHECKOUT ==================== */

#seccionCheckout {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 3rem 1rem;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.checkout-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #333;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.checkout-header p {
    color: #888;
    font-size: 1.1rem;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
    animation: fadeInUp 0.8s ease-out;
}

/* Columna izquierda: formulario + mapa */
.checkout-form-container {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.checkout-form-container > h2 {
    font-size: 1.4rem;
    color: #333;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

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

.checkout-form .form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafafa;
}

.checkout-form .form-group textarea:focus {
    outline: none;
    border-color: #c8d96f;
    box-shadow: 0 0 0 3px rgba(200, 217, 111, 0.15);
    background: #fff;
}

/* Sección del mapa */
.mapa-section {
    margin-bottom: 2rem;
}

.mapa-section h3 {
    font-size: 1.1rem;
    color: #333;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.mapa-instruccion {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

/* Buscador del mapa */
.mapa-buscador {
    position: relative;
    margin-bottom: 0.8rem;
}

.mapa-buscador-input {
    display: flex;
    gap: 0.5rem;
}

.mapa-buscador-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background: #fafafa;
}

.mapa-buscador-input input:focus {
    outline: none;
    border-color: #c8d96f;
    background: #fff;
}

.mapa-buscador-input button {
    padding: 0.75rem 1.2rem;
    background: #c8d96f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.mapa-buscador-input button:hover { background: #b5c45e; }

.mapa-sugerencias {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    list-style: none;
    padding: 0.4rem 0;
    z-index: 9999;
    max-height: 220px;
    overflow-y: auto;
}

.mapa-sugerencias li {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    color: #444;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f5f5f5;
}

.mapa-sugerencias li:last-child  { border-bottom: none; }
.mapa-sugerencias li:hover       { background: #f5f9e8; color: #333; }
.mapa-sugerencias .sin-resultado { color: #aaa; cursor: default; }
.mapa-sugerencias .sin-resultado:hover { background: transparent; }

#mapa {
    height: 350px;
    border-radius: 14px;
    border: 2px solid #e0e0e0;
    overflow: hidden;
}

.coordenadas-info {
    margin-top: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Botones de acción del checkout */
.checkout-acciones {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-volver {
    flex: 1;
    padding: 1rem;
    background: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-volver:hover {
    background: #e0e0e0;
    color: #333;
}

.btn-confirmar {
    flex: 2;
    padding: 1rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.btn-confirmar:active {
    transform: translateY(0);
}

/* Columna derecha: resumen del pedido */
.checkout-resumen {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.checkout-resumen h2 {
    font-size: 1.3rem;
    color: #333;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
}

.resumen-productos-lista {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.resumen-productos-lista::-webkit-scrollbar {
    width: 4px;
}

.resumen-productos-lista::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.resumen-producto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #555;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.resumen-producto-item span:first-child {
    flex: 1;
}

.resumen-producto-item span:last-child {
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.resumen-totales {
    border-top: 2px solid #f0f0f0;
    padding-top: 1rem;
}

.resumen-totales .resumen-linea {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    color: #666;
    font-size: 0.95rem;
}

.resumen-totales .total-linea {
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 2px solid #f0f0f0;
}

/* Responsive Checkout */
@media (max-width: 968px) {
    .checkout-content {
        grid-template-columns: 1fr;
    }

    .checkout-resumen {
        position: static;
        order: -1; /* resumen arriba en móvil */
    }

    .checkout-acciones {
        flex-direction: column;
    }

    .btn-volver,
    .btn-confirmar {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 600px) {
    #seccionCheckout {
        padding: 1.5rem 0.8rem;
    }

    .checkout-form-container,
    .checkout-resumen {
        padding: 1.2rem;
        border-radius: 14px;
    }

    #mapa {
        height: 260px;
    }
}

/* ==================== MIS PEDIDOS ==================== */

#seccionMisPedidos {
    display: none;
    width: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 0 1rem 3rem;
}

.mispedidos-container {
    max-width: 900px;
    margin: 0 auto;
}

.mispedidos-header {
    text-align: center;
    padding: 2.5rem 0 1.5rem;
}

.mispedidos-header h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: #333;
    margin: 0 0 0.3rem;
}

.mispedidos-header p {
    color: #888;
    font-size: 1rem;
}

.mispedidos-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mispedidos-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    animation: fadeInUp 0.5s ease-out;
}

.mispedidos-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.mispedidos-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pedido-num {
    font-weight: 800;
    font-size: 1.05rem;
    color: #222;
}

.pedido-fecha {
    font-size: 0.85rem;
    color: #999;
}

.pedido-estado {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pedido-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pedido-item-chip {
    background: #f0f0f0;
    color: #555;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.mispedidos-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.6rem;
    border-top: 1px solid #f0f0f0;
}

.pedido-direccion {
    font-size: 0.87rem;
    color: #888;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pedido-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: #c8d96f;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .mispedidos-card {
        padding: 1.1rem;
    }

    .mispedidos-card-top {
        flex-direction: column;
        gap: 0.6rem;
    }

    .mispedidos-card-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

/* Estilo para btn-agregar-carrito */
.btn-agregar-carrito {
    padding: 0.7rem 1.3rem;
    background-color: #c8d96f;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-agregar-carrito:hover {
    background-color: #b5c45e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 217, 111, 0.4);
}

.btn-agregar-carrito:active {
    transform: translateY(0);
}

/* Estilos para productos agotados */
.producto-agotado {
    opacity: 0.7;
}

.producto-agotado .producto-imagen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.badge-agotado {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ff6b6b;
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-stock-bajo {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ffa726;
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

.texto-stock-bajo {
    color: #ffa726;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.btn-agotado {
    padding: 0.7rem 1.3rem;
    background-color: #ccc;
    color: #666;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Estilos para stock en admin */
.producto-item-stock {
    font-weight: 600;
    margin-top: 0.5rem;
}

.producto-item-stock.sin-stock {
    color: #ff6b6b;
}

.producto-item-stock.stock-bajo {
    color: #ffa726;
}

/* Gestión de Categorías */
.categorias-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.categoria-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.categoria-item:hover {
    background-color: #f0f0f0;
}

.categoria-emoji {
    font-size: 1.5rem;
}

.categoria-nombre {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.btn-eliminar-categoria {
    padding: 0.4rem 0.8rem;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-eliminar-categoria:hover:not(:disabled) {
    background-color: #ff5252;
}

.btn-eliminar-categoria:disabled {
    background-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.nueva-categoria-wrapper {
    display: flex;
    gap: 0.5rem;
}

.nueva-categoria-wrapper input {
    flex: 1;
}

.btn-add-categoria {
    padding: 0.9rem;
    background-color: #c8d96f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 45px;
}

.btn-add-categoria:hover {
    background-color: #b5c45e;
    transform: scale(1.05);
}

/* 
   Mensaje informativo que aparece al editar un producto.
   Le indica al admin que puede dejar la imagen actual sin cambiarla.
*/
.mensaje-imagen-actual {
    margin-top: 0.6rem;
    padding: 0.6rem 1rem;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    border-left: 4px solid #4caf50;
}

@media (max-width: 768px) {
    .categorias-lista {
        grid-template-columns: 1fr;
    }
}

/* Selector de Iconos */
.select-icono {
    min-width: 70px;
    padding: 0.9rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-icono:focus {
    outline: none;
    border-color: #c8d96f;
}

/* Sección Honduras */
.seccion-honduras {
    margin: 4rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #0073cf 0%, #00a3e0 100%);
    border-radius: 20px;
    color: #fff;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.honduras-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.honduras-badge {
    margin-bottom: 1.5rem;
}

.bandera {
    font-size: 4rem;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.seccion-honduras h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 800;
}

.seccion-honduras p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.honduras-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.honduras-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
}

.check-icon {
    font-size: 1.2rem;
}

/* Nuestras Características */
.nuestras-caracteristicas {
    margin: 4rem 0;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.7s backwards;
}

.nuestras-caracteristicas h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: #333;
    margin-bottom: 3rem;
    font-weight: 800;
}

.caracteristicas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.caracteristica-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.caracteristica-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.caracteristica-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.caracteristica-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.caracteristica-card p {
    color: #666;
    line-height: 1.6;
}

    .honduras-features {
        flex-direction: column;
        align-items: center;
    }
}

/* Responsive para nuevas secciones */
@media (max-width: 768px) {
    .seccion-honduras {
        padding: 2rem 1rem;
    }

    .caracteristicas-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================
   NUEVAS SECCIONES AÑADIDAS
   ============================================================= */

/* --- GALERÍA MULTI-IMAGEN en tarjetas del catálogo --- */
.producto-imagen {
    position: relative;
}

.card-galeria-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    z-index: 2;
    pointer-events: none;
}

/* =============================================================
   MODAL DETALLE PRODUCTO
   Desktop: imagen izquierda | info derecha (2 columnas)
   Móvil:   imagen arriba    | info abajo   (1 columna)
   ============================================================= */

.modal-imagen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    box-sizing: border-box;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* Tarjeta principal */
.modal-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    width: 100%;
    max-width: 880px;
    height: 520px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    animation: zoomIn 0.3s ease;
    position: relative;
}

/* Botón cerrar */
.modal-close {
    position: absolute;
    top: 12px; right: 14px;
    width: 30px; height: 30px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* Columna IZQUIERDA: galería */
.modal-galeria {
    grid-column: 1;
    grid-row: 1;
    background: #1a1a2e;        /* fondo azul oscuro suave */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#galeriaImagenes {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    padding: 1.5rem;            /* espacio alrededor de la imagen */
    box-sizing: border-box;
}

.galeria-imagen-item {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;        /* imagen completa, sin recortar */
    display: block;
    cursor: zoom-in;
    transition: transform 0.35s ease;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.galeria-imagen-item.zoomed {
    transform: scale(2.8);
    cursor: zoom-out;
}

/* Flechas de navegación */
.modal-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s;
}
.modal-arrow:hover  { background: rgba(0,0,0,0.85); }
.modal-arrow-left   { left: 10px; }
.modal-arrow-right  { right: 10px; }

/* Hint de zoom */
.zoom-hint {
    position: absolute;
    bottom: 44px;
    right: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 3;
}

/* Dots (dentro de galería, al fondo) */
.modal-dots {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 9px 0;
    background: rgba(0,0,0,0.6);
}

.modal-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
}
.modal-dot.active {
    background: #c8d96f;
    transform: scale(1.35);
}

/* Columna DERECHA: info con scroll */
.modal-info {
    grid-column: 2;
    grid-row: 1;
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 0.6rem;
}

.modal-info::-webkit-scrollbar       { width: 4px; }
.modal-info::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.modal-info h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #222;
    margin: 0;
    line-height: 1.25;
}

.modal-precio {
    font-size: 1.8rem;
    font-weight: 900;
    color: #c8d96f;
    margin: 0;
}

.modal-stock {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    align-self: flex-start;
}

.modal-descripcion {
    color: #666;
    font-size: 0.97rem;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.btn-modal-agregar {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #c8d96f, #a8c950);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: auto;
    flex-shrink: 0;
}

.btn-modal-agregar:hover:not(:disabled) {
    background: linear-gradient(135deg, #b5c45e, #96b840);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(168,201,80,0.45);
}

.btn-modal-agregar:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* RESPONSIVE MÓVIL */
@media (max-width: 700px) {
    .modal-imagen {
        padding: 0;
        align-items: flex-end;
        overflow: hidden;
    }

    .modal-card {
        grid-template-columns: 1fr;
        grid-template-rows: 280px 1fr;
        height: auto;
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
        animation: slideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes slideUp {
        from { transform: translateY(100%); opacity: 0.6; }
        to   { transform: translateY(0);    opacity: 1; }
    }

    .modal-galeria {
        grid-column: 1;
        grid-row: 1;
    }

    /* imagen vuelve a cover en móvil */
    #galeriaImagenes {
        padding: 0;
    }

    .galeria-imagen-item {
        width: 100%;
        height: 280px;
        max-width: 100%;
        max-height: 280px;
        object-fit: cover;
        border-radius: 0;
        box-shadow: none;
    }

    .modal-info {
        grid-column: 1;
        grid-row: 2;
        padding: 1.4rem 1.4rem 2rem;
        max-height: 55vh;
        overflow-y: auto;
    }

    .modal-info h2 { font-size: 1.25rem; }
    .modal-precio  { font-size: 1.5rem; }

    .zoom-hint { display: none; }
}

/* Bloquear scroll del body cuando hay modal abierto */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}


/* --- ADMIN: cuadrícula de 3 casillas de imagen --- */
.imagenes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 0.6rem;
}

.imagen-slot {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 0.6rem;
    text-align: center;
    background: #fafafa;
    transition: border-color 0.2s;
}

.imagen-slot:hover {
    border-color: #c8d96f;
}

.slot-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.4rem;
}

.slot-badge {
    display: inline-block;
    background: #c8d96f;
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}

.slot-upload .file-upload-display {
    padding: 0.7rem 0.3rem;
    font-size: 0.78rem;
}

.slot-upload .upload-icon {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.slot-preview {
    position: relative;
    margin-top: 0.3rem;
}

.slot-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.btn-slot-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-slot-remove:hover {
    background: #e53935;
}

/* Badge de cantidad de imágenes en producto-item del admin */
.badge-imagenes {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
}

/* --- ADMIN: sección de códigos de descuento --- */
.codigo-form-admin .form-row {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.8fr;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.codigos-tabla-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.8fr 0.5fr;
    padding: 0.5rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    border-bottom: 2px solid #eee;
    margin-bottom: 0.3rem;
}

.codigo-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.8fr 0.5fr;
    align-items: center;
    padding: 0.55rem 0.6rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 0.35rem;
    transition: background 0.2s;
}

.codigo-item:hover {
    background: #f0f7e6;
}

.codigo-texto {
    font-weight: 800;
    color: #333;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.codigo-tipo {
    color: #666;
    font-size: 0.82rem;
}

.codigo-valor {
    font-weight: 700;
    color: #4caf50;
    font-size: 0.88rem;
}

.btn-eliminar-codigo {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-eliminar-codigo:hover {
    opacity: 1;
}

/* ============================================================
   PANEL DE PEDIDOS (#8)
   Estilos para las tarjetas de pedidos en el admin
   ============================================================ */

/* Contenedor de la lista de pedidos */
.lista-pedidos {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Tarjeta individual de cada pedido */
.pedido-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pedido-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Encabezado de la tarjeta: ID + fecha + badge de estado */
.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pedido-id-fecha {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pedido-id {
    font-weight: 800;
    font-size: 1.1rem;
    color: #333;
}

.pedido-fecha {
    font-size: 0.78rem;
    color: #999;
}

.pedido-estado-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Datos del cliente */
.pedido-cliente {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.9rem;
}

.pedido-cliente p {
    margin: 0.2rem 0;
    font-size: 0.88rem;
    color: #444;
}

/* Seccion de productos dentro del pedido */
.pedido-productos {
    margin-bottom: 0.9rem;
}

.pedido-productos-titulo {
    font-weight: 700;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.pedido-producto {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.85rem;
}

.pedido-producto:last-child {
    border-bottom: none;
}

.pedido-prod-nombre {
    color: #333;
    font-weight: 600;
}

.pedido-prod-detalle {
    color: #888;
    font-size: 0.78rem;
}

.pedido-prod-subtotal {
    color: #c8d96f;
    font-weight: 700;
    text-align: right;
}

/* Codigo de descuento usado en el pedido */
.pedido-codigo-usado {
    background: #fff8e1;
    border: 1px dashed #f39c12;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    color: #e67e22;
    margin-bottom: 0.5rem;
}

/* Lineas de totales */
.pedido-totales {
    border-top: 1px solid #eee;
    padding-top: 0.7rem;
    margin-bottom: 0.9rem;
}

.pedido-total-linea {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    padding: 0.15rem 0;
}

.pedido-total-linea.descuento span:last-child {
    color: #e74c3c;
}

.pedido-total-linea.total {
    font-weight: 800;
    font-size: 1rem;
    color: #333;
    border-top: 1px solid #ddd;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
}

/* Acciones del pedido: select de estado + boton WhatsApp */
.pedido-acciones {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.select-estado-pedido {
    flex: 1;
    min-width: 160px;
    padding: 0.5rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.select-estado-pedido:focus {
    border-color: #c8d96f;
}

.btn-whatsapp-pedido {
    padding: 0.5rem 1rem;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}

.btn-whatsapp-pedido:hover {
    background: #1da44e;
    transform: scale(1.03);
}

/* --- CARRITO: mapa de entrega --- */
.mapa-entrega {
    margin-top: 0.8rem;
}

.mapa-entrega label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: #444;
    margin-bottom: 0.2rem;
}

.mapa-helper {
    color: #888;
    font-size: 0.78rem;
    margin: 0;
}

.ubicacion-texto {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #4caf50;
    font-weight: 600;
    background: #e8f5e9;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    display: inline-block;
}

/* Leaflet map fix inside our layout */
#mapEntrega .leaflet-container {
    font-size: 0.75rem;
}

/* --- PANTALLA DE GRACIAS (#6) --- */
.gracias-container {
    max-width: 680px;
    margin: 3rem auto 2rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gracias-confeti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.confeti-estrella {
    position: absolute;
    top: -40px;
    animation: caer 3s ease-in forwards;
    opacity: 0.9;
}

@keyframes caer {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    80% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(105vh) rotate(720deg);
        opacity: 0;
    }
}

.gracias-icono {
    font-size: 5rem;
    animation: latido 1s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}

@keyframes latido {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

.gracias-titulo {
    font-size: 2.4rem;
    color: #333;
    margin: 0.4rem 0 0.2rem;
    position: relative;
    z-index: 1;
}

.gracias-subtitulo {
    color: #888;
    font-size: 1.05rem;
    margin: 0 0 1.5rem;
    position: relative;
    z-index: 1;
}

.gracias-mensaje {
    text-align: left;
    background: #f9fbe7;
    border-left: 4px solid #c8d96f;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.gracias-mensaje p {
    margin: 0.45rem 0;
    color: #444;
    font-size: 0.92rem;
    line-height: 1.5;
}

.gracias-resumen {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.8rem;
    text-align: left;
    position: relative;
    z-index: 1;
}

.gracias-resumen h3 {
    margin: 0 0 0.8rem;
    font-size: 1rem;
    color: #555;
}

.gracias-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88rem;
}

.gracias-item:last-of-type {
    border-bottom: none;
}

.gracias-item-nombre {
    color: #333;
    font-weight: 600;
}

.gracias-item-cantidad {
    color: #888;
}

.gracias-item-precio {
    color: #4caf50;
    font-weight: 700;
}

.gracias-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 2px solid #eee;
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}

.gracias-total-monto {
    color: #c8d96f;
    font-size: 1.25rem;
}

.gracias-acciones {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn-gracias-catalogo,
.btn-gracias-inicio {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gracias-catalogo {
    background: #c8d96f;
    color: #fff;
}

.btn-gracias-inicio {
    background: #fff;
    color: #555;
    border: 2px solid #ddd;
}

.btn-gracias-catalogo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(200, 217, 111, 0.4);
}

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

/* --- Helper text reutilizable --- */
.helper-text {
    color: #999;
    font-size: 0.78rem;
    margin: 0.2rem 0 0.5rem;
}

/* =============================================================
   RESPONSIVE para las nuevas secciones
   ============================================================= */
@media (max-width: 768px) {

    /* Admin: casillas de imagen en una fila de 3 pequeñas */
    .imagenes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .slot-preview img {
        height: 70px;
    }

    /* Códigos: una columna */
    .codigo-form-admin .form-row {
        grid-template-columns: 1fr;
    }

    .codigos-tabla-header,
    .codigo-item {
        grid-template-columns: 1fr 0.7fr auto;
    }

    .codigo-tipo {
        display: none;
    }

    /* Gracias: ajustes móvil */
    .gracias-container {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }

    .gracias-titulo {
        font-size: 1.8rem;
    }

    .gracias-icono {
        font-size: 3.5rem;
    }
}

/* ============================================================
   RESPONSIVE MÓVIL - Optimizado para todas las pantallas
   ============================================================ */

@media (max-width: 768px) {

    /* ===== ADMIN PANEL ===== */
    .admin-container {
        padding: 10px;
    }

    .admin-card {
        padding: 15px;
        margin: 15px 0;
    }

    .admin-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn-logout {
        width: 100%;
        padding: 12px;
    }

    /* Formularios */
    .form-row {
        flex-direction: column;
    }

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

    .nueva-categoria-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .nueva-categoria-wrapper input,
    .nueva-categoria-wrapper select {
        width: 100%;
    }

    /* Grid de imágenes */
    .imagenes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .imagen-slot {
        height: 200px;
    }

    /* Lista de productos admin */
    .producto-item {
        flex-direction: column;
        align-items: stretch;
    }

    .producto-item-imagen {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }

    .producto-item-info {
        width: 100%;
        padding: 0;
        margin-bottom: 15px;
    }

    .producto-item-acciones {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .producto-item-acciones button {
        width: 100%;
    }

    /* Pedidos */
    .pedido-card {
        padding: 15px;
        font-size: 14px;
    }

    .pedido-id-fecha {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .pedido-acciones {
        flex-direction: column;
        gap: 10px;
    }

    .pedido-acciones select,
    .pedido-acciones button {
        width: 100%;
    }

    /* Categorías */
    .categorias-lista,
    .codigos-lista {
        gap: 10px;
    }

    .categoria-item,
    .codigo-item {
        flex-wrap: wrap;
        padding: 12px;
    }

    /* ===== CATÁLOGO ===== */
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 15px;
    }

    .producto-card {
        font-size: 14px;
    }

    .filtros-categorias {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 5px;
    }

    .categoria-btn {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 16px;
    }

    /* Modal detalle */
    .modal-card {
        max-width: 98%;
    }

    .galeria-container {
        height: 300px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer button {
        width: 100%;
    }

    /* ===== CARRITO ===== */
    .carrito-container {
        padding: 15px;
    }

    .carrito-item {
        flex-direction: column;
        align-items: stretch;
    }

    .carrito-item-imagen {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }

    .carrito-item-info {
        width: 100%;
        margin-bottom: 15px;
    }

    .carrito-item-acciones {
        width: 100%;
        justify-content: space-between;
    }

    .resumen-compra {
        position: static;
        width: 100%;
        margin-top: 20px;
    }

    /* Formulario checkout */
    .checkout-form {
        grid-template-columns: 1fr;
    }

    /* Mapa */
    #mapa {
        height: 250px;
    }

    /* ===== GENERAL ===== */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Nav responsive */
    nav .container {
        padding: 10px 15px;
    }

    /* Footer */
    .footer-content {
        padding: 30px 20px;
    }

    /* Botones más grandes para touch */
    button,
    .btn,
    input[type="submit"] {
        min-height: 44px;
        font-size: 14px;
    }

    /* Inputs más accesibles */
    input,
    select,
    textarea {
        font-size: 16px;
        /* Evita zoom en iOS */
        padding: 12px;
    }

    /* Tablas scrollables */
    .codigos-tabla-header,
    .codigos-lista {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {

    /* Extra pequeño - ajustes finos */
    .productos-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .producto-card {
        max-width: 100%;
    }

    .admin-card h2 {
        font-size: 1.2rem;
    }

    .pedido-card {
        padding: 12px;
        font-size: 13px;
    }

    .modal-card {
        border-radius: 16px;
    }

    /* Reducir padding en general */
    .container {
        padding: 0 10px;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {

    /* Dispositivos touch - botones más grandes */
    button,
    .btn {
        padding: 12px 20px;
        min-height: 48px;
    }

    .producto-card {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Mejores áreas de click */
    .categoria-btn {
        padding: 12px 20px;
    }
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================================
   ADMIN RESPONSIVE FIXES - Agregar al final de stylei.css
   ============================================================ */

/* Arreglo para imágenes en vertical en móvil */
@media (max-width: 768px) {
    .imagenes-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .imagen-slot {
        width: 100% !important;
        max-width: 100% !important;
    }

    .slot-preview img {
        width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        object-fit: contain !important;
    }
}

/* Arreglo para filtros de categorías que no se descuadren */
@media (max-width: 768px) {
    .categorias {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: flex-start !important;
    }

    .categoria-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        min-width: auto !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* Arreglo para select de categorías en formulario móvil */
@media (max-width: 768px) {
    .nueva-categoria-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .nueva-categoria-wrapper select,
    .nueva-categoria-wrapper input {
        width: 100% !important;
    }

    .btn-add-categoria {
        width: 100% !important;
    }
}

/* Mejorar tabla de productos en móvil */
@media (max-width: 768px) {
    .producto-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .producto-item-imagen {
        width: 100% !important;
        max-height: 200px !important;
    }

    .producto-item-imagen img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
    }

    .producto-item-info {
        width: 100% !important;
        padding: 1rem 0 !important;
    }

    .producto-item-acciones {
        width: 100% !important;
        display: flex !important;
        gap: 0.5rem !important;
    }

    .producto-item-acciones button {
        flex: 1 !important;
    }
}

/* Arreglo para pedidos en móvil */
@media (max-width: 768px) {
    .pedido-card {
        padding: 1rem !important;
    }

    .pedido-card-header {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: flex-start !important;
    }

    .pedido-acciones {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .pedido-acciones select,
    .pedido-acciones button {
        width: 100% !important;
    }
}

/* Arreglo para códigos de descuento en móvil */
@media (max-width: 768px) {
    .codigo-form-admin .form-row {
        flex-direction: column !important;
    }

    .codigo-item {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: flex-start !important;
    }

    .codigo-item span {
        width: 100% !important;
    }
}

/* Mejorar formulario de productos en móvil */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column !important;
    }

    .form-row .form-group {
        width: 100% !important;
    }

    .form-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .form-actions button {
        width: 100% !important;
    }
}

/* Botones touch-friendly en móvil */
@media (max-width: 768px) {

    button,
    .btn-submit,
    .btn-cancel,
    .btn-editar,
    .btn-eliminar {
        min-height: 44px !important;
        padding: 0.7rem 1rem !important;
        font-size: 1rem !important;
    }

    input[type="text"],
    input[type="number"],
    input[type="tel"],
    input[type="email"],
    textarea,
    select {
        min-height: 44px !important;
        font-size: 16px !important;
        /* Evita zoom en iOS */
    }
}