:root {
    /* --- COLOR PALETTE --- */
    --bg-color: #050505;
    --card-bg: #0a0a0a;
    --text-color: #f2f2f2;
    --text-muted: #888888;

    /* Brand Colors */
    --brand-color: #ff3301;
    --brand-hover: #e62e00;
    --brand-dim: rgba(255, 51, 1, 0.1);

    /* State Colors */
    --danger-color: #ff3333;
    --success-color: #00ff66;
    --warning-color: #ffcc00;

    /* UI Elements */
    --grid-line: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(10, 10, 10, 0.95);

    /* Dimensions & Spacing */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-pill: 50px;
    --header-height: 80px;

    /* Typography */
    --font-main: "Inter", system-ui, -apple-system, sans-serif;
    --font-tech: "Space Mono", monospace;

    /* Animations */
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
    --trans-fast: 0.2s var(--ease);

    /* Z-Index Layers */
    --z-bg: -1;
    --z-content: 10;
    --z-header: 1000;
    --z-overlay: 2000;
    --z-toast: 9999;
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    padding-top: var(--header-height);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--trans-fast);
    cursor: pointer;
}
a:hover { color: var(--brand-color); }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
    border-radius: 2px;
}

button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

img, video {
    max-width: 100%;
    display: block;
}

ul { list-style: none; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #fff;
}
h1 { font-size: clamp(2rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.hover-underline:hover { text-decoration: underline; }

.mono-label {
    font-family: var(--font-tech);
    font-size: 0.75rem;
    color: var(--brand-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

/* =========================================
   LAYOUT & CONTAINERS
   ========================================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: var(--z-content);
}

.section {
    padding: 80px 0;
    border-bottom: 1px solid var(--grid-line);
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.col-4 { flex: 1; }

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-4 { grid-template-columns: 1fr; }
    .col-4 { width: 100%; margin-bottom: 20px; }
}

/* =========================================
   COMPONENTS: CARDS (UPDATED FOR HOT STUFF)
   ========================================= */
.shop-card, .artist-card {
    background: transparent; /* Cleaner look */
    border: none;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-img-container {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 15px;
    background: #111;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.shop-card:hover .card-img, .artist-card:hover .card-img {
    transform: scale(1.05);
}

/* Hot Stuff: Discount Badge */
.badge-discount {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--brand-color);
    color: #fff;
    font-family: var(--font-tech);
    font-weight: bold;
    font-size: 0.8rem;
    padding: 4px 8px;
    z-index: 2;
}

/* Hot Stuff: Heart Icon */
.card-overlay-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    background: rgba(0,0,0,0.3);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}
.card-overlay-heart:hover {
    background: #fff;
    color: var(--brand-color);
}

.card-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
    color: #fff;
}

/* Price styling */
.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-tech);
}

.price-strike {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.price-current {
    color: var(--brand-color);
    font-weight: bold;
    font-size: 1rem;
}

/* =========================================
   COMPONENTS: BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-tech);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all var(--trans-fast);
    text-decoration: none;
    background: #fff;
    color: #000;
}
.btn:hover {
    background: var(--brand-color);
    color: #fff;
}

.btn-center-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* =========================================
   COMPONENTS: SOCIAL UI
   ========================================= */
.site-logo {
    display: block;
    width: 120px;
    height: 36px;
    background-color: #fff;
    -webkit-mask: url("assets/img/web_logo_bw.svg") center center / contain no-repeat;
    mask: url("assets/img/web_logo_bw.svg") center center / contain no-repeat;
    transition: background-color 0.2s;
}
.site-logo:hover { background-color: var(--brand-color); }

.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #333;
    flex-shrink: 0;
}

.post-item {
    background: var(--card-bg);
    border: 1px solid #222;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.post-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.post-actions {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
}

.interaction-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    transition: all 0.2s;
    border-radius: 20px;
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
}
.interaction-btn:hover {
    color: var(--brand-color);
}
.interaction-btn.liked { color: var(--brand-color); }
.interaction-btn.reposted { color: var(--success-color); }

.delete-confirmation-wrapper {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.delete-confirmation-box {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 51, 51, 0.1);
    border-radius: 20px;
    padding: 2px 8px;
    animation: fadeIn 0.2s var(--ease);
}

.delete-text {
    font-size: 0.8rem;
    color: var(--danger-color);
    font-weight: bold;
}

.btn-confirm {
    color: var(--danger-color);
    padding: 4px;
    min-width: auto;
    min-height: auto;
}

