/* ========================================
   KDNK Customs — Monochrome Minimal
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --black: #000;
    --white: #fff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --gray-950: #0a0a0a;

    --bg: var(--gray-950);
    --surface: var(--gray-900);
    --surface-hover: var(--gray-800);
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-400);
    --text-tertiary: var(--gray-600);
    --line: var(--gray-800);
    --line-subtle: rgba(255,255,255,0.06);

    --danger: #dc2626;
    --success: #16a34a;
    --warning: #ca8a04;
    --star: #eab308;
    --discord: #5865F2;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --duration: 0.5s;
    --duration-fast: 0.2s;
    --max-w: 1200px;
}

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

/* ============ CUSTOM SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--gray-950);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: 0;
    transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}
::-webkit-scrollbar-thumb:active {
    background: var(--gray-400);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-700) var(--gray-950);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 15px;
}

::selection { background: rgba(255,255,255,0.2); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============ UTILITIES ============ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ HEADER ============ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background var(--duration-fast), backdrop-filter var(--duration-fast);
}

.header.scrolled {
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white);
    transition: opacity var(--duration-fast);
}
.logo:hover { opacity: 0.7; }

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.nav { display: flex; align-items: center; gap: 0; }
.nav a {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 20px;
    transition: color var(--duration-fast);
}
.nav a:hover { color: var(--white); }
.nav a.active { color: var(--white); }
.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: var(--white);
}
.nav a i { display: none; }

.user-menu { display: flex; align-items: center; gap: 14px; }
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    opacity: 0.9;
    transition: opacity var(--duration-fast);
}
.user-avatar:hover { opacity: 1; }
.user-name { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
    font-family: var(--font);
}
.btn:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.btn-primary {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
    font-weight: 600;
}
.btn-primary:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--white); border-color: var(--danger); }

.btn-success { border-color: var(--success); color: var(--success); }
.btn-success:hover { background: var(--success); color: var(--white); }

.btn-sm { padding: 7px 16px; font-size: 0.72rem; }
.btn-lg { padding: 16px 40px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-discord {
    background: var(--discord);
    color: var(--white);
    border-color: var(--discord);
}
.btn-discord:hover { background: #4752C4; border-color: #4752C4; color: var(--white); }

.btn-buy {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
    font-weight: 600;
    padding: 18px 48px;
    font-size: 0.85rem;
}
.btn-buy:hover {
    background: transparent;
    color: var(--white);
}

.btn-icon {
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--duration-fast);
}
.btn-icon:hover { color: var(--white); }

/* ============ PAGE ============ */
.page-content {
    min-height: 100vh;
    padding: 120px 0 80px;
}
.page-content:has(.hero) { padding-top: 0; }

/* ============ HERO (HOME) ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 120px 32px 80px;
}

.hero-inner {
    max-width: 720px;
}

.hero-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: contain;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: var(--white);
    margin-bottom: 28px;
}

.hero p {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-tertiary);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: scrollBounce 2s var(--ease) infinite;
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-tertiary), transparent);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============ HOME SECTIONS ============ */
.home-section {
    padding: 100px 0;
    position: relative;
}

.home-section + .home-section {
    border-top: 1px solid var(--line-subtle);
}

.section-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--white);
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 420px;
    line-height: 1.7;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 56px;
}

.section-header-center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.section-header-center .section-desc { margin: 0 auto; }

/* Category Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--line-subtle);
    margin-top: 80px;
    border-top: 1px solid var(--line-subtle);
    border-bottom: 1px solid var(--line-subtle);
}

.stat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    background: var(--bg);
    text-align: center;
    transition: background var(--duration-fast);
}
.stat-link:hover { background: var(--surface); }

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--white);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-name {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line-subtle);
}

.feature-card {
    background: var(--bg);
    padding: 48px 40px;
    transition: background var(--duration-fast);
}
.feature-card:hover { background: rgba(255,255,255,0.02); }

.feature-num {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 320px;
}

/* CTA */
.cta-section {
    padding: 120px 0;
    text-align: center;
    border-top: 1px solid var(--line-subtle);
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--white);
    margin-bottom: 20px;
}

