/*
Theme Name: Twenty Twenty-Five ARC
Template: twentytwentyfive
Description: Child theme de Twenty Twenty-Five para Alicante Rugby Club
Version: 1.1.0
Author: Alicante Rugby Club
*/

/* --- Hamburger icon: replace WP 2-line SVG with standard 3-line ---
   WP core uses a 2-path SVG. We hide it and use a 3-line SVG via
   background-image on the button. The SVG uses currentColor via
   a white fill since the header has dark background. */
.wp-block-navigation__responsive-container-open svg {
	display: none;
}

.wp-block-navigation__responsive-container-open {
	width: 24px;
	height: 24px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v1.5H4z' fill='white'/%3E%3Cpath d='M4 11.25h16v1.5H4z' fill='white'/%3E%3Cpath d='M4 16.5h16v1.5H4z' fill='white'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.arc-header-cta .wp-block-button__link {
	white-space: nowrap;
}

/* --- Store cart/account bar: remove gap between header and bar --- */
.arc-store-bar {
	margin-top: 0 !important;
}

/* --- Single product: remove WooCommerce wrapper gap ---
   WooCommerce wraps single-product template content in a div.woocommerce.product
   that inherits margin-block-start: 1.2rem from :where(.wp-site-blocks) > *.
   This creates a visible gap between the header bar and the product content. */
.wp-site-blocks > .woocommerce.product {
	margin-block-start: 0;
}

.arc-gold-accent {
	width: 60px;
	height: 3px;
	margin-inline: auto;
	border: none;
	background-color: var(--wp--preset--color--arc-oro);
}

.arc-whatsapp-btn .wp-block-button__link {
	background-color: transparent;
	color: #ffffff;
	border: 2px solid rgba(255, 255, 255, 0.8);
}

.arc-whatsapp-btn .wp-block-button__link:hover {
	background-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-color: #ffffff;
}

.arc-sponsors .wp-block-column {
	display: flex;
	align-items: center;
	justify-content: center;
}

.arc-sponsors .wp-block-image {
	margin-bottom: 0;
}

.arc-sponsors img {
	max-height: 60px;
	width: auto;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: 0.7;
	transition: filter 0.2s, opacity 0.2s;
}

.arc-sponsor-principal img {
	max-height: 120px;
}

.arc-sponsor-destacado img {
	max-height: 80px;
}

@media (prefers-reduced-motion: reduce) {
	.arc-sponsors img {
		transition: none;
	}
}

.arc-sponsors img:hover {
	filter: grayscale(0%);
	opacity: 1;
}

.arc-cta-oro .wp-block-button__link {
	background-color: var(--wp--preset--color--arc-burdeos-oscuro);
	color: #ffffff;
}

.arc-cta-oro .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--arc-burdeos);
	color: #ffffff;
}

/* --- Homepage: subgrid alignment for team cards and value columns ---
   Parent columns become a grid. Each column uses subgrid to align
   heading, text, and button across all 3 cards at the same row. */
.arc-team-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0 32px;
}

.arc-team-cards > .wp-block-column {
	display: grid;
	grid-template-rows: subgrid;
	grid-row: span 3;
}

.arc-values {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0 32px;
}

.arc-values > .wp-block-column {
	display: grid;
	grid-template-rows: subgrid;
	grid-row: span 2;
}

@media (max-width: 767px) {
	.arc-team-cards,
	.arc-values {
		grid-template-columns: 1fr;
	}

	.arc-team-cards > .wp-block-column,
	.arc-values > .wp-block-column {
		grid-row: auto;
	}
}