.btn-cancel {
    color: var(--text-muted);
    padding: 4px;
    min-width: auto;
    min-height: auto;
}

.btn-confirm:hover, .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--grid-line);
    z-index: var(--z-header);
    display: flex;
    align-items: center;
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.nav-links a {
    margin-left: 30px;
    font-family: var(--font-tech);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 500;
}
.nav-links a.active { color: var(--brand-color); }


/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5,5,5,0.98);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    gap: 25px;
    align-items: center;
}
.mobile-menu-link {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-tech);
    font-size: 0.8rem;
    border-radius: 4px;
}
.shop-card .card-body { padding: 20px; }

/* Shop Grid System */
.shop-grid-container {
    display: grid;
    /* Default to admin setting, fallback to 3 columns */
    grid-template-columns: repeat(var(--shop-cols, 3), 1fr);
    gap: 30px;
}

/* Mobile Responsive Override */
@media (max-width: 768px) {
    .shop-grid-container {
        /* Force single column on mobile for optimal size */
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.file-drop-zone {
    border: 2px dashed #333;
    padding: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: 0.3s;
    border-radius: 8px;
}
.file-drop-zone:hover {
    border-color: var(--brand-color);
    background: rgba(255, 51, 1, 0.05);
}
.mobile-menu-link.active { color: var(--brand-color); }
/* =========================================
   UTILITIES
   ========================================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: #111;
    border: 1px solid #333;
    padding: 16px 20px;
    border-left: 4px solid var(--brand-color);
    color: #fff;
    font-family: var(--font-tech);
    display: flex; align-items: center; gap: 12px;
    min-width: 300px;
    opacity: 0; transform: translateX(50px);
    transition: 0.3s;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--danger-color); }

.visible-mobile { display: none !important; }
.hidden-mobile { display: block !important; }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; background:none; border:none; color:#fff; font-size:1.5rem; }
    .hidden-mobile { display: none !important; }
    .visible-mobile { display: flex !important; }
    .container { padding: 0 15px; }
}

/* =========================================
   ADMIN NAVIGATION (Responsive)
   ========================================= */
.admin-navbar {
    padding: 0 20px;
    height: var(--header-height);
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid var(--grid-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: var(--z-header);
    backdrop-filter: blur(10px);
}

.admin-tabs {
    display: flex;
    gap: 5px;
}

.admin-nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--font-tech);
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: all 0.2s;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav-item.active { color: var(--brand-color); background: rgba(255, 51, 1, 0.1); font-weight: bold; }

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    font-size: 1.2rem;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.mobile-nav-header { display: none; }

/* Mobile Sidebar Logic */
@media (max-width: 1100px) {
    .mobile-nav-toggle { display: block; }

    .admin-tabs {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        background: #000;
        border-right: 1px solid var(--grid-line);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        transform: translateX(-100%);
        transition: transform 0.3s var(--ease);
        z-index: 2000;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }
    .admin-tabs.open {
        transform: translateX(0);
    }

    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--grid-line);
        font-family: var(--font-tech);
        color: var(--brand-color);
        font-weight: bold;
    }

    .admin-nav-item {
        width: 100%;
        padding: 12px 15px;
        font-size: 1rem;
        border-radius: 8px;
    }

    /* Overlay when menu is open */
    .admin-tabs.open::before {
        content: '';
        position: fixed;
        top: 0; left: 280px; right: -100vw; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        cursor: pointer;
    }
}

/* =========================================
   ADMIN LAYOUT & FIXES
   ========================================= */
.admin-shell {
    padding-top: 20px; /* Offset for content */
    padding-bottom: 50px;
    max-width: 100%;
    overflow-x: hidden;
}

.content-view {
    display: none;
    animation: fadeIn 0.3s var(--ease);
}
.content-view.active { display: block; }

.admin-card {
    background: var(--card-bg);
    border: 1px solid #222;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Sidebar Layout (Artists) */
.admin-sidebar-layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}
.inner-sidebar {
    width: 250px;
    background: var(--card-bg);
    border: 1px solid #222;
    border-radius: 8px;
    padding: 15px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

@media (max-width: 900px) {
    .admin-sidebar-layout { flex-direction: column; }
    .inner-sidebar { width: 100%; position: static; margin-bottom: 20px; }

    /* Grid Fixes */
    .grid-layout, .grid-4 { grid-template-columns: 1fr !important; }

    .admin-card { padding: 15px; border-left: none; border-right: none; border-radius: 0; }

    /* Table Scroll Fix */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table { min-width: 600px; /* Force scroll trigger */ }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: 0; } }