.cta-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 48px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ PRODUCT GRID ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.product-card {
    position: relative;
    transition: transform var(--duration) var(--ease);
}
.product-card:hover { transform: translateY(-4px); }

.product-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface);
    margin-bottom: 16px;
    position: relative;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease), opacity var(--duration-fast);
    opacity: 0.9;
}
.product-card:hover .product-card-image img {
    transform: scale(1.04);
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 10px;
    background: var(--white);
    color: var(--black);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    z-index: 1;
}

.product-fav-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--duration-fast);
    z-index: 1;
}
.product-fav-btn:hover { color: var(--danger); background: rgba(0,0,0,0.8); }
.product-fav-btn.active { color: var(--danger); }

.product-card-body { padding: 0; }

.product-card-category {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.product-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--line-subtle);
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--star);
    font-weight: 500;
}
.product-rating .count { color: var(--text-tertiary); font-size: 0.72rem; font-weight: 400; }

/* ============ PAGE HEADER ============ */
.page-header {
    margin-bottom: 48px;
}
.page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--white);
    margin-bottom: 8px;
}
.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============ CATEGORIES BAR ============ */
.categories-bar {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 0 0 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line-subtle);
    scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar { display: none; }

.category-chip {
    padding: 8px 20px;
    background: transparent;
    border: none;
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color var(--duration-fast);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
}
.category-chip:hover { color: var(--white); }
.category-chip.active {
    color: var(--white);
}
.category-chip.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: var(--white);
}

/* ============ SEARCH BAR ============ */
.search-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--line);
}
.search-bar input {
    flex: 1;
    padding: 16px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    font-family: var(--font);
}
.search-bar input::placeholder { color: var(--text-tertiary); }
.search-bar .btn {
    border: none;
    border-left: 1px solid var(--line);
    padding: 16px 32px;
}
.search-bar .btn:hover { background: var(--white); color: var(--black); }

/* ============ PRODUCT DETAIL ============ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 48px;
    transition: color var(--duration-fast);
}
.back-link:hover { color: var(--white); }

.product-detail {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
}

.product-main-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface);
}
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }

.product-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.product-thumbnails::-webkit-scrollbar { display: none; }

.product-thumb {
    width: 80px;
    height: 56px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity var(--duration-fast);
    background: var(--surface);
}
.product-thumb:hover { opacity: 0.8; }
.product-thumb.active { opacity: 1; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.product-info .category-tag {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    margin-bottom: 12px;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line-subtle);
    margin: 24px 0;
    border-top: 1px solid var(--line-subtle);
    border-bottom: 1px solid var(--line-subtle);
}
.product-meta-item {
    text-align: center;
    padding: 16px 8px;
    background: var(--bg);
}
.product-meta-item .label {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}
.product-meta-item .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 4px;
}

.product-info .price-display {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.product-info .description {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
    font-size: 0.92rem;
}

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

/* Description Block */
.description-block {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--line-subtle);
}
.description-block h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.description-block .desc-text {
    color: var(--text-secondary);
    line-height: 1.9;
    max-width: 680px;
    font-size: 0.92rem;
}

/* ============ REVIEWS ============ */
.reviews-section {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--line-subtle);
}
.reviews-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.review-card {
    padding: 28px 0;
    border-bottom: 1px solid var(--line-subtle);
}
.review-card:last-child { border-bottom: none; }

.review-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.review-avatar { width: 36px; height: 36px; border-radius: 50%; opacity: 0.9; }
.review-user { font-weight: 600; font-size: 0.9rem; color: var(--white); }
.review-date { font-size: 0.75rem; color: var(--text-tertiary); }
.review-stars { color: var(--star); margin-bottom: 8px; font-size: 0.8rem; letter-spacing: 2px; }
.review-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}
.review-text { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }

.review-form {
    padding: 32px 0;
    border-bottom: 1px solid var(--line-subtle);
}

.home-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.home-review-tab {
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 14px;
    cursor: pointer;
}

.home-review-tab-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.home-review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.home-review-user {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--white);
}

.home-review-product {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.home-review-score {
    color: var(--star);
    font-weight: 700;
    margin-bottom: 8px;
}

.home-review-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    margin-bottom: 10px;
}

