/* =========================================
   VARIABLES Y RESETEO GENERAL
   ========================================= */
:root {
    --primary-color: #333;
    --bg-color: #1F2A3C; 
    --sidebar-bg: #1F2A3C; 
    --card-bg: #2A3C53; 
    --whatsapp-green: #25D366;
    --accent-blue: #b3e5fc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    overflow-x: hidden; 
}

/* =========================================
   SCROLLBAR PERSONALIZADO GLOBAL
   ========================================= */
::-webkit-scrollbar {
    width: 12px; 
    height: 8px; /* Para los scrolls horizontales */
}

::-webkit-scrollbar-track {
    background-color: var(--bg-color); 
}

::-webkit-scrollbar-thumb {
    background-color: #3b5573; /* Celeste oscuro / Azul pizarra */
    border-radius: 10px;
    border: 3px solid var(--bg-color); /* Falso margen para que se vea flotante */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #4b6a8e; /* Brilla un poco al pasar el mouse */
}

/* =========================================
   ESTILOS DE LA TIENDA (index.html)
   ========================================= */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%; 
    flex-wrap: wrap; 
    background-color: var(--bg-color); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
}

.logo {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.logo a {
    text-decoration: none;
    display: block;
}

.logo-image {
    max-height: 40px; 
    width: auto;     
    vertical-align: middle;
}

.search-bar {
    display: flex;
    flex: 2; 
    max-width: 600px;
    background-color: var(--card-bg); 
    border-radius: 8px;
    overflow: hidden;
    margin: 0 20px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    background-color: transparent;
    color: #ffffff; 
    font-size: 1rem;
    width: 100%;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.5); 
}

.search-bar button {
    background-color: transparent;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #ffffff; 
}

.user-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end; 
}

.user-actions a {
    text-decoration: none;
    color: #ffffff; 
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.user-actions a:hover {
    color: var(--accent-blue);
}

.container {
    padding: 30px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.store-filters-container {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    gap: 15px;
    flex-wrap: wrap; 
    max-width: 100%; 
}

.store-filters {
    flex: 1;
    display: flex;
    gap: 10px;
    overflow-x: auto; 
    padding-bottom: 5px;
    max-width: 100%; 
}

.filter-btn {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap; 
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.filter-btn.active {
    background-color: var(--accent-blue);
    color: var(--bg-color);
    border-color: var(--accent-blue);
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(179, 229, 252, 0.2);
}

.dropdowns-wrapper {
    display: flex;
    flex-direction: column; 
    gap: 8px; 
    min-width: 180px; 
    align-items: flex-end; 
}

.store-sort {
    width: 100%;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    border: 1px solid rgba(255,255,255,0.05); 
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    background: var(--card-bg); 
    box-shadow: 0 8px 15px rgba(0,0,0,0.3); 
    cursor: pointer; 
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.15);
}

.low-stock-badge {
    position: absolute;
    top: 15px;
    right: -5px; 
    background-color: #facc15; 
    color: #854d0e; 
    padding: 6px 12px;
    border-radius: 20px 0 0 20px; 
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.low-stock-badge.sold-out {
    background-color: #ef4444; 
    color: #fff;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    margin-bottom: 15px;
    background-color: #fff; 
    border-radius: 8px;
    padding: 10px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #ffffff; 
}

.product-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff; 
}

.product-talles-info {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6); 
    margin-top: 5px;
}

.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--whatsapp-green);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    text-decoration: none;
    transition: transform 0.2s;
    z-index: 100;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* =========================================
   MODAL DE DETALLE DE PRODUCTO (TIENDA)
   ========================================= */
.store-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    padding: 20px;
}

.store-modal-box {
    background-color: var(--bg-color); 
    color: #ffffff; 
    width: 100%;
    max-width: 1000px;
    border-radius: 16px;
    position: relative;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    animation: popIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.detail-layout {
    display: flex;
    gap: 40px;
}

.detail-image-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    width: 100%;
    aspect-ratio: 1/1;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    background-color: #fff; 
    border-radius: 12px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#detail-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.detail-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumb-box {
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    background-color: #fff;
    transition: all 0.2s;
}

.thumb-box:hover, .thumb-box.active {
    border-color: var(--accent-blue);
    transform: scale(1.05);
}

.detail-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #ffffff; 
}

