/* =================================================================
   KAMYL - stylesheet
   Colors and sizes are defined once below, then used everywhere.
   ================================================================= */
:root {
	color-scheme: light; /* form controls stay light even when the computer uses dark mode */
	/* British Racing Green scale (hue ~160) with the brand colour #17382E at 800.
	   Light shades = backgrounds and borders, dark shades = text. Text placed on the green is white. */
	--green-50: #f2f7f5;
	--green-100: #e2eee9;
	--green-200: #c3dbd1;
	--green-300: #97bfb0;
	--green-400: #5f9783;
	--green-500: #3f8069;
	--green-600: #2f6b57;
	--green-700: #235443;
	--green-800: #17382e;
	--green-900: #102820;
	--green-950: #0a1a15;

	--brand: var(--green-800);        /* buttons, header, sidebar */
	--brand-hover: var(--green-600);  /* hover, links and focus */
	--on-brand: #ffffff;
	--link: var(--green-600);
	--focus: var(--green-600);

	--ink-1: var(--green-950);
	--ink-2: #13241f;
	--ink-3: #21332d;
	--ink-4: #30443d;
	--ink-5: #3f534c;
	--ink-6: #576a63;
	--surface: #ffffff;
	--canvas: var(--green-50);
	--muted: #f7faf9;
	--hover: var(--green-100);
	--border: #c2d3cc;
	--border-soft: #dde8e3;
	--border-strong: var(--green-400);
	--accent: var(--green-600);

	--danger: #9c2c2c;
	--danger-strong: #7f2222;
	--danger-tint: #fef2f2;
	--danger-border: #e8caca;
	--success: #3a7f14;  /* brighter, yellower green so it never reads as the brand */
	--success-tint: #f4faee;
	--success-border: #cde3bc;
	--warning: #8a6d1f;
	--warning-tint: #fffbeb;
	--warning-border: #ead7a5;
	--info: #2457c5;
	--info-tint: #eff4ff;
	--info-border: #c6d6f5;

	--sidebar-bg: var(--brand);
	--sidebar-hover: var(--green-600);
	--sidebar-border: var(--green-700);
	--sidebar-text: var(--green-50);
	--sidebar-text-muted: var(--green-200);

	/* Type sizes are in rem: they follow the visitor's own text size setting and the browser zoom.
	   The small sizes stay fixed (body text never shrinks); the titles grow smoothly with the screen. */
	--font: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
	--fs-2xs: 0.6875rem;  /* 11px */
	--fs-xs: 0.75rem;     /* 12px */
	--fs-sm: 0.8125rem;   /* 13px */
	--fs-md: 0.875rem;    /* 14px */
	--fs-lg: 1rem;        /* 16px */
	--fs-xl: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);    /* 17 -> 19px */
	--fs-2xl: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);      /* 20 -> 24px */
	--fs-3xl: clamp(1.5rem, 1.15rem + 1.3vw, 2.125rem);    /* 24 -> 34px */

	--radius: 4px;
	--input-height: 38px;
	/* Sizes that follow the available room (see "FLUID LAYOUT" at the end of the file) */
	--sidebar-width: clamp(210px, 16vw, 256px);
	--content-width: clamp(1240px, 82vw, 1840px);  /* shop: wider on large and ultrawide screens */
	--panel-width: 1840px;                          /* seller center and administration */
	--page-pad: clamp(12px, 2.4vw, 32px);           /* space between the content and the screen edges */
	--gap: clamp(12px, 0.6rem + 0.5vw, 18px);
	--card-min: clamp(170px, 11vw + 40px, 230px);   /* narrowest product card before the grid drops a column */
	--tap: 44px;                                     /* touch target on touch screens */
	/* Side spaces that also keep clear of a phone notch or a rounded screen corner (viewport-fit=cover) */
	--pad-left: max(var(--page-pad), env(safe-area-inset-left, 0px));
	--pad-right: max(var(--page-pad), env(safe-area-inset-right, 0px));
}

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--green-300) var(--green-50); }
::selection { background: var(--green-200); color: var(--ink-1); }
::placeholder { color: var(--ink-6); opacity: 1; }
summary { cursor: pointer; color: var(--ink-3); }
summary::marker { color: var(--brand); }
[hidden] { display: none !important; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* 16px by default, the visitor's setting otherwise */
body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh; /* phones: the visible height, without the browser bars */
	background: var(--canvas);
	color: var(--ink-2);
	font-family: var(--font);
	font-size: var(--fs-sm);
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--ink-1); font-weight: 600; line-height: 1.2; }
h1 { font-size: var(--fs-2xl); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
p { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; height: auto; display: block; }
small, .muted { color: var(--ink-5); font-size: var(--fs-xs); }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.text-right { text-align: end; }
.nowrap { white-space: nowrap; }
.mt { margin-top: var(--gap); }
.mb { margin-bottom: var(--gap); }
.strong { font-weight: 600; color: var(--ink-1); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

/* ---------------- Forms ---------------- */
/* Label text and its star (*) stay on the same line; the hint and the field each take a full line below */
label {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	align-content: flex-start;
	gap: 5px 4px;
	color: var(--ink-3);
	font-size: var(--fs-xs);
	font-weight: 500;
}
label:not(.check):not(.address-option) > input, label:not(.check):not(.address-option) > select, label:not(.check):not(.address-option) > textarea,
label:not(.check):not(.address-option) > .hint, label:not(.check):not(.address-option) > .phone-input { flex: 0 0 100%; min-width: 0; }
label.check {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	color: var(--ink-2);
	font-size: var(--fs-sm);
}
input, select, textarea, button {
	font-family: var(--font);
	font-size: var(--fs-sm);
	color: var(--ink-1);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
	width: 100%;
	min-height: var(--input-height);
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}
input[type="file"] { font-size: var(--fs-xs); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-hover); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input[readonly]:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { background: var(--muted); color: var(--ink-4); border-color: var(--border-soft); cursor: default; }
/* Phone with a fixed country code: [+212][6 12 34 56 78] */
.phone-input { display: flex; align-items: stretch; }
.phone-prefix { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--border); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--muted); color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.phone-input input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { flex: 1; min-width: 0; border-radius: 0 var(--radius) var(--radius) 0; }
/* Checkout: address typed or pointed on a map */
.address-mode { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; border: 0; }
.address-mode legend { width: 100%; margin-bottom: 6px; padding: 0; font-weight: 600; }
.address-mode[hidden], #map-box[hidden] { display: none; }
.map-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 8px; }
.map { position: relative; height: 320px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #e4ede9; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.map-layer { position: absolute; inset: 0; }
.map-layer img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.map-pin { position: absolute; width: 22px; height: 22px; margin: -27px 0 0 -11px; border: 2px solid #ffffff; border-radius: 50% 50% 50% 0; background: var(--danger); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transform: rotate(-45deg); pointer-events: none; }
.map-pin[hidden] { display: none; }
.map-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.map-zoom button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #ffffff; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; }
.map-credit { position: absolute; right: 0; bottom: 0; padding: 2px 6px; background: rgba(255, 255, 255, 0.85); color: var(--ink-4); font-size: 11px; }
.field-error { margin-block: 4px 0; margin-inline-start: 24px; color: var(--danger); font-size: var(--fs-xs); font-weight: 600; }
.field-error[hidden] { display: none; }
.delivery-area-note { margin: -4px 0 0; color: var(--ink-5); font-size: var(--fs-xs); }
input:disabled, select:disabled, textarea:disabled { background: var(--muted); color: var(--ink-6); border-color: var(--border-soft); }
input[type="file"]::file-selector-button {
	margin-inline-end: 10px;
	padding: 6px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--green-50);
	color: var(--ink-1);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--border-strong); background: var(--green-100); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-hover); }
.required { color: var(--danger); }
.hint { color: var(--ink-5); font-size: var(--fs-xs); font-weight: 400; }

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.inline-form { display: inline; margin: 0; }
fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: var(--radius); }
legend { padding: 0 6px; color: var(--ink-1); font-weight: 600; }

/* ---------------- Buttons ---------------- */
.btn, button.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: var(--input-height);
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink-1);
	font-size: var(--fs-xs);
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}
.btn:hover { border-color: var(--border-strong); background: var(--muted); text-decoration: none; }
.btn-primary { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { border-color: var(--brand-hover); background: var(--brand-hover); color: var(--on-brand); }
.btn-danger { border-color: var(--danger); background: var(--danger); color: #ffffff; }
.btn-danger:hover { border-color: var(--danger-strong); background: var(--danger-strong); color: #ffffff; }
.btn-small { min-height: 30px; padding: 5px 10px; font-size: var(--fs-2xs); }
/* Full-width buttons wrap long labels instead of stretching their column (product buy box, cart summary) */
.btn-block { width: 100%; white-space: normal; text-align: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.link-button {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

/* ---------------- Alerts, badges, empty states ---------------- */
.alert {
	margin-bottom: var(--gap);
	padding: 10px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { border-color: var(--success-border); background: var(--success-tint); color: var(--success); }
.alert-error { border-color: var(--danger-border); background: var(--danger-tint); color: var(--danger); }
.alert-warning { border-color: var(--warning-border); background: var(--warning-tint); color: var(--warning); }
.alert-info { border-color: var(--info-border); background: var(--info-tint); color: var(--info); }

.badge {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 0 8px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--muted);
	color: var(--ink-3);
	font-size: var(--fs-2xs);
	font-weight: 600;
	white-space: nowrap;
}
.badge-success { border-color: var(--success-border); background: var(--success-tint); color: var(--success); }
.badge-danger { border-color: var(--danger-border); background: var(--danger-tint); color: var(--danger); }
.badge-warning { border-color: var(--warning-border); background: var(--warning-tint); color: var(--warning); }
.badge-info { border-color: var(--info-border); background: var(--info-tint); color: var(--info); }

.empty {
	padding: 36px 16px;
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink-4);
	text-align: center;
}
.empty strong { display: block; margin-bottom: 4px; color: var(--ink-1); font-size: var(--fs-md); }
.empty .btn { margin-top: 12px; }

/* ---------------- Boxes and page heads ---------------- */
.box {
	margin-bottom: var(--gap);
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}
.box-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: -16px -16px 16px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-soft);
}
.box-head h2 { font-size: var(--fs-md); }
.box-flush { padding: 0; }
.box-flush .box-head { margin: 0; }

.page-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}
.page-head p { margin: 4px 0 0; color: var(--ink-4); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--ink-4); font-size: var(--fs-xs); }

.columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.columns-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Definition list used for details */
.details { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 7px 12px; margin: 0; }
.details dt { color: var(--ink-5); font-size: var(--fs-xs); }
.details dd { margin: 0; color: var(--ink-1); overflow-wrap: anywhere; }

/* ---------------- Statistics ---------------- */
.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
	gap: 10px;
	margin-bottom: var(--gap);
}
.stat {
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}
.stat span { display: block; color: var(--ink-5); font-size: var(--fs-xs); }
.stat strong { display: block; margin-top: 4px; color: var(--ink-1); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: 2px; }
a.stat:hover { border-color: var(--border-strong); text-decoration: none; }

/* ---------------- Tables ---------------- */
.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	margin-bottom: var(--gap);
}
.box .table-wrap { border: 0; margin: 0; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--border-soft);
	text-align: left;
	vertical-align: middle;
	font-variant-numeric: tabular-nums;
}
table.data thead th {
	background: var(--muted);
	color: var(--ink-4);
	font-size: var(--fs-xs);
	font-weight: 600;
	white-space: nowrap;
}
/* Column titles that sort the list (sort_th()): a second click reverses the order */
table.data thead th.sortable a { color: inherit; text-decoration: none; }
table.data thead th.sortable a:hover { color: var(--ink-1); text-decoration: underline; }
table.data thead th.sorted { color: var(--ink-1); }
.sort-arrow { font-size: 0.8em; }
table.data tbody tr:hover { background: var(--muted); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tfoot td { background: var(--muted); font-weight: 600; }
table.data .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.thumb-small { width: 44px; height: 44px; border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; background: var(--muted); flex: 0 0 44px; }
.thumb-small img { width: 100%; height: 100%; object-fit: cover; }
.thumb-small .no-image { font-size: 9px; }
.cell-product { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.row-late td { background: var(--danger-tint); }

/* ---------------- Filters and pagination ---------------- */
.filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	margin-bottom: var(--gap);
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}
.filters label { min-width: 150px; flex: 1 1 150px; }
.filters .btn { flex: 0 0 auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--gap); border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-4); font-weight: 500; }
.tabs a:hover { color: var(--ink-1); text-decoration: none; }
.tabs a.current { border-bottom-color: var(--brand); color: var(--ink-1); }
.tabs .count { color: var(--ink-6); font-weight: 400; }

.pagination { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 18px 0; }
.pagination a, .pagination span {
	min-width: 34px;
	padding: 7px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	text-align: center;
}
.pagination .current { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.pagination .pagination-gap { border-color: transparent; background: none; }

/* =================================================================
   SHOP LAYOUT
   ================================================================= */
.shop-header { background: var(--brand); color: var(--on-brand); }
.shop-header-inner {
	display: flex;
	align-items: center;
	gap: 18px;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 12px var(--pad-right) 12px var(--pad-left);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-brand); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; }
.brand-logo { flex-shrink: 0; border-radius: var(--radius); }
.brand:hover { text-decoration: none; }
.search-form { position: relative; display: flex; flex: 1; min-width: 0; max-width: 640px; }
.search-form input[type="search"] { border-radius: var(--radius) 0 0 var(--radius); border-color: var(--green-900); }
.search-form button {
	padding: 0 18px;
	border: 1px solid var(--green-900);
	border-inline-start: 0;
	border-radius: 0 var(--radius) var(--radius) 0;
	background: var(--green-900);
	color: #ffffff;
	font-weight: 600;
	cursor: pointer;
}
.header-links { display: flex; align-items: center; gap: 16px; min-width: 0; max-width: 100%; margin-inline-start: auto; white-space: nowrap; }
/* Not enough room for every link (phones, large text, zoom): the row scrolls sideways instead of leaving the screen */
.header-links { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-block: 3px; margin-block: -3px; }
.header-links::-webkit-scrollbar { display: none; }
.shop-header :focus-visible { outline-color: #ffffff; outline-offset: -2px; }
.header-links a, .header-links .link-button { color: var(--green-100); font-size: var(--fs-xs); font-weight: 500; }
.header-links a:hover, .header-links .link-button:hover { color: var(--on-brand); }
.header-links .count {
	display: inline-block;
	min-width: 18px;
	padding: 1px 5px;
	border-radius: var(--radius);
	background: var(--green-950);
	color: #ffffff;
	font-size: var(--fs-2xs);
	font-weight: 700;
	text-align: center;
}
.header-cart, .header-sell { padding: 7px 10px; border: 1px solid var(--green-300); border-radius: var(--radius); }
.menu-toggle {
	display: none;
	width: 36px;
	height: 36px;
	border: 1px solid var(--green-300);
	border-radius: var(--radius);
	background: transparent;
	color: var(--on-brand);
	font-size: var(--fs-lg);
	cursor: pointer;
}
.category-bar { border-bottom: 1px solid var(--border); background: var(--surface); }
.category-bar-inner {
	display: flex;
	gap: 2px;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 0 calc(var(--pad-right) - 6px) 0 calc(var(--pad-left) - 6px);
	overflow-x: auto;
	scrollbar-width: none;
}
.category-bar-inner a { padding: 10px 8px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.category-bar-inner a:hover { color: var(--ink-1); }
.shop-main { max-width: var(--content-width); min-height: 60vh; margin: 0 auto; padding: clamp(14px, 2vw, 24px) var(--pad-right) 40px var(--pad-left); }
.shop-footer { border-top: 1px solid var(--border); background: var(--surface); }
.shop-footer-inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
	gap: 20px;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 28px var(--pad-right) max(28px, env(safe-area-inset-bottom, 0px)) var(--pad-left);
}
.shop-footer-inner strong { display: block; margin-bottom: 6px; color: var(--ink-1); }
.shop-footer-inner p { color: var(--ink-4); }
.shop-footer-bottom { padding: 12px 16px; border-top: 1px solid var(--border-soft); color: var(--ink-5); font-size: var(--fs-xs); text-align: center; }

/* ---------------- Home ---------------- */
.home-departments { display: none; }
@media screen and (min-width: 1024px) and (hover: hover), screen and (min-width: 1024px) and (pointer: none) {
	.home-departments { display: block; margin-bottom: 28px; }
	.home-departments + .home-intro, .home-departments ~ .home-category-directory { display: none; }
	.home-departments-head {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 8px 16px;
		margin-bottom: 14px;
	}
	.home-departments-head h2 { font-size: var(--fs-xl); }
	.home-departments-head a {
		padding: 6px 12px;
		border: 1px solid var(--border);
		border-radius: 999px;
		background: var(--surface);
		color: var(--brand);
		font-size: var(--fs-md);
		font-weight: 600;
	}
	.home-departments-head a:hover { background: var(--hover); text-decoration: none; }
	.home-department-grid {
		display: grid;
		grid-template-columns: repeat(7, minmax(0, 1fr));
		gap: var(--gap);
	}
	.home-department {
		display: flex;
		flex-direction: column;
		overflow: hidden;
		border: 1px solid var(--border-soft);
		border-radius: 12px;
		background: var(--surface);
		color: var(--ink-1);
	}
	.home-department img {
		display: block;
		width: 100%;
		height: auto;
		background: var(--green-100);
	}
	.home-department-label {
		display: flex;
		flex: 1;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		padding: 10px 12px;
		font-size: var(--fs-md);
		font-weight: 600;
		line-height: 1.3;
		overflow-wrap: anywhere;
	}
	.home-department-label::after {
		content: '';
		flex: 0 0 6px;
		height: 6px;
		margin-inline-end: 2px;
		border-block-start: 1.5px solid currentColor;
		border-inline-end: 1.5px solid currentColor;
		color: var(--green-600);
		transform: rotate(45deg);
	}
	[dir="rtl"] .home-department-label::after { transform: rotate(-45deg); }
	.home-department:hover {
		border-color: var(--border-strong);
		background: var(--hover);
		text-decoration: none;
	}
	.home-department:focus-visible, .home-departments-head a:focus-visible {
		outline: 2px solid var(--focus);
		outline-offset: 3px;
	}
}
.home-intro {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	gap: var(--gap);
	margin-bottom: 24px;
}
.home-categories { padding: 6px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.home-categories a { display: block; padding: 7px 14px; color: var(--ink-2); }
.home-categories a:hover { background: var(--hover); text-decoration: none; }
.category-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 10px;
	margin-bottom: 24px;
}
.category-tile { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.category-tile-title { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink-1); }
.category-tile-links { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-sm); line-height: 1.4; }
.category-tile-links a { color: var(--ink-6); }
.category-tile-links a:hover { color: var(--brand); }
.category-tile-more { font-weight: 600; }
.home-banner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	padding: clamp(18px, 3vw, 40px);
	border-radius: var(--radius);
	background: var(--brand);
	color: var(--green-100);
}
.home-banner h1 { color: var(--on-brand); font-size: var(--fs-3xl); max-width: 22ch; }
.home-banner p { max-width: 60ch; }
.home-banner .btn-primary { align-self: flex-start; border-color: var(--green-950); background: var(--green-950); color: #ffffff; }
.home-banner .btn-primary:hover { border-color: var(--brand-hover); background: var(--brand-hover); }
.home-promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; margin-top: 6px; }
.home-promises div { padding-top: 10px; border-top: 1px solid var(--green-400); font-size: var(--fs-xs); }
.home-promises strong { display: block; color: var(--on-brand); font-size: var(--fs-sm); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }

