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

:root {
    --bg: #f7f6f3;
    --surface: #ffffff;
    --text: #111111;
    --text-muted: #6b6b6b;
    --text-faint: #9e9e9e;
    --accent: #7c4d2f;
    --accent-hover: #5c3520;
    --accent-subtle: #f4ede6;
    --border: #e4e1db;
    --border-focus: #7c4d2f;
    --success-bg: #edf7f0;
    --success-text: #1e5c33;
    --success-border: #2d7d46;
    --error-bg: #fdf0f0;
    --error-text: #8b1a1a;
    --error-border: #c0392b;
    --danger: #c0392b;
    --danger-hover: #a02a22;
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .07);
    --shadow: 0 2px 8px rgba(0, 0, 0, .09);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, .12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--accent-hover);
}

/* ─── Typography ─────────────────────────────────────────────────────────────*/
h1,
h2,
h3 {
    line-height: 1.25;
    font-weight: 700;
}

/* ─── Layout Helpers ─────────────────────────────────────────────────────────*/
.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    max-width: 1360px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

/* ─── Header ─────────────────────────────────────────────────────────────────*/
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    margin-bottom: 2.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.site-title a {
    color: inherit;
}

.site-title a:hover {
    color: var(--accent);
}

.site-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.header-nav a:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--surface-alt, #f9f9f7);
}

.hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    margin-left: auto;
}

.hamburger:hover {
    color: var(--text);
    border-color: var(--accent);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
}

.mobile-nav a {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    color: var(--accent);
}

.mobile-nav.open {
    display: block;
}

/* ─── Admin Header ───────────────────────────────────────────────────────────*/
.admin-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    gap: 0.75rem;
}

.admin-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-brand-label {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    vertical-align: middle;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ─── Search (public) ────────────────────────────────────────────────────────*/
.search-section {
    position: sticky;
    top: 78px;
    z-index: 40;
    background: var(--bg);
    padding-bottom: 0.75rem;
    padding-top: .75rem;
    margin-bottom: 1.25rem;
}

.search-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}

.search-wrapper {
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.05rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(124, 77, 47, .1);
}

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

#suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    max-height: 380px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-lg);
}

#suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    color: var(--text);
    font-size: 0.9rem;
    transition: background .15s;
    display: block;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg);
}

.products-count {
    font-size: 0.82rem;
    color: var(--text-faint);
    margin-top: 0.5rem;
    text-align: right;
}

/* ─── Product Grid ───────────────────────────────────────────────────────────*/
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}

/* ─── Product Card ───────────────────────────────────────────────────────────*/
.product-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    color: var(--text);
}

.product-card:hover {
    border-color: #c9c5bb;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    color: var(--text);
}

.product-card.inactive {
    opacity: 0.5;
}

