/* --- VARIABLES GLOBALES --- */
:root {
    --primary: #6f42c1;
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6f42c1 100%);
    --bg-light: #f4f7fa;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --brand-orange: #fb7701;
    --lux-bg: #f7f7f7;
}

/* --- TAGS LUXURY --- */
.tags {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.lux-tag {
    background: #fdf2f2;
    color: #ff4d4f;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid rgba(255, 77, 79, 0.1);
}

.lux-tag:nth-child(even) {
    background: #f0f5ff;
    color: #2f54eb;
    border-color: rgba(47, 84, 235, 0.1);
}

.container-luxury {
    width: 100%;
    margin: 0 auto;
    max-width: 1400px;
}



/* --- RESET Y BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* --- ANIMACIONES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#subcatBarContainer {
    animation: fadeIn 0.4s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseArrow {

    0%,
    100% {
        right: 5px;
        opacity: 0.7;
    }

    50% {
        right: 0;
        opacity: 1;
    }
}

@keyframes hintScrollSlow {
    0% {
        transform: translateX(0);
    }

    30% {
        transform: translateX(-100px);
    }

    70% {
        transform: translateX(-100px);
    }

    100% {
        transform: translateX(0);
    }
}

/* --- COMPONENTES COMUNES --- */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
}

.glass-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* --- DISEÃ‘O DEL ADMINISTRADOR --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-light);
    overflow-x: hidden;
}

.sidebar {
    width: 260px;
    background: var(--primary-gradient);
    color: white;
    position: fixed;
    height: 100vh;
    z-index: 2000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    left: -260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar.active {
    left: 0 !important;
}

.sidebar .brand {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    color: var(--text-main);
    background: #f8f9fa;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}

.sidebar-toggle:hover {
    background: #eee;
}

.sidebar .brand h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    padding: 20px 10px;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    transition: 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.main-content {
    margin-left: 0;
    width: 100%;
    padding: 30px;
    min-height: 100vh;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.top-bar {
    background: var(--white);
    padding: 15px 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    color: var(--text-main);
}

.top-bar h3,
.top-bar strong {
    color: var(--text-main) !important;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card-stat {
    padding: 30px;
    border-radius: 15px;
    color: white;
    position: relative;
    overflow: hidden;
}

.card-stat h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.9;
}

.card-stat span {
    font-size: 2.5rem;
    font-weight: 800;
}

.card-stat i {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: 0.2;
}

/* Tablas Admin con Responsive Wrap */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

th {
    text-align: left;
    padding: 15px;
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 2px solid #edf2f7;
}

td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Formularios Admin */
label {
    display: block;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-main);
    background: white;
}

input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

/* Gallery Picker */
.gallery-container {
    background: #f8fafc;
    border: 2px dashed var(--border);
    border-radius: 15px;
    padding: 15px;
    height: 400px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.img-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}

.img-thumb:hover {
    transform: scale(1.05);
}

.img-thumb.selected {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* --- DISEÃ‘O DEL CLIENTE (VISTA PÃšBLICA) --- */
.lux-body {
    background: var(--lux-bg);
}

.sticky-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 5%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.brand-luxury {
    font-size: 1.6rem;
    font-weight: 900;
    color: #222;
    letter-spacing: 1px;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--brand-orange);
    font-weight: 800;
    letter-spacing: 2px;
}

.search-wrapper {
    flex: 1;
    max-width: 600px;
    display: flex;
    align-items: center;
    background: #f1f3f6;
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid transparent;
}

.search-wrapper i {
    color: #888;
    margin-right: 12px;
}

.search-bar {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 1rem;
}

.cart-toggle {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f6;
    border-radius: 50%;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--brand-orange);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 800;
    border: 2px solid #fff;
}

.cat-nav-container {
    position: relative;
    background: white;
    overflow: hidden;
}

.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 15px 5%;
    background: transparent;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav.hint-active {
    animation: hintScrollSlow 2.5s ease-in-out;
}

.scroll-indicator-right {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-orange);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: auto;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: pulseArrow 1.5s infinite;
    transition: opacity 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
}

/* Mostrar siempre el indicador en todas las pantallas */
.scroll-indicator-right.visible {
    opacity: 1;
    visibility: visible;
}

