/* ==========================================================================
   CardPanel — main stylesheet
   Uses logical properties so the layout mirrors automatically in RTL.
   ========================================================================== */

:root {
	--cp-accent: #1d4ed8;
	--cp-card-ratio: 1 / 1;

	--cp-bg: #f4f5fa;
	--cp-surface: #ffffff;
	--cp-surface-2: #eef0f6;
	--cp-border: #e6e8f0;
	--cp-text: #141627;
	--cp-muted: #6b7088;
	--cp-shadow: 0 1px 2px rgba(20, 22, 39, .04), 0 6px 20px rgba(20, 22, 39, .05);
	--cp-shadow-hover: 0 4px 10px rgba(20, 22, 39, .06), 0 16px 36px rgba(20, 22, 39, .10);

	--cp-accent-soft: color-mix(in srgb, var(--cp-accent) 10%, var(--cp-surface));
	--cp-accent-border: color-mix(in srgb, var(--cp-accent) 35%, var(--cp-surface));
	--cp-accent-text: color-mix(in srgb, var(--cp-accent) 80%, var(--cp-text));

	--cp-danger: #e5484d;
	--cp-success: #1f9d61;

	--cp-radius-lg: 20px;
	--cp-radius: 16px;
	--cp-radius-sm: 12px;
	--cp-header-h: 78px;
	--cp-sidebar-w: 320px;
	--cp-gap: 28px;

	--cp-font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color-scheme: light;
}

html[data-theme="dark"] {
	--cp-bg: #0e1020;
	--cp-surface: #171a2e;
	--cp-surface-2: #20243b;
	--cp-border: #2a2e48;
	--cp-text: #eceef8;
	--cp-muted: #9aa0bd;
	--cp-shadow: 0 1px 2px rgba(0, 0, 0, .3);
	--cp-shadow-hover: 0 12px 32px rgba(0, 0, 0, .45);
	--cp-accent-soft: color-mix(in srgb, var(--cp-accent) 18%, var(--cp-surface));
	--cp-accent-border: color-mix(in srgb, var(--cp-accent) 50%, var(--cp-surface));
	--cp-accent-text: color-mix(in srgb, var(--cp-accent) 55%, #ffffff);
	color-scheme: dark;
}

[dir="rtl"] {
	--cp-font: "IBM Plex Sans Arabic", "Inter", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--cp-header-h) + 16px); }

body {
	margin: 0;
	background: var(--cp-bg);
	color: var(--cp-text);
	font-family: var(--cp-font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--cp-accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; border-radius: 6px; }

.cp-icon { flex: none; width: 20px; height: 20px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed !important;
	inset-block-start: 8px; inset-inline-start: 8px;
	width: auto; height: auto; clip: auto;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--cp-surface);
	border-radius: var(--cp-radius-sm);
	box-shadow: var(--cp-shadow-hover);
}

/* Header ---------------------------------------------------------------- */
.cp-header {
	position: sticky;
	inset-block-start: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: var(--cp-header-h);
	padding-inline: 24px;
	background: color-mix(in srgb, var(--cp-surface) 92%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	border-block-end: 1px solid var(--cp-border);
}
.admin-bar .cp-header { inset-block-start: 32px; }
@media (max-width: 782px) { .admin-bar .cp-header { inset-block-start: 0; } }

.cp-header__start,
.cp-header__end { display: flex; align-items: center; gap: 10px; min-width: 0; }

.cp-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--cp-text); }
.cp-brand:hover { text-decoration: none; }
.cp-brand__logo {
	display: grid; place-items: center;
	width: 46px; height: 46px; flex: none;
	border-radius: 14px;
	background: var(--cp-accent-soft);
	border: 1px solid var(--cp-accent-border);
	overflow: hidden;
}
.cp-brand__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cp-brand__initial {
	font-weight: 800; font-size: 22px; line-height: 1;
	color: var(--cp-accent-text);
	text-transform: uppercase;
}
.cp-brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cp-brand__name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-brand__tagline { font-size: 14px; color: var(--cp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cp-icon-btn {
	position: relative;
	display: inline-grid; place-items: center;
	width: 46px; height: 46px; flex: none;
	padding: 0;
	border: 1px solid var(--cp-border);
	border-radius: 14px;
	background: var(--cp-surface);
	color: var(--cp-text);
	cursor: pointer;
	transition: background .15s, border-color .15s;
}
.cp-icon-btn:hover { background: var(--cp-surface-2); text-decoration: none; }

.cp-menu-toggle, .cp-menu-close { display: none; }

.cp-mode-toggle__sun { display: none; }
html[data-theme="dark"] .cp-mode-toggle__sun { display: block; }
html[data-theme="dark"] .cp-mode-toggle__moon { display: none; }

.cp-lang {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--cp-border);
	border-radius: 14px;
	background: var(--cp-surface-2);
}
.cp-lang__item {
	display: inline-grid; place-items: center;
	min-width: 44px; height: 38px;
	padding-inline: 10px;
	border-radius: 11px;
	font-weight: 700; font-size: 15px;
	color: var(--cp-muted);
}
.cp-lang__item:hover { color: var(--cp-text); text-decoration: none; }
.cp-lang__item.is-current { background: var(--cp-surface); color: var(--cp-text); box-shadow: var(--cp-shadow); }

.cp-chip {
	position: relative;
	display: inline-flex; align-items: center; gap: 10px;
	height: 46px;
	padding-inline: 16px;
	border: 1px solid var(--cp-border);
	border-radius: 14px;
	background: var(--cp-surface-2);
	color: var(--cp-text);
	font-weight: 700;
	white-space: nowrap;
}
.cp-chip:hover { text-decoration: none; border-color: var(--cp-accent-border); }
.cp-chip .cp-icon { color: var(--cp-muted); }
.cp-chip__value .woocommerce-Price-amount { font-weight: 700; }
.cp-chip__badge {
	position: absolute;
	inset-block-start: -7px; inset-inline-end: -7px;
	min-width: 22px; height: 22px;
	padding-inline: 6px;
	display: grid; place-items: center;
	border-radius: 999px;
	background: var(--cp-danger);
	color: #fff;
	font-size: 12px; font-weight: 700;
	border: 2px solid var(--cp-surface);
}

/* Layout ---------------------------------------------------------------- */
.cp-shell {
	display: grid;
	grid-template-columns: var(--cp-sidebar-w) minmax(0, 1fr);
	gap: var(--cp-gap);
	max-width: 1760px;
	margin-inline: auto;
	padding: 20px 28px 32px;
}
.cp-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cp-main:focus { outline: none; }

/* Sidebar --------------------------------------------------------------- */
.cp-sidebar {
	position: sticky;
	inset-block-start: calc(var(--cp-header-h) + 20px);
	align-self: start;
	max-height: calc(100vh - var(--cp-header-h) - 40px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 16px;
	background: var(--cp-surface);
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-lg);
	box-shadow: var(--cp-shadow);
	scrollbar-width: thin;
	scrollbar-color: var(--cp-border) transparent;
}
.admin-bar .cp-sidebar { inset-block-start: calc(var(--cp-header-h) + 52px); max-height: calc(100vh - var(--cp-header-h) - 72px); }
.cp-sidebar__head { display: none; }

.cp-nav__group { display: flex; flex-direction: column; gap: 10px; }
.cp-nav > .cp-nav__group + .cp-nav__group { margin-block-start: 10px; }
.cp-nav__section { margin-block-start: 24px; }
.cp-nav__label {
	margin: 0 10px 10px;
	font-size: 13px; font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cp-muted);
}
.cp-nav__link {
	display: flex; align-items: center; gap: 14px;
	min-height: 50px;
	padding: 10px 14px;
	border: 1px solid var(--cp-border);
	border-radius: 14px;
	color: var(--cp-text);
	font-weight: 600;
	transition: background .15s, border-color .15s, color .15s;
}
.cp-nav__link:hover { text-decoration: none; background: var(--cp-surface-2); }
.cp-nav__icon { color: var(--cp-muted); }
.cp-nav__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-nav__chevron { width: 18px; height: 18px; color: var(--cp-muted); }
[dir="rtl"] .cp-nav__chevron { transform: scaleX(-1); }
.cp-nav__link.is-active {
	background: var(--cp-accent-soft);
	border-color: var(--cp-accent-border);
	color: var(--cp-accent-text);
}
.cp-nav__link.is-active .cp-nav__icon,
.cp-nav__link.is-active .cp-nav__chevron { color: var(--cp-accent-text); }


