/**
 * Home Product Tabs Frontend Styles.
 *
 * Location: /assets/css/home/tabs.css
 * Purpose:
 * - Premium responsive Homepage Product Tabs section.
 * - Left side renders modern featured product card.
 * - Right side preserves active WooCommerce product card styling.
 * - Section spacing is settings-driven through CSS variables.
 *
 * @package HyperDAF
 */

.hdaf-home-tabs {
	--hdaf-tabs-width: 1400px;
	--hdaf-tabs-pad-x: 30px;
	--hdaf-tabs-pad-y: 20px;
	--hdaf-tabs-orange: #ff7a00;
	--hdaf-tabs-orange-dark: #e86100;
	--hdaf-tabs-ink: #111827;
	--hdaf-tabs-text: #334155;
	--hdaf-tabs-muted: #64748b;
	--hdaf-tabs-line: #e5e7eb;
	--hdaf-tabs-soft: #f8fafc;
	--hdaf-tabs-green: #16a34a;
	--hdaf-tabs-green-dark: #15803d;
	--hdaf-tabs-red: #dc2626;
	--hdaf-tabs-blue: #2563eb;
	--hdaf-tabs-blue-dark: #1d4ed8;
	--hdaf-tabs-purple: #7c3aed;

	margin: 0 0 25px;
	padding: 0 20px;
	color: var(--hdaf-tabs-text);
}

.hdaf-home-tabs,
.hdaf-home-tabs * {
	box-sizing: border-box;
}

.hdaf-tabs-container {
	width: min(var(--hdaf-tabs-width), 100%);
	margin: 0 auto;
	padding: var(--hdaf-tabs-pad-y) var(--hdaf-tabs-pad-x);
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.06);
	border-radius: 22px;
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
	overflow: hidden;
}

.hdaf-tabs-head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 0 0 18px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--hdaf-tabs-green);
}

.hdaf-tabs-tabbar,
.tabbar.hdaf-tabs-tabbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0;
}

.hdaf-tabs-tabbar button,
.tabbar.hdaf-tabs-tabbar button {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	margin: 0;
	padding: 9px 14px;
	color: var(--hdaf-tabs-ink);
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	transition:
		color 160ms ease,
		background-color 160ms ease,
		border-color 160ms ease;
}

.hdaf-tabs-tabbar button:hover,
.hdaf-tabs-tabbar button:focus,
.tabbar.hdaf-tabs-tabbar button:hover,
.tabbar.hdaf-tabs-tabbar button:focus {
	color: var(--hdaf-tabs-ink);
	background: #ffffff;
	border-color: rgba(255, 122, 0, 0.42);
	outline: none;
}

.hdaf-tabs-tabbar button.active,
.tabbar.hdaf-tabs-tabbar button.active,
.hdaf-tabs-tabbar button[aria-selected="true"],
.tabbar.hdaf-tabs-tabbar button[aria-selected="true"] {
	color: #ffffff;
	background: var(--hdaf-tabs-ink);
	border-color: var(--hdaf-tabs-ink);
}

.hdaf-tabs-pane[hidden] {
	display: none !important;
}

.hdaf-tabs-layout,
.pane-wrap.hdaf-tabs-layout {
	display: grid;
	grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
	gap: 24px;
	align-items: stretch;
	overflow: visible;
}

.hdaf-tabs-featured {
	min-width: 0;
	overflow: visible;
}

/* ======================================================
   Premium left featured product card
====================================================== */

.hdaf-tabs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 18px;
	overflow: hidden;
	color: var(--hdaf-tabs-ink);
	background: #ffffff;
	border: 2px solid var(--hdaf-tabs-green);
	border-radius: 24px;
	box-shadow: none;
}

.hdaf-tabs-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 34px;
	margin: 0 0 12px;
}

.hdaf-tabs-card__badge,
.hdaf-tabs-card__chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 8px 12px;
	color: #ffffff;
	font-size: 11px;
	font-weight: 850;
	line-height: 1;
	border-radius: 999px;
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hdaf-tabs-card__badge--featured,
.hdaf-tabs-card__chip--featured {
	background: var(--hdaf-tabs-green);
	border: 1px solid var(--hdaf-tabs-green);
}

.hdaf-tabs-card__badge--onsale,
.hdaf-tabs-card__chip--onsale {
	background: var(--hdaf-tabs-red);
	border: 1px solid var(--hdaf-tabs-red);
}

.hdaf-tabs-card__badge--recent,
.hdaf-tabs-card__chip--recent {
	background: var(--hdaf-tabs-blue);
	border: 1px solid var(--hdaf-tabs-blue);
}

.hdaf-tabs-card__chip {
	background: var(--hdaf-tabs-ink);
	border-color: var(--hdaf-tabs-ink);
}