/* ---------------- Product grid ---------------- */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min), 100%), 1fr));
	gap: clamp(8px, 0.4rem + 0.4vw, 14px);
}
.product-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
}
.product-card:hover { border-color: var(--border-strong); }
.product-card a:hover { text-decoration: none; }
.product-card-image { aspect-ratio: 1 / 1; background: var(--muted); border-bottom: 1px solid var(--border-soft); }
.product-card-image img { width: 100%; height: 100%; object-fit: contain; }
.product-card-body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.product-card-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
	color: var(--ink-1);
	line-height: 1.3;
}
.product-card-store { color: var(--ink-5); font-size: var(--fs-2xs); }
.price { color: var(--ink-1); font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.old-price { color: var(--ink-6); font-size: var(--fs-xs); text-decoration: line-through; }
.discount { color: var(--danger); font-size: var(--fs-2xs); font-weight: 700; }
.no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 40px;
	color: var(--ink-6);
	font-size: var(--fs-xs);
}
.stars { color: var(--brand-hover); letter-spacing: 1px; font-size: var(--fs-xs); }
.star-off { color: var(--border); }

/* ---------------- Catalog ---------------- */
.catalog-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.catalog-filters { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.catalog-filters h3 { margin: 14px 0 8px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); }
.catalog-filters h3:first-child { margin-top: 0; }
.catalog-filters .filter-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.catalog-filters .filter-list a.current { font-weight: 700; }
.catalog-filters .sub { padding-left: 12px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.catalog-toolbar form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.catalog-toolbar select { width: auto; min-width: 190px; }
.catalog-toolbar select[name="dir"] { min-width: 130px; }
.breadcrumb { margin-bottom: 10px; color: var(--ink-5); font-size: var(--fs-xs); }
.breadcrumb a { color: var(--ink-4); }

/* ---------------- Product page ---------------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 280px; gap: var(--gap); align-items: start; }
.gallery-main { aspect-ratio: 1 / 1; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gallery-thumbs button { width: 60px; height: 60px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; cursor: pointer; }
.gallery-thumbs button.current { border-color: var(--brand); border-width: 2px; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: var(--fs-xl); line-height: 1.3; }
.product-info .price { font-size: var(--fs-2xl); }
.product-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 12px; color: var(--ink-5); font-size: var(--fs-xs); }
.buy-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.qty-input { width: 90px !important; flex: 0 0 90px !important; }
.stock-ok { color: var(--success); font-weight: 600; }
.stock-low { color: var(--warning); font-weight: 600; }
.stock-out { color: var(--danger); font-weight: 600; }
.seller-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.description { white-space: pre-line; line-height: 1.6; }
.review { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.review:last-child { border-bottom: 0; }
.review-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.review-photos img { display: block; width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.review-photo-admin { display: grid; gap: 4px; justify-items: center; }
.review-photos-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.review-photos-edit .hint { flex-basis: 100%; }
.review-photo-remove { display: grid; gap: 4px; justify-items: center; font-size: var(--fs-xs); }
.review-photo-remove img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.review-reply { margin-top: 10px; padding: 10px 12px; border-inline-start: 3px solid var(--brand); border-radius: var(--radius); background: var(--muted); }
.review-reply p { margin: 4px 0 0; }
.review-reply-label { display: inline-block; margin-inline-end: 4px; padding: 1px 8px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.review-reply-error { margin: 0; color: var(--danger); font-weight: 600; }
.review-reply-remove { margin-top: 8px; }

/* FAQ and Contact pages */
.faq-item { border-top: 1px solid var(--border-soft); }
.faq-item:first-of-type { border-top: 0; }
.faq-item > summary { padding: 10px 0; cursor: pointer; font-weight: 600; }
.faq-item > p { margin: 0 0 12px; color: var(--ink-4); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; align-items: start; }
.contact-grid .box { margin: 0; }
.contact-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.contact-list .muted { display: inline-block; min-width: 56px; }
/* Anti-spam field of the contact form: off screen, never seen nor focused by people */
.contact-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
#contact-form, #my-messages { margin-bottom: 16px; }
.terms-check a { font-weight: 600; }

/* Buy again */
.order-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.reorder-hint { margin: -6px 0 14px; font-size: var(--fs-xs); }
.reorder-notice ul { margin: 6px 0 0; padding-inline-start: 20px; }
.price-changed { margin-top: 4px; }

/* Accounting exports */
.export-presets { margin-bottom: 14px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; align-items: start; }
.export-grid .box { margin: 0; }
.export-grid select { max-width: 100%; }
.export-notes { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }

/* "Export to CSV" panel of the Orders pages */
.export-panel > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.export-panel > summary::-webkit-details-marker { display: none; }
.export-panel > summary::before { content: "\25B8"; color: var(--brand); }
.export-panel[open] > summary::before { content: "\25BE"; }
.export-form { display: grid; gap: 14px; margin-top: 14px; }
.export-reports { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.export-reports .check { align-items: flex-start; }
.export-panel select { max-width: 100%; }

/* Recently viewed (drawn by script.js from the browser's own history) */
.recently-viewed .section-head { flex-wrap: wrap; }
.recent-actions { display: flex; gap: 14px; font-size: var(--fs-xs); }
.recent-note { margin: -6px 0 12px; font-size: var(--fs-xs); }
.consent-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--muted); }
.consent-choice p { flex-basis: 100%; margin: 0; }

