/* =========================================================================
   Omniplan — theme additions
   Styles for the parts that changed from / were added to the mockup:
     1. Account control (avatar dropdown / Login·Register)
     2. Cart badge
     3. FILTER dropdown menu (replaces the offcanvas popup)
     4. Portrait product carousels (DISCOVER look, portrait, info always on)
   Colour + radius language is borrowed from the mockup's slider so the new
   pieces feel native.
   ========================================================================= */

:root {
	--omp-ink: #2F3033;
	--omp-radius: 18px;
	--omp-card-w: clamp(240px, 26vw, 300px);
	--omp-gap: 22px;
}

/* ------------------------------------------------------------------ */
/* 1. Account control                                                  */
/* ------------------------------------------------------------------ */
.omniplan-account .dropdown-toggle::after { display: none; }            /* hide caret; the avatar is the affordance */
.omniplan-account .dropdown-toggle { line-height: 0; }
.omniplan-account img.avatar { width: 40px; height: 40px; object-fit: cover; }

.omniplan-account-menu {
	border: 0;
	border-radius: 14px;
	padding: 8px;
	min-width: 220px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}
.omniplan-account-menu .dropdown-header {
	font-weight: 700;
	color: var(--omp-ink);
	max-width: 100%;
}
.omniplan-account-menu .dropdown-item {
	border-radius: 9px;
	padding: 9px 12px;
	font-size: 14px;
}
.omniplan-account-menu .dropdown-item:active { background: var(--omp-ink); }

.omniplan-auth-btn { letter-spacing: 0.04em; }

/* ------------------------------------------------------------------ */
/* 2. Cart badge                                                       */
/* ------------------------------------------------------------------ */
.cart-btn { color: inherit; }
.omniplan-cart-count {
	position: absolute;
	top: 2px;
	right: 4px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	font-size: 10px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
	color: #fff;
	background: #f36340;
	border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/* 3. FILTER dropdown menu                                             */
/* ------------------------------------------------------------------ */
.omniplan-filter .filter-label {
	font-size: 13px;
	font-weight: 300;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.omniplan-filter-menu {
	border: 0;
	border-radius: 14px;
	padding: 8px;
	margin-top: 10px;
	min-width: 230px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}
.omniplan-filter-menu .dropdown-item {
	border-radius: 9px;
	padding: 9px 12px;
	cursor: pointer;
	font-size: 14px;
}
.omniplan-filter-menu .dropdown-item:hover { background: #f3f4f6; }
.omniplan-filter-menu .form-check-input { cursor: pointer; }
.omniplan-filter-menu .form-check-input:checked {
	background-color: var(--omp-ink);
	border-color: var(--omp-ink);
}

/* ------------------------------------------------------------------ */
/* 4. Portrait product carousels                                       */
/* ------------------------------------------------------------------ */
.p-carousel {
	margin-top: 28px;
	padding: 4px 0 8px;
}
.p-carousel-track {
	display: flex;
	gap: var(--omp-gap);
	column-gap: var(--omp-gap);
	padding: 6px max(16px, calc((100vw - 1140px) / 2));     /* align ends with .container */
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.p-carousel-track::-webkit-scrollbar { display: none; }
.p-carousel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.p-carousel-track.is-dragging .p-card { pointer-events: none; }

/* Card shell — portrait, full-bleed image with a permanent gradient + info. */
.p-card {
	position: relative;
	flex: 0 0 var(--omp-card-w);
	width: var(--omp-card-w);
	aspect-ratio: 3 / 4;
	border-radius: var(--omp-radius);
	overflow: hidden;
	scroll-snap-align: start;
	background: #1c1c1f;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
	transform: translateZ(0);
	transition: transform 240ms ease, box-shadow 240ms ease;
}
.p-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22); }

.p-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: scale(1.02);
	filter: saturate(1.05) contrast(1.02);
	transition: transform 600ms ease;
}
.p-card:hover .p-card-img { transform: scale(1.06); }

/* Always-on gradient (the DISCOVER overlay, but visible by default). */
.p-card-overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120% 120% at 25% 15%, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0) 50%),
		linear-gradient(180deg, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.55) 72%, rgba(0, 0, 0, 0.82) 100%);
	pointer-events: none;
}

/* Top badges. */
.p-card-tag {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(6px);
	padding: 6px 12px;
	border-radius: 999px;
}
.p-card-sale {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: #f34b60;
	padding: 6px 11px;
	border-radius: 999px;
}

/* Overlaid info block. */
.p-card-info {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 20px;
	z-index: 2;
	display: block;
	text-decoration: none;
	color: #fff;
}
.p-card-meta {
	font-size: 12.5px;
	font-weight: 300;
	color: rgba(255, 255, 255, 0.82);
	margin-bottom: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.p-card-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	margin: 0 0 14px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.p-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

/* Price — style WooCommerce's <del>/<ins>/.amount on the dark overlay. */
.p-card-price { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.1; }
.p-card-price del { color: rgba(255, 255, 255, 0.6); font-weight: 400; margin-right: 6px; }
.p-card-price del .amount { font-weight: 400; }
.p-card-price ins { text-decoration: none; color: #fff; }
.p-card-price .amount { white-space: nowrap; }

/* CTA pill (colour comes from the theme variant below). */
.p-card-cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
	background: #2531bd;
	transition: transform 160ms ease, filter 160ms ease;
}
.p-card:hover .p-card-cta { transform: translateY(-1px); filter: brightness(1.06); }
.p-card-cta .dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	display: inline-block;
}

/* Theme variants — same palette as the DISCOVER slider. */
.p-card.theme-orange .p-card-tag { color: #ffd9c2; }
.p-card.theme-orange .p-card-cta { background: #f36340; }
.p-card.theme-blue   .p-card-tag { color: #cfeeff; }
.p-card.theme-blue   .p-card-cta { background: #2531bd; }
.p-card.theme-green  .p-card-tag { color: #c4eede; }
.p-card.theme-green  .p-card-cta { background: #008a6f; }
.p-card.theme-red    .p-card-tag { color: #ffd2d8; }
.p-card.theme-red    .p-card-cta { background: #f34b60; }

/* Rail controls reuse the slider's .nav-btn; ensure they're tappable here. */
.slider-shell .slider-head .controls.p-carousel-controls .nav-btn { cursor: pointer; }

/* Dark mode niceties (mockup toggles .dark / [data-bs-theme]). */
.dark .omniplan-account-menu,
.dark .omniplan-filter-menu { background: #1f2023; color: #f3f4f6; }
.dark .omniplan-filter-menu .dropdown-item:hover { background: rgba(255, 255, 255, 0.08); }

/* ------------------------------------------------------------------ */
/* Small screens                                                       */
/* ------------------------------------------------------------------ */
@media (max-width: 575.98px) {
	:root { --omp-card-w: 78vw; }
	.p-carousel-track { padding-left: 16px; padding-right: 16px; }
	.p-card-title { font-size: 16px; }
}
