:root {
    --text-dark: #212529;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --white-bg: #ffffff;
    --light-bg: #f8f9fa;
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body {
    font-family: var(--font-family);
    margin: 0;
    background-color: #fff;
}
.store-header {
    background-color: var(--white-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.store-logo { max-height: 50px; }
.store-nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    color: var(--text-light);
}
.store-nav a.active { color: var(--color-links, var(--primary-color)); }
main.store-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background-color: var(--white-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}
div.product-card:hover {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.product-card a { text-decoration: none; }
div.product-image {
    width: 100%;
    padding-top: 100% !important; /* <-- ESTA ES LA LÍNEA CLAVE */
    position: relative;
    background-color: var(--light-bg);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto asegura que la imagen cubra el cuadrado sin deformarse */
}
.image-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; position: absolute; top: 0; font-size: 3rem; color: var(--border-color); }
div.product-info { padding: 10px 20px 20px 20px; text-align:center; }
.product-category { font-size: 0.8rem; color: var(--text-light); margin: 0; text-transform: uppercase; }
h3.product-title { font-size: 14px; font-weight:500; color: var(--text-dark); margin:0; }
p.product-price { font-size: 14px; font-weight: bold; color: #81160e; margin: 0; }
button.btn-agregar { font-size: 14px; font-weight: bold; color: #fff; background:#000; padding:5px; width:100%; border:none; }
button.btn-agregar:hover { background:#81160e;}
.product-actions {
    padding: 0 1rem 1rem 1rem;
    display: flex;           /* <-- Add this line */
    justify-content: center; /* <-- Add this line */
}
footer.store-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    background-color:#4F0E09;
}
footer.store-footer p {
    color:#fff;
}


/* --- Secciones por Categoría --- */
.category-section {
    margin-bottom: 3rem;
}
.category-header-wrapper {
    background-color: transparent;
    padding: 0 0 10px 0;
    border-bottom: 1px solid var(--border-color, #dee2e6);
}
.content-wrapper {
    max-width: 1300px;
    margin: 0 auto;
}
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.category-header h2 { margin: 0; font-size: 14px; text-transform:uppercase; }
.btn-ver-mas {
    background-color: var(--color-botones, #0d6efd);
    color: var(--color-texto-botones, white);
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size:13px;
    text-transform:uppercase;
}
.btn-ver-mas:hover { background-color: var(--color-hover-botones, #0b5ed7); }

/* --- Carrusel de Productos Personalizado --- */
.prodt-carousel-wrapper { position: relative; padding: 10px 0; }
.prodt-carousel-slides {
    display: grid;
    grid-auto-flow: column;
    /* Por defecto (PC grande), 6 productos por fila */
    grid-auto-columns: calc((100% / 6) - 1.25rem); 
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.prodt-carousel-slides::-webkit-scrollbar { display: none; }

.prodt-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: none; /* JS lo mostrará */
}
.prodt-arrow.prev { left: -20px; }
.prodt-arrow.next { right: -20px; }
.prodt-arrow.visible { display: block; }


/* PC Pequeño (4 columnas) */
@media (max-width: 1300px) {
    .prodt-carousel-slides {
        grid-auto-columns: calc((100% / 5) - 1.125rem);
    }
    main.store-container {
        padding: 0 20px;
    }
}

/* Tablet (4 columnas, como pediste) */
@media (max-width: 992px) {
    .prodt-carousel-slides {
        grid-auto-columns: calc((100% / 4) - 1rem); /* 4 columnas */
    }
    main.store-container {
        padding: 20px;
    }
}

/* Móvil (2 columnas) */
@media (max-width: 768px) {
    .prodt-carousel-slides {
        grid-auto-columns: calc((100% / 2) - 0.75rem); /* 2 columnas */
    }
    main.store-container {
        padding: 10px;
    }
    .prodt-arrow.prev { left: 0; }
    .prodt-arrow.next { right: 0; }
}
/* Móvil (2 columnas) */
@media (max-width: 360px) {
    .prodt-carousel-slides {
        grid-auto-columns: calc((100% / 2) - 0.75rem); /* 2 columnas */
    }
    main.store-container {
        padding: 10px;
    }
    .prodt-arrow.prev { left: 0; }
    .prodt-arrow.next { right: 0; }
}
/* ====================================================== */
/* FORZAR RELACIÓN DE ASPECTO 1:1 PARA IMAGEN DE PRODUCTO */
/* ====================================================== */
.product-card .product-image {
    height: 0 !important;
    padding-top: 100% !important;
}
.product-actions a.btn-agregar {
    text-align: center;
    display: block;
}

/* --- Estilos para la Notificación Toast --- */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--success-color, #198754); /* Color verde de éxito */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2000;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInAndOut 4s ease-in-out;
}

@keyframes slideInAndOut {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    15% {
        opacity: 1;
        transform: translateX(0);
    }
    85% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}
/* --- Estilos para la Página de "Gracias" --- */
.gracias-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Botón secundario para "Ver Pedido" */
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #000;
    border: 2px solid #000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background-color: #000;
    color: #fff;
}