/* Hero (page header) ---------------------------------------------------- */
.cp-hero {
	padding: 26px 28px;
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-lg);
	background:
		linear-gradient(120deg, var(--cp-surface) 0%, var(--cp-accent-soft) 100%);
	box-shadow: var(--cp-shadow);
}
.cp-hero__title { margin: 0; font-size: clamp(26px, 2.4vw, 34px); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
[dir="rtl"] .cp-hero__title { letter-spacing: 0; }
.cp-hero__subtitle { margin-block-start: 8px; font-size: 18px; color: var(--cp-muted); }
.cp-hero__subtitle p { margin: 0; }

/* Toolbar --------------------------------------------------------------- */
.cp-toolbar {
	display: flex; align-items: flex-end; gap: 20px;
	padding: 18px 22px;
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-lg);
	background: var(--cp-surface);
	box-shadow: var(--cp-shadow);
}
.cp-toolbar__search { flex: 1; min-width: 0; }
.cp-toolbar__label {
	display: block;
	margin-block-end: 8px;
	font-size: 13px; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
	color: var(--cp-muted);
}
.cp-toolbar__field { position: relative; }
.cp-toolbar__icon {
	position: absolute;
	inset-inline-start: 18px; inset-block-start: 50%;
	transform: translateY(-50%);
	color: var(--cp-muted);
	pointer-events: none;
}
.cp-input {
	width: 100%;
	height: 56px;
	padding-inline: 50px 18px;
	border: 1px solid var(--cp-border);
	border-radius: 14px;
	background: var(--cp-surface-2);
	font-size: 17px;
	transition: border-color .15s, background .15s;
}
.cp-input::placeholder { color: var(--cp-muted); }
.cp-input:focus { outline: none; border-color: var(--cp-accent); background: var(--cp-surface); }
.cp-input::-webkit-search-cancel-button { cursor: pointer; }

.cp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	height: 56px;
	padding-inline: 22px;
	border-radius: 14px;
	border: 1px solid transparent;
	font-weight: 700; font-size: 17px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s;
}
.cp-btn:hover { text-decoration: none; }
.cp-btn--outline { background: var(--cp-surface); border-color: var(--cp-border); color: var(--cp-text); }
.cp-btn--outline:hover { background: var(--cp-surface-2); }
.cp-btn--primary { background: var(--cp-accent); color: #fff; }
.cp-btn--primary:hover { filter: brightness(1.06); }
.cp-fav-filter[aria-pressed="true"] { background: var(--cp-accent-soft); border-color: var(--cp-accent-border); color: var(--cp-accent-text); }
.cp-fav-filter[aria-pressed="true"] .cp-icon { fill: #f5b301; color: #f5b301; }

/* Card grid ------------------------------------------------------------- */
.cp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
	margin: 0; padding: 0;
	list-style: none;
}

.cp-card {
	position: relative;
	display: flex; flex-direction: column;
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-lg);
	background: var(--cp-surface);
	overflow: hidden;
	box-shadow: var(--cp-shadow);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.cp-card:hover { transform: translateY(-3px); box-shadow: var(--cp-shadow-hover); border-color: var(--cp-accent-border); }
.cp-card[hidden] { display: none; }

.cp-card__link { position: relative; display: block; color: var(--cp-text); }
.cp-card__link:hover { text-decoration: none; }

.cp-card__media {
	position: relative;
	aspect-ratio: var(--cp-card-ratio);
	background: var(--cp-surface-2);
	overflow: hidden;
}
.cp-card__img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}
.cp-card:hover .cp-card__img { transform: scale(1.04); }

