/* =============================================
   MUMILAB 3D – CATÁLOGO DE PRECIOS
   Premium Dark Theme with Brand Colors
   ============================================= */

/* --- Design Tokens --- */
:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #12121e;
    --bg-card: rgba(22, 22, 38, 0.75);
    --bg-card-hover: rgba(30, 30, 52, 0.9);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(80, 120, 255, 0.35);

    --text-primary: #f0f0f5;
    --text-secondary: #9095a8;
    --text-muted: #5a5f72;

    /* Brand colors from logo: blue + magenta/purple + gold */
    --brand-blue: #3366ff;
    --brand-purple: #b83dba;
    --brand-gold: #f5b731;

    --accent: var(--brand-blue);
    --accent-light: #5580ff;
    --accent-glow: rgba(51, 102, 255, 0.3);
    --gradient-brand: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    --gradient-gold: linear-gradient(135deg, var(--brand-gold), #e6a020);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 12px 48px rgba(51, 102, 255, 0.15), 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(51, 102, 255, 0.12);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Animated Background --- */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(51, 102, 255, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(184, 61, 186, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 50% 100%, rgba(245, 183, 49, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.bg-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--brand-blue);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite ease-in-out;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    25% { opacity: 0.4; }
    50% { opacity: 0.2; transform: translateY(-100vh) scale(1); }
    75% { opacity: 0.1; }
}

/* --- Header --- */
.header {
    width: 100%;
    max-width: 1320px;
    padding: 2.5rem 2rem 0;
    animation: slideDown 0.8s var(--transition-smooth) backwards;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

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

/* --- Logo --- */
.logo-container {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-smooth);
}

.logo-container:hover img {
    transform: scale(1.05);
}

.logo-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-brand);
    z-index: 0;
    animation: logoSpin 12s linear infinite;
    opacity: 0.6;
}

@keyframes logoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Header Text --- */
.header-text {
    text-align: left;
}

.header-text h1 {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--text-primary);
}

.header-text h1 .highlight {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.25rem;
    letter-spacing: 0.3px;
}

/* --- Toolbar --- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.search-container {
    flex: 1;
    min-width: 220px;
    max-width: 420px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-container:focus-within .search-icon {
    color: var(--accent);
}

#searchInput {
    width: 100%;
    padding: 0.7rem 2.5rem 0.7rem 2.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}

#searchInput::placeholder {
    color: var(--text-muted);
}

#searchInput:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 6px;
    display: none;
    transition: color var(--transition-fast);
}

.search-clear.visible {
    display: block;
}

.search-clear:hover {
    color: var(--text-primary);
}

/* --- Buttons --- */
.admin-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-edit {
    border-color: var(--accent);
    color: var(--accent-light);
}

.btn-edit:hover {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-edit.active {
    background: var(--gradient-brand);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.btn-reset {
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
}

.btn-reset:hover {
    background: rgba(255, 80, 80, 0.15);
    color: #ff4040;
}

.btn-export-data {
    border-color: rgba(80, 200, 120, 0.35);
    color: #50c878;
}

.btn-export-data:hover {
    background: rgba(80, 200, 120, 0.15);
    color: #40e070;
    box-shadow: 0 0 20px rgba(80, 200, 120, 0.15);
}

.btn-sync {
    border-color: rgba(51, 102, 255, 0.35);
    color: var(--accent-light);
}

.btn-sync:hover {
    background: rgba(51, 102, 255, 0.15);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* --- Category Tabs --- */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.tab.active {
    background: var(--gradient-brand);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 12px var(--accent-glow);
}

/* --- Product Counter --- */
.product-counter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

#visibleCount {
    color: var(--accent-light);
    font-weight: 700;
}

/* --- Catalog Grid --- */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1320px;
    padding: 0.5rem 2rem 4rem;
}

/* --- Product Card --- */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all var(--transition-smooth);
    position: relative;
    animation: cardAppear 0.6s var(--transition-smooth) backwards;
    box-shadow: var(--shadow-card);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-hover);
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-card:hover .product-image .img-overlay {
    opacity: 1;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Product Image --- */
.product-image {
    width: 100%;
    height: 240px;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.product-image img {
    transition: transform var(--transition-smooth), opacity 0.2s ease;
}

.product-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 18, 0.7), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
}

.img-overlay svg {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    padding: 8px;
    width: 40px;
    height: 40px;
    color: white;
    transition: transform var(--transition-bounce);
}