/* Couriers and tracking */
.tracking-number { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.courier-box .box-head a { font-weight: 400; }
.slip-courier { margin: 10px 0 0; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.slip-courier strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.slip-cod td { font-size: var(--fs-md); border-top: 2px solid var(--ink-1); }

/* Reminder settings */
.reminder-type { display: grid; gap: 10px; }
.reminder-type .muted { margin: 0; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix input { max-width: 120px; }

/* Vacation mode */
.vacation-line { margin: 6px 0 0; font-size: var(--fs-xs); }
.vacation-modes { display: grid; gap: 10px; }
.vacation-due { margin: 6px 0 0; padding-inline-start: 20px; }
.vacation-status form { margin-inline-start: 8px; }

/* Audit log */
.audit-table td { vertical-align: top; }
.audit-changes { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 6px 0 0; font-size: var(--fs-xs); }
.audit-changes dt { color: var(--ink-4); }
.audit-changes dd { margin: 0; word-break: break-word; }
.audit-old { text-decoration: line-through; color: var(--ink-4); }
.audit-new { font-weight: 600; }

/* Commission statements */
.statement-detail .box-head { gap: 10px; }
.statement-summary { display: grid; grid-template-columns: max-content max-content; gap: 4px 28px; margin: 0; }
.statement-summary dd { margin: 0; text-align: right; }
tr.row-selected td { background: var(--muted); }
tr.row-cancelled td { color: var(--ink-4); text-decoration: line-through; }
tr.row-cancelled td:last-child { text-decoration: none; }
.review-vote { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
.review-vote .is-voted { font-weight: 600; }

/* ---------------- Store page ---------------- */
.store-head { display: flex; gap: 16px; align-items: center; }
.store-logo { display: flex; align-items: center; justify-content: center; width: 100px; height: 100px; flex: 0 0 100px; border: 1px solid var(--border); border-radius: 12px; background: #ffffff; overflow: hidden; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-logo-small { width: 48px; height: 48px; flex-basis: 48px; border-radius: 8px; }
.store-logo-small .no-image { font-size: var(--fs-lg); }
.seller-card-store { display: flex; align-items: center; gap: 10px; }
.store-logo .no-image { font-size: var(--fs-2xl); font-weight: 700; color: var(--ink-4); }

/* ---------------- Cart, checkout and order tracking ---------------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.seller-group { margin-bottom: var(--gap); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.seller-group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--border-soft);
	background: var(--muted);
}
.seller-group-head h2, .seller-group-head h3 { font-size: var(--fs-sm); }
.cart-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
/* Checkout: a line whose price changed since the page was shown (listed in the message above) */
.cart-line-changed { background: var(--warning-tint); box-shadow: inset 3px 0 0 var(--warning); }
.cart-line .thumb-small { width: 64px; height: 64px; }
.cart-line-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cart-line-actions input { width: 70px !important; }
.seller-group-foot { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--border-soft); color: var(--ink-4); font-size: var(--fs-xs); }
.summary { position: sticky; top: 16px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.summary-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); font-size: var(--fs-lg); font-weight: 700; color: var(--ink-1); }
.address-choice { display: grid; gap: 8px; }
.address-option { display: flex; flex-wrap: nowrap; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-weight: 400; color: var(--ink-2); font-size: var(--fs-sm); }
.address-option input[type="radio"] { flex: 0 0 auto; margin-top: 2px; }
.address-option:has(input:checked) { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
[dir="rtl"] .address-option:has(input:checked) { box-shadow: inset -3px 0 0 var(--brand); }
/* Courier type of a delivery (seller/delivery.php): one card per type, its use explained below the name */
.courier-types { display: grid; gap: 8px; }
.courier-types legend { margin-bottom: 6px; padding: 0; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; }
.courier-types .address-option > span { display: grid; gap: 2px; }
.courier-types .address-option strong { color: var(--ink-1); }
/* Checkout: delivery or pickup, store by store */
.fulfillment-choice { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.fulfillment-choice:last-child { margin-bottom: 0; }
.fulfillment-choice legend { margin-bottom: 8px; padding: 0; }
.fulfillment-choice p { margin: 0; }
.fulfillment-choice .btn { margin-inline-start: 6px; }
/* Store page: address and opening hours for visits and pickup */
.store-visit p { margin: 0 0 6px; }
.store-visit .btn { margin-top: 4px; }
.payment-method { padding: 12px; border: 1px solid var(--brand); border-radius: var(--radius); background: var(--muted); }

/* Seller order: the steps of the delivery and the next action */
.flow-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); /* 6 steps, 5 for a pickup */ margin: 4px 0 14px; padding: 0; list-style: none; }
.flow-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.flow-step + .flow-step::before { content: ""; position: absolute; top: 14px; inset-inline-end: 50%; width: 100%; height: 3px; background: var(--border-soft); z-index: 0; }
.flow-step.flow-done::before, .flow-step.flow-current::before, .flow-step.flow-problem::before { background: var(--brand); }
.flow-dot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 2px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--ink-5); font-size: var(--fs-xs); font-weight: 700; }
.flow-done .flow-dot { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.flow-current .flow-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--muted); }
.flow-problem .flow-dot { border-color: var(--danger); background: var(--danger); color: #ffffff; }
.flow-label { color: var(--ink-5); font-size: var(--fs-xs); }
.flow-done .flow-label { color: var(--ink-3); }
.flow-current .flow-label, .flow-problem .flow-label { color: var(--ink-1); font-weight: 700; }
.flow-problem .flow-label { color: var(--danger); }
.flow-next { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--muted); color: var(--ink-2); font-size: var(--fs-sm); }
.flow-next-title { display: inline-block; margin-inline-end: 6px; color: var(--brand); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.order-flow-closed .flow-steps { opacity: 0.45; }
@media print {
	.order-flow { display: none !important; }
}
/* Seller order: the current step is the main focus of the screen (large headline, next action, wide main area) */
.order-focus { margin-bottom: var(--gap); padding: 18px 18px 20px; border: 1px solid var(--border); border-top: 4px solid var(--brand); border-radius: var(--radius); background: var(--surface); }
.order-focus-alert { border-top-color: var(--danger); }
.order-focus .flow-steps { margin: 0 0 18px; }
.focus-head { margin-bottom: 14px; }
.focus-kicker { display: inline-block; color: var(--brand); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.order-focus-alert .focus-kicker { color: var(--danger); }
.focus-title { margin: 6px 0 0; color: var(--ink-1); font-size: var(--fs-2xl); font-weight: 500; line-height: 1.3; }
.focus-title strong { font-weight: 700; }
.order-focus .stats { margin-bottom: 16px; }
.order-focus .stat { background: var(--muted); }
.order-focus .stat strong { font-size: var(--fs-2xl); }
.focus-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: var(--gap); align-items: start; }
.focus-grid > * { min-width: 0; container-type: inline-size; }
.focus-main > :last-child, .focus-side > :last-child { margin-bottom: 0; }
/* The products to prepare or hand over: larger rows, the quantity stands out */
.focus-main .order-products .thumb-small { width: 64px; height: 64px; flex-basis: 64px; }
.focus-main .order-products td { padding-block: 12px; font-size: var(--fs-md); }
.focus-main .order-products tbody td:nth-child(4) { color: var(--ink-1); font-size: var(--fs-xl); font-weight: 700; }
/* The courier and the map get the room while the delivery is arranged and followed */
.focus-main .map { height: clamp(360px, 55vh, 620px); }
.focus-courier-box .courier-panel > h3 { display: none; }
.focus-side .form-stack > .btn-primary { width: 100%; min-height: 44px; font-size: var(--fs-md); }
@container page (max-width: 900px) {
	.focus-grid { grid-template-columns: minmax(0, 1fr); }
	.order-focus { padding: 14px; }
}
@media print {
	.order-focus { padding: 0; border: 0; }
	.focus-grid { grid-template-columns: 1fr !important; }
}
.progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 4px 0 12px; }
.progress span { height: 4px; border-radius: 2px; background: var(--border-soft); }
.progress span.done { background: var(--brand); }
.progress-labels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; color: var(--ink-5); font-size: var(--fs-2xs); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 12px 18px; border-left: 1px solid var(--border); margin-left: 4px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline time { display: block; color: var(--ink-5); font-size: var(--fs-2xs); }
.status-actions { display: grid; gap: 10px; }
.status-actions form { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--muted); }

/* ---------------- Auth pages ---------------- */
.auth-box { max-width: 440px; margin: 20px auto; }
.auth-box-wide { max-width: 720px; }
.auth-box h1 { margin-bottom: 4px; }
.auth-box .lead { margin-bottom: 16px; color: var(--ink-4); }
.step-label { margin: 0 0 6px; color: var(--brand); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.auth-links { margin-top: 14px; color: var(--ink-4); font-size: var(--fs-xs); }
.auth-links a { text-decoration: underline; }

/* Read by screen readers, not shown */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------- Before the seller registration (pages/register_seller_intro.php) ----------------
   Boxes and the order step dots */
.seller-intro { max-width: 1100px; margin: 0 auto; }
.seller-intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.seller-intro-steps h3 { margin-bottom: 6px; }
.seller-intro-steps p { color: var(--ink-4); }
.seller-intro-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.seller-intro-steps li { display: flex; align-items: flex-start; gap: 12px; margin: 0; }
.seller-intro-steps .flow-dot { flex: 0 0 auto; border-color: var(--brand); color: var(--brand); }
.seller-intro-list { display: grid; gap: 8px; margin: 0; padding: 0; padding-inline-start: 18px; }
.seller-intro-list li::marker { color: var(--brand); }
/* Single offer of the seller intro: price and button on one side, everything included on the other */
.seller-plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px 32px; padding: 24px; border-top: 4px solid var(--brand); }
.seller-plan h2 { font-size: var(--fs-2xl); }
.seller-plan-offer > p { margin: 6px 0 0; }
.seller-plan-price { margin-top: 18px !important; color: var(--ink-1); font-size: var(--fs-md); }
.seller-plan-price strong { font-size: 3rem; line-height: 1; }
.seller-plan-price span { color: var(--ink-5); font-size: var(--fs-sm); }
.seller-plan-note { color: var(--ink-3); font-weight: 600; }
.seller-plan-btn { display: flex; justify-content: center; width: 100%; margin: 18px 0 4px; }
.seller-plan-features { padding-inline-start: 32px; border-inline-start: 1px solid var(--border-soft); }
.seller-plan-included { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); color: var(--ink-1); font-weight: 700; }
.seller-plan-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.seller-plan-list li { position: relative; margin: 0; padding-inline-start: 26px; }
.seller-plan-list li::before { content: ""; position: absolute; top: 3px; inset-inline-start: 4px; width: 6px; height: 11px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@container (max-width: 760px) {
	.seller-plan { grid-template-columns: minmax(0, 1fr); }
	.seller-plan-features { padding-inline-start: 0; padding-top: 20px; border-inline-start: 0; border-top: 1px solid var(--border-soft); }
}
@container (max-width: 520px) {
	.seller-plan-list { grid-template-columns: minmax(0, 1fr); }
}
.seller-intro-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 4px solid var(--brand); }
.seller-intro-end h2 { margin-bottom: 4px; }

/* ---------------- Seller registration in steps (pages/register_seller.php, script.js) ----------------
   Without JavaScript every step is shown one under the other. With it (.wizard-on), one step at a time,
   with the order steps (.flow-steps) as the stepper: a step already reached can be clicked. */