.category-nav::after {
    content: '';
    min-width: 60px;
    display: block;
    flex-shrink: 0;
}

.cat-pill {
    padding: 8px 20px;
    background: #f8f9fa;
    border-radius: 20px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    border: 1px solid #eee;
    white-space: nowrap;
    position: relative;
    transition: 0.2s;
}

.cat-pill:hover {
    background: #eee;
}

.cat-pill.active {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
}

/* Submenu Dropdown logic */
.cat-has-sub {
    position: relative;
}

.subcat-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    z-index: 1100;
    margin-top: 10px;
    padding: 10px 0;
    text-align: left;
}

/* Show on hover for desktop */
@media (min-width: 901px) {
    .cat-has-sub:hover .subcat-menu {
        display: block;
        animation: fadeInUp 0.2s ease;
    }
}

.subcat-item {
    padding: 10px 20px;
    color: #444;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
}

.subcat-item:hover {
    background: #f8f9fa;
    color: var(--brand-orange);
}

/* Product Cards Cliente */
.lux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 20px 5%;
}

.lux-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.lux-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.lux-card .img-box {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f1f3f6;
    position: relative;
}

/* Skeleton Animation */
.lux-card .img-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f1f3f6 25%, #e9ecef 50%, #f1f3f6 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite linear;
    z-index: 1;
}