.img-overlay:hover svg {
    transform: scale(1.15);
}

/* Category Badge */
.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.3rem 0.7rem;
    background: rgba(10, 10, 18, 0.65);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(51, 102, 255, 0.2);
    z-index: 5;
}

/* Image URL editor */
.editable-img-url {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px dashed var(--accent);
    color: white;
    padding: 6px 8px;
    font-size: 11px;
    font-family: inherit;
    border-radius: var(--radius-sm);
    display: none;
    z-index: 10;
    outline: none;
}

body.editing .editable-img-url {
    display: block;
}

/* Image file input */
.editable-img-file {
    position: absolute;
    bottom: 40px;
    left: 10px;
    right: 10px;
    display: none;
    z-index: 10;
}

body.editing .editable-img-file {
    display: block;
}

.editable-img-file label {
    display: block;
    padding: 6px 8px;
    background: rgba(51, 102, 255, 0.2);
    border: 1px dashed var(--accent);
    color: var(--accent-light);
    font-size: 11px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.editable-img-file label:hover {
    background: rgba(51, 102, 255, 0.35);
}

.editable-img-file input[type="file"] {
    display: none;
}

/* --- Gallery Strip (Color Variants) --- */
.gallery-strip {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    align-items: center;
    z-index: 8;
    padding: 6px 8px;
    background: rgba(10, 10, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    opacity: 0;
    transform: translateY(6px);
}

.gallery-strip::-webkit-scrollbar { display: none; }

.product-card:hover .gallery-strip,
body.editing .gallery-strip {
    opacity: 1;
    transform: translateY(0);
}

.gallery-thumb {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--bg-secondary);
    padding: 0;
    transition: all var(--transition-fast);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

.gallery-thumb.active {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.gallery-thumb-remove {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: rgba(255, 50, 50, 0.9);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    display: none;
    transition: transform var(--transition-fast);
}

body.editing .gallery-thumb-remove {
    display: block;
}

.gallery-thumb-remove:hover {
    transform: scale(1.2);
    background: #ff2020;
}

.gallery-add-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px dashed var(--accent);
    background: rgba(51, 102, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent-light);
    transition: all var(--transition-fast);
}

.gallery-add-thumb:hover {
    background: rgba(51, 102, 255, 0.25);
    transform: scale(1.08);
}

/* Gallery count badge */
.gallery-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.2rem 0.55rem;
    background: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--brand-gold);
    border: 1px solid rgba(245, 183, 49, 0.25);
    z-index: 5;
    letter-spacing: 0.3px;
}

/* Adjust gallery strip in editing mode (move above edit controls) */
body.editing .gallery-strip {
    bottom: 72px;
    opacity: 1;
    transform: translateY(0);
}

body.editing .gallery-count-badge {
    display: none;
}

/* --- Product Info --- */
.product-info {
    padding: 1.25rem 1.5rem 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    outline: none;
    line-height: 1.35;
    transition: color var(--transition-fast);
}

.product-card:hover .product-name {
    color: white;
}

body.editing .product-name {
    border-bottom: 1px dashed var(--accent);
    padding-bottom: 4px;
}

/* Category Selector in Edit Mode */
.category-select {
    display: none;
    width: 100%;
    padding: 5px 8px;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

body.editing .category-select {
    display: block;
}

/* --- Pricing Table --- */
.pricing-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background var(--transition-fast);
}

.price-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.best-value {
    background: rgba(51, 102, 255, 0.08);
}

.qty-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qty-label .qty-icon {
    color: var(--text-muted);
    opacity: 0.6;
}

.price-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-light);
    display: flex;
    align-items: center;
    gap: 2px;
    font-variant-numeric: tabular-nums;
}

.price-row.best-value .price-value {
    color: var(--brand-gold);
}

.best-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--gradient-gold);
    color: #1a1a2e;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
    letter-spacing: 0.5px;
}

.price-value span[contenteditable="true"] {
    outline: none;
    min-width: 40px;
    text-align: right;
}

body.editing .price-value span[contenteditable="true"] {
    background: rgba(51, 102, 255, 0.12);
    border-bottom: 1px dashed var(--accent);
    padding: 0 4px;
    border-radius: 2px;
}

/* --- Delete Button --- */
.delete-card-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 50, 50, 0.85);
    backdrop-filter: blur(8px);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-fast);
}