.detail-condition {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.condition-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.cond-nuevo { background-color: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }
.cond-pocouso { background-color: rgba(250, 204, 21, 0.15); color: #facc15; border: 1px solid rgba(250, 204, 21, 0.3); }
.cond-usado { background-color: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

.brand-ragbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #f97316; 
    color: #ffffff;
    border: 1px solid #c2410c;
    box-shadow: 0 2px 5px rgba(249, 115, 22, 0.3);
}

.detail-price {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff; 
}

.detail-tags { margin-bottom: 20px; }
.detail-tags .badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.size-section {
    margin-top: 10px;
    margin-bottom: 20px;
}

.size-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-box {
    min-width: 45px;
    height: 45px;
    padding: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-weight: bold;
    color: #ffffff;
    transition: all 0.2s;
}

.size-box:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
}

.size-box.active {
    background-color: var(--accent-blue);
    color: var(--bg-color);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 10px rgba(179, 229, 252, 0.2);
}

.size-box.out-of-stock {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
}

.stock-info {
    margin-top: 10px;
    font-size: 0.9rem;
}

.payment-methods {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.payment-title {
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
}

.payment-text strong {
    color: #fff;
}

.whatsapp-buy-btn {
    background-color: var(--whatsapp-green);
    color: #ffffff;
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto; 
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.whatsapp-buy-btn:hover {
    transform: scale(1.02);
    background-color: #20b858;
}

/* =========================================
   SELECTORES DESPLEGABLES PERSONALIZADOS
   ========================================= */
.custom-dropdown {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-dropdown-header {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.custom-dropdown-header:hover {
    border-color: var(--accent-blue);
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-dropdown.open .custom-dropdown-header {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(179, 229, 252, 0.2); 
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--sidebar-bg); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.7);
    z-index: 105; 
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.custom-dropdown.open .custom-dropdown-options {
    display: block;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-dropdown-option {
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem; 
}

.custom-dropdown-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.custom-dropdown-option.selected {
    background-color: var(--accent-blue);
    color: var(--bg-color);
    font-weight: bold;
}

.custom-dropdown i {
    transition: transform 0.3s;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.custom-dropdown.open i {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.store-sort .custom-dropdown-header {
    border-radius: 20px;
    padding: 8px 16px; 
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 0.85rem; 
}
.store-sort .custom-dropdown.open .custom-dropdown-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* =========================================
   ESTILOS DEL LOGIN & FORMULARIOS
   ========================================= */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color); 
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px; 
}

.login-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 40px 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6); 
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    max-height: 55px;
    margin-bottom: 15px;
}

.login-header h2 {
    color: #ffffff; 
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; 
}
.form-row .input-group {
    flex: 1;
    min-width: 120px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 600;
}

.input-group label i {
    margin-right: 5px;
    color: var(--accent-blue);
}

.input-group input, 
.input-group .custom-textarea {
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 8px;
    font-size: 1rem;
    color: #ffffff; 
    transition: all 0.3s ease;
}

.input-group .custom-textarea {
    resize: vertical;
}

.input-group input::placeholder,
.input-group .custom-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:focus,
.input-group .custom-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(179, 229, 252, 0.2); 
}

.custom-file-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
    flex-wrap: wrap; 
}

.custom-file-upload {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 11px 15px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.custom-file-upload:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.file-name-display {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tags-selector-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.tag-pill {
    cursor: pointer;
    user-select: none;
}

.tag-pill input[type="checkbox"] {
    display: none; 
}

.tag-pill span {
    display: inline-block;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.tag-pill:hover span {
    background-color: rgba(255, 255, 255, 0.1);
}

.tag-pill input[type="checkbox"]:checked + span {
    background-color: var(--accent-blue);
    color: var(--bg-color);
    border-color: var(--accent-blue);
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(179, 229, 252, 0.3);
}

.image-preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    background-color: rgba(0,0,0,0.2); 
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px;
    min-height: 100px; 
    margin-top: 5px;
    align-content: center;
}

.no-images-text {
    grid-column: 1 / -1; 
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
}

.preview-container {
    position: relative; 
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: #fff; 
    animation: fadeInPreview 0.3s ease;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    cursor: pointer;
}

.btn-delete-thumb {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-delete-thumb:hover {
    background-color: #ef4444;
    transform: scale(1.1);
}

@keyframes fadeInPreview {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.variante-box {
    background-color: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-delete-var {
    position: absolute;
    top: -10px; right: -10px;
    background-color: #ff6b6b; color: white; border: none;
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    display: flex; justify-content: center; align-items: center;
    z-index: 10;
}
.btn-delete-var:hover { transform: scale(1.1); background-color: #ef4444; }

.login-btn {
    background-color: #ffffff;
    color: var(--bg-color);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-btn:hover { background-color: #e0e0e0; }
.login-btn:active { transform: scale(0.98); }

/* =========================================
   ESTILOS DEL PANEL ADMINISTRATIVO (panel.html)
   ========================================= */
.admin-body {
    background-color: var(--bg-color);
    color: #ffffff;
    overflow-x: hidden;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid rgba(255,255,255,0.05); 
    display: flex;
    flex-direction: column;
}

.admin-brand {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-brand .admin-logo {
    max-width: 100%; 
    max-height: 45px; 
    object-fit: contain; 
    margin-bottom: 10px;
}

.admin-brand h3 {
    color: #fff;
    font-weight: 500;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.admin-nav a {
    padding: 15px 25px;
    color: rgba(255,255,255,0.6); 
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
    border-left: 4px solid transparent; 
}

.admin-nav a:hover, .admin-nav a.active {
    background-color: rgba(255,255,255,0.03); 
    color: #ffffff;
    border-left: 4px solid var(--accent-blue);
}

.logout-link {
    margin-top: auto;
    color: #ff6b6b !important;
}

.admin-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-primary {
    background-color: #ffffff;
    color: var(--bg-color);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover { background-color: #e0e0e0; }

.admin-content {
    background-color: rgba(255,255,255,0.02); 
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-table th {
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.admin-thumb {
    width: 50px; height: 50px; object-fit: cover;
    border-radius: 5px; background-color: #fff;
}

.badge {
    background-color: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8);
    padding: 5px 12px; border-radius: 15px; font-size: 0.75rem;
    display: inline-block; margin: 2px;
}

.stock-ok { color: #4ade80; }
.stock-agotado { color: #f87171; font-weight: bold; }

.action-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1rem; margin-right: 8px; transition: color 0.2s;
}

.edit-btn { color: var(--accent-blue); }
.edit-btn:hover { color: #fff; }
.delete-btn { color: rgba(255,255,255,0.3); } 
.delete-btn:hover { color: #ff6b6b; }

/* =========================================
   VENTANA MODAL (Admin y General)
   ========================================= */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); align-items: center; justify-content: center;
    backdrop-filter: blur(5px); padding: 20px;
}

.modal-content {
    background-color: var(--bg-color); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; width: 100%; max-width: 850px; padding: 30px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6); animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh; overflow-y: auto; 
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 12px;
}

.close-btn { background: none; border: none; color: rgba(255,255,255,0.4); font-size: 1.3rem; cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: #fff; }

/* =========================================
   LIGHTBOX Y MODALES GLOBALES (Alertas)
   ========================================= */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9);
    z-index: 2000; display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s;
}
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-overlay img { max-width: 90%; max-height: 90vh; object-fit: contain; border-radius: 8px; transform: scale(0.95); transition: transform 0.3s; }
.lightbox-overlay.active img { transform: scale(1); }
.lightbox-close { position: absolute; top: 20px; right: 30px; background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; z-index: 2001; }
.lightbox-close:hover { color: #ff6b6b; }

.custom-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); display: none;
    align-items: center; justify-content: center; z-index: 9999; 
}
.custom-modal-box {
    background: var(--sidebar-bg); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
    padding: 40px 30px; max-width: 400px; width: 90%; text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6); animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: #fff;
}
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}
.custom-modal-icon { font-size: 3.5rem; margin-bottom: 20px; }
.icon-success { color: #4ade80; } .icon-error { color: #f87171; } .icon-warning { color: #facc15; }
.custom-modal-box h3 { font-size: 1.5rem; margin-bottom: 10px; }
.custom-modal-box p { color: rgba(255, 255, 255, 0.7); margin-bottom: 25px; }

/* =========================================
   RESPONSIVE DESIGN 
   ========================================= */
@media (max-width: 850px) {
    .logo, .user-actions { flex: auto; }
    .search-bar { order: 3; min-width: 100%; margin: 15px 0 0 0; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .admin-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 5px 0; }
    .admin-nav a { padding: 10px 15px; border-left: none; border-bottom: 3px solid transparent; gap: 8px; font-size: 0.9rem;}
    .admin-nav a:hover, .admin-nav a.active { border-left: none; border-bottom: 3px solid var(--accent-blue); }
    .admin-main { padding: 20px; }
    
    .store-filters-container { 
        flex-direction: column; 
        align-items: stretch; 
        width: 100%; 
    }
    
    .store-filters {
        width: 100%; 
    }
    
    .dropdowns-wrapper {
        flex-direction: column; 
        width: 100%;
    }

    .store-sort { width: 100%; } 
}

@media (max-width: 768px) {
    .detail-layout { flex-direction: column; }
    
    .product-grid {
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    
    .product-card {
        width: 100%; 
        margin: 0; 
        padding: 15px; 
        overflow: hidden; 
    }
    
    .product-image {
        max-height: 200px; 
        object-fit: contain; 
    }
    
    .product-title {
        font-size: 1rem; 
    }
    
    .product-price {
        font-size: 1.2rem; 
    }
}