.wizard-nav { margin: 16px 0 20px; }
.wizard-nav .wizard-steps { margin: 0; }
.wizard-step-button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.wizard-step-button:disabled { cursor: default; }
.wizard-step-button:not(:disabled):hover .flow-label { color: var(--link); text-decoration: underline; }
.wizard-step-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius); }
.wizard-panel + .wizard-panel { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border-soft); }
.wizard-on .wizard-panel + .wizard-panel { margin-top: 0; padding-top: 0; border-top: 0; }
.wizard-title { margin-bottom: 4px; font-size: var(--fs-lg); }
.wizard-title:focus { outline: none; }
.wizard-intro { margin-bottom: 14px; color: var(--ink-4); }
.wizard-group > .hint { margin: 0 0 10px; }
.wizard-reveal { padding: 14px; border-inline-start: 3px solid var(--green-200); border-radius: var(--radius); background: var(--muted); }
.wizard-narrow input:not([type="checkbox"]):not([type="radio"]) { max-width: 140px; }
.wizard-more { padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.wizard-more > summary { font-weight: 600; }
.wizard-more[open] > summary { margin-bottom: 12px; }
.wizard-actions { justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.wizard-actions [data-wizard-next], .wizard-actions [data-wizard-submit] { margin-inline-start: auto; min-width: 150px; }
.wizard-draft-note { margin: 10px 0 0; }
.wizard-draft { text-align: start; }
.wizard-draft .link-button { margin-inline-start: 6px; color: var(--link); font-weight: 600; text-decoration: underline; }
.wizard-errors { text-align: start; }
.wizard-errors ul { margin-top: 6px; }
.wizard-errors a { color: inherit; text-decoration: underline; }
.wizard-errors:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
/* Message under a field (inside its label) and the field itself */
.field-error-input { flex: 0 0 100%; margin: 0; }
input[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]), select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-tint); }
input[aria-invalid="true"]:focus, select[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
/* Departments of a store: boxes in as many columns as the room allows (at least one is ticked) */
.department-list legend { padding: 0 6px; }
.department-list legend .hint { display: block; margin-top: 2px; }
.department-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 8px 14px; margin-top: 6px; }
.department-list[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-tint); }
.department-list .field-error-input { margin-top: 10px; }
/* Two choices side by side as cards (individual / company) */
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-cards legend { margin-bottom: 8px; padding: 0; }
.choice-card { align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.choice-card:hover { border-color: var(--border-strong); }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--muted); box-shadow: inset 0 0 0 1px var(--brand); }
.choice-card input, .check-top input { margin-top: 2px; }
.check-top { align-items: flex-start; }
/* Review: the answers of each step, with a link back to the step */
.wizard-summary { display: grid; gap: 12px; }
.summary-block { padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--muted); }
.summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.summary-head .link-button { color: var(--link); font-size: var(--fs-xs); font-weight: 600; }
.summary-block .details dd { white-space: pre-line; }
[dir="rtl"] .summary-block dd[dir="ltr"] { text-align: right; }
@container (max-width: 520px) {
	.choice-cards { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 480px) {
	/* Phones: only the numbered dots (the step name is in the line above the title), names kept for screen readers */
	.wizard-nav .wizard-steps { grid-auto-columns: minmax(0, 1fr); overflow: visible; padding-bottom: 0; }
	.wizard-nav .flow-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.wizard-actions .btn { flex: 1 1 auto; min-width: 0; }
}

/* =================================================================
   PANEL LAYOUT (seller center and administration)
   ================================================================= */
.sidebar {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	width: var(--sidebar-width);
	background: var(--sidebar-bg);
	color: var(--sidebar-text);
	overflow-y: auto;
}
.sidebar-brand { padding: max(16px, env(safe-area-inset-top, 0px)) 16px 16px; border-bottom: 1px solid var(--sidebar-border); }
.sidebar .sidebar-brand a { display: flex; align-items: center; justify-content: flex-start; gap: 8px; color: var(--on-brand); font-size: var(--fs-xl); font-weight: 700; }
.sidebar-brand span { color: var(--sidebar-text-muted); font-size: var(--fs-xs); }
.sidebar-nav, .sidebar-foot { display: grid; gap: 2px; padding: 8px; }
.sidebar-nav { flex: 1; align-content: start; }
.sidebar-foot { border-top: 1px solid var(--sidebar-border); }
.sidebar a, .sidebar button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	min-height: 34px;
	padding: 7px 10px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: transparent;
	color: var(--sidebar-text);
	font-size: var(--fs-sm);
	font-weight: 500;
	text-align: left;
	cursor: pointer;
}
.sidebar a:hover, .sidebar button:hover { background: var(--sidebar-hover); color: var(--on-brand); text-decoration: none; }
.sidebar a.current { border-color: var(--green-950); background: var(--green-950); color: #ffffff; }
.sidebar a.current .sidebar-count { background: #ffffff; color: var(--ink-1); }
.sidebar-foot form { margin: 0; }
.sidebar-count { min-width: 20px; padding: 1px 6px; border-radius: var(--radius); background: var(--green-950); color: #ffffff; font-size: var(--fs-2xs); font-weight: 700; text-align: center; }
.panel-body { min-width: 0; min-height: 100vh; min-height: 100dvh; margin-inline-start: var(--sidebar-width); }
.panel-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 0 var(--pad-right) 0 var(--pad-left);
	border-bottom: 1px solid var(--border);
	background: var(--surface);
}
.panel-topbar-title { color: var(--ink-4); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.panel-topbar-user { min-width: 0; margin-inline-start: auto; overflow: hidden; color: var(--ink-4); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.panel .menu-toggle { border-color: var(--border); color: var(--ink-1); }
.panel-main { max-width: var(--panel-width); margin-inline: auto; padding: clamp(14px, 1.8vw, 24px) var(--pad-right) max(40px, env(safe-area-inset-bottom, 0px)) var(--pad-left); }

/* Product form */
.image-manager { display: flex; flex-wrap: wrap; gap: 10px; }
.image-item { width: 120px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.image-item .image-frame { height: 110px; background: var(--muted); }
.image-item img { width: 100%; height: 100%; object-fit: cover; }
.image-item .image-tools { display: grid; gap: 4px; padding: 6px; font-size: var(--fs-2xs); }
.variation-table input { min-height: 32px !important; padding: 5px 8px !important; }
.attribute-field[hidden] { display: none; }
/* Bundles */
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.bundle-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.bundle-card:hover { border-color: var(--border-strong); }
.bundle-card a:hover { text-decoration: none; }
.bundle-card-images { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); background: var(--muted); }
.bundle-card-images .thumb-small { width: 56px; height: 56px; flex-basis: 56px; }
.bundle-card-body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.bundle-thumb { display: flex; align-items: center; justify-content: center; background: var(--brand); }
.bundle-thumb span { color: #ffffff; font-size: var(--fs-2xs); font-weight: 700; }
.bundle-content { margin: 4px 0; padding-left: 16px; color: var(--ink-3); font-size: var(--fs-xs); }
.bundle-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bundle-options label { min-width: 140px; }
.bundle-item-head, .bundle-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 32px; gap: 6px; align-items: center; }
.bundle-item-head { margin-bottom: 6px; color: var(--ink-5); font-size: var(--fs-2xs); font-weight: 600; }
#bundle-items { display: grid; gap: 6px; }
.bundle-item-row .btn { min-height: 32px; padding: 0; }
.order-bundles { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--success-border); border-radius: var(--radius); background: var(--success-tint); }

/* Bulk pricing */
.bulk-pricing { display: grid; gap: 8px; }
.tier-head, .tier-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 6px; align-items: center; max-width: 460px; }
.tier-head { color: var(--ink-5); font-size: var(--fs-2xs); font-weight: 600; }
#tier-rows { display: grid; gap: 6px; }
.tier-row input { min-height: 32px !important; padding: 5px 8px !important; }
.tier-row .btn { min-height: 32px; padding: 0; }
.bulk-table { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--green-50); }
.bulk-table table { width: 100%; margin: 6px 0; border-collapse: collapse; }
.bulk-table td { padding: 4px 6px; border-bottom: 1px solid var(--border-soft); font-size: var(--fs-xs); }
.bulk-table tr.current td { background: var(--green-100); font-weight: 600; color: var(--ink-1); }
.product-card-bulk { color: var(--brand); font-size: var(--fs-2xs); font-weight: 600; }

/* Option editor of the product form */
.option-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.option-group { display: grid; gap: 8px; align-content: start; background: var(--muted); }
.option-values { display: grid; gap: 6px; }
.option-value-head, .option-value-row { display: grid; grid-template-columns: minmax(0, 1fr) 82px 32px; gap: 6px; align-items: center; }
.option-value-head { color: var(--ink-5); font-size: var(--fs-2xs); font-weight: 600; }
.option-value-row input { min-height: 32px !important; padding: 5px 8px !important; }
.option-value-row .btn { min-height: 32px; padding: 0; }
.box .combo-head { margin: 18px 0 8px; padding: 0; border-bottom: 0; }
.combo-head h3 .muted { font-weight: 400; }
.custom-attribute-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }

/* Permissions matrix */
.matrix td, .matrix th { text-align: center !important; }
.matrix td:first-child, .matrix th:first-child { text-align: left !important; }

/* Privacy: guest checkout, order number + secret code, delivery PIN, customer requests */
.privacy-note { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--muted); color: var(--ink-4); font-size: var(--fs-sm); line-height: 1.5; }
.hp-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.code-box { margin-bottom: var(--gap); padding: 16px; border: 2px solid var(--brand); border-radius: var(--radius); background: var(--surface); }
.code-box h2 { margin-bottom: 6px; }
.code-box-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.code-box-values div { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--green-50); }
.code-box-values small { display: block; color: var(--ink-5); }
.code-value { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-xl); font-weight: 700; letter-spacing: 1px; color: var(--ink-1); overflow-wrap: anywhere; }
.pin-value { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-lg); font-weight: 700; letter-spacing: 3px; }
.request-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.request-line:first-child { border-top: 0; }
/* Reason of a return / an exchange (a problem with what was delivered stands out for the store) */
.request-reason { font-size: 0.9em; }
.request-reason-store strong, small.request-reason-store { color: var(--danger); }
aside .request-line { grid-template-columns: 1fr; }
.request-line p { margin: 4px 0 0; }
.item-choice { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }

/* Cookie notice (bottom of the page, closed with "OK, understood") */
.cookie-notice { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 16px; max-width: 760px; margin: 0 auto; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 30px rgba(10, 26, 21, 0.18); font-size: var(--fs-sm); line-height: 1.5; }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; flex: 1; }
.cookie-notice-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; white-space: nowrap; }
.cookie-table td:first-child { font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.privacy-list { margin: 0; padding-left: 18px; line-height: 1.7; }
/* Never taller than the screen, never under a phone's notch or home bar */
.cookie-notice { inset-inline: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-width: 640px) {
	.cookie-notice { flex-direction: column; align-items: stretch; }
	.cookie-notice-actions { flex-direction: row; flex-wrap: wrap; justify-content: space-between; white-space: normal; }
	.cookie-notice-actions .btn { flex: 1 1 auto; white-space: normal; }
}
@media print {
	.cookie-notice { display: none !important; }
}

/* Courier management: package-scoped cards and the public live profile. */
.courier-delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-block: 16px; }
.delivery-request-card { display: flex; flex-direction: column; gap: 10px; }
.delivery-request-card form { margin-block-start: auto; }
.courier-public-profile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-block: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.courier-avatar { display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 50%; background: var(--green-100); color: var(--brand); font-weight: 800; }
.secret-code { margin-block: 12px; font-size: clamp(1.5rem, 5vw, 2.25rem); font-weight: 800; letter-spacing: .12em; }
.compact-form { min-inline-size: 190px; }
.request-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding-block: 14px; border-block-end: 1px solid var(--border); }

