:root {
    --bg: #1e1f24;
    /* Corporate Gray */
    --panel: #2a2c33;
    --muted: #a7adbd;
    --text: #f2f5ff;
    --line: rgba(255, 255, 255, .08);
    --accent: #B6CC38;
    /* Corporate Green */
    --accent-dark: #a3b832;
    --accent-light: #e9f2c9;

    /* Premium Palette (Light Modal) */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --emerald-50: #f3f8e8;
    /* Adjusted for corporate green match */
    --emerald-100: #e9f2c9;
    --emerald-600: #89b12d;
    --emerald-700: #104a1d;
    /* Dark text from code.html */
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    background: radial-gradient(1200px 600px at 15% -10%, rgba(182, 204, 56, .12), transparent),
        radial-gradient(900px 500px at 100% 0%, rgba(255, 255, 255, .06), transparent),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.brand {
    font-weight: 900;
    letter-spacing: -0.8px;
    font-size: 22px;
    text-transform: uppercase;
    color: var(--accent);
}

.meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

/* Search Interface (Home) */
.search-container {
    max-width: 600px;
    margin: 40px auto;
    text-align: left;
}

.search-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.2;
}

.search-desc {
    color: var(--muted);
    margin-bottom: 30px;
    font-size: 15px;
}

.search-box {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 6px;
    display: flex;
    transition: all .3s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(182, 204, 56, 0.1);
}

.search-input {
    background: transparent;
    border: none;
    padding: 14px 20px;
    color: white;
    font-size: 16px;
    flex-grow: 1;
    outline: none;
}

.search-input::placeholder {
    color: var(--slate-500);
}

.btn--search {
    background: var(--accent);
    border: none;
    border-radius: 14px;
    padding: 0 24px;
    color: var(--slate-900);
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s;
}

.btn--search:active {
    transform: scale(0.95);
}

.btn--filter {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 20px;
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    transition: all .2s;
    margin-left: 6px;
}

.btn--filter:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.btn--filter:active {
    transform: scale(0.95);
}


@media (max-width: 768px) {
    .search-box {
        flex-wrap: wrap;
        padding: 8px;
        gap: 8px;
        background: rgba(255, 255, 255, 0.08);
        /* Ligeramente más visible en móvil */
    }

    .search-input {
        width: 100%;
        flex: none;
        padding: 16px;
        border-bottom: 1px solid var(--line);
        font-size: 17px;
        /* Mejor lectura en móvil */
    }

    .btn--search {
        flex: 6;
        /* 60% */
        height: 52px;
        padding: 0;
        font-size: 14px;
    }

    .btn--filter {
        flex: 4;
        /* 40% */
        height: 52px;
        margin-left: 0;
        padding: 0;
        font-size: 14px;
    }
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn--search-result {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 16px;
    color: white;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
}

.btn--search-result:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateX(4px);
}

.btn--search-result__type {
    background: var(--accent);
    color: var(--slate-900);
    font-size: 10px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.btn--search-result__title {
    font-size: 14px;
    font-weight: 700;
    flex-grow: 1;
}

.btn--search-result__ref {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Notice Modal (First Search Notice) */
.notice-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(12px);
    animation: fadeIn 0.2s ease-out;
}

.notice-modal {
    background: white;
    border-radius: 24px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    padding: 32px;
    animation: slideUp 0.3s ease-out;
}

.notice-modal__title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 900;
    color: var(--slate-900);
    line-height: 1.2;
}

.notice-modal__desc {
    margin: 0 0 24px;
    color: var(--slate-600);
    font-size: 15px;
    line-height: 1.6;
}

.notice-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn--notice-continue {
    background: var(--accent);
    color: var(--slate-900);
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.btn--notice-continue:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 204, 56, 0.3);
}

.btn--notice-details {
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.btn--notice-details:hover {
    background: var(--slate-200);
}

/* Filter Modal (Advanced Search Filters) */
.filter-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.filter-modal {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

.filter-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--slate-100);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    color: var(--slate-600);
    transition: all 0.2s;
}