.product-image {
    width: 100%;
    height: 210px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 0.85rem;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

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

.product-info {
    padding: 1.1rem 1.2rem 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 650;
    color: var(--text);
    line-height: 1.4;
}

.product-card:hover .product-title {
    color: var(--accent);
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    line-height: 1.55;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stars {
    color: var(--accent);
    letter-spacing: 1px;
}

.product-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
}

.product-stock {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.product-stock.low {
    color: var(--danger);
    font-weight: 600;
}

.product-stock.out {
    color: var(--text-faint);
}

/* ─── Messages ───────────────────────────────────────────────────────────────*/
.message {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    border-left: 3px solid;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    animation: fadeSlide .25s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

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

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-left-color: var(--success-border);
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-left-color: var(--error-border);
}

.message.info {
    background: #eff6ff;
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────*/
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-faint);
    margin-top: 4rem;
}

.contact-cta {
    padding: 2.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.contact-cta-inner {
    background: #1a7a3f;
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(26, 122, 63, .25);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.contact-cta-inner:hover {
    cursor: pointer;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.contact-cta-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.contact-cta-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

.contact-cta-sub {
    font-size: 0.9rem;
    opacity: 0.85;
}

.contact-cta-arrow {
    font-size: 1.75rem;
    font-weight: 300;
    opacity: 0.9;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .contact-cta-inner {
        padding: 1.25rem 1.25rem;
        border-radius: 12px;
    }

    .contact-cta-title {
        font-size: 1rem;
    }
}

/* ─── Buttons ────────────────────────────────────────────────────────────────*/
button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
    white-space: nowrap;
}

.btn-primary,
button[type="submit"] {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-primary:hover,
button[type="submit"]:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
    color: var(--text);
    border-color: #c9c5bb;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: #e8b4b4;
}

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

.btn-sm {
    padding: 0.38rem 0.7rem;
    font-size: 0.8rem;
}

.btn-sold {
    background: #fff7ed;
    color: #c2590a;
    border-color: #f5c38a;
}

.btn-sold:hover {
    background: #ffedd5;
    color: #9a4209;
    border-color: #f97316;
}

.btn-group {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ─── Forms ──────────────────────────────────────────────────────────────────*/
.form-group {
    margin-bottom: 1.4rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(124, 77, 47, .12);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: var(--accent);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.form-inline {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.form-inline>* {
    flex: 1;
}

.currency-select {
    flex: none;
    width: auto;
    padding: 0.45rem 0.6rem;
}

.form-inline label {
    margin: 0;
    font-weight: 400;
    white-space: nowrap;
    flex: none;
}

/* ─── Star Rating ────────────────────────────────────────────────────────────*/
.star-rating {
    display: flex;
    gap: 0.5rem;
    font-size: 1.75rem;
}

.star-rating span {
    cursor: pointer;
    transition: color .15s, transform .15s;
    color: var(--border);
    user-select: none;
}

.star-rating span:hover,
.star-rating span.active {
    color: var(--accent);
    transform: scale(1.1);
}

/* ─── Login ──────────────────────────────────────────────────────────────────*/
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 2rem;
}

.login-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.login-card .login-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ─── Admin Layout ───────────────────────────────────────────────────────────*/
.admin-container {
    max-width: 1360px;
    margin: 1.25rem auto;
    padding: 0 1rem;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-page-header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
}

.page-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

/* ─── Admin Product List (mobile-first cards) ────────────────────────────────*/
.admin-search-wrapper {
    position: sticky;
    top: 52px;
    z-index: 40;
    background: var(--bg);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
}

.admin-search-wrapper input {
    width: 100%;
    padding: 0.7rem 0.9rem 0.7rem 2.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s;
}

.admin-search-wrapper input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(124, 77, 47, .1);
}

.admin-search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 1rem;
    pointer-events: none;
}

.admin-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-product-item {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: border-color .15s, box-shadow .15s;
}

.admin-product-item:hover {
    border-color: #c9c5bb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.admin-product-item[data-hidden="true"] {
    display: none;
}

.admin-product-thumb {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 0.7rem;
}

.admin-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 88px;
}

.admin-product-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-product-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.65rem;
    line-height: 1.5;
}

.admin-product-meta .stars {
    font-size: 0.78rem;
    letter-spacing: 1px;
}

.admin-product-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.admin-product-actions .btn-edit {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.admin-product-actions .btn-edit:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
}

.admin-product-actions .btn-delete {
    margin-left: auto;
    background: transparent;
    color: var(--danger);
    border-color: #e8b4b4;
}

.admin-product-actions .btn-delete:hover {
    background: #fef2f2;
    color: var(--danger-hover);
    border-color: var(--danger);
}

.admin-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-faint);
    font-size: 0.9rem;
    display: none;
}

.admin-no-results.visible {
    display: block;
}

.admin-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-faint);
}

/* ─── Table (kept for reference, not used in admin list) ─────────────────────*/
.table-responsive {
    overflow-x: auto;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

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

thead {
    border-bottom: 2px solid var(--border);
}

th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    background: var(--bg);
}

td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background .15s;
}