.hdaf-tabs-card__chip--featured {
	background: var(--hdaf-tabs-green-dark);
	border-color: var(--hdaf-tabs-green-dark);
}

.hdaf-tabs-card__chip--onsale {
	background: #b91c1c;
	border-color: #b91c1c;
}

.hdaf-tabs-card__chip--recent {
	background: var(--hdaf-tabs-purple);
	border-color: var(--hdaf-tabs-purple);
}

.hdaf-tabs-card__art {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	min-height: 270px;
	margin: 0 0 14px;
	padding: 14px;
	overflow: visible;
	text-decoration: none;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.10);
	border-radius: 22px;
}

.hdaf-tabs-card__image {
	display: block;
	width: 100%;
	max-width: 285px;
	height: 100%;
	max-height: 250px;
	object-fit: contain;
	object-position: center;
	transform: translateZ(0) scale(1.5);
	transform-origin: center;
	transition: none;
	will-change: auto;
}

.hdaf-tabs-card__art:hover .hdaf-tabs-card__image,
.hdaf-tabs-card__art:focus .hdaf-tabs-card__image {
	transform: translateZ(0) scale(1.5);
}

.hdaf-tabs-card__title {
	margin: 0;
	color: var(--hdaf-tabs-blue);
	font-size: 24px;
	font-weight: 650;
	line-height: 1.18;
	letter-spacing: -0.025em;
	text-align: center;
}

.hdaf-tabs-card__title a {
	color: inherit;
	text-decoration: none;
	text-underline-offset: 4px;
	text-decoration-thickness: 1.5px;
	transition:
		color 160ms ease,
		text-decoration-color 160ms ease;
}

.hdaf-tabs-card__title a:hover,
.hdaf-tabs-card__title a:focus {
	color: var(--hdaf-tabs-blue-dark);
	text-decoration: underline;
	text-decoration-color: currentColor;
	outline: none;
}

.hdaf-tabs-card__price-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 18px 0 0;
	text-align: center;
}

.hdaf-tabs-card__price {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	gap: 6px;
	color: var(--hdaf-tabs-green);
	font-size: 23px;
	font-weight: 850;
	line-height: 1.1;
	text-align: center;
}

.hdaf-tabs-card__price del {
	color: #94a3b8;
	font-size: 14px;
	font-weight: 650;
	opacity: 1;
}

.hdaf-tabs-card__price ins {
	color: var(--hdaf-tabs-green);
	text-decoration: none;
}

.hdaf-tabs-card__status-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 10px 0 0;
	padding: 0 0 14px;
	border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.hdaf-tabs-card__micro,
.hdaf-tabs-card__stock {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 7px 10px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	border-radius: 999px;
	white-space: nowrap;
}

.hdaf-tabs-card__micro {
	color: var(--hdaf-tabs-green-dark);
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
}

.hdaf-tabs-card__stock::before {
	width: 6px;
	height: 6px;
	margin-right: 6px;
	border-radius: 999px;
	content: "";
}

.hdaf-tabs-card__stock.is-in {
	color: #047857;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
}

.hdaf-tabs-card__stock.is-in::before {
	background: #10b981;
}

.hdaf-tabs-card__stock.is-out {
	color: #991b1b;
	background: #fef2f2;
	border: 1px solid #fecaca;
}

.hdaf-tabs-card__stock.is-out::before {
	background: #ef4444;
}

.hdaf-tabs-card__meta {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 14px 0 0;
}

.hdaf-tabs-card__meta span {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-width: 0;
	padding: 10px 8px;
	text-align: center;
	background: var(--hdaf-tabs-orange);
	border: 1px solid var(--hdaf-tabs-orange);
	border-radius: 14px;
}

.hdaf-tabs-card__meta strong {
	display: block;
	width: 100%;
	overflow: hidden;
	color: #ffffff;
	font-size: 10.5px;
	font-weight: 850;
	line-height: 1.15;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hdaf-tabs-card__meta em {
	display: block;
	width: 100%;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.82);
	font-size: 9.5px;
	font-style: normal;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hdaf-tabs-card__actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 42px;
	gap: 10px;
	margin-top: auto;
	padding-top: 16px;
}

.hdaf-tabs-card__cta,
.hdaf-tabs-card__wish {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	text-decoration: none;
	border-radius: 14px;
	transition:
		color 160ms ease,
		background-color 160ms ease,
		border-color 160ms ease;
}

.hdaf-tabs-card__cta {
	color: #ffffff;
	font-size: 13px;
	font-weight: 850;
	line-height: 1;
	background: var(--hdaf-tabs-orange);
	border: 1px solid var(--hdaf-tabs-orange);
}

