/* ==========================================================================
   Odavadriided — minimalist marketplace styles
   Inspired by clean nordic/japanese e-commerce aesthetics.
   ========================================================================== */

:root {
	--odav-bg: #ffffff;
	--odav-bg-soft: #f7f6f3;
	--odav-text: #111111;
	--odav-text-muted: #6b6b6b;
	--odav-border: #e7e5e0;
	--odav-accent: #111111;
	--odav-accent-hover: #444444;
	--odav-danger: #b91c1c;
	--odav-success: #166534;
	--odav-radius: 0px;
	--odav-radius-soft: 6px;
	--odav-shadow: 0 1px 2px rgba(0,0,0,0.04);
	--odav-container: 1280px;
	--odav-gap: 24px;

	--odav-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Base resets ---------- */

html, body {
	background: var(--odav-bg);
	color: var(--odav-text);
	font-family: var(--odav-font);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

body, p, h1, h2, h3, h4, h5, h6, ul, ol, li, figure, blockquote {
	margin: 0;
}

a {
	color: var(--odav-accent);
	text-decoration: none;
	transition: color .15s ease;
}
a:hover { color: var(--odav-accent-hover); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.2;
}
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 18px; }

/* ---------- Layout ---------- */

.odav-container {
	max-width: var(--odav-container);
	margin: 0 auto;
	padding: 0 24px;
}

@media (max-width: 600px) {
	.odav-container { padding: 0 16px; }
}

/* ---------- Header ---------- */

.odav-site-header {
	border-bottom: 1px solid var(--odav-border);
	background: var(--odav-bg);
	position: sticky;
	top: 0;
	z-index: 100;
}

.odav-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 0;
}

.odav-logo {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--odav-text);
}
.odav-logo:hover { color: var(--odav-text); }

.odav-nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	padding: 0;
	margin: 0;
}
.odav-nav a {
	color: var(--odav-text);
	font-size: 14px;
	font-weight: 500;
}
.odav-nav a:hover { opacity: .65; }

.odav-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

@media (max-width: 720px) {
	.odav-nav { display: none; }
}

/* ---------- Buttons ---------- */

.odav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 500;
	font-family: var(--odav-font);
	background: var(--odav-accent);
	color: #fff;
	border: 1px solid var(--odav-accent);
	border-radius: var(--odav-radius);
	cursor: pointer;
	transition: all .15s ease;
	text-decoration: none;
	line-height: 1;
}
.odav-btn:hover { background: var(--odav-accent-hover); border-color: var(--odav-accent-hover); color: #fff; }

.odav-btn--ghost {
	background: transparent;
	color: var(--odav-text);
	border-color: var(--odav-border);
}
.odav-btn--ghost:hover { background: var(--odav-bg-soft); color: var(--odav-text); border-color: var(--odav-text); }

.odav-btn--small { padding: 8px 14px; font-size: 13px; }
.odav-btn--block { width: 100%; }

/* ---------- Hero ---------- */

.odav-hero {
	padding: 80px 0 60px;
	border-bottom: 1px solid var(--odav-border);
}
.odav-hero h1 {
	max-width: 720px;
	margin-bottom: 16px;
}
.odav-hero p {
	max-width: 560px;
	color: var(--odav-text-muted);
	font-size: 17px;
	margin-bottom: 28px;
}

/* ---------- Product grid ---------- */

.odav-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--odav-gap);
	padding: 40px 0 80px;
}
@media (max-width: 1024px) { .odav-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .odav-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 420px)  { .odav-grid { grid-template-columns: 1fr; } }

.odav-card {
	display: block;
	color: var(--odav-text);
}
.odav-card__media {
	aspect-ratio: 4/5;
	background: var(--odav-bg-soft);
	overflow: hidden;
	position: relative;
}
.odav-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.odav-card:hover .odav-card__media img { transform: scale(1.03); }

.odav-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--odav-text-muted);
	font-size: 13px;
}

.odav-card__body { padding: 12px 2px 0; }
.odav-card__title {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.odav-card__price {
	font-size: 14px;
	font-weight: 600;
	color: var(--odav-text);
}
.odav-card__seller {
	font-size: 12px;
	color: var(--odav-text-muted);
	margin-top: 2px;
}

/* ---------- Page heading ---------- */

.odav-page-heading {
	padding: 50px 0 24px;
	border-bottom: 1px solid var(--odav-border);
}
.odav-page-heading h1 { margin-bottom: 6px; }
.odav-page-heading p { color: var(--odav-text-muted); }

/* ---------- Single product ---------- */

.odav-product {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 60px;
	padding: 50px 0 100px;
}
@media (max-width: 900px) {
	.odav-product { grid-template-columns: 1fr; gap: 32px; padding: 28px 0 60px; }
}

.odav-product__gallery {
	display: grid;
	gap: 12px;
}
.odav-product__gallery img {
	width: 100%;
	aspect-ratio: 4/5;
	object-fit: cover;
	background: var(--odav-bg-soft);
}

.odav-product__info {
	position: sticky;
	top: 100px;
	align-self: start;
}
@media (max-width: 900px) { .odav-product__info { position: static; } }

.odav-product__title { font-size: 28px; margin-bottom: 12px; }
.odav-product__price {
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 24px;
}
.odav-product__meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--odav-text-muted);
	font-size: 14px;
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--odav-border);
}
.odav-product__meta strong { color: var(--odav-text); font-weight: 500; }