/* Printing (seller delivery slip) */
@media print {
	.sidebar, .panel-topbar, .shop-header, .category-bar, .shop-footer, .back-link, .page-head .actions, form, .alert { display: none !important; }
	.panel-body { margin-left: 0; }
	body { background: #ffffff; }
	.box, .table-wrap, .stat { border-color: var(--border-strong); }
	.code-box .btn { display: none !important; }
	/* One column on paper: the products table gets the full width and is never cut */
	.columns, .columns-equal { grid-template-columns: 1fr !important; }
	.table-wrap { overflow: visible; }
	table.data { width: 100%; }
	.no-print { display: none !important; }
	.box, tr { break-inside: avoid; }
}

/* Exchanges: replacement chosen by the customer and price difference */
.exchange-for { color: var(--ink-3); }
.price-diff { margin: 6px 0 0; padding: 6px 10px; border-radius: var(--radius); background: var(--muted); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.price-diff-more { background: var(--warning-tint); color: var(--warning); }
.price-diff-less { background: var(--success-tint); color: var(--success); }
.price-diff:empty { display: none; }
.return-item { padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); display: grid; gap: 8px; }
.return-item-fields { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.return-items { display: grid; gap: 8px; }
.return-box .box-head + .request-line { border-top: 0; padding-top: 0; }
.return-item-done { background: var(--muted); color: var(--ink-4); }

/* Conversation of a request (customer / store / marketplace) */
.thread { display: grid; gap: 6px; margin-top: 10px; }
.thread-msg { max-width: 92%; padding: 7px 10px; border-radius: var(--radius); background: var(--muted); }
.thread-msg small { display: block; color: var(--ink-5); }
.thread-msg p { margin: 2px 0 0; color: var(--ink-2); }
.thread-customer { justify-self: start; }
.thread-seller, .thread-marketplace { justify-self: end; background: var(--surface); border: 1px solid var(--border); }
.thread-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 8px; }
.done-options { margin: 0; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: var(--radius); display: grid; gap: 8px; }
.done-options legend { padding: 0 4px; font-size: var(--fs-xs); color: var(--ink-4); }
.request-line-single { grid-template-columns: 1fr; }
.request-line > form { align-content: start; }
.text-warning { color: var(--warning); }

/* Review of a delivered product (customer order page) */
.review-panel, .review-done { grid-column: 1 / -1; }
.review-panel > summary { list-style: none; cursor: pointer; width: fit-content; }
.review-panel > summary::-webkit-details-marker { display: none; }
.review-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.review-toggle:hover { border-color: var(--brand); color: var(--brand-hover); }
.review-panel[open] .review-toggle { border-color: var(--brand); background: var(--muted); }
.review-form { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--muted); }
.review-title { margin: 0; color: var(--ink-2); }
.stars-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; width: fit-content; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { display: block; font-size: 30px; line-height: 1; color: var(--border); cursor: pointer; transition: color 80ms ease, transform 80ms ease; }
.stars-input label:hover, .stars-input label:hover ~ label, .stars-input input:checked ~ label { color: var(--brand-hover); }
.stars-input label:hover { transform: scale(1.12); }
.stars-input input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.stars-input-text { margin: -4px 0 0; color: var(--ink-4); font-size: var(--fs-xs); font-weight: 600; }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.review-done { margin-top: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--muted); font-size: var(--fs-sm); }
.review-done p { margin: 4px 0 0; color: var(--ink-3); }
.review-done-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-delete { color: var(--danger); font-size: var(--fs-xs); }
.review-edit { margin-top: 8px; }

/* Commission rules (administration) */
.check-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.check-list .check-indent { padding-left: 20px; }
.rule-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 999px; background: var(--muted); color: var(--ink-1); font-weight: 600; font-variant-numeric: tabular-nums; }
tr.row-disabled td { color: var(--ink-5); }
tr.row-winner td { background: var(--muted); }
.box details > summary { cursor: pointer; color: var(--ink-1); font-weight: 600; }
.box details[open] > summary { margin-bottom: 12px; }

/* Support: dispute form in a request conversation */
.dispute-box { margin-top: 8px; }
.dispute-box > summary { cursor: pointer; color: var(--ink-4); font-size: var(--fs-xs); font-weight: 600; }
.dispute-box[open] > summary { margin-bottom: 8px; }

/* Refunds of a return request */
.refund-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: var(--fs-sm); }
.refund-table td { padding: 4px 6px; border-top: 1px solid var(--border-soft); vertical-align: middle; }

/* Analytics funnel */
.funnel-bar-cell { width: 22%; min-width: 90px; }
.funnel-bar { display: block; height: 10px; min-width: 2px; border-radius: 2px; background: var(--brand); }

/* Search suggestions (header) */
.suggest-box { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(10, 26, 21, 0.15); }
.suggest-box a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border-soft); color: var(--ink-2); }
.suggest-box a:first-child { border-top: 0; }
.suggest-box a:hover, .suggest-box a.current { background: var(--muted); text-decoration: none; }
.suggest-box img, .suggest-noimg { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 4px; object-fit: cover; background: var(--muted); }
.suggest-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-price { color: var(--ink-1); font-weight: 600; white-space: nowrap; }
.suggest-category .suggest-name, .suggest-all .suggest-name { color: var(--ink-4); font-size: var(--fs-sm); }

/* Saved for later (cart) and wishlist */
.saved-later { margin-top: var(--gap); }
.saved-later .cart-line:first-of-type { border-top: 0; }

/* Product gallery: zoom and full screen view */
.gallery-main { position: relative; }
.gallery-zoom { width: 100%; height: 100%; overflow: hidden; cursor: zoom-in; }
.gallery-zoom img { transition: transform 120ms ease; }
.gallery-zoom.zoomed img { transform: scale(2.2); }
.gallery-zoom:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.gallery-hint { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--ink-3); font-size: var(--fs-xs); pointer-events: none; }
.gallery-thumbs button[hidden] { display: none; }
.lightbox { width: min(96vw, 1100px); max-width: none; height: min(92vh, 900px); max-height: none; padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); }
.lightbox::backdrop { background: rgba(10, 26, 21, 0.75); }
.lightbox[open] { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; }
.lightbox-frame { grid-column: 2; height: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.lightbox-frame img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; transition: transform 150ms ease; }
.lightbox-frame img.zoomed { transform: scale(2.5); cursor: zoom-out; }
.lightbox-prev, .lightbox-next, .lightbox-close { border: 0; background: transparent; color: var(--ink-2); font-size: 34px; line-height: 1; cursor: pointer; }
.lightbox-prev { grid-column: 1; grid-row: 1; }
.lightbox-next { grid-column: 3; grid-row: 1; }
.lightbox-close { position: absolute; top: 6px; right: 10px; z-index: 2; font-size: 30px; }
.lightbox-caption { grid-column: 1 / -1; margin: 0; padding: 8px 12px; color: var(--ink-4); font-size: var(--fs-sm); text-align: center; }

/* Product reviews: distribution and tools */
.rating-bars { display: grid; gap: 4px; max-width: 420px; margin-bottom: 12px; }
.rating-bar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 36px; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 4px; color: var(--ink-3); font-size: var(--fs-sm); }
.rating-bar:hover, .rating-bar.current { background: var(--muted); text-decoration: none; }
.rating-bar.current { font-weight: 600; color: var(--ink-1); }
.rating-bar.empty-bar { color: var(--ink-6); }
.rating-bar-track { height: 8px; border-radius: 4px; background: var(--border-soft); overflow: hidden; }
.rating-bar-track span { display: block; height: 100%; background: var(--brand-hover); }
.review-tools { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); font-size: var(--fs-sm); }
.image-tag { display: grid; gap: 2px; font-size: var(--fs-xs); }
.image-tag select { min-height: 30px; font-size: var(--fs-xs); }