@keyframes skeleton-shine {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

.lux-card .img-box img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.lux-card .img-box img[src] {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.lux-card .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lux-card .info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lux-card .title {
    font-size: 0.9rem;
    line-height: 1.4;
    height: 2.8rem;
    overflow: hidden;
    margin-bottom: 8px;
}

.lux-card .price {
    color: var(--brand-orange);
    font-size: 1.15rem;
    font-weight: 800;
    margin-top: auto;
}

.price-original {
    font-size: 0.85rem;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

.price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.lux-btn-cart {
    width: 36px;
    height: 36px;
    background: var(--brand-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 12px;
    right: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- MODAL DETALLE PRODUCTO --- */
.lux-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lux-modal-content {
    background: white;
    width: 100%;
    max-width: 950px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    animation: zoomIn 0.3s ease;
    max-height: 92vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.lux-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.2rem;
    cursor: pointer;
    color: #999;
    z-index: 11000;
    transition: 0.2s;
    background: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lux-close:hover {
    color: var(--brand-orange);
    transform: rotate(90deg);
}

#modalBody {
    display: flex !important;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Secciones del Modal */
.modal-gallery {
    flex: 1.25;
    min-width: 0;
    padding: 30px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    background: #fafafa;
    border-right: 1px solid #eee;
}

.modal-main-photo {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1/1;
    background: white;
    border-radius: 15px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: zoom-in;
}

.modal-main-photo img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.zoom-overlay-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-orange);
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    pointer-events: none;
    /* Dejar que el click pase al contenedor */
}

.zoom-overlay-btn:hover {
    transform: scale(1.1);
    background: white;
}

.modal-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    overflow-x: auto;
    width: 100%;
    padding: 10px 15px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.modal-thumb {
    width: 65px;
    height: 65px;
    flex: 0 0 65px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    background: white;
    padding: 0;
    transition: 0.23s;
}

.modal-thumb:hover {
    border-color: var(--brand-orange);
    transform: scale(1.05);
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-product-info {
    flex: 1;
    min-width: 0;
    padding: 40px;
    overflow-y: auto;
    background: white;
    display: flex !important;
    flex-direction: column;
}

.modal-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #222;
    line-height: 1.25;
}

.modal-seller {
    color: #888;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.modal-pricing-card {
    background: #fff8f0;
    padding: 22px;
    border-radius: 18px;
    border-left: 6px solid var(--brand-orange);
    margin-bottom: 30px;
}

.price-label {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 8px;
}

.price-main {
    font-size: 2rem;
    color: var(--brand-orange);
    font-weight: 800;
}

.price-total {
    font-size: 1.15rem;
    color: #444;
    margin-top: 10px;
}

.modal-qty-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
}

.qty-control-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 35px;
    padding: 8px 22px;
    background: #fff;
}

.qty-control-box button {
    border: 0;
    background: none;
    font-size: 2rem;
    color: var(--brand-orange);
    cursor: pointer;
    width: 45px;
}

.qty-control-box input {
    width: 65px;
    border: 0;
    text-align: center;
    font-weight: 800;
    font-size: 1.3rem;
    outline: none;
}

.qty-limit-text {
    color: #aaa;
    font-size: 0.9rem;
}

.modal-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 30px;
}

.modal-actions-grid button {
    border: 0;
    padding: 18px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-add-cart {
    background: var(--brand-orange);
    color: white;
}

.btn-buy-now {
    background: #25d366;
    color: white;
}

.btn-add-cart:hover,
.btn-buy-now:hover {
    filter: brightness(1.1);
    transform: translateY(-3px);
}

.modal-description-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

/* --- CARRITO SIDEBAR --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 11000;
    transition: 0.3s;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    background: var(--brand-orange);
    color: white;
    display: flex;
    justify-content: space-between;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.cart-item-row img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    margin: 0 0 5px 0;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

/* --- RESPONSIVIDAD --- */
@media (min-width: 992px) {
    .sidebar {
        left: 0;
    }

    .sidebar-toggle {
        display: none !important;
    }

    .main-content {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
}

@media (max-width: 991px) {

    /* Force sidebar to be hidden on mobile */
    .sidebar {
        left: -260px !important;
    }

    .sidebar.active {
        left: 0 !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    .lux-modal {
        padding: 8px;
    }

    .lux-modal-content {
        max-height: 98vh;
        width: 100%;
        border-radius: 15px;
        overflow-y: auto;
    }

    #modalBody {
        flex-direction: column !important;
        height: auto;
    }

    /* --- ADMIN SIDEBAR MOBILE --- */
    .sidebar-toggle {
        display: flex !important;
    }

    .top-bar {
        padding: 10px 15px;
    }

    /* Force all admin content to single column - DISABLED to allow specific grids like image manager
    .grid-edit,
    .grid-edit>div,
    [style*="display: grid"],
    [style*="display:grid"] {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    */

    .glass-card {
        margin-bottom: 20px !important;
        width: 100% !important;
    }

    /* Transform tables into cards on mobile - DISABLED per user request for horizontal scroll
    /*
    table {
        border: 0;
    }

    table thead {
        display: none;
    }

    table tr {
        display: block;
        margin-bottom: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        padding: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    table td {
        display: block;
        text-align: right;
        padding: 10px 10px 10px 45%;
        border: none;
        position: relative;
        min-height: 35px;
    }

    /* Add labels using nth-child */
    table td:nth-child(1):before {
        content: "Cant.";
    }

    table td:nth-child(2):before {
        content: "Precio Total";
    }

    table td:nth-child(3):before {
        content: "U. Price";
    }

    table td:nth-child(4):before {
        content: "Ganancia";
    }

    table td:nth-child(5):before {
        content: "Dto. %";
    }

    table td:before {
        position: absolute;
        left: 10px;
        top: 10px;
        font-weight: bold;
        text-align: left;
        color: #666;
        font-size: 0.85rem;
    }

    table td:last-child {
        border-bottom: 0;
    }

    /* Hide label for delete button column */
    table td:nth-child(6):before {
        content: "";
    }

    table td:nth-child(6) {
        text-align: center;
        padding-left: 10px;
    }

    /* Keep inputs and buttons full width */
    table input,
    table select,
    table button {
        width: 100% !important;
        max-width: 100% !important;
    }

    */ .modal-gallery {
        padding: 25px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .modal-main-photo {
        max-width: 320px;
        margin: 0 auto;
        box-shadow: none;
        border: 1px solid #eee;
    }

    .modal-thumbs {
        justify-content: flex-start;
        margin-top: 20px;
    }

    .modal-product-info {
        padding: 30px;
        overflow-y: visible;
    }

    .modal-actions-grid {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: 1.6rem;
    }

    .lux-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header-main {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0;
        padding: 8px 10px !important;
    }

    /* Ocultar completamente el logo en mÃ³vil */
    .brand-container {
        display: none !important;
    }

    /* Ocultar los iconos del header - serÃ¡n botones flotantes */
    .header-actions {
        display: none !important;
    }

    .search-container {
        width: 100%;
        max-width: 100%;
    }

    .search-wrapper {
        width: 100%;
        margin-top: 0;
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .search-wrapper i {
        font-size: 0.9rem;
        margin-right: 10px;
    }

    .sticky-header {
        padding: 8px 3%;
    }

    .modal-main-photo {
        max-width: 250px;
    }

    .modal-product-info {
        padding: 20px;
    }

    .modal-actions-grid {
        gap: 12px;
    }

    /* Hacer los botones de categorÃ­a mÃ¡s pequeÃ±os en mÃ³vil */
    .category-nav {
        gap: 5px;
        padding: 6px 2%;
    }

    .cat-pill {
        padding: 5px 12px;
        font-size: 0.8rem;
        border-radius: 14px;
    }

    .cat-nav-container {
        margin-bottom: 8px;
    }

    /* Hacer los cuadros de productos mÃ¡s pequeÃ±os en mÃ³vil */
    .lux-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 15px 3%;
    }

    .lux-card .info {
        padding: 8px;
    }

    .lux-card .title {
        font-size: 0.8rem;
        height: 2.4rem;
        margin-bottom: 6px;
    }

    .lux-card .price {
        font-size: 1rem;
    }

    .lux-btn-cart {
        width: 32px;
        height: 32px;
        bottom: 8px;
        right: 8px;
        font-size: 0.85rem;
    }
}

/* --- RELATED PRODUCTS (MODAL) --- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.related-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.related-img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    padding: 10px;
}

.related-title {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-price {
    font-size: 0.95rem;
    color: var(--primary);
    /* Uses standard purple */
    font-weight: 800;
}

/* Header Layout Fixes */
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    gap: 20px;
    background: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .header-main {
        flex-wrap: wrap;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
}

/* --- BÃšSQUEDA Y SUGERENCIAS --- */
.search-wrapper {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    border-bottom: 1px solid #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-item i {
    color: #94a3b8;
    font-size: 0.9rem;
}

.suggestion-item strong {
    color: var(--text-main);
}

/* --- CONTADOR DE VISITAS --- */
.visitor-counter-container {
    text-align: center;
    margin: 40px auto 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(238, 90, 111, 0.1));
    border-radius: 15px;
    max-width: 600px;
}

.visitor-counter-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 600;
}

@keyframes visitorPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.visitor-counter-content .fa-fire {
    color: #ff6b6b;
    font-size: 1.5rem;
    animation: visitorPulse 2s infinite;
}

#visitorCounter {
    color: #ff6b6b;
    font-size: 1.3rem;
    font-weight: 800;
    transition: all 0.3s ease;
}