.home-review-comment-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-review-open {
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.home-review-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.home-review-modal.active {
    display: flex;
}

.home-review-modal-box {
    width: 100%;
    max-width: 620px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 18px;
    position: relative;
}

.home-review-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.home-review-modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.home-review-comment {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 1100px) {
    .home-reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .home-reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ FORMS ============ */
.form-group { margin-bottom: 24px; }
.form-group label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--duration-fast);
    font-family: var(--font);
}
.form-control:focus { border-color: var(--white); }
select.form-control { cursor: pointer; padding: 14px 4px; }
textarea.form-control { min-height: 100px; resize: vertical; border: 1px solid var(--line); padding: 14px 16px; }

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--white);
}

/* ============ STAR RATING ============ */
.star-rating { display: flex; gap: 6px; }
.star-rating .star {
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--gray-700);
    transition: color var(--duration-fast), transform var(--duration-fast);
}
.star-rating .star:hover, .star-rating .star.active { color: var(--star); transform: scale(1.1); }

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 64px;
}
.pagination a, .pagination span {
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--duration-fast);
    letter-spacing: 0.02em;
}
.pagination a:hover { color: var(--white); }
.pagination .active {
    color: var(--white);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}
.empty-state .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-tertiary);
    font-weight: 800;
    letter-spacing: -0.04em;
}
.empty-state h3 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ============ FOOTER ============ */
.footer {
    margin-top: 120px;
    position: relative;
    overflow: hidden;
}

.footer-main {
    padding: 80px 0 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-brand-block {}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 20px;
    transition: opacity var(--duration-fast);
}
.footer-logo:hover { opacity: 0.7; }

.footer-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.footer-brand-desc {
    color: var(--text-tertiary);
    font-size: 0.88rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-col-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-subtle);
    transition: color var(--duration-fast), padding-left var(--duration-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-nav a::after {
    content: '\2192';
    opacity: 0;
    transition: opacity var(--duration-fast), transform var(--duration-fast);
    font-size: 0.85rem;
}
.footer-nav a:hover {
    color: var(--white);
    padding-left: 8px;
}
.footer-nav a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.footer-social {
    display: flex;
    gap: 0;
    margin-top: 4px;
}

.footer-social a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    border: 1px solid var(--line-subtle);
    transition: all var(--duration-fast);
}
.footer-social a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
    border-color: var(--gray-600);
}

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--line-subtle);
    gap: 16px;
}

.footer-copy {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    letter-spacing: 0.06em;
}

.footer-back-top {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--duration-fast);
    background: none;
    border: none;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-back-top:hover { color: var(--white); }