.cp-card__placeholder {
	--cp-hue: 250;
	width: 100%; height: 100%;
	display: grid; place-items: center;
	background:
		radial-gradient(120% 90% at 20% 10%, hsl(var(--cp-hue) 85% 66%) 0%, transparent 60%),
		linear-gradient(135deg, hsl(var(--cp-hue) 70% 50%), hsl(calc(var(--cp-hue) + 40) 70% 36%));
}
.cp-card__placeholder span {
	font-size: clamp(40px, 5vw, 64px);
	font-weight: 800;
	color: rgba(255, 255, 255, .92);
	text-transform: uppercase;
	letter-spacing: .02em;
	text-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}

.cp-card__caption {
	position: absolute;
	inset-inline: 0; inset-block-end: 0;
	padding: 44px 16px 14px;
	background: linear-gradient(to top, var(--cp-surface) 38%, color-mix(in srgb, var(--cp-surface) 70%, transparent) 70%, transparent);
}
.cp-card__title {
	margin: 0;
	font-size: 17px; font-weight: 700; line-height: 1.3;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-card__meta { display: block; margin-block-start: 2px; font-size: 13px; color: var(--cp-muted); }

.cp-card__badges {
	position: absolute;
	inset-block-start: 10px; inset-inline-start: 10px;
	display: flex; gap: 6px;
	pointer-events: none;
}
.cp-badge {
	display: grid; place-items: center;
	width: 34px; height: 34px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--cp-surface) 90%, transparent);
	color: var(--cp-text);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.cp-badge .cp-icon { width: 18px; height: 18px; }
.cp-badge--bolt { color: var(--cp-success); }
.cp-badge--tag { color: var(--cp-danger); }
.cp-badge--close { color: var(--cp-muted); }

.cp-fav {
	position: absolute;
	inset-block-start: 10px; inset-inline-end: 10px;
	display: grid; place-items: center;
	width: 36px; height: 36px;
	padding: 0;
	border: 0; border-radius: 10px;
	background: color-mix(in srgb, var(--cp-surface) 90%, transparent);
	color: var(--cp-muted);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
	cursor: pointer;
	opacity: 0;
	transition: opacity .15s, color .15s, transform .15s;
}
.cp-card:hover .cp-fav,
.cp-fav:focus-visible,
.cp-fav[aria-pressed="true"] { opacity: 1; }
.cp-fav:hover { transform: scale(1.08); color: var(--cp-text); }
.cp-fav[aria-pressed="true"] { color: #f5b301; }
.cp-fav[aria-pressed="true"] .cp-icon { fill: currentColor; }
@media (hover: none) { .cp-fav { opacity: 1; } }

/* Product cards */
.cp-card__footer {
	display: flex; flex-direction: column; align-items: stretch; gap: 10px;
	margin-block-start: auto;
	padding: 2px 16px 16px;
}
.cp-card__price { font-weight: 800; font-size: 18px; color: var(--cp-text); line-height: 1.3; }
.cp-card__price del { color: var(--cp-muted); font-weight: 500; font-size: 14px; margin-inline-end: 6px; }
.cp-card__price ins { text-decoration: none; }
.cp-card__footer a.button,
.cp-card__footer .added_to_cart {
	display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
	width: 100%;
	min-height: 42px;
	margin: 0 !important;
	padding: 8px 16px !important;
	border-radius: 12px !important;
	border: 0;
	background: var(--cp-accent) !important;
	color: #fff !important;
	font-weight: 700 !important; font-size: 15px !important; line-height: 1.2 !important;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
}
.cp-card__footer a.button:hover { filter: brightness(1.07); text-decoration: none; }
.cp-card__footer a.button.loading { opacity: .7; }
.cp-card__footer a.button.loading::after { display: none !important; }
.cp-card__footer a.button.added { display: none !important; }
.cp-card__footer .added_to_cart { background: var(--cp-accent-soft) !important; color: var(--cp-accent-text) !important; border: 1px solid var(--cp-accent-border); }
.cp-card--product .cp-card__caption { position: static; padding: 12px 16px 6px; background: none; }
.cp-card--product .cp-card__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Empty state ----------------------------------------------------------- */
.cp-empty {
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	padding: 48px 20px;
	border: 1px dashed var(--cp-border);
	border-radius: var(--cp-radius-lg);
	background: var(--cp-surface);
	color: var(--cp-muted);
	text-align: center;
}
.cp-empty[hidden] { display: none; }
.cp-empty .cp-icon { width: 30px; height: 30px; }
.cp-empty p { margin: 0; }

/* Panels & content ------------------------------------------------------ */
.cp-panel {
	padding: clamp(18px, 3vw, 32px);
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-lg);
	background: var(--cp-surface);
	box-shadow: var(--cp-shadow);
}
.cp-content > :first-child { margin-block-start: 0; }
.cp-content > :last-child { margin-block-end: 0; }
.cp-content h2, .cp-content h3 { line-height: 1.3; }
.cp-content img { border-radius: var(--cp-radius-sm); }
.cp-featured { margin: 0 0 24px; }
.cp-featured img { width: 100%; border-radius: var(--cp-radius); }
.cp-404 { display: flex; justify-content: center; }

.cp-content input[type="text"],
.cp-content input[type="email"],
.cp-content input[type="tel"],
.cp-content input[type="password"],
.cp-content input[type="number"],
.cp-content input[type="search"],
.cp-content select,
.cp-content textarea,
.cp-product input.qty {
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-sm);
	background: var(--cp-surface-2);
	color: var(--cp-text);
	max-width: 100%;
}
.cp-content input:focus, .cp-content select:focus, .cp-content textarea:focus { outline: none; border-color: var(--cp-accent); }

/* Pagination ------------------------------------------------------------ */
.cp-pagination .nav-links,
.cp-pagination-wrap ul.page-numbers {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
	margin: 8px 0 0; padding: 0; list-style: none; border: 0;
}
.cp-pagination-wrap .woocommerce-pagination ul.page-numbers li { border: 0; }
.cp-pagination .page-numbers,
.cp-pagination-wrap .page-numbers a,
.cp-pagination-wrap .page-numbers span {
	display: inline-grid; place-items: center;
	min-width: 44px; height: 44px;
	padding: 0 12px;
	border: 1px solid var(--cp-border) !important;
	border-radius: 12px;
	background: var(--cp-surface);
	color: var(--cp-text);
	font-weight: 600;
}
.cp-pagination .page-numbers.current,
.cp-pagination-wrap .page-numbers span.current {
	background: var(--cp-accent);
	border-color: var(--cp-accent) !important;
	color: #fff;
}