.odav-product__desc {
	white-space: pre-wrap;
	font-size: 15px;
	line-height: 1.65;
	color: #2a2a2a;
	margin-bottom: 32px;
}

/* ---------- Forms ---------- */

.odav-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 560px;
}
.odav-field { display: flex; flex-direction: column; gap: 6px; }
.odav-field label {
	font-size: 13px;
	font-weight: 500;
	color: var(--odav-text);
}
.odav-field .odav-help {
	font-size: 12px;
	color: var(--odav-text-muted);
}
.odav-field input[type="text"],
.odav-field input[type="email"],
.odav-field input[type="number"],
.odav-field input[type="password"],
.odav-field input[type="file"],
.odav-field textarea,
.odav-field select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--odav-border);
	background: #fff;
	font-size: 15px;
	font-family: var(--odav-font);
	color: var(--odav-text);
	border-radius: var(--odav-radius);
	transition: border-color .15s ease;
}
.odav-field textarea { min-height: 140px; resize: vertical; }
.odav-field input:focus,
.odav-field textarea:focus,
.odav-field select:focus {
	outline: none;
	border-color: var(--odav-text);
}

/* ---------- Notices ---------- */

.odav-notice {
	padding: 12px 14px;
	border-left: 3px solid var(--odav-accent);
	background: var(--odav-bg-soft);
	font-size: 14px;
	margin-bottom: 20px;
}
.odav-notice--success { border-left-color: var(--odav-success); }
.odav-notice--error { border-left-color: var(--odav-danger); color: var(--odav-danger); }

/* ---------- Contact-seller box ---------- */

.odav-contact-box {
	border: 1px solid var(--odav-border);
	padding: 20px;
	background: var(--odav-bg-soft);
}
.odav-contact-box h3 { font-size: 16px; margin-bottom: 12px; }

/* ---------- Seller dashboard ---------- */

.odav-dashboard {
	padding: 40px 0 80px;
}
.odav-dashboard__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}
.odav-dashboard__head h1 { font-size: 26px; }

.odav-listings {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	border-top: 1px solid var(--odav-border);
}
.odav-listing-row {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	gap: 16px;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid var(--odav-border);
}
.odav-listing-row__media {
	width: 80px;
	height: 100px;
	background: var(--odav-bg-soft);
	overflow: hidden;
}
.odav-listing-row__media img { width:100%; height:100%; object-fit: cover; }
.odav-listing-row__title { font-weight: 500; font-size: 15px; }
.odav-listing-row__meta { color: var(--odav-text-muted); font-size: 13px; }
.odav-listing-row__actions { display: flex; gap: 8px; }

@media (max-width: 600px) {
	.odav-listing-row { grid-template-columns: 64px 1fr; row-gap: 8px; }
	.odav-listing-row__media { width:64px; height: 80px; }
	.odav-listing-row__actions { grid-column: 1 / -1; }
}

.odav-status {
	display: inline-block;
	font-size: 11px;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 2px 8px;
	background: var(--odav-bg-soft);
	border: 1px solid var(--odav-border);
	color: var(--odav-text-muted);
}
.odav-status--publish { background: #e8f3ec; color: var(--odav-success); border-color: #cfe6d6; }
.odav-status--draft   { background: #fff7ed; color: #9a3412;          border-color: #fde4cc; }
.odav-status--pending { background: #eff6ff; color: #1e40af;          border-color: #dbe7fe; }

/* ---------- Footer ---------- */

.odav-site-footer {
	border-top: 1px solid var(--odav-border);
	padding: 40px 0;
	font-size: 13px;
	color: var(--odav-text-muted);
}
.odav-site-footer .odav-container {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

/* ---------- Misc helpers ---------- */

.odav-mt-1 { margin-top: 8px; }
.odav-mt-2 { margin-top: 16px; }
.odav-mt-3 { margin-top: 24px; }
.odav-mt-4 { margin-top: 32px; }
.odav-text-muted { color: var(--odav-text-muted); }
.odav-hidden { display: none !important; }

/* Image upload preview chips on add-listing form */
.odav-image-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}
.odav-image-thumb {
	position: relative;
	width: 80px;
	height: 100px;
	background: var(--odav-bg-soft);
	overflow: hidden;
}
.odav-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.odav-image-thumb button {
	position: absolute;
	top: 4px; right: 4px;
	background: #000; color: #fff;
	border: 0;
	width: 20px; height: 20px;
	font-size: 12px;
	cursor: pointer;
	line-height: 1;
}