.footer-back-top i {
    transition: transform var(--duration-fast);
}
.footer-back-top:hover i {
    transform: translateY(-3px);
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.toast {
    padding: 14px 32px;
    background: var(--white);
    color: var(--black);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    animation: toastIn 0.5s var(--ease);
    white-space: nowrap;
}
.toast.error { background: var(--danger); color: var(--white); }

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

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal h3 { margin-bottom: 24px; font-size: 1.1rem; }

/* ============ ADMIN ============ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar .logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}
.admin-sidebar .logo small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 4px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--duration-fast);
}
.admin-nav a:hover { background: var(--surface-hover); color: var(--text-primary); }
.admin-nav a.active { color: var(--white); background: var(--surface-hover); border-right: 2px solid var(--white); }

.admin-content { padding: 32px; }
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 12px;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 16px;
}

.admin-panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.admin-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.admin-inline-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 24px;
}
.stat-card .label { font-size: 0.8rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 1px; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--white); margin-top: 8px; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}
.admin-table th {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.admin-table tr:hover td { background: var(--surface-hover); }
.admin-table .product-thumb-small {
    width: 48px;
    height: 36px;
    object-fit: cover;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-active { background: rgba(22,163,74,0.15); color: var(--success); }
.badge-inactive { background: rgba(220,38,38,0.15); color: var(--danger); }
.badge-featured { background: rgba(202,138,4,0.15); color: var(--warning); }
.badge-admin { background: rgba(255,255,255,0.1); color: var(--white); }

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

.file-input-wrapper {
    border: 1px dashed var(--line);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--duration-fast);
}
.file-input-wrapper:hover { border-color: var(--white); }
.file-input-wrapper input { display: none; }
.file-input-wrapper .text { color: var(--text-tertiary); font-size: 0.85rem; }

.image-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.image-preview-item {
    position: relative;
    width: 100px;
    height: 80px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-item .remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============ IMAGE EDITOR ============ */
.image-editor-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.image-editor-overlay.active { display: flex; }
.image-editor-container {
    background: var(--surface);
    border: 1px solid var(--gray-700);
    width: min(960px, 96vw);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.image-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.image-editor-header h3 { font-size: 0.88rem; font-weight: 600; color: var(--white); }
.image-editor-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.image-editor-close:hover { color: var(--white); }
.image-editor-canvas-wrap {
    flex: 1;
    min-height: 300px;
    max-height: 480px;
    overflow: hidden;
    background: #111;
}
.image-editor-canvas-wrap img { display: block; max-width: 100%; }
.image-editor-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    align-items: center;
    flex-shrink: 0;
    background: var(--gray-950);
}
.toolbar-group {
    display: flex;
    gap: 4px;
    align-items: center;
}
.toolbar-group:not(:last-child) {
    padding-right: 8px;
    margin-right: 2px;
    border-right: 1px solid var(--gray-700);
}
.image-editor-toolbar button {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    color: var(--text-primary);
    padding: 6px 11px;
    font-size: 0.75rem;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.image-editor-toolbar button:hover { background: var(--gray-700); color: var(--white); }
.image-editor-toolbar button.active { background: var(--white); color: var(--black); border-color: var(--white); }
.image-editor-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 18px;
    flex-shrink: 0;
}
.image-preview-item .edit-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    border: 1px solid var(--gray-600);
    cursor: pointer;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background 0.15s;
}
.image-preview-item .edit-btn:hover { background: rgba(255,255,255,0.15); }

/* ============ MOBILE NAV ============ */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .page-content { padding: 88px 0 48px; }

    .hero { min-height: 90vh; padding: 100px 20px 60px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-scroll { display: none; }

    .home-section { padding: 64px 0; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 40px; }

    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-link { padding: 28px 16px; }
    .stat-number { font-size: 1.8rem; }

    .features-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 32px 24px; }

    .cta-section { padding: 80px 0; }

    .product-detail { grid-template-columns: 1fr; gap: 32px; }
    .product-info { position: static; }
    .product-meta { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
    .product-actions .btn { flex: 1 1 200px; }

    .header-inner { height: 60px; }
    .user-menu { gap: 10px; margin-left: auto; }
    .user-name { display: none; }
    .user-menu .btn { padding: 6px 12px; font-size: 0.7rem; }
    .user-avatar { width: 26px; height: 26px; }

    .mobile-nav-toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line-subtle);
        flex-direction: column;
        padding: 16px 20px;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 0; border-bottom: 1px solid var(--line-subtle); }
    .nav a:last-child { border-bottom: none; }
    .nav a.active::after { display: none; }

    .search-bar .btn { padding: 16px 20px; }

    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-main { padding: 48px 0 32px; }
    .footer-bottom-bar { flex-direction: column; align-items: flex-start; gap: 12px; }

    .toast-container { left: 20px; right: 20px; transform: none; }
    .toast { width: 100%; text-align: center; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 14px 0;
    }
    .admin-sidebar .logo { margin-bottom: 10px; padding: 0 16px 12px; }
    .admin-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 0 12px 4px;
    }
    .admin-nav a {
        flex: 0 0 auto;
        border: 1px solid var(--line);
        padding: 8px 12px;
        white-space: nowrap;
        font-size: 0.82rem;
    }
    .admin-nav a.active { border-right: 1px solid var(--white); }
    .admin-content { padding: 20px 16px; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .admin-panels-grid { grid-template-columns: 1fr; }
    .admin-form-grid-2, .admin-form-grid-3 { grid-template-columns: 1fr; }
    .admin-form-actions .btn, .admin-inline-actions .btn { width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .features-grid { grid-template-columns: 1fr; }
    .product-meta { grid-template-columns: repeat(2, 1fr); }
    .modal { width: calc(100% - 20px); padding: 24px; }
}