tbody tr:hover {
    background: var(--bg);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.status-badge.active {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-badge.inactive {
    background: #f5f5f5;
    color: var(--text-muted);
}

.action-links {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ─── Media Upload ───────────────────────────────────────────────────────────*/
.media-upload-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--bg);
    color: var(--text-muted);
}

.media-upload-box:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.media-upload-box.dragover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.media-upload-icon {
    font-size: 1.75rem;
    margin-bottom: 0.4rem;
}

.media-upload-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
    color: var(--text);
}

.media-upload-hint {
    font-size: 0.78rem;
    color: var(--text-faint);
}

.media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.media-preview-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--bg);
    position: relative;
}

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-item .preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, .6);
    color: white;
    font-size: 0.6rem;
    padding: 0.2rem 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--bg);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-delete {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(192, 57, 43, .92);
    color: white;
    border: none;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    transition: background .15s;
    border-bottom-left-radius: var(--radius-sm);
    line-height: 1;
}

.media-delete:hover {
    background: var(--danger);
}

/* ─── Product Detail (public) ────────────────────────────────────────────────*/
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    background: var(--surface);
    padding: 2rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.main-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 0.9rem;
    border: 1.5px solid var(--border);
    cursor: zoom-in;
    position: relative;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}

.main-image:hover img {
    transform: scale(1.02);
}

.gallery-image-count {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    background: rgba(0, 0, 0, .55);
    color: white;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    pointer-events: none;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.gallery-thumb {
    aspect-ratio: 1;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--accent);
}

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

.product-details {
    display: flex;
    flex-direction: column;
}

.product-details h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.25rem;
    line-height: 1.25;
}

.product-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    gap: 1rem;
}

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

.product-details-row strong {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.product-details-row .value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}

.condition-display {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.condition-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.videos-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1.5px solid var(--border);
}

.videos-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.video-player {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    border: 1.5px solid var(--border);
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
}

/* ─── Lightbox ───────────────────────────────────────────────────────────────*/
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox.open {
    display: flex;
}

.lightbox-inner {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-inner img {
    max-width: 100%;
    max-height: 92vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, .15);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 1001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, .25);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .15);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 1001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, .3);
}

.lightbox-prev {
    left: 0.75rem;
}

.lightbox-next {
    right: 0.75rem;
}

.lightbox-counter {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .7);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ─── Back Link ──────────────────────────────────────────────────────────────*/
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color .2s;
}

.back-link:hover {
    color: var(--text);
}

/* ─── Empty State ────────────────────────────────────────────────────────────*/
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-faint);
    font-size: 0.95rem;
}

/* ─── Error Pages ────────────────────────────────────────────────────────────*/
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.error-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.error-code {
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.error-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.error-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────*/
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {

    header {
        padding: 1.25rem 0 0;
    }

    main {
        padding: 0 1rem;
        margin-bottom: 3rem;
    }

    .container,
    .admin-container {
        padding: 0 1rem;
    }

    .header-container,
    .admin-topbar-inner {
        padding: 0 1rem;
    }

    .header-container {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 0;
        row-gap: 0.1rem;
    }

    .site-title {
        flex: 1;
        min-width: 0;
    }

    .site-tagline {
        width: 100%;
        order: 3;
        font-size: 0.8rem;
        padding-bottom: 0.15rem;
    }

    .header-nav {
        display: none;
    }

    .hamburger {
        display: block;
        order: 2;
        flex-shrink: 0;
    }

    .search-section {
        /* top, JS tarafından dinamik olarak güncellenir */
        padding-top: 0.75rem;
        transition: top 0.15s ease;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.25rem;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(5, 1fr);
    }

    .product-details h1 {
        font-size: 1.4rem;
    }

    .admin-page-header {
        flex-direction: row;
        align-items: center;
    }

    .admin-topbar-actions {
        gap: 0.3rem;
    }

    .login-card {
        padding: 2rem 1.25rem;
    }

    .page-card {
        padding: 1rem;
    }

    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }

    .error-card {
        padding: 2rem 1.25rem;
    }

    .error-code {
        font-size: 4rem;
    }

    .product-detail {
        padding: 1rem;
    }

    .lightbox-prev {
        left: 0.4rem;
    }

    .lightbox-next {
        right: 0.4rem;
    }
}