/**
 * Single product styles.
 *
 * @package OroTortuga
 */

/* ============================================================
   Product layout
   ============================================================ */

.ot-product {
	display: grid;
	gap: clamp(28px, 3vw, 48px);
}

/* ============================================================
   Gallery – vertical scroll, no thumbnails
   ============================================================ */

.ot-product__gallery {
	display: grid;
	gap: clamp(4px, 0.8vw, 8px);
	min-width: 0;
}

.ot-product__gallery-link {
	background: #f7f5f0;
	border: 1px solid rgba(89, 46, 45, 0.08);
	cursor: zoom-in;
	display: block;
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.ot-product__gallery-link:hover {
	border-color: rgba(89, 46, 45, 0.24);
}

.ot-product__gallery-link:focus-visible {
	border-color: #9f7438;
}

.ot-product__gallery-image {
	aspect-ratio: 4 / 5;
	display: block;
	height: auto;
	object-fit: contain;
	padding: clamp(12px, 2vw, 24px);
	transition: opacity 0.2s ease;
	width: 100%;
}

.ot-product__gallery-link:hover .ot-product__gallery-image {
	opacity: 0.96;
}

/* ============================================================
   Product info column
   ============================================================ */

.ot-product__info {
	display: grid;
	gap: clamp(16px, 2vw, 22px);
	align-content: start;
}

/* --- eyebrow (category label) --- */

.ot-product__eyebrow {
	color: rgba(80, 65, 66, 0.68);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	margin: 0;
	text-transform: uppercase;
}

/* --- title --- */

.ot-product__title {
	font-family: "Isenheim", serif;
	font-size: clamp(1.6rem, 2.2vw, 2.4rem);
	line-height: 1.04;
	margin: 0;
}

/* --- price --- */

.ot-product__price {
	color: #592e2d;
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0;
}

/* --- availability banner --- */

.ot-product__availability {
	background: rgba(255, 255, 255, 0.68);
	border: 1px solid rgba(183, 149, 93, 0.2);
	display: grid;
	gap: 6px;
	padding: 14px 16px;
}

.ot-product__availability-label {
	color: #592e2d;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	margin: 0;
	text-transform: uppercase;
}

.ot-product__availability-text {
	color: rgba(80, 65, 66, 0.84);
	font-size: 0.94rem;
	line-height: 1.62;
	margin: 0;
}

/* --- excerpt / short description --- */

.ot-product__excerpt {
	font-size: 1rem;
	line-height: 1.68;
	max-width: 42rem;
}

.ot-product__excerpt p {
	margin: 0;
}

.ot-product__excerpt p + p {
	margin-top: 0.8em;
}

/* --- context links (category, collection, material chips) --- */

.ot-product__context {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ot-product__context-link {
	background: rgba(240, 238, 233, 0.78);
	border: 1px solid rgba(89, 46, 45, 0.1);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	padding: 9px 11px;
	text-transform: uppercase;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ot-product__context-link:hover,
.ot-product__context-link:focus-visible {
	background: #592e2d;
	border-color: #592e2d;
	color: #f7f0ea;
	text-decoration: none;
}

/* ============================================================
   Purchase section (add to cart, variants, meta)
   ============================================================ */

.ot-product__purchase {
	display: grid;
	gap: 16px;
}

.ot-product__purchase form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.ot-product__purchase form.variations_form {
	display: grid;
	gap: 14px;
}

.ot-product__purchase table.variations {
	display: grid;
	margin: 0;
}

.ot-product__purchase table.variations tbody,
.ot-product__purchase table.variations tr,
.ot-product__purchase table.variations th,
.ot-product__purchase table.variations td {
	display: grid;
	width: 100%;
}

.ot-product__purchase table.variations tr {
	gap: 8px;
	margin-bottom: 14px;
}

.ot-product__purchase table.variations th.label {
	color: rgba(80, 65, 66, 0.68);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-align: left;
	text-transform: uppercase;
}

.ot-product__purchase table.variations select {
	appearance: none;
	background-color: rgba(255, 255, 255, 0.92);
	background-image: linear-gradient(45deg, transparent 50%, #592e2d 50%), linear-gradient(135deg, #592e2d 50%, transparent 50%);
	background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
	background-repeat: no-repeat;
	background-size: 6px 6px, 6px 6px;
	border-color: rgba(89, 46, 45, 0.22);
	color: #504142;
	font-size: 1rem;
	width: 100%;
}

.ot-product__purchase table.variations select:focus-visible {
	border-color: #9f7438;
	box-shadow: 0 0 0 3px rgba(159, 116, 56, 0.2);
	outline: 0;
}

.ot-product__purchase table.variations select.ot-variation-select--enhanced {
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.ot-variation-tiles {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ot-variation-tile {
	align-items: center;
	background: rgba(255, 255, 255, 0.76);
	border: 1px solid rgba(89, 46, 45, 0.16);
	color: #504142;
	cursor: pointer;
	display: inline-flex;
	font-family: "Alegreya Sans SC", sans-serif;
	font-size: 0.86rem;
	font-weight: 500;
	justify-content: center;
	letter-spacing: 0.08em;
	min-height: 46px;
	padding: 10px 12px;
	text-align: center;
	text-transform: uppercase;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.ot-variation-tile:hover,
.ot-variation-tile:focus-visible {
	border-color: #9f7438;
	box-shadow: 0 0 0 3px rgba(159, 116, 56, 0.16);
	outline: 0;
}

.ot-variation-tile.is-selected {
	background: #592e2d;
	border-color: #592e2d;
	color: #f7f0ea;
}

.ot-variation-tile.is-disabled,
.ot-variation-tile:disabled {
	cursor: not-allowed;
	opacity: 0.45;
	text-decoration: line-through;
}

.ot-product__variation-hint {
	background: rgba(255, 255, 255, 0.78);
	border-left: 3px solid #9f7438;
	color: rgba(80, 65, 66, 0.86);
	font-size: 0.92rem;
	line-height: 1.55;
	margin: 0;
	padding: 10px 12px;
}

.ot-product__purchase .reset_variations {
	color: #592e2d;
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ot-product__purchase .woocommerce-variation {
	background: rgba(255, 255, 255, 0.68);
	border: 1px solid rgba(89, 46, 45, 0.1);
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 12px 14px;
}

.ot-product__purchase .woocommerce-variation-price,
.ot-product__purchase .woocommerce-variation-availability {
	margin: 0;
}

.ot-product__purchase .quantity .qty {
	min-width: 84px;
}

/* --- add to cart button (WooCommerce native) --- */

.ot-product__purchase .single_add_to_cart_button {
	background: #592e2d;
	border: 1px solid #592e2d;
	color: #f7f0ea;
	cursor: pointer;
	font-family: "Alegreya Sans SC", sans-serif;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	min-height: 48px;
	padding: 0 22px;
	text-transform: uppercase;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.ot-product__purchase .single_add_to_cart_button:hover,
.ot-product__purchase .single_add_to_cart_button:focus-visible {
	background: #4a2625;
	border-color: #4a2625;
}

.ot-product__purchase .single_add_to_cart_button:disabled,
.ot-product__purchase .single_add_to_cart_button.disabled,
.ot-product__purchase .single_add_to_cart_button.wc-variation-selection-needed,
.ot-product__purchase .single_add_to_cart_button.wc-variation-is-unavailable,
.ot-product__purchase .single_add_to_cart_button[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.6;
}

/* --- purchase note --- */

.ot-product__purchase-note {
	color: rgba(80, 65, 66, 0.72);
	font-size: 0.86rem;
	line-height: 1.55;
	margin: 0;
}

/* --- meta (SKU, categories, tags) --- */

.ot-product__meta {
	border-top: 1px solid rgba(89, 46, 45, 0.12);
	padding-top: 14px;
}

.ot-product__meta .product_meta {
	display: grid;
	gap: 6px;
	font-size: 0.82rem;
}

.ot-product__meta .product_meta > span {
	display: block;
}

/* ============================================================
   Accordion details (material, dimensions, shipping)
   ============================================================ */

.ot-product__details {
	border-top: 1px solid rgba(89, 46, 45, 0.12);
	display: grid;
	gap: 0;
	padding-top: 4px;
}

.ot-product__details-item {
	border-bottom: 1px solid rgba(89, 46, 45, 0.08);
}

.ot-product__details-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: #504142;
	cursor: pointer;
	display: flex;
	font-family: "Alegreya Sans SC", sans-serif;
	font-size: 0.76rem;
	font-weight: 500;
	gap: 8px;
	justify-content: space-between;
	letter-spacing: 0.12em;
	min-height: 44px;
	padding: 10px 0;
	text-transform: uppercase;
	width: 100%;
}

.ot-product__details-toggle::after {
	content: "+";
	font-size: 1rem;
	font-weight: 400;
	transition: transform 0.2s ease;
}

.ot-product__details-item.is-open .ot-product__details-toggle::after {
	content: "\2212";
}

.ot-product__details-panel {
	color: rgba(80, 65, 66, 0.82);
	font-size: 0.92rem;
	line-height: 1.62;
	max-height: 0;
	overflow: hidden;
	padding: 0;
	transition: max-height 0.3s ease, padding 0.3s ease;
}

.ot-product__details-item.is-open .ot-product__details-panel {
	max-height: 400px;
	padding: 0 0 14px;
}

/* ============================================================
   Product description section
   ============================================================ */

.ot-product-description {
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(89, 46, 45, 0.1);
	margin-top: clamp(32px, 4vw, 56px);
	padding: clamp(24px, 3vw, 36px);
}

.ot-product-description__eyebrow {
	color: rgba(80, 65, 66, 0.68);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.ot-product-description__title {
	font-family: "Isenheim", serif;
	font-size: clamp(1.35rem, 1.8vw, 1.8rem);
	line-height: 1.06;
	margin: 0 0 16px;
}

.ot-product-description__content {
	color: rgba(80, 65, 66, 0.88);
	font-size: 0.98rem;
	line-height: 1.72;
}

.ot-product-description__content > *:first-child {
	margin-top: 0;
}

.ot-product-description__content > *:last-child {
	margin-bottom: 0;
}

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

@media (min-width: 520px) {
	.ot-variation-tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.ot-product {
		grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
	}
}

@media (min-width: 1024px) {
	.ot-product {
		align-items: start;
		grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
	}

	.ot-product__gallery {
		position: sticky;
		top: 110px;
	}

	.ot-product__info {
		position: sticky;
		top: 110px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ot-product__gallery-image,
	.ot-product__gallery-link,
	.ot-product__context-link,
	.ot-product__purchase .single_add_to_cart_button,
	.ot-variation-tile,
	.ot-product__details-toggle::after,
	.ot-product__details-panel {
		transition: none;
	}
}
