@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

:root {
    --accent: #0d9488;
    --bg: #f8fafc;
    --text-main: #0f172a;
}

body {
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ── SCROLLBARS ─────────────────────────────────────── */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #475569; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #0d9488; }

/* ── ANIMATIONS ─────────────────────────────────────── */
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.animate-slide-up { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.animate-slide-in { animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }

@keyframes shine {
    from { transform: translateX(-100%); }
    to   { transform: translateX(200%); }
}
.animate-shine { animation: shine 2.5s infinite linear; }

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(20, 184, 166, 0); }
    100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}
.animate-pulse-ring { animation: pulse-ring 2s infinite; }

/* ── RANGE SLIDER ───────────────────────────────────── */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    background: #0f172a;
    border: 4px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.1); }
input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    background: #0f172a;
    border: 4px solid #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* ── ACTIVE STATES ──────────────────────────────────── */
.cat-pill.active  { box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.3); }
.mat-btn.active   { box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.4); transform: translateY(-2px); }
.nav-link.active  { background-color: #0f172a; color: #fff; }

/* ── PRODUCT CARD HOVER IMAGE ────────────────────────── */
.product-img-wrap img { transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.product-card:hover .product-img-wrap img { transform: scale(1.1); }

/* ── UPLOAD PROGRESS ─────────────────────────────────── */
#upload-progress-bar { transition: width 0.2s ease; }

/* ── MOBILE SEARCH (shown on small screens via JS) ───── */
#mobile-search-bar {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}
#mobile-search-bar.open { max-height: 80px; opacity: 1; }

/* ── LOCK BADGE ──────────────────────────────────────── */
.lock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 20;
}

/* ── OWNED BADGE ─────────────────────────────────────── */
.owned-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(13, 148, 136, 0.9);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 20;
}

/* ── CODE BLOCK ──────────────────────────────────────── */
pre code {
    font-family: 'JetBrains Mono', monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── TOOLTIP ─────────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 9999;
}

/* ── ADMIN TABLE ─────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    background: #f8fafc;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #94a3b8;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.admin-table td {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.admin-table tr:hover td { background: #f8fafc; }

/* ── STATUS BADGES ───────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 8px; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.15em; }
.badge-green  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-orange { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.badge-red    { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-blue   { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-gray   { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* ── TRANSITIONS ─────────────────────────────────────── */
* { transition-property: color, background-color, border-color, opacity, transform, box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
a, button { transition-duration: 200ms; }

/* ── FOCUS RING ──────────────────────────────────────── */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ── PRINT STYLES ─────────────────────────────────────── */
@media print {
    #main-header, #cart-sidebar, #category-sidebar, .fixed { display: none !important; }
    .view-section { display: block !important; }
}
