/* CARRUSEL PRINCIPAL */ 

.carousel-container {
    position: relative;
    overflow: hidden;
}
.carousel-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.carousel-images img {
    width: 100%;
    flex-shrink: 0;
}
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 5px;
    cursor: pointer;
    z-index: 10;
}
.carousel-button.left { left: 10px; }
.carousel-button.right { right: 10px; }

/* VISOR PDF */

#pdf-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
#pdf-viewer-overlay.hidden {
    display: none;
}
.pdf-viewer-content {
    position: relative;
    width: 80%;
    height: 90%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

#pdf-viewer-frame {
    width: 100%;
    height: 100%;
}

#pdf-viewer-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 2100;
}

/* GALERIA MODAL */

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}
.qty-control {
    border-radius: 0.5rem;
    overflow: hidden;
}
.qty-control button {
    min-width: 40px;
    font-weight: 600;
    line-height: 1;
}
#qty-input {
    width: 5.5rem;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

/* PAGINACIÓN DE GRUPOS */

.product-image-container {
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 0.5rem;
}
.product-image-container img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    display: block;
}

#products-container.products-carousel-root {
    position: relative;
    overflow: hidden;
    display: block !important;
    width: 100%;
}
.products-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
}

#products-track {
    display: flex;
    transition: transform 400ms ease;
    will-change: transform;
}
.products-page {
    min-width: 100%;
    width: 100%;
    box-sizing: border-box;
    display: grid;
}

#products-container .product {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.product > * {
    text-align: center;
}
.products-page > .product-placeholder {
    visibility: hidden;
}
.product h3 {
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    max-height: calc(1.2em * 2);
}

/* CARRITO */

#cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 350px;
    background-color: white;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;

    display: flex;
    flex-direction: column;
}

#cart-drawer.open {
    transform: translateX(0); 
}

#cart-items {
    flex: 1;           
    overflow-y: auto;
    padding: 1rem;     
}

#cart-overlay {
    position: fixed;
    inset: 0; 
    background: rgba(0,0,0,0.45);
    z-index: 999;
    transition: opacity 0.3s ease;
}

#cart-overlay.hidden {
    display: none;
}

/* MI CUENTA DROPDOWN*/

.account-wrapper {
    position: relative;
    display: inline-block;
}
.account-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 250px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    font-family: Arial, sans-serif;
    color: #333;
}
.hidden { 
    display: none; 
}
.account-dropdown button {
    display: flex;
    align-items: center;
    width: 90%;
    padding: 12px 12px;
    background: #fff;
    border: none;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    margin: 4px 8px;
    transition: all 0.2s ease;
}
.account-dropdown button:hover {
    background: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
} 
.account-dropdown a:hover, 
.account-dropdown .guest-text:hover {
    background: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.account-dropdown .guest-text {
    padding: 12px 16px;
    margin: 4px 8px;
    font-weight: 600;
    color: #555;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.guest-text {
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

/* LOGIN */

body {
    font-family: 'Roboto', sans-serif;
}
.glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.bg-custom {
    background-image: url("/static/background/1.jpg");
}
.toast {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* CORREO Y CELULAR */

@keyframes border-glow {
    0% { clip-path: inset(0 98% 0 0); }
    25% { clip-path: inset(98% 0 0 0); }
    50% { clip-path: inset(0 0 98% 0); }
    75% { clip-path: inset(0 0 0 98%); }
    100% { clip-path: inset(0 98% 0 0); }
}
.before\:animate-border-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 4px solid #22c55e;
    animation: border-glow 2s linear infinite;
}
.header-brand {
  background: linear-gradient(135deg, #0A1A28, #06b6d4);
  color: white;
}

/* REGISTRO DETALLADO */

.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: #4a5568; }
.form-input, .form-select {
    width: 100%; padding: 0.75rem 1rem; border: 1px solid #e2e8f0;
    border-radius: 0.375rem; font-size: 1rem; line-height: 1.5;
    color: #2d3748; background-color: #ffffff;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.form-input:focus, .form-select:focus {
    outline: none; border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
.checkbox-group { display: flex; align-items: center; margin-top: 0.5rem; }
.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem; width: 1.25rem; height: 1.25rem; accent-color: #3b82f6;
}
.error-message { color: #e53e3e; font-size: 0.875rem; margin-top: 0.25rem; }
.address-module { border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 1.5rem; margin-bottom: 1.5rem; background-color: #f9fafb; }
.address-module:last-of-type { margin-bottom: 0; }

/* MI CUENTA */

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #2d3748;
    background-color: #ffffff;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}
.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #3b82f6;
}
.error-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
.address-module {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f9fafb;
}
.address-module:last-of-type {
    margin-bottom: 0;
}
.menu-link.active {
    background-color: #f3f4f6;
    border-left: 4px solid #3b82f6;
    font-weight: 600;
    color: #1f2937;
}

/* FAVORITOS DROPDOWN*/

.favorites-wrapper {
    position: relative;
    display: inline-block;
}
.favorites-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 250px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    font-family: Arial, sans-serif;
    color: #333;
}
.favorites-dropdown button {
    display: flex;
    align-items: center;
    width: 90%;
    padding: 12px 12px;
    background: #fff;
    border: none;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    margin: 4px 8px;
    transition: all 0.2s ease;
}
.favorites-dropdown button:hover {
    background: #fef2f2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.favorites-dropdown .guest-text {
    padding: 12px 16px;
    margin: 4px 8px;
    font-weight: 600;
    color: #555;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.hidden {
    display: none;
}
.favorites-item img {
    flex-shrink: 0;
}
.favorites-item span {
    margin-right: 0.5rem;
    gap: 8px;
}
.fav-text {
    min-width: 0;
}
.fav-key {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fav-desc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}
.fav-remove {
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin-left: auto;
}
/* FAVORITOS */

.favorites-table {
    width: 100%;
    border-collapse: collapse;
}
.favorites-table th,
.favorites-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.favorites-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    font-size: 1.2rem;
}
.favorites-table tbody tr:hover {
    background-color: #f0f4f8;
}
.favorites-table td img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}
@media (max-width: 768px) {
    .favorites-table thead {
        display: none;
    }
    .favorites-table, .favorites-table tbody, .favorites-table tr, .favorites-table td {
        display: block; /* Hace que las celdas se apilen */
        width: 100%;
    }
    .favorites-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        overflow: hidden;
    }
    .favorites-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    .favorites-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 1rem;
        font-weight: 600;
        text-align: left;
        color: #4a5568;
    }
}