/* Footer ---------------------------------------------------------------- */
.cp-footer { margin-block-start: 12px; padding: 8px 4px; color: var(--cp-muted); font-size: 14px; }
.cp-footer p { margin: 0; }

/* Comments -------------------------------------------------------------- */
.cp-comments__list { padding-inline-start: 20px; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; }

/* WooCommerce ----------------------------------------------------------- */
.cp-notices:empty { display: none; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: var(--cp-radius);
	border-top-color: var(--cp-accent) !important;
	background: var(--cp-surface) !important;
	color: var(--cp-text) !important;
	box-shadow: var(--cp-shadow);
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--cp-accent) !important; }

.woocommerce .cp-content a.button,
.woocommerce .cp-content button.button,
.woocommerce .cp-content input.button,
.woocommerce .cp-product a.button,
.woocommerce .cp-product button.button,
.woocommerce-page .cp-content .button,
.woocommerce .cp-notices .button,
.wc-block-components-button:not(.is-link) {
	border-radius: 12px !important;
	background: var(--cp-accent) !important;
	color: #fff !important;
	font-weight: 700 !important;
	padding: 12px 20px !important;
}
.woocommerce .cp-content .button:hover,
.woocommerce .cp-product .button:hover { filter: brightness(1.06); }

.cp-product div.product { margin: 0; }
.cp-product div.product div.images img { border-radius: var(--cp-radius); }
.cp-product div.product .product_title { font-size: clamp(24px, 2.2vw, 32px); font-weight: 800; }
.cp-product div.product p.price,
.cp-product div.product span.price { color: var(--cp-accent-text) !important; font-weight: 800; font-size: 26px !important; }
.cp-product .woocommerce-tabs ul.tabs li { border-radius: 12px 12px 0 0 !important; background: var(--cp-surface-2) !important; border-color: var(--cp-border) !important; }
.cp-product .woocommerce-tabs ul.tabs li.active { background: var(--cp-surface) !important; }
.cp-product .woocommerce-tabs ul.tabs::before, .cp-product .woocommerce-tabs ul.tabs li::before, .cp-product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.cp-product .related > h2,
.cp-product .upsells > h2 { font-size: 22px; margin-block: 32px 16px; }
.cp-product .cp-grid.products::before,
.cp-product .cp-grid.products::after { display: none; }

.woocommerce table.shop_table { border-radius: var(--cp-radius); border-color: var(--cp-border); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--cp-border); }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: block; padding: 10px 14px;
	border: 1px solid var(--cp-border); border-radius: 12px;
	color: var(--cp-text); font-weight: 600;
}
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { background: var(--cp-accent-soft); border-color: var(--cp-accent-border); color: var(--cp-accent-text); }
html[data-theme="dark"] .woocommerce form .form-row .input-text,
html[data-theme="dark"] .woocommerce form .form-row select { background: var(--cp-surface-2); color: var(--cp-text); }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--cp-text); }

/* Overlay (mobile drawer) ----------------------------------------------- */
.cp-overlay {
	position: fixed; inset: 0;
	z-index: 90;
	background: rgba(8, 10, 24, .45);
}
.cp-overlay[hidden] { display: none; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1280px) {
	:root { --cp-sidebar-w: 280px; --cp-gap: 22px; }
}

@media (max-width: 1024px) {
	:root { --cp-header-h: 68px; }
	.cp-shell { grid-template-columns: minmax(0, 1fr); padding: 16px; }
	.cp-menu-toggle, .cp-menu-close { display: inline-grid; }
	.cp-header { padding-inline: 14px; }
	.cp-header .cp-brand__tagline { display: none; }

	.cp-sidebar {
		position: fixed;
		inset-block: 0; inset-inline-start: 0;
		z-index: 100;
		width: min(340px, 88vw);
		height: 100vh;
		height: 100dvh;
		max-height: none;
		border-radius: 0;
		border-block: 0; border-inline-start: 0;
		transform: translateX(-105%);
		transition: transform .25s ease;
		visibility: hidden;
	}
	[dir="rtl"] .cp-sidebar { transform: translateX(105%); }
	.admin-bar .cp-sidebar { inset-block-start: 0; max-height: none; }
	body.cp-drawer-open .cp-sidebar { transform: none; visibility: visible; }
	body.cp-drawer-open { overflow: hidden; }
	.cp-sidebar__head {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
		margin-block-end: 18px;
	}
}