/* --- Single product: add to cart button --- */
.single_add_to_cart_button.wp-element-button,
.products .wp-element-button {
	background-color: var(--wp--preset--color--arc-burdeos);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.03em;
	border: 2px solid var(--wp--preset--color--arc-burdeos);
	border-radius: 2px;
	padding: 14px 32px;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.single_add_to_cart_button.wp-element-button:hover,
.products .wp-element-button:hover {
	background-color: var(--wp--preset--color--arc-burdeos-oscuro);
	color: #ffffff;
	border-color: var(--wp--preset--color--arc-burdeos-oscuro);
}

/* --- Single product: price font ---
   WooCommerce product-price block doesn't expose fontFamily as a block attribute.
   CSS is the only way to set this. */
.single-product .wp-block-woocommerce-product-price {
	font-family: var(--wp--preset--font-family--arc-heading);
}

/* --- Single product: tabs --- */
.wc-block-components-tab-panel .wc-block-components-tab-panel__tab--active,
.woocommerce-tabs .tabs li.active a {
	border-bottom-color: var(--wp--preset--color--arc-burdeos);
	color: var(--wp--preset--color--arc-burdeos);
	font-weight: 700;
}



.variations {
	border-collapse: collapse;
}

.variations th.label {
	padding: 0 12px 8px 0;
	vertical-align: middle;
	font-weight: 700;
}

.variations td.value {
	padding: 0 0 8px 0;
}

.variations td.value select {
	min-width: 160px;
}

.e-atc-qty-button-holder {
	display: flex;
	align-items: center;
	gap: 12px;
}

.e-atc-qty-button-holder .quantity input.qty {
	width: 60px;
	text-align: center;
}

/* ===================================================================
   Shop page: product grid design (/tienda/)
   Targets woocommerce/product-collection block in TT25 child theme.
   CSS classes are WooCommerce "private API" — verify after WC updates.
   =================================================================== */

/* WooCommerce injects inline grid-template-columns from block attributes.
   !important is the official override — no theme.json or PHP alternative.
   Ref: https://github.com/woocommerce/woocommerce/issues/45362 */
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template {
	grid-template-columns: repeat(3, 1fr) !important;
	grid-template-rows: auto;
	gap: 24px 24px;
}

.wp-block-woocommerce-product-collection .wc-block-product {
	display: grid;
	grid-template-rows: subgrid;
	grid-row: span 4;
	background: #ffffff;
	padding: 12px 12px 16px;
	border-radius: 4px;
	transition: box-shadow 0.2s;
}

.wp-block-woocommerce-product-collection .wc-block-product:hover {
	box-shadow: 0 4px 20px rgba(74, 28, 36, 0.1);
}

/* --- Product images: square, clean --- */
.wp-block-woocommerce-product-collection .wc-block-components-product-image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--wp--preset--color--arc-neutro-claro);
	padding: 3%;
	border-radius: 2px;
}

.wp-block-woocommerce-product-collection .wc-block-components-product-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 0.4s ease;
}

.wp-block-woocommerce-product-collection .wc-block-product:hover .wc-block-components-product-image img {
	transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-woocommerce-product-collection .wc-block-components-product-image img {
		transition: none;
	}
}

/* --- Product titles --- */
.wp-block-woocommerce-product-collection .wp-block-post-title {
	text-transform: none;
	font-size: 0.9rem;
	font-family: var(--wp--preset--font-family--arc-body);
	font-weight: 600;
	line-height: 1.35;
	margin-top: 10px;
	color: var(--wp--preset--color--arc-neutro-oscuro);
}

/* --- Prices --- */
.wp-block-woocommerce-product-collection .wc-block-components-product-price {
	font-weight: 700;
	font-size: 1rem;
	font-family: var(--wp--preset--font-family--arc-heading);
	color: var(--wp--preset--color--arc-burdeos);
	margin-top: 2px;
}

/* --- Buttons: pin to bottom of grid cell --- */
.wp-block-woocommerce-product-collection .wp-block-button.wc-block-components-product-button {
	align-self: end;
}

