/**
 * HALINK C8 — Product detail page (Dola PDP)
 */

.c8-pdp {
	padding: 0 0 60px;
	background: var(--c8-bg, #f0efeb);
	overflow-x: clip;
	max-width: 100%;
}

.c8-pdp__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 1.5rem;
	align-items: start;
	margin-bottom: 2rem;
	min-width: 0;
}

.c8-pdp__gallery,
.c8-pdp__summary {
	min-width: 0;
	max-width: 100%;
}

/* ---------- Gallery ---------- */
.c8-pdp-gallery {
	background: #fff;
	border-radius: 12px;
	padding: 12px;
	max-width: 100%;
	min-width: 0;
}

.c8-pdp-gallery__main {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 100%;
	overflow: hidden;
	border-radius: 10px;
	background: #f5f3ee;
}

.c8-pdp-gallery__main .swiper-wrapper {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
}

.c8-pdp-gallery__main .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100% !important;
	overflow: hidden;
}

.c8-pdp-gallery__img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	display: block;
}

.c8-pdp-gallery__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #121f38;
	font-size: 1.25rem;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.c8-pdp-gallery__nav--prev {
	left: 8px;
}

.c8-pdp-gallery__nav--next {
	right: 8px;
}

.c8-pdp-gallery__thumbs {
	margin-top: 0.75rem;
	overflow: hidden;
}

.c8-pdp-gallery__thumbs .swiper-slide {
	width: 72px !important;
	height: 72px;
	border-radius: 8px;
	overflow: hidden;
	opacity: 0.55;
	cursor: pointer;
	border: 2px solid transparent;
}

.c8-pdp-gallery__thumbs .swiper-slide-thumb-active {
	opacity: 1;
	border-color: #121f38;
}

.c8-pdp-gallery__thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Hide default WC sale flash if awkward */
.c8-pdp-gallery .onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
}

/* ---------- Summary ---------- */
.c8-pdp__summary {
	background: #fff;
	border-radius: 12px;
	padding: 1.25rem 1.35rem 1.5rem;
}

.c8-pdp__title {
	margin: 0 0 0.85rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
	font-weight: 700;
	color: #121f38;
	line-height: 1.3;
}

.c8-pdp-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.45rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.875rem;
}

.c8-pdp-meta__label {
	color: #666;
	margin-right: 0.25rem;
}

.c8-pdp-meta__value {
	color: #121f38;
	font-weight: 500;
}

.c8-pdp-meta__stock.is-instock {
	color: #16a34a;
}

.c8-pdp-meta__stock.is-outofstock {
	color: #dc2626;
}

.c8-pdp__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.35rem 0.65rem;
	margin: 0 0 1rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #af1713;
}

.c8-pdp__price-label {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #333;
}

.c8-pdp__price del {
	color: #999;
	font-size: 1rem;
	font-weight: 400;
}

/* Promo */
.c8-pdp-promo {
	margin-bottom: 1.15rem;
	padding: 0.85rem 1rem;
	background: #121f38;
	border-radius: 10px;
	color: #fff;
}

.c8-pdp-promo__title {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.65rem;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
}

.c8-pdp-promo__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.c8-pdp-promo__list li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0.45rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

.c8-pdp-promo__list li:last-child {
	margin-bottom: 0;
}

.c8-pdp-promo__list img {
	flex-shrink: 0;
	margin-top: 1px;
}

/* Cart */
.c8-pdp-cart__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.c8-pdp-cart__qty-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #121f38;
}

.c8-pdp-cart .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d1cfc8;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.c8-pdp-cart .quantity .qty {
	width: 52px;
	height: 42px;
	border: 0;
	text-align: center;
	font-size: 1rem;
	font-weight: 600;
	-moz-appearance: textfield;
}

.c8-pdp-cart .quantity .qty::-webkit-outer-spin-button,
.c8-pdp-cart .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.c8-pdp-cart__add {
	flex: 1 1 180px;
	min-height: 46px;
	padding: 0.75rem 1.25rem !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: #9a563a !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 0.9375rem !important;
	text-transform: none !important;
	cursor: pointer;
}

.c8-pdp-cart__add:hover {
	background: #7e422c !important;
}