/* Stores: directory, performance and category links */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.store-card { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.store-card-head { display: flex; align-items: center; gap: 10px; }
.store-card-rating { margin: 0; }
.store-card-perf { margin: 0; padding-left: 18px; font-size: var(--fs-sm); }
.store-card-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.store-card-cats a, .category-chips a, .store-matches a { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-3); font-size: var(--fs-xs); }
.store-card-cats a:hover, .category-chips a:hover, .store-matches a:hover { border-color: var(--brand); text-decoration: none; }
.category-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--gap); }
.category-chips a { font-size: var(--fs-sm); }
.category-chips a.current { border-color: var(--brand); background: var(--muted); color: var(--ink-1); font-weight: 600; }
.category-chips .count { color: var(--ink-6); }
.category-chips .chip-other { border-style: dashed; }
.store-matches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Live courier tracking: a focused, original green map card using Kamyl's existing tokens */
.courier-page { background: linear-gradient(160deg, var(--green-50), #fff 55%, var(--green-100)); }
.courier-top { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px max(18px, calc((100vw - 720px) / 2)); border-bottom: 1px solid var(--border-soft); background: rgba(255, 255, 255, 0.94); }
.courier-main { width: min(720px, calc(100% - 24px)); margin: 24px auto 48px; }
.courier-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 50px rgba(16, 40, 32, 0.10); }
.courier-message { padding: 30px; text-align: center; }
.live-head, .live-customer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.live-head { padding: 22px 22px 16px; }
.live-head h1, .live-customer-head h3 { margin: 3px 0; }
.live-head p { margin: 0; color: var(--ink-5); }
.live-kicker { color: var(--brand); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.live-destination { margin: 0 22px 18px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--muted); }
.live-destination p { margin: 5px 0 10px; }
.live-map { height: 300px; border-width: 1px 0; border-radius: 0; cursor: default; }
.live-customer-card .live-map { height: 280px; border: 1px solid var(--border); border-radius: 10px; }
.live-destination-marker, .live-courier-marker { position: absolute; z-index: 3; pointer-events: none; }
.live-destination-marker { width: 18px; height: 18px; margin: -22px 0 0 -9px; border: 2px solid #fff; border-radius: 50% 50% 50% 0; background: var(--ink-1); box-shadow: 0 2px 8px rgba(0,0,0,.3); transform: rotate(-45deg); }
.live-courier-marker { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 7px solid rgba(23,56,46,.20); border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 3px 12px rgba(16,40,32,.25); }
.live-courier-marker span { display: block; width: 24px; height: 24px; margin: 0; border: 3px solid #fff; border-radius: 50%; background: var(--brand); }
.live-share { padding: 18px 22px; }
.live-signal { display: inline-flex; align-items: center; gap: 8px; }
.live-signal > span { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-6); box-shadow: 0 0 0 4px rgba(87,106,99,.12); }
.live-signal > span.active { background: var(--success); box-shadow: 0 0 0 5px rgba(58,127,20,.14); animation: live-pulse 1.8s infinite; }
.live-signal > span.waiting { background: var(--warning); }
.live-signal > span.stale, .live-signal > span.stopped { background: var(--danger); }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 10px rgba(58,127,20,0); } }
.live-privacy { margin: 0 22px 22px; }
.live-customer-card { margin: 12px 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(145deg, #fff, var(--green-50)); }
.live-customer-head { margin-bottom: 12px; }
.live-detail { margin: 10px 0 0; }
.live-link-once { display: grid; gap: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; direction: ltr; }
.copy-row .btn { flex: 0 0 auto; }
.live-seller-box .form-actions { margin-top: 10px; }
@media (max-width: 600px) {
	.courier-top { padding-inline: 12px; }
	.courier-main { margin-top: 12px; }
	.courier-card { border-radius: 10px; }
	.live-head, .live-customer-head { flex-direction: column; }
	.live-map { height: 260px; }
	.copy-row { flex-direction: column; }
}

/* Seller batch actions: bar, pick list, delivery slips */
.batch-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pick-check { width: 34px; text-align: center; }
.pick-box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--ink-3); border-radius: 3px; }
.pick-qty { font-size: var(--fs-lg); }
.slip { margin-bottom: var(--gap); padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.slip-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink-1); }
.slip-ref { font-size: var(--fs-xl); letter-spacing: 0.02em; }
.slip-to { margin: 12px 0; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.slip-to p { margin: 4px 0 0; }
.slip-foot { margin: 10px 0 0; }
@media print {
	.slip { border: 0; padding: 0; break-after: page; }
	.slip:last-of-type { break-after: auto; }
	.batch-bar { display: none !important; }
}

/* =================================================================
   LANGUAGES AND BIDIRECTIONAL LAYOUT
   ================================================================= */
html[lang="ar"] body,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea,
html[lang="ar"] button {
	font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}
[dir="rtl"] .search-form input[type="search"] { border-radius: 0 var(--radius) var(--radius) 0; }
[dir="rtl"] .search-form button { border-radius: var(--radius) 0 0 var(--radius); }
bdi, .tracking-number, .code-value, .pin-value, [data-code] { unicode-bidi: isolate; direction: ltr; }
.language-switcher { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0; white-space: nowrap; }
.language-switcher button { width: auto; min-height: 28px; padding: 2px 4px; border: 0; background: transparent; color: inherit; font-size: var(--fs-xs); font-weight: 500; cursor: pointer; }
.language-switcher button.current { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.header-links .language-switcher { display: inline-flex; }
.sidebar .language-switcher { padding: 5px 3px; color: var(--sidebar-text); }
.sidebar .language-switcher button { display: inline-block; width: auto; min-height: 28px; padding: 3px; }
/* Each rule below resets the left/right value FIRST, then sets the direction-aware one: in French/English
   "inline-start" is the left side, so a reset written after it would cancel it */
.sidebar { left: auto; inset-block: 0; inset-inline-start: 0; }
.sidebar a, .sidebar button { text-align: start; }
.phone-prefix { border-right: 1px solid var(--border); border-inline-end: 0; border-radius: var(--radius) 0 0 var(--radius); }
[dir="rtl"] .phone-prefix { border-radius: 0 var(--radius) var(--radius) 0; }
[dir="rtl"] .phone-input input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { border-radius: var(--radius) 0 0 var(--radius); }
.alert ul, .privacy-list, .bundle-content, .catalog-filters .sub, .check-list .check-indent, .store-card-perf { padding-left: 0; padding-inline-start: 18px; }
.timeline li { padding-left: 0; border-left: 0; margin-left: 0; padding-inline-start: 18px; border-inline-start: 1px solid var(--border); margin-inline-start: 4px; }
.timeline li::before { left: auto; inset-inline-start: -5px; }
.map-zoom, .gallery-hint, .lightbox-close { right: auto; inset-inline-end: 8px; }
.map-credit { right: auto; inset-inline-end: 0; }
.suggest-box { left: auto; right: auto; inset-inline: 0; }
.direction-arrow { display: inline-block; }
[dir="rtl"] .direction-arrow, [dir="rtl"] .lightbox-prev, [dir="rtl"] .lightbox-next { transform: scaleX(-1); }
/* Tables and summaries follow the reading direction (Arabic: right to left) */
table.data th, table.data td, .matrix td:first-child, .matrix th:first-child { text-align: start; }
.matrix td:first-child, .matrix th:first-child { text-align: start !important; }
.statement-summary dd { text-align: end; }
table.data th.text-right, table.data td.text-right { text-align: end; }


/* ---------------- Product identifiers and bulk imports ---------------- */
.ksin { font-size: 0.85em; color: var(--ink-4); word-break: break-all; }
.ksin strong { color: var(--ink-2); }
.plain-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.plain-list { margin: 6px 0 0; padding-inline-start: 18px; }
/* Import progress bar: its own class, so it does not restyle the order steps (.progress) */
.import-progress { height: 10px; margin: 10px 0; border-radius: 5px; background: var(--border-soft); overflow: hidden; }
.import-progress span { display: block; height: 100%; background: var(--green-400); transition: width 0.3s; }
.import-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.import-image-rules { margin: 6px 0 0; padding-inline-start: 18px; font-size: var(--fs-sm); }
.import-image-rules li { margin-bottom: 4px; }
.import-image-source { max-width: 360px; overflow-wrap: anywhere; }
/* Image import: website on a computer only (a phone shows a short note instead) */
.desktop-only-note { display: none; }
.variation-table input[name="combo_gtin[]"] { min-width: 130px; }
.api-key-shown { padding: 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--muted); font-family: monospace; word-break: break-all; }
.code-block { margin: 8px 0 0; padding: 10px; border-radius: var(--radius); background: var(--muted); border: 1px solid var(--border-soft); font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* ---------- Growth tools: revenue trend, badges, sponsored products ---------- */
.trend-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; margin-top: 14px; padding: 0 2px; border-bottom: 1px solid var(--border-soft); }
.trend-col { position: relative; flex: 1 1 0; min-width: 2px; height: 100%; }
.trend-col .trend-before, .trend-col .trend-bar { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 3px 3px 0 0; }
.trend-col .trend-before { background: var(--border-soft); left: 15%; right: 15%; }
.trend-col .trend-bar { background: var(--brand); opacity: .85; left: 25%; right: 25%; }
.trend-col:hover .trend-bar { opacity: 1; }
.trend-legend { margin-top: 6px; }
.trend-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.trend-key-now { background: var(--brand); }
.trend-key-before { background: var(--border-soft); }
.customer-badge { white-space: nowrap; }
.sponsored-label { display: inline-block; font-size: var(--fs-xs); color: var(--ink-5); letter-spacing: .02em; }
.meter { height: 6px; border-radius: 3px; background: var(--border-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--brand); }
input.input-small { max-width: 220px; padding: 4px 8px; font-size: var(--fs-xs); margin-top: 4px; }

/* ---------- Seller center live updates (setupSellerLive() in script.js) ---------- */
.sidebar-count[hidden] { display: none; }
.live-toasts { position: fixed; bottom: max(16px, env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px; z-index: 70; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.live-toasts:empty { display: none; }
.live-toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border: 1px solid var(--border); border-inline-start: 4px solid var(--brand); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 24px rgba(10, 26, 21, 0.18); animation: live-toast-in 160ms ease-out; }
.live-toast-text { display: grid; flex: 1; gap: 2px; min-width: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.live-toast-text strong { color: var(--ink-1); }
.live-toast-text span { color: var(--ink-4); font-size: var(--fs-xs); }
.live-toast-actions { display: flex; flex-shrink: 0; align-items: center; gap: 4px; }
.live-toast-close { width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink-4); font-size: 20px; line-height: 1; cursor: pointer; }
.live-toast-close:hover { background: var(--muted); color: var(--ink-1); }
.live-banner { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; padding: 10px 14px; border: 1px solid var(--info-border); border-radius: var(--radius); background: var(--info-tint); color: var(--info); font-size: var(--fs-sm); font-weight: 600; }
@keyframes live-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .live-toast { animation: none; } }
@media print { .live-toasts, .live-banner { display: none !important; } }
/* "Local courier" of a delivery: a saved courier or a new one (seller/delivery.php) */
.local-courier-mode { display: flex; flex-wrap: wrap; gap: 8px 20px; }
/* Courier part of the "Update the order" box (seller/courier_panel.php) */
.courier-panel { display: grid; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.courier-panel h3 { font-size: var(--fs-md); }
.courier-panel h4 { margin: 4px 0 0; font-size: var(--fs-sm); }
.courier-current { display: flex; align-items: center; gap: 12px; }
.courier-request-summary p { margin: 0; }
.courier-panel .request-row { padding-block: 10px; }
.courier-find, .courier-cancel { padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.courier-find > summary { color: var(--brand); font-weight: 600; cursor: pointer; }
.courier-cancel > summary { color: var(--danger); font-weight: 600; cursor: pointer; }
.courier-find[open] > summary, .courier-cancel[open] > summary { margin-bottom: 10px; }
/* Deliveries page of the seller center (seller/deliveries.php) */
.deliveries-stats { margin-bottom: var(--gap); }
.stat.stat-attention { border-color: var(--warning-border); background: var(--warning-tint); }
.deliveries-empty { padding: 14px 16px; margin: 0; }
.delivery-position { display: inline-block; font-size: var(--fs-sm); }
.delivery-position-live { color: var(--success); font-weight: 600; }
.delivery-position-stale { color: var(--warning); }
.delivery-position-none { color: var(--ink-5); }
.delivery-map-link { margin-inline-start: 8px; font-size: var(--fs-xs); font-weight: 600; }
.delivery-request { padding: 12px 0; border-top: 1px solid var(--border-soft); }
.delivery-request:first-of-type { border-top: 0; padding-top: 0; }
.delivery-request-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-bottom: 6px; }
.delivery-request .request-row { padding-block: 8px; border-block-end: 0; border-top: 1px dashed var(--border-soft); }

/* =================================================================
   FLUID LAYOUT - one design for every screen
   -----------------------------------------------------------------
   There is one layout, not one per device. Every page is built from the same
   components, and each component adapts to the room it actually has:

   1. Sizes are fluid (clamp() in the variables at the top): text titles, side spaces,
      gaps, content width and the product card width grow and shrink with the screen.
   2. Grids fill the room by themselves (auto-fill / auto-fit + minmax), so the number of
      product cards, stat tiles or footer columns follows the width without breakpoints.
   3. Container queries (@container) switch a component's layout from the width of the box
      it sits in, not the width of the screen: a form in a narrow side column stacks like a
      form on a phone, and the seller center (screen minus its menu) behaves like the shop.
      Containers: "page" = the main area of each layout; every .box, store group, product
      card and layout column is a container for what it holds.
   4. Media queries are kept only for what belongs to the whole screen: the header and the
      menus that fold away, touch screens, short landscape screens, foldable screens,
      reduced motion and printing.

   Screens this covers (same design everywhere, nothing hidden that exists elsewhere):
     1. Small phones and folded foldables (from 280px)  - 2 product columns, stacked forms
     2. Phones, portrait and landscape (360-900px)       - menus behind the ☰ button, links row scrolls
     3. Unfolded foldables and dual-screen devices        - layouts keep clear of the fold or hinge
     4. Tablets, portrait (~768-900px)                    - catalog filters stay beside the products
     5. Tablets landscape and small laptops (~1024-1280px)
     6. Old 4:3 and 5:4 monitors (1024x768, 1280x1024)
     7. Laptops and desktops (1280-1920px)
     8. Large and QHD desktops (1920-2560px)              - wider content, more product columns
     9. Ultrawide and multi-monitor windows (2560px+)     - content capped and centred, never stretched
   Browser resizing, rotation and zoom move through these states continuously: the
   thresholds are content widths, so 200% zoom on a laptop gets the tablet layout.
   ================================================================= */

/* ---------- Containers ---------- */
.shop-main, .panel-main, .courier-main { container: page / inline-size; }
.box, .seller-group, .product-card,
.columns > *, .cart-layout > *, .catalog-layout > *, .product-layout > * { container-type: inline-size; }

/* ---------- Page layouts: side by side when the room allows ---------- */
.home-intro { grid-template-columns: clamp(200px, 18%, 260px) minmax(0, 1fr); }
.catalog-layout { grid-template-columns: clamp(200px, 22%, 260px) minmax(0, 1fr); }
.cart-layout { grid-template-columns: minmax(0, 1fr) clamp(280px, 30%, 360px); }
.product-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) clamp(260px, 22%, 340px); }
.description, .faq-item > p, .page-head p { max-width: 80ch; }
.box-head { flex-wrap: wrap; }
.catalog-toolbar select { min-width: min(190px, 100%); }
.category-tiles { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); }