.filter-modal__close:hover {
    background: var(--slate-200);
    transform: rotate(90deg);
}

.filter-modal__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
    color: var(--slate-900);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.filter-modal__desc {
    margin: 0 0 24px;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.5;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-field label {
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-field input {
    padding: 12px 16px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--slate-900);
    background: var(--slate-50);
    transition: all 0.2s;
}

.filter-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(182, 204, 56, 0.1);
    background: white;
}

.filter-field input::placeholder {
    color: var(--slate-400);
}

.filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn--filter-search {
    flex: 1;
    background: var(--accent);
    color: var(--slate-900);
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
}

.btn--filter-search:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 204, 56, 0.3);
}

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

.btn--filter-clear {
    flex: 1;
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
}

.btn--filter-clear:hover {
    background: var(--slate-200);
}

/* Product Card Search Results (Individual Product Cards) */
.product-card-search {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card-search:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.product-card-search__image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-search__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-search__info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card-search__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}

.product-card-search__ref {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.product-card-search__price {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--accent);
}

.btn--product-view {
    background: var(--accent);
    color: var(--slate-900);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.btn--product-view:hover {
    background: var(--accent-dark);
    transform: scale(1.02);
}

.btn--product-view:active {
    transform: scale(0.98);
}

@media (min-width: 640px) {
    .results-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Premium Product Landing (The Card itself) */
.p-landing {
    background: white;
    width: 100%;
    max-width: 672px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    /* Matches Reference */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.p-landing__scroll {
    overflow-y: visible;
}

/* Hero Section */
.p-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--slate-100);
    cursor: zoom-in;
}

.p-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Content */
.p-content {
    padding: 24px;
    color: var(--slate-900);
}

/* Botones de Navegación Modal (Flechas Premium Glass) */
.p-nav-btn {
    position: absolute;
    bottom: 15px;
    /* Bajadas a la base de la imagen como pidió */
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent);
    /* Verde corporativo solicitado */
    cursor: pointer;
    z-index: 1100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.p-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.p-nav-btn--prev {
    left: 20px;
}

.p-nav-btn--next {
    right: 20px;
}

/* Animación de entrada para contenido del modal al navegar */
@keyframes slideInProduct {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

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

.p-modal__scroll>* {
    animation: slideInProduct 0.4s ease-out;
}

/* Estado de carga interna del modal */
.p-modal--loading {
    opacity: 0.5;
    filter: blur(2px);
    pointer-events: none;
}

@media (max-width: 950px) {
    .p-nav-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        top: auto;
        transform: none;
        background: rgba(255, 255, 255, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }

    .p-nav-btn--prev {
        left: 15px;
        /* Más compacto en móvil */
        margin-left: 0;
    }

    .p-nav-btn--next {
        right: 15px;
        margin-right: 0;
    }
}

@media (min-width: 640px) {
    .p-content {
        padding: 32px;
    }
}

.p-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.p-title-wrap {
    flex-grow: 1;
}

.p-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: var(--emerald-700);
}

@media (min-width: 640px) {
    .p-title {
        font-size: 24px;
    }
}

.p-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #e8f5e1;
    color: #25622a;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.p-price-wrap {
    text-align: right;
    flex-shrink: 0;
}

.p-price-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: -0.2px;
    margin-bottom: 2px;
}

.p-price-val {
    font-size: 22px;
    font-weight: 900;
    white-space: nowrap;
}

.p-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--slate-600);
    font-weight: 500;
    margin: 0 0 24px;
}

/* Specs */
.p-section-title {
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--slate-800);
    border-bottom: 1px solid var(--slate-100);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.p-specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 32px;
}

@media (min-width: 640px) {
    .p-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.p-spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--slate-50);
    padding: 12px 16px;
    border-radius: 12px;
}

.p-spec-icon {
    width: 22px;
    height: 22px;
    background: #eef5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4d7c0f;
}

