:root {
	color-scheme: light;
	--bg: #faf9f6;
	--card-bg: #ffffff;
	--fg: #14171a;
	--fg-heading: #0a0c0d;
	--muted: #6b7280;
	--muted-light: #9ca3af;
	--border: #e6e4df;
	--border-light: #f0eee9;
	--accent: #171717;
	--accent-gold: #9f783e;
	--accent-gold-hover: #866432;
	--accent-light: #f4efe6;
	--danger: #be123c;
	--danger-bg: #fef2f2;
	--radius: 8px;
	--radius-lg: 12px;
	--space: 1.25rem;
	--font-serif: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
	--font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font: var(--font-sans);
	--shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
	--shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
	--shadow-hover: 0 12px 30px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
}

/* =========================================================
   SHELL & HEADER
   ========================================================= */
.app-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-header {
	background: #ffffff;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 40;
	backdrop-filter: blur(8px);
	background: rgba(255, 255, 255, 0.96);
}

.site-header-inner {
	max-width: 72rem;
	margin: 0 auto;
	padding: 1.1rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand-title {
	font-family: var(--font-serif);
	font-size: 1.85rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--fg-heading);
	text-transform: uppercase;
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.brand-title:hover {
	opacity: 0.85;
}

.brand-subtitle {
	font-family: var(--font-sans);
	font-size: 0.65rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--accent-gold);
	display: block;
	margin-top: -3px;
	font-weight: 600;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.main-content {
	flex: 1;
	max-width: 72rem;
	width: 100%;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 4rem;
}

/* =========================================================
   PUBLIC VISITOR STORE - HERO & PRODUCT GRID
   ========================================================= */
.store-intro {
	text-align: center;
	margin-bottom: 3rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border-light);
}

.store-heading {
	font-family: var(--font-serif);
	font-size: clamp(2rem, 4.5vw, 2.75rem);
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--fg-heading);
	margin: 0 0 0.5rem;
}

.store-tagline {
	font-size: 1rem;
	color: var(--muted);
	letter-spacing: 0.02em;
	max-width: 32rem;
	margin: 0 auto;
}

.products-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
}

@media (min-width: 52rem) {
	.products-grid {
		gap: 2.25rem;
		grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
	}
}

.product-card {
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	box-shadow: var(--shadow-card);
}

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

.product-card-image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f5f4f0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

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

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

.product-card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.product-card-title {
	font-family: var(--font-serif);
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--fg-heading);
	margin: 0 0 0.6rem;
	cursor: pointer;
	transition: color 0.15s ease;
}

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

.price-container {
	display: flex;
	align-items: baseline;
	gap: 0.65rem;
	margin-bottom: 0.85rem;
}

.current-price {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--fg-heading);
	letter-spacing: -0.01em;
}

.original-price {
	font-size: 0.95rem;
	color: var(--muted-light);
	text-decoration: line-through;
	font-weight: 400;
}

.product-card-desc {
	font-size: 0.9rem;
	color: var(--muted);
	line-height: 1.5;
	margin: 0 0 1.25rem;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.btn-view-product {
	width: 100%;
	padding: 0.75rem 1rem;
	background: #11141a;
	color: #ffffff;
	border: 1px solid #11141a;
	border-radius: var(--radius);
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s ease;
	display: block;
}

.btn-view-product:hover {
	background: #2b303c;
	border-color: #2b303c;
}

/* =========================================================
   PUBLIC PRODUCT DETAILS PAGE
   ========================================================= */
.product-details-view {
	max-width: 64rem;
	margin: 0 auto;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--muted);
	margin-bottom: 2rem;
	cursor: pointer;
	padding: 0.4rem 0.6rem;
	margin-left: -0.6rem;
	border-radius: var(--radius);
	transition: all 0.15s ease;
}

.back-link:hover {
	color: var(--fg-heading);
	background: rgba(0, 0, 0, 0.04);
}

.product-details-grid {
	display: grid;
	gap: 3rem;
	grid-template-columns: 1fr;
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	box-shadow: var(--shadow-card);
}

@media (min-width: 48rem) {
	.product-details-grid {
		grid-template-columns: 1.1fr 1fr;
		padding: 2.5rem;
		gap: 3.5rem;
	}
}

.details-gallery {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.details-main-image-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f5f4f0;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border-light);
	display: flex;
	align-items: center;
	justify-content: center;
}