.hdaf-tabs-card__cta:hover,
.hdaf-tabs-card__cta:focus {
	color: #ffffff;
	background: var(--hdaf-tabs-orange-dark);
	border-color: var(--hdaf-tabs-orange-dark);
	text-decoration: none;
	outline: none;
}

.hdaf-tabs-card__wish {
	appearance: none;
	width: 42px;
	margin: 0;
	padding: 0;
	color: var(--hdaf-tabs-ink);
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.16);
	box-shadow: none;
	cursor: pointer;
}

.hdaf-tabs-card__wish:hover,
.hdaf-tabs-card__wish:focus {
	color: var(--hdaf-tabs-green-dark);
	background: #f0fdf4;
	border-color: var(--hdaf-tabs-green);
	text-decoration: none;
	outline: none;
}

.hdaf-tabs-card__wish.is-added {
	color: #ffffff;
	background: var(--hdaf-tabs-green);
	border-color: var(--hdaf-tabs-green);
}

.hdaf-tabs-card__wish.is-loading {
	opacity: 0.72;
	pointer-events: none;
}

/* ======================================================
   Right product cards layout only
   Product card internals remain handled by active WooCommerce/template CSS.
====================================================== */

.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products,
.hdaf-home-tabs.woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 24px 26px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products > li.product,
.hdaf-home-tabs.woocommerce ul.products > li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	min-width: 0;
}

/* ======================================================
   Responsive
====================================================== */

@media (max-width: 1180px) {
	.hdaf-tabs-layout,
	.pane-wrap.hdaf-tabs-layout {
		grid-template-columns: 1fr;
	}

	.hdaf-tabs-card {
		max-width: 100%;
	}

	.hdaf-tabs-card__art {
		min-height: 250px;
	}

	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products,
	.hdaf-home-tabs.woocommerce ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 1024px) {
	.hdaf-home-tabs {
		padding-inline: 16px;
	}

	.hdaf-tabs-container {
		padding: 14px;
		border-radius: 16px;
	}

	.hdaf-tabs-tabbar,
	.tabbar.hdaf-tabs-tabbar {
		flex-wrap: nowrap;
		justify-content: center;
		gap: 6px;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.hdaf-tabs-tabbar::-webkit-scrollbar,
	.tabbar.hdaf-tabs-tabbar::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}

	.hdaf-tabs-tabbar button,
	.tabbar.hdaf-tabs-tabbar button {
		flex: 0 0 auto;
		min-height: 32px;
		padding: 8px 10px;
		font-size: 12px;
	}

	.hdaf-tabs-card__image {
		transform: translateZ(0) scale(1.5);
	}

	.hdaf-tabs-card__art:hover .hdaf-tabs-card__image,
	.hdaf-tabs-card__art:focus .hdaf-tabs-card__image {
		transform: translateZ(0) scale(1.5);
	}

	.hdaf-home-tabs .pane-wrap .woocommerce ul.products,
	.hdaf-home-tabs .pane-wrap ul.products,
	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products,
	.hdaf-home-tabs.woocommerce ul.products {
		display: flex !important;
		flex-wrap: nowrap !important;
		gap: 14px !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 7px 0 12px !important;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 0;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		grid-template-columns: none !important;
	}

	.hdaf-home-tabs .pane-wrap .woocommerce ul.products::-webkit-scrollbar,
	.hdaf-home-tabs .pane-wrap ul.products::-webkit-scrollbar,
	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products::-webkit-scrollbar,
	.hdaf-home-tabs.woocommerce ul.products::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}

	.hdaf-home-tabs .pane-wrap .woocommerce ul.products > li.product,
	.hdaf-home-tabs .pane-wrap ul.products > li.product,
	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products > li.product,
	.hdaf-home-tabs.woocommerce ul.products > li.product {
		flex: 0 0 36.3636% !important;
		width: auto !important;
		margin: 0 !important;
		scroll-snap-align: start;
	}
}