@media (max-width: 600px) {
    #visitorCounter {
        font-size: 1.1rem !important;
    }

    .visitor-counter-container {
        padding: 15px;
        margin: 20px 10px;
    }

    .visitor-counter-content {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.95rem;
    }
}

/* --- SKELETON SCREENS --- */
.skeleton {
    background: #e2e8f0;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 12px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

.skeleton-card {
    border-radius: 20px;
    background: white;
    padding: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1/1;
}

.skeleton-text {
    height: 20px;
    width: 80%;
    margin: 0 auto;
}

.skeleton-price {
    height: 30px;
    width: 50%;
    margin: 0 auto;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

/* --- RELATED PRODUCTS SECTION --- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.related-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.related-img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.related-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-info {
    padding: 10px;
}

.related-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4em;
    line-height: 1.2;
}

.related-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- LIGHTBOX (ZOOM FASE 6) --- */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 20001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    pointer-events: none;
}

/* Preloader Animations */
@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes progressSlide {
    0% {
        left: -100%;
        width: 30%;
    }

    50% {
        width: 60%;
    }

    100% {
        left: 100%;
        width: 30%;
    }
}

/* Image Zoom Effect */
.modal-main-photo,
.main-photo {
    overflow: hidden !important;
    position: relative;
    cursor: zoom-in;
}

.modal-main-photo img,
.main-photo img {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    transform-origin: center center;
}
