/*
 * Ficha de Produto — L'Éléphant
 * Single reconstruído para seguir o XD e a mesma grelha/tipografia da Loja.
 */

body.single-product {
	background: #ede6e2;
}

.elephant-product-page {
	width: 100%;
	margin: 0;
	padding: 0;
}

/* Mesmo eixo horizontal da Loja. */
.elephant-product-page .elephant-topbar {
	padding-left: calc(1% + 15px);
	padding-right: calc(1% + 15px);
}

.elephant-product__breadcrumb, .elephant-product__breadcrumb a,
.elephant-product__breadcrumb span {
	display: flex;
	align-items: center;
	white-space: nowrap;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.elephant-product__breadcrumb a,
.elephant-product__breadcrumb span {
	color: var(--black);
}

/* =====================================================================
 * STAGE — destaque | galeria | informação
 * ===================================================================== */
.elephant-product__stage {
    display: grid;
    grid-template-columns: 35.5% 27% 37.5%;
    grid-template-rows: minmax(0, 1fr);
    width: 100%;
    height: clamp(500px, 38vw, 680px);
    min-height: 0;
    background: #ede6e2;
    border-bottom: 1px solid rgba(0, 0, 0, 0.16);
    padding: 25px 0px !important;
    overflow: hidden;
}
.elephant-product-grid {
    margin-bottom: 50px;
}
.elephant-product__featured,
.elephant-product__gallery-panel,
.elephant-product__summary {
	min-width: 0;
	min-height: 0;
	height: 100%;
}

.elephant-product__featured {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    overflow: hidden;
    background: #ede6e2;
}

.elephant-product__featured-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}
/* A galeria é o painel fotográfico central e ocupa integralmente a célula. */
.elephant-product__gallery-panel {
	position: relative;
	overflow: hidden;
	background: #ede6e2;
}

.elephant-product__gallery-track {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	overflow: hidden;
}

.elephant-product__gallery-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

/* Slick fica totalmente preso à altura do stage. */
.elephant-product__gallery-track,
.elephant-product__gallery-track .slick-list,
.elephant-product__gallery-track .slick-track,
.elephant-product__gallery-track .slick-slide,
.elephant-product__gallery-track .slick-slide > div,
.elephant-product__gallery-slide {
	height: 100% !important;
	min-height: 0 !important;
}

.elephant-product__gallery-track .slick-list {
	position: relative;
	overflow: hidden;
}

.elephant-product__gallery-track .slick-track {
	display: flex !important;
}

.elephant-product__gallery-track .slick-slide,
.elephant-product__gallery-slide {
	overflow: hidden;
}

.elephant-product__gallery-slide {
	width: 100%;
	outline: 0;
}

.elephant-product__gallery-track.is-draggable,
.elephant-product__gallery-track .slick-list {
	cursor: grab;
}

.elephant-product__gallery-track .slick-list:active {
	cursor: grabbing;
}

.elephant-product__summary {
    display: flex;
    align-items: end;
    justify-content: flex-start;
    padding: clamp(28px, 3vw, 56px) clamp(28px, 3.25vw, 64px);
    background: #ede6e2;
}

.elephant-product__summary-inner {
	width: min(100%, 350px);
	max-width: 350px;
}

.elephant-product__summary-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
}

.elephant-product__heading {
	min-width: 0;
}

/* O título continua a ter hierarquia, mas passa a Roboto e deixa de dominar
 * visualmente a página como acontecia na versão anterior. */
.elephant-product__title {
	margin: 0;
	font-family: "Roboto", sans-serif;
	font-size: clamp(22px, 1.45vw, 28px);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: 0;
}

.elephant-product__brand {
	margin: 4px 0 0;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	color: rgba(0, 0, 0, 0.68);
}

.elephant-product__heart {
	flex: 0 0 auto;
	margin-top: -2px;
}

.elephant-product__heart .elephant-wishlist-heart {
	width: 22px;
	height: 22px;
}

.elephant-product__price-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.elephant-product__price {
	margin: 0;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
}

.elephant-product__price .amount,
.elephant-product__price bdi {
	font: inherit;
}

.elephant-product__price-note {
	font-family: "Roboto", sans-serif;
	font-size: 11px;
	font-weight: 400;
	line-height: 16px;
	color: rgba(0, 0, 0, 0.5);
}

.elephant-product__description {
	width: min(100%, 300px);
	margin-top: 17px;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	color: var(--black);
}

.elephant-product__description > :first-child {
	margin-top: 0;
}

.elephant-product__description > :last-child {
	margin-bottom: 0;
}

.elephant-product__description p {
	font: inherit;
	line-height: inherit;
	margin: 0 0 8px;
}

.elephant-product__compact-specs {
	margin-top: 8px;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
}