@media (max-width: 782px) {
	.hdaf-home-tabs {
		margin-bottom: 22px;
		padding-inline: 16px;
	}

	.hdaf-tabs-container {
		padding: 12px;
		border-radius: 14px;
	}

	.hdaf-tabs-head {
		margin-bottom: 14px;
		padding-bottom: 14px;
	}

	.hdaf-tabs-card {
		padding: 14px;
		border-radius: 20px;
	}

	.hdaf-tabs-card__top {
		margin-bottom: 10px;
	}

	.hdaf-tabs-card__badge,
	.hdaf-tabs-card__chip {
		min-height: 28px;
		padding: 7px 10px;
		font-size: 10px;
	}

	.hdaf-tabs-card__art {
		min-height: 220px;
		padding: 12px;
		border-radius: 18px;
	}

	.hdaf-tabs-card__image {
		max-width: 240px;
		max-height: 210px;
		transform: translateZ(0) scale(1.5);
	}

	.hdaf-tabs-card__art:hover .hdaf-tabs-card__image,
	.hdaf-tabs-card__art:focus .hdaf-tabs-card__image {
		transform: translateZ(0) scale(1.5);
	}

	.hdaf-tabs-card__title {
		font-size: 22px;
	}

	.hdaf-tabs-card__price {
		font-size: 21px;
	}

	.hdaf-tabs-tabbar,
	.tabbar.hdaf-tabs-tabbar {
		justify-content: center;
	}

	.hdaf-tabs-tabbar button,
	.tabbar.hdaf-tabs-tabbar button {
		min-height: 30px;
		padding: 7px 9px;
		font-size: 11px;
	}

	.hdaf-home-tabs .pane-wrap .woocommerce ul.products,
	.hdaf-home-tabs .pane-wrap ul.products,
	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products,
	.hdaf-home-tabs.woocommerce ul.products {
		gap: 12px !important;
		padding: 7px 0 11px !important;
	}

	.hdaf-home-tabs .pane-wrap .woocommerce ul.products > li.product,
	.hdaf-home-tabs .pane-wrap ul.products > li.product,
	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products > li.product,
	.hdaf-home-tabs.woocommerce ul.products > li.product {
		flex: 0 0 36.3636% !important;
	}
}

@media (max-width: 520px) {
	.hdaf-home-tabs {
		padding-inline: 16px;
	}

	.hdaf-tabs-container {
		padding: 10px;
		border-radius: 14px;
	}

	.hdaf-tabs-tabbar,
	.tabbar.hdaf-tabs-tabbar {
		justify-content: center;
		gap: 5px;
	}

	.hdaf-tabs-tabbar button,
	.tabbar.hdaf-tabs-tabbar button {
		min-height: 28px;
		padding: 6px 8px;
		font-size: 10.5px;
	}

	.hdaf-tabs-card__art {
		min-height: 190px;
	}

	.hdaf-tabs-card__image {
		max-width: 210px;
		max-height: 180px;
		transform: translateZ(0) scale(1.5);
	}

	.hdaf-tabs-card__art:hover .hdaf-tabs-card__image,
	.hdaf-tabs-card__art:focus .hdaf-tabs-card__image {
		transform: translateZ(0) scale(1.5);
	}

	.hdaf-tabs-card__title {
		font-size: 20px;
	}

	.hdaf-tabs-card__actions {
		grid-template-columns: minmax(0, 1fr) 40px;
	}

	.hdaf-tabs-card__cta,
	.hdaf-tabs-card__wish {
		min-height: 40px;
		border-radius: 12px;
	}

	.hdaf-tabs-card__wish {
		width: 40px;
	}

	.hdaf-home-tabs .pane-wrap .woocommerce ul.products,
	.hdaf-home-tabs .pane-wrap ul.products,
	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products,
	.hdaf-home-tabs.woocommerce ul.products {
		gap: 10px !important;
		padding: 6px 0 10px !important;
	}

	.hdaf-home-tabs .pane-wrap .woocommerce ul.products > li.product,
	.hdaf-home-tabs .pane-wrap ul.products > li.product,
	.hdaf-home-tabs.woocommerce ul.products.hdaf-tabs-products > li.product,
	.hdaf-home-tabs.woocommerce ul.products > li.product {
		flex: 0 0 57.1429% !important;
	}
}

@media (max-width: 380px) {
	.hdaf-home-tabs {
		padding-inline: 16px;
	}

	.hdaf-tabs-container {
		padding: 10px;
	}
}

@media (max-width: 360px) {
	.hdaf-tabs-tabbar button,
	.tabbar.hdaf-tabs-tabbar button {
		font-size: 10px;
		padding-inline: 7px;
	}

	.hdaf-tabs-card__badge,
	.hdaf-tabs-card__chip {
		max-width: 50%;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.hdaf-tabs-card__art {
		min-height: 170px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hdaf-tabs-tabbar button,
	.tabbar.hdaf-tabs-tabbar button,
	.hdaf-tabs-card__image,
	.hdaf-tabs-card__cta,
	.hdaf-tabs-card__wish,
	.hdaf-tabs-card__title a {
		transition: none;
	}

	.hdaf-tabs-card__art:hover .hdaf-tabs-card__image,
	.hdaf-tabs-card__art:focus .hdaf-tabs-card__image {
		transform: translateZ(0) scale(1.5);
	}
}

@media (prefers-reduced-motion: reduce) and (max-width: 1024px) {
	.hdaf-tabs-card__art:hover .hdaf-tabs-card__image,
	.hdaf-tabs-card__art:focus .hdaf-tabs-card__image {
		transform: translateZ(0) scale(1.5);
	}
}