.delete-card-btn:hover {
    background: #ff2020;
    transform: scale(1.15);
}

body.editing .delete-card-btn {
    display: flex;
}

/* --- Add Card Button --- */
.add-card-btn {
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    min-height: 380px;
    transition: all var(--transition-smooth);
}

body.editing .add-card-btn {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-card-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(51, 102, 255, 0.04);
    transform: translateY(-3px);
}

.add-card-btn svg {
    transition: transform var(--transition-bounce);
}

.add-card-btn:hover svg {
    transform: scale(1.2) rotate(90deg);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.5s ease-out;
}

.empty-state p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.empty-state span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Lightbox with Gallery Navigation --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(24px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    cursor: pointer;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* Lightbox Content */
.lightbox-content {
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: zoomIn 0.3s var(--transition-smooth);
}

@keyframes zoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 72vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lightbox-caption {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

/* Lightbox Dots */
.lightbox-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-fast);
}

.lightbox-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.lightbox-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    transform: scale(1.3);
}

/* Lightbox Counter */
.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(10, 10, 18, 0.6);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-xl);
}

/* --- WhatsApp FAB --- */
.whatsapp-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 100;
    transition: all var(--transition-bounce);
    text-decoration: none;
    animation: fabPulse 3s infinite ease-in-out;
}

.whatsapp-fab:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 999;
    transition: bottom var(--transition-bounce);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.show {
    bottom: 5rem;
}

/* --- Quote Banner --- */
.quote-banner {
    width: 100%;
    max-width: 1320px;
    padding: 0 2rem 2rem;
}

.quote-banner-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.quote-banner-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(51, 102, 255, 0.08), rgba(184, 61, 186, 0.06), rgba(245, 183, 49, 0.04));
    pointer-events: none;
}

.quote-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.quote-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.quote-text h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.quote-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #25d366;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
}

.quote-btn:hover {
    background: #1fbf5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.35);
}

@media (max-width: 768px) {
    .quote-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .quote-banner {
        padding: 0 1rem 2rem;
    }
}