.p-spec-icon svg {
    width: 14px;
    height: 14px;
}

.p-spec-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-600);
}

.p-spec-text span {
    color: var(--slate-900);
}

/* Featured Buttons */
/* Featured CTAs (Regla 9) */
.p-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn--p-main {
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn--p-main:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.btn--p-sec {
    background: #E2E8F0;
    /* Slate 200 (Gray) */
    color: #475569;
    /* Slate 600 */
    border: none;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.btn--p-sec:hover {
    background: #CBD5E1;
}

.btn--p-sec-hidden {
    background: #F1F5F9;
    color: #94A3B8;
}

/* Variants List (Minimalist Regla 7B) */
.p-variants-list {
    margin-top: 32px;
    border-top: 1px solid var(--slate-100);
    padding-top: 24px;
    animation: fadeIn 0.4s ease-out;
}

.p-variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--slate-50);
}

.p-v-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.p-v-ref {
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-900);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.p-v-detail {
    font-size: 11px;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-v-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--emerald-600);
}

.p-v-actions {
    display: flex;
    gap: 8px;
    padding-left: 16px;
}

.btn--v-img-simple,
.btn--v-cot-simple {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn--v-img-simple {
    background: white;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}

.btn--v-img-simple:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
}

.btn--v-cot-simple {
    background: #25D366;
    color: white;
    border: none;
}

.btn--v-cot-simple:hover {
    background: #128C7E;
}

.btn--v-img:hover {
    background: #eef5e1;
}

/* Search More Button */
.p-search-more {
    text-align: center;
    margin-top: 24px;
    padding: 12px;
}

.btn--search-more {
    background: #f1f5f9;
    color: #475569;
    border: 1px dashed #cbd5e1;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn--search-more:hover {
    background: white;
    border-color: var(--accent);
    color: var(--accent-dark);
    transform: translateY(-2px);
}

.btn--v-cot {
    background: #e9f2c9;
    color: #19330a;
    border: 1px solid var(--accent);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.btn--v-img {
    background: #e9f2c9;
    color: #19330a;
    border: 1px solid var(--accent);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

/* Zoom Overlay */
.zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
    backdrop-filter: blur(10px);
}

.zoom-overlay img {
    max-width: min(92vw, 960px);
    max-height: 86vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
    background: white;
}

.zoom-overlay__close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--slate-900);
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 24px;
}

/* Helpers */
.btn:active {
    transform: scale(0.95);
}

.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-weight: 600;
}

.error {
    color: #ffb4b4;
    text-align: center;
    padding: 40px;
}

/* === NEW TABLE VIEW STYLES (Requirement 3) === */

.search-wrap-dark {
    background-color: #4C4D4D;
    /* Fixed dark background */
    padding: 40px 20px;
    border-radius: 20px;
    margin: 20px auto;
    max-width: 900px;
}

/* Adjust contained search-container */
.search-wrap-dark .search-container {
    max-width: 100%;
    margin: 0;
    text-align: left;
}

.results-table-container {
    margin-top: 30px;
}

/* Table Grid Layout */
.table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 80px;
    /* Desc | Ref | Cat | Action */
    padding: 10px 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
    gap: 12px;
}