/* --- Add to cart: oro solido, confident --- */
.wp-block-woocommerce-product-collection .wc-block-components-product-button__button,
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-button .wp-element-button {
	background-color: var(--wp--preset--color--arc-oro);
	color: var(--wp--preset--color--arc-burdeos-oscuro);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
	border: 2px solid var(--wp--preset--color--arc-oro);
	padding: 10px 16px;
	text-align: center;
	width: 100%;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.wp-block-woocommerce-product-collection .wc-block-components-product-button__button:hover,
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-button .wp-element-button:hover {
	background-color: var(--wp--preset--color--arc-burdeos);
	color: #ffffff;
	border-color: var(--wp--preset--color--arc-burdeos);
}

/* --- Select options: burdeos outline, confident --- */
.wp-block-woocommerce-product-collection a.wp-element-button[href*="/producto/"] {
	background-color: transparent;
	color: var(--wp--preset--color--arc-burdeos);
	border: 2px solid var(--wp--preset--color--arc-burdeos);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
	padding: 10px 16px;
	text-align: center;
	width: 100%;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.wp-block-woocommerce-product-collection a.wp-element-button[href*="/producto/"]:hover {
	background-color: var(--wp--preset--color--arc-burdeos);
	color: #ffffff;
	border-color: var(--wp--preset--color--arc-burdeos);
}

/* --- Mobile: 2-column grid ---
   WooCommerce injects inline grid-template-columns from block attributes.
   !important is the official override — no theme.json or PHP alternative exists.
   Ref: https://wordpress.org/support/topic/display-2-columns-on-mobile-for-product-collection-block-on-homepage/
   Ref: https://github.com/woocommerce/woocommerce/issues/45362 */
@media (max-width: 767px) {
	.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 20px 12px;
	}

	.wp-block-woocommerce-product-collection .wc-block-product {
		padding: 8px 8px 12px;
	}

	.wp-block-woocommerce-product-collection .wc-block-components-product-image {
		padding: 2%;
	}

	.wp-block-woocommerce-product-collection .wp-block-post-title {
		font-size: 0.78rem;
		margin-top: 8px;
	}

	.wp-block-woocommerce-product-collection .wc-block-components-product-price {
		font-size: 0.8rem;
	}

	.wp-block-woocommerce-product-collection .wc-block-components-product-button__button,
	.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-button .wp-element-button,
	.wp-block-woocommerce-product-collection a.wp-element-button[href*="/producto/"] {
		font-size: 0.7rem;
		padding: 10px 12px;
	}
}

/* --- Hide inscription price range in store grid ---
   The "70€ – 470€" range anchors parents on the highest price (Kahneman).
   Price is visible inside the product page where category context exists. */
.wp-block-woocommerce-product-collection .product_cat-inscripcion-2 .wc-block-components-product-price {
	display: none;
}

/* --- Pagination --- */
.wp-block-woocommerce-product-collection .wp-block-query-pagination {
	margin-top: 48px;
	gap: 12px;
	justify-content: center;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
}

/* ===================================================================
   WooCommerce flow pages: carrito, checkout, mi cuenta
   =================================================================== */

/* --- Sticky footer: push footer to bottom on short pages --- */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main {
	flex-grow: 1;
}

/* --- Checkout: hide address fields (pickup only, no shipping) ---
   PHP filter (functions.php) marks these as not required so WooCommerce
   validation passes. CSS hides them visually. Two-step approach is more
   stable than PHP hidden:true which has broken across WooCommerce updates.
   Country stays in DOM pre-set to ES but invisible — Store API requires it.
   Remove these rules + the PHP filter if the club starts shipping. */
.wc-block-components-address-form__address_1,
.wc-block-components-address-form__address_2-toggle,
.wc-block-components-address-form__city,
.wc-block-components-address-form__state,
.wc-block-components-address-form__postcode,
.wc-block-components-address-form__country {
	display: none;
}

/* --- Carrito: "Finalizar compra" button --- */
.wc-block-cart__submit-button {
	background-color: var(--wp--preset--color--arc-oro);
	color: var(--wp--preset--color--arc-burdeos-oscuro);
	font-weight: 700;
	border: none;
	padding: 14px 32px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.wc-block-cart__submit-button:hover {
	background-color: var(--wp--preset--color--arc-oro-oscuro);
	color: #ffffff;
}

/* --- Checkout: "Realizar el pedido" button --- */
.wc-block-components-checkout-place-order-button {
	background-color: var(--wp--preset--color--arc-oro);
	color: var(--wp--preset--color--arc-burdeos-oscuro);
	font-weight: 700;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s;
}

.wc-block-components-checkout-place-order-button:hover {
	background-color: var(--wp--preset--color--arc-oro-oscuro);
	color: #ffffff;
}

/* --- Checkout: style "Acceso" login link as oro pill button ---
   WooCommerce renders a plain text link next to "Información de contacto".
   Only visible to guest users; disappears when logged in. */
.wc-block-checkout__login-prompt {
	background-color: var(--wp--preset--color--arc-oro);
	color: var(--wp--preset--color--arc-burdeos-oscuro);
	font-weight: 700;
	font-size: 0.8125rem;
	text-decoration: none;
	padding: 6px 16px;
	border-radius: 4px;
	transition: background-color 0.2s;
}

.wc-block-checkout__login-prompt:hover {
	background-color: var(--wp--preset--color--arc-oro-oscuro);
	color: #ffffff;
	text-decoration: none;
}

/* --- Mi cuenta: WooCommerce My Account uses PHP templates, not blocks.
   CSS is the only way to style these pages — no block attributes available. --- */
.woocommerce-account .woocommerce-form-login .woocommerce-form-login__submit {
	background-color: var(--wp--preset--color--arc-oro);
	color: var(--wp--preset--color--arc-burdeos-oscuro);
	font-weight: 700;
	border: none;
	padding: 12px 32px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.woocommerce-account .woocommerce-form-login .woocommerce-form-login__submit:hover {
	background-color: var(--wp--preset--color--arc-oro-oscuro);
	color: #ffffff;
}

/* --- Mi cuenta: sidebar navigation links --- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	padding: 10px 16px;
	color: var(--wp--preset--color--arc-burdeos-oscuro);
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: border-color 0.2s, background-color 0.2s;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	border-left-color: var(--wp--preset--color--arc-oro);
	background-color: var(--wp--preset--color--arc-oro-claro);
}

/* ===================================================================
   Coaches section (escuela, senior) — uniform circular photos + aligned text
   Targets the columns inside the burdeos-claro background section
   that contains is-style-rounded images.
   =================================================================== */

/* The container (.wp-block-image) controls the circle size.
   The image fills it 100%. No fixed px values — works at any
   column width. Gutenberg inline width/height attributes
   are overridden by the 100% + aspect-ratio combination. */

.arc-coaches .wp-block-columns {
	align-items: start;
}

.arc-coaches .wp-block-column {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.arc-coaches .wp-block-column .wp-block-image {
	width: 120px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 50%;
	flex-shrink: 0;
}

.arc-coaches .wp-block-column .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 50%;
}

@media (max-width: 767px) {
	.arc-coaches .wp-block-columns {
		gap: 24px;
	}

	.arc-coaches .wp-block-column .wp-block-image {
		width: 100px;
	}
}

/* ===================================================================
   Coach grid for sections with many coaches.
   Desktop keeps the native 4-col flex from wp:columns.
   Mobile flattens the stacked layout into a 2-col grid with
   smaller circles so 12+ entries fit without endless scrolling.
   =================================================================== */
@media (max-width: 781px) {
	.arc-coaches-multi .wp-block-columns:not(.is-not-stacked-on-mobile) {
		flex-wrap: wrap !important;
		gap: 32px 16px;
	}

	.arc-coaches-multi .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: calc(50% - 8px) !important;
		margin-left: 0 !important;
	}

	.arc-coaches-multi .wp-block-image {
		width: 140px;
		margin-inline: auto;
	}

	.arc-coaches-multi .wp-block-image img {
		width: 100%;
		height: auto;
		display: block;
	}
}