@container page (max-width: 1060px) {
	.product-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.product-layout .product-side { grid-column: 1 / -1; }
}
@container page (max-width: 860px) {
	.home-intro { grid-template-columns: minmax(0, 1fr); }
	.home-categories { display: none; }
}
@container (max-width: 760px) {
	.columns, .columns-equal, .cart-layout, .catalog-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
}
@container page (max-width: 600px) {
	.product-layout { grid-template-columns: minmax(0, 1fr); }
	.category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.category-tile { padding: 10px; }
}

/* ---------- Components: from the width of their own box ---------- */
@container (max-width: 720px) {
	.form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 680px) {
	.courier-delivery-grid, .request-row { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 560px) {
	.request-line, .return-item-fields { grid-template-columns: minmax(0, 1fr); }
	.cart-line { grid-template-columns: 54px minmax(0, 1fr); }
	.cart-line .thumb-small { width: 54px; height: 54px; }
	.cart-line-actions { grid-column: 1 / -1; justify-content: flex-start; }
	.progress-labels { display: none; }
}
@container (max-width: 520px) {
	.form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
	/* Phones: always two product columns (a single column wastes the screen) */
	.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@container (max-width: 480px) {
	/* The order steps scroll sideways instead of squeezing their labels */
	.flow-steps { grid-auto-columns: minmax(64px, 1fr); overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
	.flow-label { font-size: 10px; }
	/* Long button labels wrap instead of leaving the box (table buttons stay on one line) */
	.btn { max-width: 100%; white-space: normal; }
	table.data .btn { white-space: nowrap; }
}
@container (max-width: 420px) {
	.details { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.details dd { margin-bottom: 8px; }
	.statement-summary { grid-template-columns: minmax(0, 1fr) max-content; column-gap: 12px; }
}
/* A product card narrower than 150px (small phones, folded foldables) */
@container (max-width: 150px) {
	.product-card-body { padding: 8px; }
	.product-card .price { font-size: var(--fs-md); }
}

/* ---------- Whole screen: header and menus that fold away ---------- */
@media (max-width: 1100px) {
	/* The search drops to its own line before the links run out of room */
	.shop-header-inner { flex-wrap: wrap; gap: 10px 14px; }
	.search-form { order: 3; flex-basis: 100%; max-width: none; }
}
@media (max-width: 900px) {
	.menu-toggle { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; }
	.header-links { gap: 12px; }
	.category-bar { display: none; }
	.category-bar.open { display: block; max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; }
	.category-bar.open .category-bar-inner { flex-direction: column; padding-block: 4px; }
	/* Panel menu: slides in over the page. Hidden, it is also out of the keyboard order (visibility). */
	.sidebar { width: min(300px, 86vw); transform: translateX(-100%); visibility: hidden; transition: transform 150ms ease, visibility 0s linear 150ms; padding-bottom: env(safe-area-inset-bottom, 0px); }
	[dir="rtl"] .sidebar { transform: translateX(100%); }
	.sidebar.open { transform: none; visibility: visible; box-shadow: 0 0 30px rgba(10, 26, 21, 0.35); transition: transform 150ms ease; }
	.panel-body { margin-inline-start: 0; }
	/* The menu button stays at hand on long pages */
	.panel-topbar { position: sticky; top: 0; z-index: 30; }
	.panel .live-banner { top: 56px; }
	/* Image import: website on a computer only (a phone shows a short note instead) */
	.desktop-only { display: none !important; }
	.desktop-only-note { display: block; }
}
/* Links row of the header: a soft edge shows that it scrolls (class set by script.js) */
.header-links.is-scrollable { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-inline-end: 24px; }
[dir="rtl"] .header-links.is-scrollable { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.header-links.is-scrollable.at-end { -webkit-mask-image: none; mask-image: none; }

/* ---------- Touch screens: larger targets, no zoom on focus ---------- */
@media (pointer: coarse) {
	:root { --input-height: 44px; }
	.btn, button.btn { min-height: var(--tap); }
	.btn-small { min-height: 36px; }
	.header-links a, .header-links .link-button, .category-bar-inner a { display: inline-flex; align-items: center; min-height: var(--tap); }
	.language-switcher button { min-width: 36px; min-height: 36px; }
	.sidebar a, .sidebar button { min-height: var(--tap); }
	.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); }
	.tabs a { padding-block: 12px; }
	.home-categories a, .catalog-filters .filter-list a { padding-block: 6px; }
	.gallery-thumbs button { width: 64px; height: 64px; }
	/* 16px text in fields: phones do not zoom the page in when a field is touched */
	input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { font-size: max(1rem, 16px); }
	input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
}

/* ---------- Short screens: phones in landscape, small laptop windows ---------- */
@media (max-height: 560px) and (orientation: landscape) {
	.summary { position: static; }
	.panel-topbar { position: static; }
	.panel .live-banner { top: 0; }
	.cookie-notice { padding: 10px 12px; font-size: var(--fs-xs); }
	.live-map, .map { height: min(300px, 70vh); }
}

/* ---------- Foldable and dual-screen devices ---------- */
/* Two screens side by side (a book-style foldable open, or a dual-screen phone): the layouts get a
   gap at least as wide as the fold or hinge, so no text or button sits across it */
@media (horizontal-viewport-segments: 2) {
	:root { --fold: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px)); }
	.product-layout, .cart-layout, .catalog-layout, .home-intro, .columns, .columns-equal { column-gap: max(var(--gap), calc(var(--fold) + 2 * var(--page-pad))); }
	.product-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.product-layout .product-side { grid-column: 1 / -1; }
}
/* Folded like a laptop (top screen + bottom screen): nothing sticks to the top across both halves */
@media (vertical-viewport-segments: 2) {
	.summary, .panel-topbar { position: static; }
	.cookie-notice { bottom: calc(100vh - env(viewport-segment-top 0 1, 100vh) + 16px); }
}

/* ---------- Accessibility ---------- */
.sidebar :focus-visible { outline-color: #ffffff; outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
