/*
Theme Name:   Tybo Accesorios
Template:     twentytwentyfive
Version:      1.0.0
Description:  Child theme for Tybo Accesorios — a Uruguayan accessories brand.
Author:       Tybo Accesorios
Author URI:   https://tyboaccesorios.com
Text Domain:  tybo
Domain Path:  /languages
Requires WP:  6.7
Requires PHP: 8.0
*/

/* ─── Typography scale ───────────────────────────────────────────────────── */

/* Header nav menu */
.wp-block-navigation a {
	font-size: 16px;
}

/* WooCommerce mini-cart drawer heading ("Tu carrito") — ships at 2em by default */
.wc-block-mini-cart__title {
	font-size: 24px !important;
}

/* ─── Product archive — card grid ────────────────────────────────────────── */

/* Responsive column count: 2 mobile, 3 tablet, 4 desktop */
.tybo-shop-grid .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 24px !important;
}
@media (min-width: 600px) {
	.tybo-shop-grid .wc-block-product-template {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}
@media (min-width: 1024px) {
	.tybo-shop-grid .wc-block-product-template {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

.tybo-product-card {
	position: relative;     /* anchor for the absolute-positioned badge */
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	border-radius: 12px;
	overflow: hidden;
	height: 100%;
}

/* Square-ish cropped image that fills the card top */
.tybo-product-card .wc-block-components-product-image img,
.tybo-product-card .wp-block-woocommerce-product-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

/* Body section grows so the button is always pushed to the bottom */
.tybo-card-body {
	flex: 1;
}

/* Product name — regular weight, no underline in default state */
.tybo-product-card .wp-block-post-title {
	font-size: 19px;
}
.tybo-product-card .wp-block-post-title a {
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.tybo-product-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--sand);
	text-decoration: underline;
}

/* Price row — bold */
.tybo-product-card .wc-block-components-product-price {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--lg);
}

/* Regular price when on sale — struck through, muted, smaller */
.tybo-product-card .wc-block-components-product-price del,
.tybo-product-card del.woocommerce-Price-amount {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
	font-size: 0.85em;
	text-decoration: line-through;
	margin-right: 4px;
}

/* Sale price — remove browser underline from <ins> */
.tybo-product-card .wc-block-components-product-price ins {
	text-decoration: none;
}

/* "¡Oferta!" badge — sand background, dark text, absolute top-left above the image */
.tybo-product-card .wc-block-components-product-sale-badge,
.tybo-product-card .wp-block-woocommerce-product-sale-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--contrast);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 20px;
	line-height: 1;
}

/* Add-to-cart button — small, right-aligned at card bottom corner */
.tybo-card-button {
	display: flex;
	justify-content: flex-end !important;
	width: 100%;
}
.tybo-card-button .wp-block-woocommerce-product-button a,
.tybo-card-button .wp-block-woocommerce-product-button button,
.tybo-card-button .wc-block-components-product-button a,
.tybo-card-button .wc-block-components-product-button button {
	font-size: var(--wp--preset--font-size--xs);
	padding: 8px 16px;
	border-radius: 20px;
	white-space: nowrap;
}
.tybo-card-button .wc-block-components-product-button a:hover,
.tybo-card-button .wc-block-components-product-button button:hover {
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--contrast);
}

/* ─── Single product — two-column layout ─────────────────────────────────── */

.tybo-product-layout {
	display: flex;
	align-items: flex-start;
	flex-wrap: nowrap;
}

.tybo-product-gallery-col {
	width: 55%;
	flex-shrink: 0;
	/* Square box with a white background — legacy non-square photos are
	   letterboxed (object-fit: contain) instead of cropped, while the
	   catalog standardizes on square photos going forward. */
	aspect-ratio: 1 / 1;
	background: var(--wp--preset--color--base);
	overflow: hidden;
}
.tybo-product-gallery-col .wp-block-woocommerce-product-image-gallery,
.tybo-product-gallery-col .woocommerce-product-gallery,
.tybo-product-gallery-col .woocommerce-product-gallery__wrapper,
.tybo-product-gallery-col .woocommerce-product-gallery__image {
	max-width: none;
	width: 100%;
	height: 100%;
}
.tybo-product-gallery-col img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: var(--wp--preset--color--base);
}

.tybo-product-info-col {
	width: 45%;
	flex-shrink: 0;
	padding: 40px;
	position: sticky;
	top: 32px;
	align-self: flex-start;
}

@media (max-width: 782px) {
	.tybo-product-layout {
		flex-wrap: wrap;
	}
	.tybo-product-gallery-col,
	.tybo-product-info-col {
		width: 100%;
	}
	.tybo-product-info-col {
		position: static;
		padding: 24px;
	}
}

/* Product title on single page — regular weight for elegance */
.tybo-product-info-col .wp-block-post-title {
	font-weight: 400;
	margin-bottom: 8px;
}

/* Price on single page — bold and notably larger than body text */
.tybo-product-info-col .wc-block-components-product-price,
.tybo-product-info-col .woocommerce-Price-amount {
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 700;
}
.tybo-product-info-col .wc-block-components-product-price del {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
	font-size: 0.8em;
	text-decoration: line-through;
	margin-right: 6px;
}
.tybo-product-info-col .wc-block-components-product-price ins {
	text-decoration: none;
}

/* Short description */
.tybo-product-info-col .wp-block-post-excerpt {
	font-size: var(--wp--preset--font-size--md);
	line-height: 1.6;
}