/* --- Footer --- */
.footer {
    margin-top: auto;
    width: 100%;
    padding: 3rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(to top, rgba(10, 10, 18, 0.9), transparent);
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-brand span {
    font-weight: 700;
    font-size: 1rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.footer-cta {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-light);
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1rem 0;
    }

    .header-inner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .header-text {
        text-align: center;
    }

    .header-text h1 {
        font-size: 2rem;
    }

    .logo-container {
        width: 75px;
        height: 75px;
    }

    .toolbar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-container {
        max-width: 100%;
    }

    .admin-controls {
        width: 100%;
        justify-content: center;
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
        padding: 0.5rem 1rem 4rem;
    }

    .product-image {
        height: 200px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 0.75rem;
    }

    .lightbox-next {
        right: 0.75rem;
    }

    .gallery-strip {
        gap: 4px;
        padding: 4px 6px;
    }

    .gallery-thumb,
    .gallery-add-thumb {
        width: 34px;
        height: 34px;
    }

    .whatsapp-fab {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.7rem;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .btn span {
        display: none;
    }

    .btn {
        padding: 0.6rem 0.7rem;
    }
}

@media (min-width: 1400px) {
    .catalog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =============================================
   PRINT / PDF STYLES – Digital Version
   Mantiene la estética dark premium para envío digital
   ============================================= */

@media print {
    /* Force dark background to render in PDF */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    body {
        background-color: var(--bg-primary) !important;
        color: var(--text-primary) !important;
        -webkit-print-color-adjust: exact !important;
    }

    /* Hide interactive-only elements */
    .bg-particles, .admin-controls, .add-card-btn,
    .editable-img-url, .editable-img-file, .delete-card-btn,
    .whatsapp-fab, .toast, .lightbox, .search-container,
    .category-tabs, .product-counter, .btn-reset,
    .img-overlay, .category-select, .toolbar,
    .gallery-strip, .gallery-count-badge, .gallery-add-thumb,
    .gallery-thumb-remove, .lightbox-nav, .lightbox-dots,
    .lightbox-counter {
        display: none !important;
    }

    /* Keep the animated background as a static gradient */
    .bg-mesh {
        position: fixed !important;
        display: block !important;
        background:
            radial-gradient(ellipse 80% 50% at 20% 0%, rgba(51, 102, 255, 0.15) 0%, transparent 60%),
            radial-gradient(ellipse 60% 40% at 80% 10%, rgba(184, 61, 186, 0.12) 0%, transparent 50%) !important;
    }

    /* Header */
    .header {
        padding: 2rem 1.5rem 1rem !important;
    }

    .header-inner {
        margin-bottom: 1.5rem !important;
    }

    .logo-container {
        width: 80px !important;
        height: 80px !important;
    }

    .logo-ring {
        display: block !important;
        animation: none !important;
        opacity: 0.7 !important;
    }

    .header-text h1 {
        font-size: 2.2rem !important;
        color: var(--text-primary) !important;
    }

    .header-text h1 .highlight {
        color: var(--accent-light) !important;
        background: none !important;
        -webkit-background-clip: initial !important;
    }

    .subtitle {
        color: var(--text-secondary) !important;
    }

    /* Grid layout */
    .catalog-grid {
        padding: 0 1.5rem 2rem !important;
        gap: 1.2rem !important;
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Cards – keep dark style */
    .product-card {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: var(--radius-lg) !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: none !important;
        animation: none !important;
        transform: none !important;
    }

    /* Category badge */
    .category-badge {
        display: inline-flex !important;
        background: rgba(10, 10, 18, 0.75) !important;
        color: var(--accent-light) !important;
        border: 1px solid rgba(51, 102, 255, 0.25) !important;
    }

    /* Product images */
    .product-image {
        height: 200px !important;
    }

    .product-image img {
        object-fit: cover !important;
    }

    /* Product name */
    .product-name {
        color: var(--text-primary) !important;
        font-size: 1rem !important;
    }

    /* Pricing table */
    .pricing-table {
        background: rgba(0, 0, 0, 0.25) !important;
        border-radius: var(--radius-md) !important;
    }

    .price-row {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        padding: 0.5rem 0.8rem !important;
    }

    .qty-label {
        color: var(--text-secondary) !important;
        font-size: 0.78rem !important;
    }

    .price-value {
        color: var(--accent-light) !important;
        font-size: 0.95rem !important;
    }

    .price-row.best-value {
        background: rgba(51, 102, 255, 0.1) !important;
    }

    .price-row.best-value .price-value {
        color: var(--brand-gold) !important;
    }

    .best-tag {
        background: var(--gradient-gold) !important;
        color: #1a1a2e !important;
    }

    /* Quote Banner */
    .quote-banner {
        padding: 0 1.5rem 1.5rem !important;
    }

    .quote-banner-inner {
        background: var(--bg-card) !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: var(--radius-lg) !important;
        backdrop-filter: none !important;
    }

    .quote-btn {
        background: #25d366 !important;
        color: white !important;
        box-shadow: none !important;
    }

    /* Footer */
    .footer {
        border-top: 1px solid var(--border-subtle) !important;
        background: linear-gradient(to top, rgba(10, 10, 18, 0.8), transparent) !important;
        padding: 1.5rem 2rem 1rem !important;
    }

    .footer p, .footer-cta {
        color: var(--text-muted) !important;
    }

    .footer-cta {
        color: var(--text-secondary) !important;
    }

    .footer-brand span {
        color: var(--accent-light) !important;
        background: none !important;
        -webkit-background-clip: initial !important;
    }

    .footer-link {
        color: var(--text-secondary) !important;
    }

    /* Disable all animations */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    /* Page margins */
    @page {
        margin: 0.5cm;
        size: A4;
    }
}

/* =============================================
   CLIENT MODE — Read-only catalog for customers
   URL: ?cliente
   ============================================= */
body.client-mode .admin-controls,
body.client-mode .product-counter,
body.client-mode .delete-card-btn,
body.client-mode .editable-img-url,
body.client-mode .editable-img-file,
body.client-mode .category-select,
body.client-mode .add-card-btn,
body.client-mode .gallery-thumb-remove,
body.client-mode .gallery-add-thumb {
    display: none !important;
}

body.client-mode .toolbar {
    justify-content: center;
}

body.client-mode .search-container {
    max-width: 520px;
    margin: 0 auto;
}

/* Tooltip for Share button */
.btn-share {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
}

.btn-share:hover {
    background: rgba(245, 183, 49, 0.1);
    color: var(--brand-gold);
    box-shadow: 0 0 15px rgba(245, 183, 49, 0.2);
}