.elephant-product__compact-specs p {
	margin: 0;
	font: inherit;
	line-height: inherit;
}

/* =====================================================================
 * CARRINHO — no XD não existe caixa de quantidade no single.
 * ===================================================================== */
.elephant-product__add-to-cart {
    margin-top: 50px;
}
.elephant-product__add-to-cart form.cart {
	display: flex;
	align-items: center;
	margin: 0;
}

/* Mantém o input no DOM/POST do WooCommerce com o valor 1, apenas não o
 * apresenta visualmente. */
.elephant-product__add-to-cart .quantity {
	display: none !important;
}

.elephant-product__add-to-cart .single_add_to_cart_button,
.elephant-product__add-to-cart button.single_add_to_cart_button {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 7px;
	min-height: 20px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none;
	color: var(--black) !important;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0;
	text-transform: uppercase;
	cursor: pointer;
}

.elephant-product__add-to-cart .single_add_to_cart_button::before {
	content: "\2014";
	display: inline-block;
}

.elephant-product__add-to-cart .single_add_to_cart_button:hover,
.elephant-product__add-to-cart .single_add_to_cart_button:focus-visible {
	background: transparent !important;
	color: rgba(0, 0, 0, 0.52) !important;
}

/* Variações mantêm a funcionalidade WooCommerce. */
.elephant-product__add-to-cart table.variations {
	width: 100%;
	margin: 0 0 16px;
	border-collapse: collapse;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	line-height: 20px;
}

.elephant-product__add-to-cart table.variations th,
.elephant-product__add-to-cart table.variations td {
	padding: 5px 0;
	border: 0;
	font: inherit;
}

.elephant-product__add-to-cart table.variations select {
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 0;
	background: transparent;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
}

.elephant-product__delivery-note {
	margin: 14px 0 0;
	font-family: "Roboto-Italic", "Roboto", sans-serif;
	font-size: 11px;
	font-weight: 400;
	font-style: italic;
	line-height: 16px;
	color: rgba(0, 0, 0, 0.55);
}

/* =====================================================================
 * RELACIONADOS — mesma grelha da Loja, sem título intermédio.
 * ===================================================================== */
.elephant-product__related {
	width: 100%;
	margin: 0;
	padding: 0;
}

.elephant-product__related .elephant-product-grid {
	border-top: 0;
}

.elephant-product__related .elephant-product-card {
	min-height: clamp(330px, 31vw, 500px);
}

.elephant-product__related .elephant-product-card__image {
	min-height: clamp(260px, 24vw, 400px);
}

.single-product .woocommerce-tabs,
.single-product .related.products > h2,
.single-product .upsells.products {
	display: none !important;
}

/* =====================================================================
 * RESPONSIVE
 * ===================================================================== */
@media (max-width: 1100px) {
	.elephant-product__stage {
		grid-template-columns: 50% 50%;
		grid-template-rows: auto auto;
		height: auto;
		min-height: 0;
		overflow: visible;
	}

	.elephant-product__featured,
	.elephant-product__gallery-panel {
		height: auto;
		aspect-ratio: 4 / 5;
	}

	.elephant-product__featured {
		padding: 42px;
	}

	.elephant-product__gallery-track {
		position: relative;
		inset: auto;
	}

	.elephant-product__summary {
		grid-column: 1 / -1;
		min-height: 390px;
		padding: 48px calc(1% + 15px);
	}

	.elephant-product__summary-inner {
		width: min(100%, 430px);
		max-width: 430px;
	}
}

@media (max-width: 780px) {
	.elephant-product-page .elephant-topbar {
		padding-left: var(--page-margin-mobile);
		padding-right: var(--page-margin-mobile);
	}

	.elephant-product__breadcrumb {
		font-size: 14px;
		line-height: 20px;
	}

	.elephant-product__stage {
		display: block;
	}

	.elephant-product__featured,
	.elephant-product__gallery-panel {
		width: 100%;
		aspect-ratio: 4 / 5;
		border-bottom: 1px solid rgba(0, 0, 0, 0.16);
	}

	.elephant-product__featured {
		padding: 36px var(--page-margin-mobile);
	}

	.elephant-product__featured-image {
		max-width: 82%;
		max-height: 82%;
	}

	.elephant-product__summary {
		min-height: auto;
		padding: 42px var(--page-margin-mobile) 50px;
	}

	.elephant-product__summary-inner {
		width: 100%;
		max-width: 100%;
	}

	.elephant-product__title {
		font-size: 24px;
		line-height: 27px;
	}

	.elephant-product__description {
		width: min(100%, 360px);
	}

	.elephant-product__related .elephant-product-card {
		min-height: 340px;
	}

	.elephant-product__related .elephant-product-card__image {
		min-height: 260px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elephant-product__gallery-track .slick-track {
		transition: none !important;
	}
}