.details-main-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-thumbnails {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.gallery-thumb {
	width: 4.5rem;
	height: 4.5rem;
	border-radius: var(--radius);
	border: 2px solid var(--border);
	overflow: hidden;
	background: #f5f4f0;
	cursor: pointer;
	padding: 0;
	transition: border-color 0.15s ease;
}

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

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

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

.details-title {
	font-family: var(--font-serif);
	font-size: clamp(1.8rem, 3.5vw, 2.4rem);
	font-weight: 600;
	line-height: 1.25;
	color: var(--fg-heading);
	margin: 0 0 1rem;
}

.details-prices {
	display: flex;
	align-items: baseline;
	gap: 0.85rem;
	margin-bottom: 1.75rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--border-light);
}

.details-current-price {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--fg-heading);
	letter-spacing: -0.02em;
}

.details-original-price {
	font-size: 1.15rem;
	color: var(--muted-light);
	text-decoration: line-through;
}

.details-description {
	font-size: 1rem;
	color: #374151;
	line-height: 1.75;
	margin: 0 0 2.5rem;
	white-space: pre-line;
	flex: 1;
}

.btn-shop-now {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	width: 100%;
	padding: 1.1rem 2rem;
	background: #0f1217;
	color: #ffffff;
	border: none;
	border-radius: var(--radius);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	cursor: pointer;
	text-align: center;
	text-transform: uppercase;
	transition: all 0.2s ease;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-shop-now:hover {
	background: #252b36;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   PRIVATE ADMIN AREA
   ========================================================= */
.admin-badge {
	background: #1e293b;
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.admin-header-nav {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.admin-nav-tabs {
	display: flex;
	gap: 0.5rem;
	background: #f1f0ec;
	padding: 0.25rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	margin-bottom: 2rem;
}

.admin-tab-btn {
	flex: 1;
	padding: 0.65rem 1.25rem;
	border: none;
	background: transparent;
	color: var(--muted);
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: calc(var(--radius) - 2px);
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: center;
}

.admin-tab-btn.active {
	background: #ffffff;
	color: var(--fg-heading);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.admin-card {
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 2rem;
	box-shadow: var(--shadow-card);
}

.admin-section-title {
	font-family: var(--font-serif);
	font-size: 1.75rem;
	font-weight: 600;
	color: var(--fg-heading);
	margin: 0 0 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border-light);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* Admin Table */
.admin-table-container {
	overflow-x: auto;
}

.admin-products-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.admin-products-table th {
	padding: 0.85rem 1rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
	border-bottom: 2px solid var(--border);
}

.admin-products-table td {
	padding: 1rem;
	border-bottom: 1px solid var(--border-light);
	vertical-align: middle;
	font-size: 0.92rem;
}

.admin-product-row:hover td {
	background: #faf9f6;
}

.admin-thumb-img {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 6px;
	object-fit: cover;
	background: #f5f4f0;
	border: 1px solid var(--border);
}

.admin-action-btns {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.btn-edit {
	padding: 0.45rem 0.85rem;
	background: #f1f0ec;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--fg-heading);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-edit:hover {
	background: #e4e2db;
}

.btn-delete {
	padding: 0.45rem 0.85rem;
	background: var(--danger-bg);
	border: 1px solid #fecaca;
	border-radius: var(--radius);
	color: var(--danger);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-delete:hover {
	background: #fee2e2;
}

/* Admin Form Fields */
.form-grid {
	display: grid;
	gap: 1.25rem;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.form-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--fg-heading);
}

.form-hint {
	font-size: 0.775rem;
	color: var(--muted);
	margin-top: 0.1rem;
}

.form-input,
.form-textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: #ffffff;
	color: var(--fg);
	font-family: inherit;
	font-size: 0.95rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-textarea:focus {
	outline: none;
	border-color: #0f1217;
	box-shadow: 0 0 0 3px rgba(15, 18, 23, 0.08);
}

.form-textarea {
	min-height: 7rem;
	resize: vertical;
}

.btn-publish {
	padding: 0.85rem 1.75rem;
	background: #0f1217;
	color: #ffffff;
	border: none;
	border-radius: var(--radius);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-publish:hover {
	background: #2b303c;
}

.btn-secondary {
	padding: 0.85rem 1.5rem;
	background: #f1f0ec;
	color: var(--fg-heading);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-secondary:hover {
	background: #e4e2db;
}

/* Login Card */
.login-container {
	max-width: 26rem;
	margin: 2rem auto;
}

.login-card {
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 2.25rem;
	box-shadow: var(--shadow-card);
}

.login-title {
	font-family: var(--font-serif);
	font-size: 1.85rem;
	font-weight: 600;
	color: var(--fg-heading);
	margin: 0 0 0.5rem;
	text-align: center;
}

.login-subtitle {
	font-size: 0.875rem;
	color: var(--muted);
	text-align: center;
	margin: 0 0 1.75rem;
}

/* Footer */
.site-footer {
	border-top: 1px solid var(--border);
	background: #ffffff;
	padding: 2rem 1.5rem;
	text-align: center;
	color: var(--muted);
	font-size: 0.85rem;
}

.footer-brand {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	letter-spacing: 0.06em;
	color: var(--fg-heading);
	margin-bottom: 0.35rem;
}

/* Modal / Dialog */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	z-index: 100;
}

.modal-content {
	background: #ffffff;
	border-radius: var(--radius-lg);
	max-width: 40rem;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 2rem;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-light);
}

.modal-title {
	font-family: var(--font-serif);
	font-size: 1.6rem;
	font-weight: 600;
	margin: 0;
	color: var(--fg-heading);
}

.modal-close-btn {
	background: transparent;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--muted);
	cursor: pointer;
	padding: 0.25rem;
}

.modal-close-btn:hover {
	color: var(--fg-heading);
}

/* Utility / Status */
.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 3rem 1.5rem;
	color: var(--muted);
	font-weight: 500;
}

.spinner {
	width: 1.4rem;
	height: 1.4rem;
	border: 2px solid var(--border);
	border-top-color: #0f1217;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.empty {
	text-align: center;
	padding: 4rem 1.5rem;
	color: var(--muted);
}

.empty-title {
	font-family: var(--font-serif);
	font-size: 1.5rem;
	color: var(--fg-heading);
	margin: 0 0 0.5rem;
}

.alert {
	padding: 0.85rem 1.1rem;
	border-radius: var(--radius);
	font-size: 0.9rem;
	margin-bottom: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.alert-error {
	background: var(--danger-bg);
	border: 1px solid #fecaca;
	color: var(--danger);
}

.alert-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

/* Showcase Toolbar & Filter */
.catalog-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
	padding: 0.75rem 1rem;
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius);
	flex-wrap: wrap;
}

.catalog-search-wrap {
	position: relative;
	flex: 1;
	min-width: 220px;
	display: flex;
	align-items: center;
}

.catalog-search-input {
	width: 100%;
	padding: 0.55rem 2rem 0.55rem 2.2rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.9rem;
	font-family: inherit;
	background: var(--bg);
	color: var(--fg);
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.catalog-search-input:focus {
	border-color: #0f1217;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(15, 18, 23, 0.06);
}

.catalog-search-icon {
	position: absolute;
	left: 0.75rem;
	color: var(--muted);
	pointer-events: none;
	font-size: 0.9rem;
}

.catalog-search-clear {
	position: absolute;
	right: 0.6rem;
	background: transparent;
	border: none;
	color: var(--muted);
	cursor: pointer;
	font-size: 0.85rem;
	padding: 0.2rem;
}

.catalog-search-clear:hover {
	color: var(--fg);
}

.catalog-controls-right {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.catalog-sort-select {
	padding: 0.55rem 1.8rem 0.55rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.88rem;
	font-family: inherit;
	background: var(--bg);
	color: var(--fg);
	outline: none;
	cursor: pointer;
}

.catalog-count-badge {
	font-size: 0.82rem;
	color: var(--muted);
	font-weight: 500;
	white-space: nowrap;
}

/* Copy Link Button & Details Toolbar */
.details-actions-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.btn-copy-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.95rem 1.4rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: #ffffff;
	color: var(--fg);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-copy-link:hover {
	background: var(--bg);
	border-color: #94a3b8;
}

.btn-copy-link.copied {
	background: #f0fdf4;
	border-color: #86efac;
	color: #166534;
}

/* Image Manager in Admin */
.image-manager-box {
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	padding: 1.25rem;
	background: #fafafa;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.image-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 1.25rem;
	border: 1px dashed #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}

.image-dropzone:hover {
	border-color: #0f1217;
	background: #f8fafc;
}

.image-dropzone input[type="file"] {
	display: none;
}

.image-previews-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	gap: 0.75rem;
}

.image-preview-card {
	position: relative;
	aspect-ratio: 1;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--border);
	background: #fff;
}

.image-preview-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.image-preview-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(15, 18, 23, 0.85);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.image-preview-remove:hover {
	background: var(--danger);
}

.image-preview-badge {
	position: absolute;
	bottom: 4px;
	left: 4px;
	background: rgba(15, 18, 23, 0.85);
	color: #fff;
	font-size: 9px;
	font-weight: 600;
	padding: 1px 5px;
	border-radius: 3px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