/* Long description, below the two-column layout */
.wp-block-woocommerce-product-details {
	margin-top: 0;
	border-top: 1px solid var(--wp--preset--color--field);
	padding-top: 24px;
}

/* Stock indicator — reads as plain text, not a badge */
.tybo-product-info-col .wc-block-components-product-stock-indicator,
.tybo-product-info-col .woocommerce-stock-status {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
	margin-top: 8px;
	background: none;
	padding: 0;
	border: none;
}

/* ─── Secondary buttons ───────────────────────────────────────────────────── */

/* Sand-filled "outline" style buttons — used anywhere a CTA shouldn't compete
   with the main add-to-cart action, which stays solid black. */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--sand);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.tybo-footer {
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--contrast);
	padding: 48px 24px 24px;
}

.tybo-footer-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	justify-content: space-between;
}

.tybo-footer-col {
	min-width: 160px;
}

.tybo-footer-brand {
	flex: 1 1 240px;
}

.tybo-footer-logo {
	font-family: var(--wp--preset--font-family--poppins);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--lg);
	margin: 0 0 8px;
}

.tybo-footer-tagline {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
}

.tybo-footer-col h3 {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 12px;
}

.tybo-footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tybo-footer-col a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--sm);
}

.tybo-footer-col a:hover {
	text-decoration: underline;
}

.tybo-footer-social ul,
.tybo-footer-social {
	flex-direction: row;
	gap: 12px;
}

.tybo-footer-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tybo-footer-social a:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.tybo-footer-social a span {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tybo-footer-bottom {
	max-width: 1200px;
	margin: 32px auto 0;
	padding-top: 16px;
	border-top: 1px solid rgba(17, 17, 17, 0.1);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--muted);
}

.tybo-footer-bottom p {
	margin: 0;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */

.tybo-header {
	border-bottom: 1px solid var(--wp--preset--color--field);
	background: var(--wp--preset--color--base);
}

.tybo-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 24px;
}

/* Logo is the home link */
.tybo-logo {
	margin: 0;
	flex-shrink: 0;
}
.tybo-logo img {
	display: block;
	width: auto;
	height: 64px;
}
@media (max-width: 600px) {
	.tybo-logo img {
		height: 48px;
	}
}

/* ─── Front page ──────────────────────────────────────────────────────────── */

/* Banner: text on sand left, photo right; stacks with photo on top on mobile */
.tybo-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: var(--wp--preset--color--sand);
	min-height: 560px;
	margin-top: 0;
}
.tybo-hero-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 64px max(48px, calc((100vw - 1200px) / 2 + 24px));
	padding-right: 64px;
}
.tybo-hero-text > * {
	margin: 0;
}
.tybo-eyebrow {
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin-bottom: 16px !important;
}
.tybo-hero-title {
	font-size: 3rem;
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin-bottom: 20px !important;
}
.tybo-hero-lead {
	max-width: 420px;
	margin-bottom: 32px !important;
}
.tybo-hero-media {
	margin: 0;
	height: 100%;
	min-height: 0;
}
.tybo-hero-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
@media (max-width: 782px) {
	.tybo-hero {
		grid-template-columns: 1fr;
		min-height: 0;
	}
	.tybo-hero-media {
		order: -1;
		aspect-ratio: 1 / 1;
		height: auto;
	}
	.tybo-hero-text {
		padding: 40px 24px 48px;
	}
	.tybo-hero-title {
		font-size: 2.25rem;
	}
}

/* Sections */
.tybo-home-section {
	padding-top: 72px;
	padding-bottom: 8px;
}
.tybo-section-title {
	font-weight: 400;
	font-size: 1.75rem;
	letter-spacing: 0.02em;
	margin-bottom: 32px !important;
}
@media (max-width: 600px) {
	.tybo-home-section {
		padding-top: 48px;
	}
}

/* Category tiles */
.tybo-cat-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
@media (min-width: 1024px) {
	.tybo-cat-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 24px;
	}
}
.tybo-cat-tile {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp--preset--color--field);
	color: var(--wp--preset--color--base);
	text-decoration: none;
}
.tybo-cat-media,
.tybo-cat-img {
	display: block;
	width: 100%;
	height: 100%;
}
.tybo-cat-img {
	object-fit: cover;
	transition: transform 0.6s ease;
}
.tybo-cat-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(17, 17, 17, 0.55) 0%, rgba(17, 17, 17, 0) 55%);
	pointer-events: none;
}
.tybo-cat-label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 20px;
}
.tybo-cat-name {
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 500;
	line-height: 1.2;
}
.tybo-cat-cta {
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.9;
}
.tybo-cat-cta::after {
	content: " →";
}
.tybo-cat-tile:hover,
.tybo-cat-tile:focus-visible {
	color: var(--wp--preset--color--base);
}
.tybo-cat-tile:hover .tybo-cat-img,
.tybo-cat-tile:focus-visible .tybo-cat-img {
	transform: scale(1.05);
}
@media (max-width: 600px) {
	.tybo-cat-label {
		padding: 14px;
	}
	.tybo-cat-name {
		font-size: var(--wp--preset--font-size--lg);
	}
}

/* Perks strip, just above the footer */
.tybo-perks {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px 64px;
	max-width: 1200px;
	margin: 72px auto 0;
	padding: 40px 24px;
	border-top: 1px solid var(--wp--preset--color--field);
}
.tybo-perk {
	display: flex;
	align-items: center;
	gap: 12px;
}
.tybo-perk p {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm);
}
.tybo-perk a {
	text-decoration: none;
}