.c8-pdp-cart__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
	margin-bottom: 1rem;
}

.c8-pdp-cart__buy,
.c8-pdp-cart__phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.7rem 1rem;
	border: 0;
	border-radius: 8px;
	background: #121f38;
	color: #fff !important;
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
}

.c8-pdp-cart__buy:hover,
.c8-pdp-cart__phone:hover {
	background: #0b1424;
	color: #fff !important;
}

.c8-pdp-cart__phone b {
	color: #ffb38a;
}

/* Trust */
.c8-pdp-trust {
	margin-top: 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

.c8-pdp-trust__title {
	margin-bottom: 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #121f38;
}

.c8-pdp-trust__list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.c8-pdp-trust__list li {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: #333;
}

.c8-pdp-trust__list img {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	object-fit: contain;
}

/* ---------- Tabs ---------- */
.c8-pdp__tabs,
.c8-pdp-tabs {
	background: #fff;
	border-radius: 12px;
	padding: 1rem 1.25rem 1.5rem;
	margin-bottom: 2rem;
}

.c8-pdp-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.5rem;
	margin: 0 0 1.25rem;
	padding: 0 0 0.75rem;
	list-style: none;
	border-bottom: 1px solid #e8e6e1;
}

.c8-pdp-tabs__link {
	padding: 0.35rem 0.15rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1.0625rem;
	font-weight: 700;
	color: #666;
	cursor: pointer;
	border-bottom: 2px solid transparent;
}

.c8-pdp-tabs__link.is-active {
	color: #121f38;
	border-bottom-color: #9a563a;
}

.c8-pdp-tabs__panel[hidden] {
	display: none !important;
}

.c8-pdp-tabs__content {
	position: relative;
}

.c8-pdp-tabs__inner {
	font-size: 0.975rem;
	line-height: 1.7;
	color: #333;
}

.c8-pdp-tabs__inner.is-collapsed {
	max-height: 420px;
	overflow: hidden;
}

.c8-pdp-tabs__more {
	display: inline-flex;
	margin: 1rem auto 0;
	padding: 0.45rem 1rem;
	border: 1px solid #d1cfc8;
	border-radius: 999px;
	background: #fff;
	color: #121f38;
	font-weight: 600;
	font-size: 0.875rem;
	cursor: pointer;
}

.c8-pdp-tabs__more .is-less {
	display: none;
}

.c8-pdp-tabs__more.is-open .is-more {
	display: none;
}

.c8-pdp-tabs__more.is-open .is-less {
	display: inline;
}

.c8-pdp-guide ol {
	padding-left: 1.25rem;
}

.c8-pdp-guide li {
	margin-bottom: 0.5rem;
}

/* ---------- Related ---------- */
.c8-pdp__related-title {
	margin: 0 0 1.25rem;
	text-align: center;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
	font-weight: 700;
	color: #121f38;
}

.c8-pdp-related-grid.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.c8-pdp-related-grid .product {
	margin: 0 !important;
	width: auto !important;
	float: none !important;
}

@media (max-width: 991px) {
	.c8-pdp__top {
		grid-template-columns: 1fr;
	}

	.c8-pdp__summary {
		padding: 1rem 1.05rem 1.25rem;
	}

	.c8-pdp-trust__list {
		grid-template-columns: 1fr;
	}

	.c8-pdp-related-grid.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.c8-pdp__tabs,
	.c8-pdp-tabs {
		padding: 0.85rem 0.95rem 1.15rem;
	}

	.c8-sticky-atc {
		bottom: calc(64px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 575px) {
	.c8-pdp-meta {
		grid-template-columns: 1fr;
	}

	.c8-pdp-cart__actions {
		grid-template-columns: 1fr;
	}

	.c8-pdp-cart__row {
		flex-direction: column;
		align-items: stretch;
	}

	.c8-pdp-cart__add {
		flex: 1 1 auto;
		width: 100%;
	}

	.c8-pdp-related-grid.products {
		grid-template-columns: 1fr !important;
	}

	.c8-pdp-gallery__thumbs .swiper-slide {
		width: 58px !important;
		height: 58px;
	}
}