.th-col {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.th-action {
    text-align: right;
}

.th-cat {
    text-align: center;
}

.th-ref {
    text-align: center;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 80px;
    align-items: center;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    /* Darker row for contrast on 4C4D4D */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 6px;
    gap: 12px;
}

.table-row:hover {
    background: rgba(182, 204, 56, 0.1);
    /* Accent hover */
    border-color: var(--accent);
}

/* Columns */
.td-col {
    font-size: 13px;
    color: white;
}

.td-desc {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-ref,
.td-cat {
    text-align: center;
    color: var(--slate-400);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-action {
    text-align: right;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.page-info {
    font-size: 14px;
    font-weight: 700;
    color: white;
    min-width: 100px;
    text-align: center;
}

.btn--page {
    background: #B6CC38;
    /* Decology Green */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn--page:hover:not(:disabled) {
    background: #a3b832;
    transform: translateY(-1px);
}

.btn--page:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.btn--table-view {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.table-row:hover .btn--table-view {
    background: var(--accent);
    color: var(--slate-900);
}

/* Responsive Table */
@media (max-width: 600px) {
    .table-header {
        display: none;
    }

    .table-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .td-ref,
    .td-cat {
        display: none;
    }

    /* Hide extra cols on mobile */

    .td-desc {
        font-size: 14px;
    }
}

/* === PREMIUM SUGGESTION ALERT (Yellow Theme) === */
.suggestion-banner {
    background: #FFFBEB;
    /* Dim Yellow */
    border: 1px solid #FEF3C7;
    /* Subtle Yellow Border */
    border-radius: 16px;
    padding: 20px 24px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.3s ease-out;
}

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

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

.suggestion-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.suggestion-content p {
    margin: 0;
    font-size: 14px;
    color: #92400E;
    /* Dark legible text */
    font-weight: 500;
    line-height: 1.5;
}

.suggestion-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn--suggestion-ok {
    background: #B6CC38;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn--suggestion-ok:hover {
    background: #a3b832;
}

.btn--suggestion-close {
    background: #E1E4E8;
    color: #4C4D4D;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn--suggestion-close:hover {
    background: #D1D5DA;
}

@media (max-width: 600px) {
    .suggestion-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .suggestion-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .suggestion-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* === PREMIUM MODAL REFINEMENTS (card decology.png style) === */

.p-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.p-modal {
    background: #F4F5F7;
    /* Light gray background from mockup */
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

.p-modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    /* Back to Right as requested */
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    font-size: 22px;
    color: #1A1D1E;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.p-modal__close:hover {
    transform: scale(1.1);
}

.p-modal__scroll {
    overflow-y: auto;
}

.p-hero {
    width: 100%;
    height: 350px;
    background: #e8ebf0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 600px) {
    .p-hero {
        height: 280px;
        /* Reduced for mobile */
    }
}

/* Adjust title wrap to avoid overlap with X/Price if very long */
.p-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
}

.p-title-wrap {
    flex: 1;
    padding-right: 40px;
    /* Safe space for floating elements */
}

.p-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p-content {
    padding: 40px;
}

.p-title {
    font-size: 28px;
    font-weight: 800;
    color: #1A1D1E;
    margin-bottom: 12px;
}

.p-badge {
    background: #EBF2D1;
    color: #6B7C1E;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 24px;
}

.p-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #4C4D4D;
    margin-bottom: 32px;
}

.p-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #1A1D1E;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 40px;
}

.p-spec-item {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.p-spec-icon {
    width: 24px;
    height: 24px;
    background: #EBF2D1;
    color: #6B7C1E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.p-spec-text {
    font-size: 14px;
    font-weight: 700;
    color: #1A1D1E;
}

.p-spec-text span {
    font-weight: 500;
    color: #4C4D4D;
    margin-left: 4px;
}

.p-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn--p-main {
    background: #B6CC38;
    /* Decology Green */
    color: white;
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.btn--p-main:hover {
    background: #a3b832;
    transform: translateY(-2px);
}

.btn--p-sec {
    background: #E1E4E8;
    color: #1A1D1E;
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.btn--p-sec:hover {
    background: #D1D5DA;
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .p-specs-grid {
        grid-template-columns: 1fr;
    }

    .p-actions {
        grid-template-columns: 1fr;
    }

    .p-modal {
        width: 100%;
        /* Cambiado de vw a % para evitar scrollbar issues */
        max-width: none;
        border-radius: 0;
        max-height: 100dvh;
        height: 100dvh;
        margin: 0;
        z-index: 2001;
        overflow-x: hidden;
        overflow-y: auto !important;
        /* Enable scroll if content exceeds 100dvh */
        -webkit-overflow-scrolling: touch;
    }

    .p-modal-overlay {
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: flex-start;
        /* Align to top for better scrolling start */
        justify-content: center;
        backdrop-filter: blur(4px);
        overflow-x: hidden;
    }

    .p-content {
        padding: 24px 20px 80px;
        /* Space for WhatsApp button */
    }

    /* Fix table responsiveness in Public Catalog Detail */
    .table-container {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }

    .table-row {
        min-width: 500px;
        /* Ensure columns don't collapse */
        gap: 8px;
        padding: 12px 10px;
    }

    .td-col.td-desc {
        font-size: 13px;
    }

    /* Center search interface and prevent overflow */
    .search-wrap-dark {
        padding: 20px 10px;
        width: 100%;
        overflow-x: hidden;
    }

    /* Variant Card Actions */
    .btn--v-img-simple,
    .btn--v-details-simple,
    .btn--v-cot-simple {
        padding: 10px;
        border-radius: 8px;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        cursor: pointer;
        flex: 1;
        border: none;
        transition: all 0.2s;
    }

    .btn--v-img-simple {
        background: #f1f5f9;
        color: #475569;
    }

    .btn--v-details-simple {
        background: #e9f2c9;
        /* Light Green */
        color: #104a1d;
        /* Dark Green */
    }

    .btn--v-cot-simple {
        background: #B6CC38;
        color: white;
    }

    .btn--v-img-simple:hover,
    .btn--v-details-simple:hover,
    .btn--v-cot-simple:hover {
        transform: translateY(-2px);
        filter: brightness(0.95);
    }

    .p-title {
        font-size: 22px;
    }
}

/* =========================================
   ADMIN PORTAL STYLES (Phase 1)
   ========================================= */

.admin-auth-wrap {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #2a2c33 0%, #1a1b1f 100%);
    z-index: 3000;
}

.auth-card {
    background: #24252a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo img {
    height: 48px;
}

.auth-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    color: white;
}

.auth-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.field-group input {
    width: 100%;
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: white;
    font-size: 16px;
    transition: all 0.3s;
}

.field-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(182, 204, 56, 0.1);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    font-size: 13px;
}

.chk-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--muted);
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.btn--auth-submit {
    width: 100%;
    background: var(--accent);
    color: #1a1b1f;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.btn--auth-submit:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(182, 204, 56, 0.2);
}

.btn--auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-error-msg {
    margin-top: 20px;
    background: rgba(220, 38, 38, 0.1);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* DASHBOARD LAYOUT */

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #141518;
}

.admin-sidebar {
    width: 280px;
    background: #1a1b1f;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 32px;
}

.sidebar-logo {
    height: 32px;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 0 16px;
}

.nav-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.nav-item.active {
    background: rgba(182, 204, 56, 0.1);
    color: var(--accent);
}

.sidebar-footer {
    padding: 24px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-pill {
    background: #24252a;
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.u-name {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: white;
}

.u-role {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
}

#btnLogout {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

#btnLogout:hover {
    background: rgba(255, 255, 255, 0.05);
}

.admin-main {
    flex-grow: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-context {
    font-size: 18px;
    font-weight: 900;
    color: white;
}

.admin-view-content {
    padding: 40px;
}

.welcome-card {
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
}

.welcome-card h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.welcome-card p {
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto 12px;
}

@media (max-width: 900px) {
    .admin-sidebar {
        display: none;
    }

    .admin-main {
        margin-left: 0;
    }
}

/* Stats Cards (Dashboard) */
.stat-card {
    background: #24252a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.stat-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent);
}

/* View Placeholders */
.view-placeholder {
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 64px;
    text-align: center;
}

.view-placeholder h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.view-placeholder p {
    color: var(--muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 8px;
}

.view-placeholder .meta {
    margin-top: 24px;
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
}

/* Admin Tables and Data Views */
.admin-content-header {
    margin-bottom: 32px;
}

.admin-content-header h2 {
    margin-bottom: 8px;
}

.view-loading,
.view-error {
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
}

.view-error {
    border-color: rgba(239, 68, 68, 0.3);
}

.stores-table-wrap {
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #24252a;
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 1px;
}

.data-table td {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table code {
    background: rgba(182, 204, 56, 0.1);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.inline-edit {
    background: #24252a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 14px;
    width: 100%;
    max-width: 200px;
}

.inline-edit:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-table-save {
    background: var(--accent);
    color: #1a1b1f;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-table-save:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* User Management Styles */
.btn--accent {
    background: var(--accent);
    color: #1a1b1f;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.btn--accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #24252a;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.role-super {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.role-admin {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.role-editor {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 21, 24, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.modal-card {
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
}

.modal-card h3 {
    margin-bottom: 24px;
}

/* Variant Row Buttons */
.btn--v-img-simple,
.btn--v-cot-simple,
.btn--v-details-simple {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn--v-img-simple {
    background: rgba(255, 255, 255, 0.05);
    color: var(--slate-400);
    border: 1px solid var(--line);
}

.btn--v-img-simple:hover {
    background: white;
    color: var(--slate-900);
}

.btn--v-cot-simple {
    background: var(--accent);
    color: var(--slate-900);
}

.btn--v-cot-simple:hover {
    background: var(--accent-dark);
}

.btn--v-details-simple {
    background: transparent;
    color: var(--slate-200);
    border: 1px solid var(--slate-500);
}

.btn--v-details-simple:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.p-v-actions {
    display: flex;
    gap: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions button {
    flex: 1;
}

/* === Placeholder Styles === */
.p-hero img.img-placeholder {
    object-fit: contain;
    padding: 60px;
    /* Generous padding for logos */
    background-color: #f9fafb;
    /* Light background to frame the logo */
    opacity: 0.9;
}

/* Ensure variants grid images also look good if they are placeholders */
.btn--v-img-simple[data-is-placeholder="true"],
.btn--v-img-simple.img-placeholder {
    /* Styles for buttons/thumbnails if needed contextually */
}

/* =========================================
   ADMIN RESPONSIVE LAYOUT & COMPONENTS
   ========================================= */

/* Mobile Navigation Toggle (Sandwich) */
.admin-mobile-nav-toggle {
    display: none;
    /* Hidden on desktop */
}

/* Overlay for Mobile Menu */
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1900;
}

.admin-overlay.active {
    display: block;
}

@media (max-width: 900px) {
    .admin-layout {
        display: block !important;
        /* Stack columns */
    }

    .admin-sidebar {
        display: block !important;
        /* Always render, hide via transform */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 2000;
        background: var(--panel);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        background: var(--panel);
        border-bottom: 1px solid var(--line);
        margin-bottom: 20px;
        position: relative;
        z-index: 100;
    }

    .admin-mobile-nav-toggle {
        display: block;
        background: transparent;
        border: none;
        color: white;
        font-size: 28px;
        cursor: pointer;
        padding: 5px;
    }
}

/* Responsive Grid for Sets */
.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .sets-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
    }
}

/* Set Card Improvements (Look Decology - Light Theme) */
.set-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.set-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.set-cover {
    height: 180px;
    /* Taller aspect ratio */
    background: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
}

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

.set-info {
    padding: 20px;
}

.set-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1b1f;
    /* Dark text for light theme */
}

.set-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    font-size: 12px;
    color: #64748b;
}

.badge-id {
    color: #15803d;
    /* Green text */
    background: #dcfce7;
    /* Light green bg */
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
}

/* Admin Workspace (Edit View) Responsive */
.set-workspace {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .set-workspace {
        grid-template-columns: 1fr;
        /* Stack meta panel and products */
    }
}

.set-meta-panel,
.set-products-panel-inner {
    background: #ffffff;
    /* Light theme */
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Product Row in Admin */
.p-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #1a1b1f;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.p-row:hover {
    background: #2a2c33;
}

.p-row img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .p-row {
        flex-wrap: wrap;
        /* Allow wrapping on small screens */
    }

    .p-row-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        margin-top: 10px;
    }
}

/* Modal Search Styles (Admin) */
.search-modal-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    padding: 20px;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
}

/* GLOBAL BUTTON STYLES (Moved out of nesting) */
.btn--v-details-simple {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #333 !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    margin: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.btn--v-details-simple:hover {
    background: #000 !important;
    transform: translateY(-2px);
    color: var(--accent) !important;
}

/* Botón Volver (Nuevo) */
.btn-back-floating {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-back-floating:hover {
    background: black;
    transform: scale(1.05);
}

/* Ensure Sidebar is Dark and Full Screen on Mobile */
@media (max-width: 900px) {
    .admin-sidebar {
        background: #1a1b1f !important;
        /* Force Dark */
        top: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        max-width: 80vw;
    }

    .admin-overlay {
        z-index: 1099;
        /* Below sidebar (2000) but above everything else */
    }

    .admin-mobile-header {
        position: relative;
        z-index: 100;
        background: #1a1b1f !important;
        /* Match sidebar */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.search-modal {
    background: #24252a;
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    padding: 20px;
    margin-top: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* PATCH: Fix Mobile Z-Index & Overlay */
@media (max-width: 900px) {
    .admin-sidebar {
        z-index: 9999 !important;
        display: flex !important;
    }

    .admin-overlay {
        z-index: 9998 !important;
    }

    .admin-mobile-header {
        position: relative;
        z-index: 9990 !important;
    }
}

/* Fix12-2: Details Button Visibility */
.btn--v-details-simple {
    display: inline-block !important;
    background: #333;
    color: white;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s;
}

.btn--v-details-simple:hover {
    background: #555;
    text-decoration: none;
}

/* =========================================
   DCL SINGLE CARD (View=Product Special)
   ========================================= */

/* =========================================
   DCL SINGLE CARD (View=Product Special)
   ========================================= */

.dcl-single-card {
    background: white;
    width: 100%;
    max-width: 600px;
    /* Slightly narrower like modal */
    margin: 40px auto;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 32px;
    /* Smoother roundness */
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4);
    font-family: 'Manrope', sans-serif;
}

.dcl-hero {
    position: relative;
    width: 100%;
    height: 320px;
    /* Fixed height for consistency */
    background: var(--slate-100);
}

.dcl-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dcl-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #4b5563;
    z-index: 10;
    transition: transform 0.2s, background 0.2s;
}

.dcl-close:hover {
    transform: scale(1.1);
    background: #fff;
}

.dcl-body {
    padding: 32px 40px 40px;
    color: #1f2937;
}

.dcl-top {
    margin-bottom: 24px;
}

.dcl-title {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    letter-spacing: -0.5px;
}

.dcl-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    background: #ecfccb;
    /* Light lime green */
    color: #3f6212;
    /* Dark lime green */
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.dcl-desc {
    color: #4b5563;
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.6;
}

.dcl-specs-title {
    font-size: 12px;
    font-weight: 800;
    color: #6b7280;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dcl-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 40px;
}

.dcl-spec {
    background: #f3f4f6;
    /* Gray-100 */
    padding: 12px 16px;
    border-radius: 8px;
    /* Slightly rounded */
    display: flex;
    align-items: center;
    gap: 10px;
}

.dcl-spec__icon {
    color: #84cc16;
    /* Lime-500 */
    font-weight: 900;
    font-size: 14px;
    display: flex;
    /* Fix alignment */
    align-items: center;
}

.dcl-spec__label {
    font-weight: 800;
    color: #1f2937;
    font-size: 13px;
}

.dcl-spec__value {
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
}

.dcl-actions {
    display: flex;
    gap: 12px;
}

.dcl-btn {
    flex: 1;
    padding: 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dcl-btn--primary {
    background: #a3b832;
    /* The exact mockup green */
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(163, 184, 50, 0.3);
}

.dcl-btn--primary:hover {
    background: #8fa32a;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(163, 184, 50, 0.4);
}

.dcl-btn--secondary {
    background: #e5e7eb;
    /* Gray-200 */
    color: #1f2937;
    /* Gray-800 */
}

.dcl-btn--secondary:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .dcl-single-card {
        border-radius: 0;
        max-width: 100%;
        margin: 0;
        box-shadow: none;
        min-height: 100vh;
    }

    .dcl-specs {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dcl-actions {
        flex-direction: column;
    }

    .dcl-hero {
        height: 260px;
    }

    .dcl-body {
        padding: 24px;
    }

    .dcl-title {
        font-size: 22px;
    }
}

/* Card individual (view=product) — estilo modal/card premium */
/* Card individual (view=product) — estilo modal/card premium */
.dcl-product-card {
    max-width: 672px;
    /* Requested 42rem */
    width: 100%;
    background: #fff;
    border-radius: 2.5rem;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    position: relative;
    animation: dclIn .25s ease both;
    margin: 40px auto;
}

/* ... skipped keyframes ... */

/* Responsive Media Heights */
.dcl-media {
    height: 16rem;
    /* 256px - Mobile Base */
    width: 100%;
    overflow: hidden;
    background: #f0f0f0;
    cursor: zoom-in;
    /* Indicate clickable */
}

@media (min-width: 640px) {
    .dcl-media {
        height: 20rem;
        /* 320px - SM */
    }
}

@media (min-width: 768px) {
    .dcl-media {
        height: 480px;
        /* 480px - MD/Desktop */
    }
}

.dcl-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.dcl-media:hover .dcl-media-img {
    transform: scale(1.03);
    /* Subtle zoom effect */
}

.dcl-body {
    padding: 24px 24px 30px;
}

@media(min-width: 768px) {
    .dcl-body {
        padding: 34px 40px 40px;
    }
}

.dcl-title {
    font-size: 32px;
    line-height: 1.1;
    margin: 0 0 16px;
    color: #111827;
    font-weight: 800;
    text-transform: none;
    letter-spacing: -0.5px;
}

.dcl-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #e6f4ea;
    color: #1e4620;
    font-size: 11px;
    font-weight: 800;
    border-radius: 100px;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.dcl-desc {
    margin-top: 16px;
    color: #64748b;
    line-height: 1.7;
    font-size: 15px;
}

.dcl-specs {
    margin-top: 22px;
}

.dcl-specs-title {
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .18em;
    margin: 0 0 10px;
}

.dcl-specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media(min-width: 768px) {
    .dcl-specs-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dcl-spec {
    background: #f0f2f5;
    padding: 12px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: .15s;
}

.dcl-spec:hover {
    background: #e9edf2;
}

.dcl-check {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9eb544;
    font-weight: 900;
}

.dcl-spec-label {
    font-weight: 800;
    color: #1f2937;
    font-size: 14px;
}

.dcl-spec-value {
    color: #64748b;
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.dcl-actions {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media(min-width: 640px) {
    .dcl-actions {
        flex-direction: row;
    }
}

.dcl-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 18px;
    border-radius: 14px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 12px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}

.dcl-btn-primary {
    background: #adb54d;
    color: #fff;
    box-shadow: 0 14px 30px rgba(173, 181, 77, .22);
}

.dcl-btn-primary:hover {
    background: #9fa745;
}

.dcl-btn-secondary {
    background: #e5e9ef;
    color: #334155;
}

.dcl-btn-secondary:hover {
    background: #dde2e9;
}

/* Set Landing Variant Pills */
.variant-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.variant-pill b {
    color: #1e293b;
    font-weight: 700;
    margin-right: 4px;
}

/* Small fix for mobile rendering of card container */
@media (max-width: 600px) {
    .dcl-product-card {
        border-radius: 0;
        min-height: 100vh;
        margin: 0;
        box-shadow: none;
    }
}