@media (max-width: 640px) {
	.cp-header__end { gap: 6px; }
	.cp-icon-btn { width: 42px; height: 42px; border-radius: 12px; }
	.cp-chip { height: 42px; padding-inline: 12px; border-radius: 12px; }
	.cp-chip .cp-icon { display: none; }
	.cp-lang { display: none; }
	.cp-header .cp-brand__text { display: none; }
	.cp-hero { padding: 20px; }
	.cp-hero__subtitle { font-size: 16px; }
	.cp-toolbar { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
	.cp-toolbar__favs .cp-toolbar__label { display: none; }
	.cp-toolbar__favs .cp-btn { width: 100%; height: 48px; }
	.cp-input { height: 50px; font-size: 16px; }
	.cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.cp-card__caption { padding: 34px 12px 10px; }
	.cp-card__title { font-size: 15px; }
	.cp-card__footer { padding: 2px 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}

/* Single product details */
.cp-product .price ins { text-decoration: none; }
.cp-product .price del { opacity: .55; font-size: .75em; }
.cp-product span.onsale {
	min-height: 0 !important; min-width: 0 !important;
	padding: 6px 12px !important;
	border-radius: 10px !important;
	background: var(--cp-danger) !important;
	color: #fff !important;
	font-size: 14px !important; line-height: 1.2 !important;
	inset-block-start: 14px !important; inset-inline-start: 14px !important;
	margin: 0 !important;
}
.cp-product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.cp-product form.cart .quantity { margin: 0 !important; }
.cp-product form.cart .button { min-height: 46px; }

/* ==========================================================================
   v1.1 — account popover, top-up window, product rows, Elementor
   ========================================================================== */
:root { --cp-green: #16a34a; --cp-red: #dc2626; }

.cp-btn--sm { height: 42px; padding-inline: 16px; font-size: 15px; border-radius: 12px; }
.cp-btn--success { background: var(--cp-green); color: #fff; }
.cp-btn--success:hover { filter: brightness(1.07); }
.cp-btn .cp-icon { width: 18px; height: 18px; }

button.cp-chip { cursor: pointer; font: inherit; font-weight: 700; }

/* Avatar */
.cp-avatar {
	display: inline-grid; place-items: center; flex: none;
	width: 56px; height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--cp-accent), color-mix(in srgb, var(--cp-accent) 55%, #a855f7));
	color: #fff;
	font-weight: 800; font-size: 24px;
	text-transform: uppercase;
}
.cp-avatar--sm { width: 30px; height: 30px; font-size: 14px; }

/* Account popover */
.cp-account { position: relative; }
.cp-account__panel {
	position: absolute;
	inset-block-start: calc(100% + 10px);
	inset-inline-end: 0;
	z-index: 80;
	width: min(360px, calc(100vw - 24px));
	padding: 18px;
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-lg);
	background: var(--cp-surface);
	box-shadow: 0 20px 50px rgba(15, 18, 40, .18);
}
.cp-account__panel[hidden] { display: none; }
.cp-account__head { display: flex; align-items: center; gap: 14px; margin-block-end: 16px; }
.cp-account__who { display: flex; flex-direction: column; min-width: 0; }
.cp-account__hello { font-size: 14px; color: var(--cp-muted); }
.cp-account__name { font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-account__balance {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	padding: 16px;
	margin-block-end: 12px;
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius);
	background: var(--cp-accent-soft);
}
.cp-account__label { display: block; font-size: 14px; color: var(--cp-muted); }
.cp-account__amount { display: block; font-size: 26px; font-weight: 800; color: var(--cp-accent-text); line-height: 1.2; }
.cp-account__actions { display: flex; flex-direction: column; gap: 6px; }
.cp-account__link {
	display: flex; align-items: center; gap: 12px;
	padding: 11px 12px;
	border-radius: 12px;
	color: var(--cp-text); font-weight: 600;
}
.cp-account__link:hover { background: var(--cp-surface-2); text-decoration: none; }
.cp-account__link .cp-icon { color: var(--cp-muted); }
.cp-account__link--danger, .cp-account__link--danger .cp-icon { color: var(--cp-red); }

/* Top-up window */
.cp-modal {
	width: min(560px, calc(100vw - 24px));
	max-height: calc(100vh - 40px);
	padding: 0;
	border: 0;
	border-radius: 24px;
	background: var(--cp-surface);
	color: var(--cp-text);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.cp-modal::backdrop { background: rgba(8, 10, 24, .55); backdrop-filter: blur(3px); }
.cp-modal__box { position: relative; padding: 28px; }
.cp-modal__close { position: absolute; inset-block-start: 18px; inset-inline-end: 18px; border-radius: 50%; }
.cp-modal__title { margin: 4px 0 20px; font-size: 26px; font-weight: 800; text-align: center; }
.cp-topup__block { padding-block: 14px; border-block-start: 1px solid var(--cp-border); }
.cp-topup__label { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.cp-topup__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cp-topup__value { font-size: 22px; font-weight: 700; color: var(--cp-green); letter-spacing: .02em; word-break: break-all; }
.cp-topup__value--account { color: var(--cp-accent-text); font-size: 20px; }
.cp-topup__buttons { display: inline-flex; gap: 10px; }
.cp-round {
	display: inline-grid; place-items: center;
	width: 50px; height: 50px;
	border-radius: 50%;
	color: #fff;
}
.cp-round:hover { filter: brightness(1.08); text-decoration: none; }
.cp-round--call { background: #2563eb; }
.cp-round--wa { background: #25d366; }
.cp-topup__note {
	margin: 12px 0 0;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--cp-surface-2);
	color: var(--cp-muted);
	font-size: 15px;
}
.cp-copy.is-copied { background: var(--cp-accent); }

/* Floating WhatsApp */
.cp-wa-float {
	position: fixed;
	inset-block-end: 22px; inset-inline-end: 22px;
	z-index: 60;
	display: grid; place-items: center;
	width: 58px; height: 58px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
	transition: transform .15s;
}
.cp-wa-float:hover { transform: scale(1.06); text-decoration: none; }
.cp-wa-float .cp-icon { width: 28px; height: 28px; }
body.cp-drawer-open .cp-wa-float { display: none; }

/* Product rows (home) */
.cp-row-section { margin-block-start: 12px; }
.cp-row-section[hidden] { display: none; }
.cp-row-head { display: flex; align-items: center; gap: 16px; margin-block-end: 14px; }
.cp-row-title { margin: 0; font-size: 22px; font-weight: 800; white-space: nowrap; }
.cp-row-line { flex: 1; height: 1px; background: var(--cp-border); }
.cp-row-more { font-weight: 700; white-space: nowrap; }
.cp-row-nav { display: flex; gap: 8px; }
.cp-row-nav .cp-icon-btn { width: 40px; height: 40px; border-radius: 12px; }
.cp-row-prev .cp-icon { transform: scaleX(-1); }
[dir="rtl"] .cp-row-prev .cp-icon { transform: none; }
[dir="rtl"] .cp-row-next .cp-icon { transform: scaleX(-1); }
.cp-row {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(210px, 240px);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 2px 14px;
	scrollbar-width: thin;
	scrollbar-color: var(--cp-border) transparent;
}
.cp-row > .cp-card { scroll-snap-align: start; }
.cp-row > .cp-card:hover { transform: none; }

/* Elementor content keeps its own layout */
.cp-elementor { min-width: 0; }
.cp-elementor .elementor-section.elementor-section-stretched { max-width: 100%; }

@media (max-width: 640px) {
	.cp-row-nav { display: none; }
	.cp-row { grid-auto-columns: 46%; gap: 12px; }
	.cp-row-title { font-size: 19px; }
	.cp-account__panel { position: fixed; inset-inline: 12px; inset-block-start: calc(var(--cp-header-h) + 8px); width: auto; }
	.cp-modal__box { padding: 22px 18px; }
	.cp-topup__value { font-size: 19px; }
	.cp-wa-float { inset-block-end: 16px; inset-inline-end: 16px; width: 52px; height: 52px; }
}

/* Infinite scroll */
.cp-loadmore { display: flex; justify-content: center; padding: 18px 0 6px; }
.cp-loadmore__btn { min-width: 200px; height: 50px; }
.cp-spinner {
	display: none;
	width: 18px; height: 18px;
	border: 2px solid var(--cp-border);
	border-top-color: var(--cp-accent);
	border-radius: 50%;
	animation: cp-spin .7s linear infinite;
}
.cp-loadmore.is-loading .cp-spinner { display: inline-block; }
.cp-loadmore.is-loading .cp-loadmore__btn { pointer-events: none; opacity: .85; }
@keyframes cp-spin { to { transform: rotate(360deg); } }
.cp-pagination-wrap[hidden], .cp-pagination[hidden] { display: none; }

/* Login / register window */
.cp-auth { width: min(480px, calc(100vw - 24px)); }
.cp-auth__head { display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; padding-inline-end: 44px; }
.cp-auth__logo { width: 64px; height: 64px; border-radius: 16px; }
.cp-auth__title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; }
.cp-auth__subtitle { margin: 4px 0 0; color: var(--cp-muted); font-size: 15px; }
.cp-auth__tabs {
	display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
	padding: 4px; margin-block-end: 18px;
	border-radius: 14px; background: var(--cp-surface-2);
}
.cp-auth__tab {
	height: 42px; border: 0; border-radius: 11px;
	background: transparent; color: var(--cp-muted);
	font-weight: 700; cursor: pointer;
}
.cp-auth__tab.is-active { background: var(--cp-surface); color: var(--cp-text); box-shadow: var(--cp-shadow); }
.cp-auth__form { display: flex; flex-direction: column; gap: 14px; }
.cp-auth__form[hidden] { display: none; }
.cp-field { display: flex; flex-direction: column; gap: 6px; }
.cp-field__label { font-weight: 600; font-size: 15px; }
.cp-field__label em { color: var(--cp-red); font-style: normal; }
.cp-field__wrap { position: relative; display: block; }
.cp-field__input {
	width: 100%; height: 52px;
	padding-inline: 16px;
	border: 1px solid var(--cp-border); border-radius: 14px;
	background: var(--cp-surface-2); color: var(--cp-text);
	font-size: 16px;
}
.cp-field__wrap .cp-field__input { padding-inline-end: 52px; }
.cp-field__input:focus { outline: none; border-color: var(--cp-accent); background: var(--cp-surface); }
.cp-auth__eye {
	position: absolute; inset-block: 0; inset-inline-end: 6px;
	width: 42px; border: 0; background: none; color: var(--cp-muted); cursor: pointer;
	display: grid; place-items: center;
}
.cp-auth__eye.is-on { color: var(--cp-accent); }
.cp-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.cp-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cp-check input { width: 18px; height: 18px; accent-color: var(--cp-accent); }
.cp-auth__link { border: 0; padding: 0; background: none; color: var(--cp-accent-text); font-weight: 700; cursor: pointer; font-size: inherit; }
.cp-auth__submit { width: 100%; height: 52px; margin-top: 4px; }
.cp-auth__submit.is-loading .cp-spinner { display: inline-block; border-color: rgba(255,255,255,.4); border-top-color: #fff; }
.cp-auth__submit:disabled { opacity: .85; cursor: wait; }
.cp-auth__switch { margin: 0; text-align: center; color: var(--cp-muted); font-size: 15px; }
.cp-auth__error {
	padding: 12px 14px; border-radius: 12px;
	background: color-mix(in srgb, var(--cp-red) 10%, var(--cp-surface));
	color: var(--cp-red); font-weight: 600; font-size: 15px;
}
.cp-auth__error[hidden] { display: none; }
.cp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* v1.4 — top-up window styled like the store's original, balance card */
.cp-btn--xs { height: 38px; padding-inline: 16px; font-size: 14px; border-radius: 10px; }
.cp-topup-btn { background: var(--cp-green); border-color: var(--cp-green); color: #fff; }
.cp-topup-btn:hover { background: var(--cp-green); filter: brightness(1.08); }

#cp-topup .cp-modal__box { padding: 30px 30px 32px; }
#cp-topup .cp-modal__title { font-size: 28px; margin: 6px 0 26px; }
#cp-topup .cp-modal__close { background: var(--cp-surface-2); border: 0; width: 42px; height: 42px; }
.cp-topup__block { border: 0; padding-block: 0; margin-block-end: 26px; }
.cp-topup__block:last-of-type { margin-block-end: 0; }
.cp-topup__label { margin: 0 0 18px; font-size: 17px; font-weight: 800; }
.cp-topup__row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.cp-topup__value { font-size: 24px; font-weight: 600; color: var(--cp-green); letter-spacing: 0; }
.cp-topup__value--account { color: #2563eb; }
html[data-theme="dark"] .cp-topup__value--account { color: #60a5fa; }
.cp-topup__logo { width: 44px; height: 44px; object-fit: contain; }
.cp-topup__copy { margin-top: 14px; text-align: start; }
.cp-topup__copy .cp-btn { display: inline-flex; }
.cp-round { width: 50px; height: 50px; }
.cp-round--call { background: #2563eb; color: #fff; }
.cp-round--wa { background: #25d366; color: #25d366; }
.cp-round svg { display: block; }

/* Balance card in the account menu */
.cp-account__balance {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: nowrap;
	padding: 18px 20px;
}
.cp-account__topup { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.cp-account__cardicon {
	display: grid; place-items: center;
	width: 64px; height: 64px;
	border-radius: 16px;
	background: linear-gradient(135deg, #22c1ee, #2563eb);
	color: #fff;
	box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
}
.cp-account__cardicon .cp-icon { width: 32px; height: 32px; }
.cp-account__sum { min-width: 0; }
.cp-account__amount { font-size: 30px; color: #0ea5e9; }
html[data-theme="dark"] .cp-account__amount { color: #38bdf8; }

/* Locked buy button (price 0) */
.cp-card__footer .cp-btn-locked,
.cp-locked-wrap .cp-btn-locked {
	display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
	width: 100%;
	min-height: 42px;
	padding: 8px 16px !important;
	border-radius: 12px !important;
	background: var(--cp-surface-2) !important;
	color: var(--cp-muted) !important;
	border: 1px dashed var(--cp-border) !important;
	font-weight: 700 !important; font-size: 15px !important;
	cursor: not-allowed;
	pointer-events: none;
	user-select: none;
}
.cp-btn-locked .cp-icon { width: 18px; height: 18px; }
.cp-locked-wrap { margin: 16px 0 20px; max-width: 320px; }
.cp-locked-wrap .cp-btn-locked { min-height: 48px; }

/* Ads slider */
.cp-ads {
	position: relative;
	border-radius: var(--cp-radius-lg);
	overflow: hidden;
	background: var(--cp-surface-2);
	box-shadow: var(--cp-shadow);
	aspect-ratio: 3 / 1;
	isolation: isolate;
}
.cp-ads--slim { aspect-ratio: 4 / 1; }
.cp-ads--tall { aspect-ratio: 16 / 9; }
.cp-ads__track { position: absolute; inset: 0; }
.cp-ads__slide {
	position: absolute; inset: 0;
	opacity: 0; visibility: hidden;
	transition: opacity .6s ease, visibility .6s;
}
.cp-ads__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.cp-ads__media { position: absolute; inset: 0; display: block; color: #fff; }
.cp-ads__media:hover { text-decoration: none; }
.cp-ads__media picture, .cp-ads__img, .cp-ads__video, .cp-ads__placeholder {
	display: block; width: 100%; height: 100%; border: 0;
}
.cp-ads__img, video.cp-ads__video { object-fit: cover; }
iframe.cp-ads__video { pointer-events: none; transform: scale(1.35); }
.cp-ads__placeholder { background: linear-gradient(120deg, var(--cp-accent), #0ea5e9); }
.cp-ads__caption {
	position: absolute; inset-inline: 0; inset-block-end: 0;
	display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	padding: 60px 28px 26px;
	background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}
.cp-ads__title { margin: 0; font-size: clamp(20px, 2.4vw, 32px); font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.cp-ads__btn {
	display: inline-flex; align-items: center; height: 46px; padding-inline: 22px;
	border-radius: 12px; background: var(--cp-accent); color: #fff; font-weight: 700;
}
.cp-ads__nav {
	position: absolute; inset-block-start: 50%; z-index: 3;
	transform: translateY(-50%);
	display: grid; place-items: center;
	width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: 50%;
	background: rgba(255,255,255,.85); color: #111;
	box-shadow: 0 4px 14px rgba(0,0,0,.2);
	cursor: pointer; opacity: 0; transition: opacity .2s;
}
.cp-ads:hover .cp-ads__nav, .cp-ads__nav:focus-visible { opacity: 1; }
.cp-ads__prev { inset-inline-start: 14px; }
.cp-ads__next { inset-inline-end: 14px; }
.cp-ads__prev .cp-icon { transform: scaleX(-1); }
[dir="rtl"] .cp-ads__prev .cp-icon { transform: none; }
[dir="rtl"] .cp-ads__next .cp-icon { transform: scaleX(-1); }
.cp-ads__dots {
	position: absolute; inset-block-end: 12px; inset-inline: 0; z-index: 3;
	display: flex; justify-content: center; gap: 7px;
}
.cp-ads__dot {
	width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
	background: rgba(255,255,255,.55); cursor: pointer;
	transition: width .25s, background .25s;
}
.cp-ads__dot.is-active { width: 26px; background: #fff; }
@media (hover: none) { .cp-ads__nav { display: none; } }
@media (max-width: 640px) {
	.cp-ads, .cp-ads--slim, .cp-ads--wide { aspect-ratio: 16 / 9; }
	.cp-ads:has(source) { aspect-ratio: 1 / 1; }
	.cp-ads__caption { padding: 40px 16px 30px; }
	.cp-ads__btn { height: 40px; padding-inline: 16px; font-size: 14px; }
}

/* Ads slider — effects */
.cp-ads__slide { z-index: 0; }
.cp-ads__slide.is-leaving { z-index: 1; }
.cp-ads__slide.is-active { z-index: 2; }

/* Cinematic: crossfade + slow zoom (Ken Burns) */
.cp-ads--fx-kenburns .cp-ads__slide { transition: opacity 1.1s ease, visibility 1.1s; }
.cp-ads--fx-kenburns .cp-ads__img,
.cp-ads--fx-kenburns video.cp-ads__video { transform: scale(1); transform-origin: 60% 50%; }
.cp-ads--fx-kenburns .cp-ads__slide.is-active .cp-ads__img,
.cp-ads--fx-kenburns .cp-ads__slide.is-active video.cp-ads__video {
	animation: cp-kenburns calc(var(--cp-ads-dur, 6s) + 1.2s) ease-out forwards;
}
@keyframes cp-kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }

/* Slide */
.cp-ads--fx-slide .cp-ads__slide {
	opacity: 1; visibility: visible;
	transform: translateX(100%);
	transition: transform .75s cubic-bezier(.77, 0, .18, 1);
}
[dir="rtl"] .cp-ads--fx-slide .cp-ads__slide { transform: translateX(-100%); }
.cp-ads--fx-slide .cp-ads__slide.is-active { transform: translateX(0); }

/* Zoom in */
.cp-ads--fx-zoom .cp-ads__slide { transform: scale(1.12); transition: opacity .8s ease, transform 1s cubic-bezier(.2, .7, .2, 1), visibility .8s; }
.cp-ads--fx-zoom .cp-ads__slide.is-active { transform: scale(1); }

/* Caption enters after the image */
.cp-ads__caption > * { opacity: 0; transform: translateY(18px); transition: opacity .6s ease .35s, transform .6s cubic-bezier(.2, .7, .2, 1) .35s; }
.cp-ads__caption > .cp-ads__btn { transition-delay: .5s; }
.cp-ads__slide.is-active .cp-ads__caption > * { opacity: 1; transform: none; }
.cp-ads__btn { box-shadow: 0 8px 22px rgba(0, 0, 0, .25); transition: transform .2s, filter .2s; }
.cp-ads__media:hover .cp-ads__btn { filter: brightness(1.08); }

/* Progress bar inside the active dot */
.cp-ads__dot { position: relative; overflow: hidden; }
.cp-ads__dot.is-active { width: 34px; background: rgba(255, 255, 255, .45); }
.cp-ads__dot.is-active::after {
	content: ""; position: absolute; inset-block: 0; inset-inline-start: 0;
	width: 100%; background: #fff; border-radius: inherit;
	transform-origin: left center;
	animation: cp-ads-progress var(--cp-ads-dur, 6s) linear forwards;
}
[dir="rtl"] .cp-ads__dot.is-active::after { transform-origin: right center; }
.cp-ads.is-paused .cp-ads__dot.is-active::after,
.cp-ads.is-paused .cp-ads__slide.is-active .cp-ads__img { animation-play-state: paused; }
@keyframes cp-ads-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Subtle vignette for depth */
.cp-ads__media::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(0, 0, 0, .18));
}
.cp-ads__caption { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
	.cp-ads__slide, .cp-ads__img, .cp-ads__caption > * { animation: none !important; transition: none !important; }
}

/* Admin-only hint when no ads are live */
.cp-ads-empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	aspect-ratio: 5 / 1; min-height: 110px; padding: 16px; text-align: center;
	border: 2px dashed var(--cp-accent); border-radius: var(--cp-radius-lg);
	color: var(--cp-accent); background: color-mix(in srgb, var(--cp-accent) 6%, transparent);
}
.cp-ads-empty:hover { text-decoration: none; background: color-mix(in srgb, var(--cp-accent) 11%, transparent); }
.cp-ads-empty span { color: var(--cp-muted, #64748b); font-size: .95rem; }
.cp-ads__placeholder { display: flex; align-items: flex-start; justify-content: center; }
.cp-ads__hint { margin-top: 18px; padding: 8px 14px; border-radius: 10px; background: rgba(0,0,0,.35); color: #fff; font-size: .95rem; max-width: 90%; text-align: center; }

/* Continue with Google */
.cp-google { display: flex; justify-content: center; min-height: 44px; }
.cp-google.is-loading { opacity: .5; pointer-events: none; }
.cp-auth__or { display: flex; align-items: center; gap: 12px; color: var(--cp-muted); font-size: 14px; margin: 2px 0; }
.cp-auth__or::before, .cp-auth__or::after { content: ""; flex: 1; height: 1px; background: var(--cp-border); }

/* Small phones: the header must fit (wallet + top-up + mode + account + menu) ------- */
@media (max-width: 1024px) {
	html, body { overflow-x: clip; max-width: 100%; }
	.cp-header__start { flex: none; }
	.cp-header__end { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
}
@media (max-width: 430px) {
	.cp-header { padding-inline: 10px; gap: 6px; }
	.cp-header__start, .cp-header__end { gap: 4px; }
	.cp-icon-btn { width: 38px; height: 38px; border-radius: 11px; }
	.cp-chip { height: 38px; padding-inline: 8px; min-width: 0; font-size: 14px; }
	.cp-chip__value { white-space: nowrap; }
	.cp-brand__logo { width: 38px; height: 38px; }
}
@media (max-width: 360px) {
	.cp-header .cp-mode-toggle { display: none; }
}
@media (max-width: 340px) {
	.cp-header .cp-brand { display: none; }
	.cp-chip { font-size: 13px; padding-inline: 6px; }
}

/* Smart search dropdown ---------------------------------------------- */
.cp-toolbar__field { position: relative; }
.cp-sr {
	position: absolute; inset-inline: 0; inset-block-start: calc(100% + 8px);
	z-index: 70;
	max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain;
	padding: 8px;
	background: var(--cp-surface);
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-sm, 14px);
	box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
}
.cp-sr[hidden] { display: none; }
.cp-sr.is-loading { opacity: .7; }
.cp-sr__head { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--cp-muted); letter-spacing: .02em; }
.cp-sr__item {
	display: flex; align-items: center; gap: 12px;
	padding: 8px 10px; border-radius: 12px;
	color: var(--cp-text); text-decoration: none;
}
.cp-sr__item:hover, .cp-sr__item.is-active { background: var(--cp-accent-soft); text-decoration: none; }
.cp-sr__item img, .cp-sr__ph {
	flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
	background: var(--cp-surface-2);
}
.cp-sr__ph { display: grid; place-items: center; font-weight: 700; color: var(--cp-muted); }
.cp-sr__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-sr__txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-sr__txt small { color: var(--cp-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-sr__price { flex: none; font-weight: 700; color: var(--cp-accent-text, var(--cp-accent)); font-size: 14px; white-space: nowrap; }
.cp-sr__all { display: block; margin-top: 4px; padding: 10px; border-radius: 12px; text-align: center; font-weight: 700; color: var(--cp-accent-text, var(--cp-accent)); }
.cp-sr__all:hover, .cp-sr__all.is-active { background: var(--cp-accent-soft); text-decoration: none; }
.cp-sr__none { padding: 16px; text-align: center; color: var(--cp-muted); }
@media (max-width: 640px) {
	.cp-sr { max-height: 60vh; }
	.cp-sr__price { font-size: 13px; }
}
.cp-sr-grid.is-loading { opacity: .55; transition: opacity .15s; }
.cp-sr-grid { margin-bottom: var(--cp-gap, 24px); }

/* Customer order status badges */
.cp-ostatus { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cp-ostatus--wait { background: #fef3c7; color: #92400e; }
.cp-ostatus--done { background: #dcfce7; color: #166534; }
.cp-ostatus--bad  { background: #fee2e2; color: #991b1b; }
html[data-theme="dark"] .cp-ostatus--wait { background: #3b2a06; color: #fcd34d; }
html[data-theme="dark"] .cp-ostatus--done { background: #052e16; color: #86efac; }
html[data-theme="dark"] .cp-ostatus--bad  { background: #3b0a0a; color: #fca5a5; }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a:visited { color: var(--cp-accent-text) !important; }
