/*
 Theme Name:   Mi Tienda Child
 Theme URI:    https://tudominio.com
 Description:  Tema hijo para ecommerce con WooCommerce
 Author:       Tu Nombre
 Author URI:   https://tudominio.com
 Template:     storefront
 Version:      1.0.0
 Text Domain:  mi-tienda-child
*/

/* ==========================================================================
   Estilos custom del ecommerce
   ========================================================================== */

/* Header / branding */
.site-header {
	/* personalizar header aca */
}

/* ==========================================================================
   HOME - Hero (video de fondo)
   ========================================================================== */
.home-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 600px;
	overflow: hidden;
	background-color: #111; /* se ve mientras carga el video */
}

.home-hero__video {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate(-50%, -50%);
	z-index: 1;
	opacity: 0;
	transition: opacity 0.8s ease;
}

/* Splash de bienvenida ("Bienvenido a Piéce") */
.home-hero__intro {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
	opacity: 1;
	transition: opacity 0.6s ease;
	pointer-events: none;
}

.home-hero__intro span {
	color: #fff;
	font-size: 2.2rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
	padding: 0 20px;
}

/* Oscurece el video para que el texto se lea bien */
.home-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 2;
	opacity: 0;
	transition: opacity 0.8s ease;
}

.home-hero__content {
	position: relative;
	z-index: 3;
	text-align: center;
	color: #fff;
	padding: 0 20px;
	opacity: 0;
	transition: opacity 0.8s ease;
}

.home-hero__content h1 {
	font-size: 2.5rem;
	margin-bottom: 12px;
	color: #fff;
}

.home-hero__content p {
	font-size: 1.1rem;
	margin-bottom: 0;
}

/* Botones flotantes en las esquinas inferiores */
.home-hero__cta {
	position: absolute;
	bottom: 30px;
	z-index: 3;
	padding: 14px 26px;
	background: #fff;
	color: #111;
	text-decoration: none;
	font-weight: 600;
	border-radius: 4px;
	opacity: 0;
	transition: opacity 0.8s ease, background 0.2s ease, color 0.2s ease;
}

.home-hero__cta:hover {
	background: #111;
	color: #fff;
}

.home-hero__cta--left {
	left: 30px;
}

.home-hero__cta--right {
	right: 30px;
}

/* Cuando pasan los 2.5s, JS agrega esta clase: se apaga el splash y se prende todo lo demás */
.home-hero.is-loaded .home-hero__intro {
	opacity: 0;
}

.home-hero.is-loaded .home-hero__video,
.home-hero.is-loaded .home-hero__overlay,
.home-hero.is-loaded .home-hero__content,
.home-hero.is-loaded .home-hero__cta {
	opacity: 1;
}

@media (max-width: 600px) {
	.home-hero {
		min-height: 500px;
	}

	.home-hero__cta {
		position: static;
		display: inline-block;
		margin: 20px 10px 0;
	}

	.home-hero__content {
		padding-top: 40px;
	}
}

/* ==========================================================================
   HOME - Categorías destacadas
   ========================================================================== */
.home-categorias {
	padding: 60px 20px;
	text-align: center;
}

.home-categorias__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	max-width: 1200px;
	margin: 30px auto 0;
}

.home-categorias__item {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	text-decoration: none;
	color: #fff;
}

.home-categorias__item img {
	width: 100%;
	height: 280px;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.home-categorias__item:hover img {
	transform: scale(1.05);
}

.home-categorias__item span {
	position: absolute;
	bottom: 15px;
	left: 15px;
	font-size: 1.1rem;
	font-weight: 600;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

@media (max-width: 900px) {
	.home-categorias__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ==========================================================================
   HOME - About Us
   ========================================================================== */
.home-about {
	display: flex;
	align-items: center;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 20px;
}

.home-about__imagen,
.home-about__texto {
	flex: 1;
}

.home-about__imagen img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

@media (max-width: 768px) {
	.home-about {
		flex-direction: column;
	}
}

/* ==========================================================================
   HOME - Productos destacados
   ========================================================================== */
.home-destacados {
	padding: 60px 20px;
	text-align: center;
	max-width: 1200px;
	margin: 0 auto;
}

/* ==========================================================================
   CATÁLOGO - Banner superior (video o carrusel)
   ========================================================================== */
.catalogo-banner {
	position: relative;
	width: 100%;
	height: 420px;
	overflow: hidden;
	background: #111;
}

.catalogo-banner--video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* --- Carrusel --- */
.catalogo-carrusel {
	display: flex;
	width: 100%;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	/* oculta la scrollbar nativa, la navegación es con las flechas */
	scrollbar-width: none;
}

.catalogo-carrusel::-webkit-scrollbar {
	display: none;
}

.catalogo-carrusel__slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
	height: 100%;
}

.catalogo-carrusel__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.catalogo-carrusel__flecha {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.85);
	color: #111;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.catalogo-carrusel__flecha:hover {
	background: #fff;
}

.catalogo-carrusel__flecha--prev {
	left: 20px;
}

.catalogo-carrusel__flecha--next {
	right: 20px;
}

@media (max-width: 600px) {
	.catalogo-banner {
		height: 280px;
	}

	.catalogo-carrusel__flecha {
		width: 36px;
		height: 36px;
		font-size: 1.3rem;
	}
}

/* ==========================================================================
   CATÁLOGO PRINCIPAL - Layout general (sidebar + contenido)
   ========================================================================== */
.catalogo-wrap {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 40px;
	max-width: 1300px;
	margin: 0 auto;
	padding: 40px 20px;
	align-items: start;
}

/* --- Sidebar de categorías --- */
.catalogo-sidebar h2 {
	font-size: 1.1rem;
	margin-bottom: 16px;
}

.catalogo-categorias {
	list-style: none;
	margin: 0;
	padding: 0;
}

.catalogo-categorias li {
	margin-bottom: 8px;
}

.catalogo-categorias a {
	display: block;
	padding: 8px 10px;
	text-decoration: none;
	color: #333;
	border-radius: 4px;
	transition: background 0.2s ease;
}

.catalogo-categorias a:hover {
	background: #f0f0f0;
}

.catalogo-categorias a.is-active {
	background: #111;
	color: #fff;
	font-weight: 600;
}

/* --- Barra de filtros (precio, talle, color) --- */
.catalogo-filtros {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	padding: 16px 20px;
	margin-bottom: 30px;
	background: #f8f8f8;
	border-radius: 6px;
}

.catalogo-filtros .widget {
	min-width: 160px;
}

.catalogo-filtros .widget-title {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 8px;
}

/* --- Grilla de productos: 4 columnas desktop, 2 mobile --- */
.catalogo-contenido ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.catalogo-contenido ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
}

@media (max-width: 900px) {
	.catalogo-wrap {
		grid-template-columns: 1fr;
	}

	.catalogo-sidebar {
		border-bottom: 1px solid #e5e5e5;
		padding-bottom: 20px;
		margin-bottom: 10px;
	}
}

@media (max-width: 600px) {
	.catalogo-contenido ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.catalogo-filtros {
		flex-direction: column;
		gap: 16px;
	}
}

/* ==========================================================================
   PRODUCTO INDIVIDUAL
   ========================================================================== */
.producto-individual {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	max-width: 1300px;
	margin: 0 auto;
	padding: 40px 20px;
	align-items: start;
}

.producto-galeria .woocommerce-product-gallery {
	max-width: 100%;
}

.producto-info .price {
	font-size: 1.4rem;
	margin: 10px 0 20px;
}

/* Ficha técnica (diseñador, año, materiales, color, talla) */
.ficha-tecnica {
	list-style: none;
	margin: 20px 0;
	padding: 20px 0;
	border-top: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
}

.ficha-tecnica li {
	display: flex;
	gap: 8px;
	padding: 6px 0;
	font-size: 0.95rem;
}

.ficha-tecnica__label {
	font-weight: 600;
	min-width: 110px;
}

@media (max-width: 900px) {
	.producto-individual {
		grid-template-columns: 1fr;
		gap: 30px;
	}
}

/* Productos relacionados */
.producto-relacionados {
	max-width: 1300px;
	margin: 0 auto;
	padding: 20px 20px 60px;
}

.producto-relacionados h2 {
	text-align: center;
	margin-bottom: 30px;
}

.producto-relacionados ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.producto-relacionados ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
}

@media (max-width: 600px) {
	.producto-relacionados ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* ==========================================================================
   CARRITO
   ========================================================================== */
.carrito-wrap {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 50px;
	max-width: 1300px;
	margin: 0 auto;
	padding: 40px 20px;
	align-items: start;
}

.carrito-vacio {
	grid-column: 1 / -1;
	text-align: center;
	padding: 80px 20px;
}

.carrito-vacio p {
	font-size: 1.2rem;
	margin-bottom: 20px;
}

/* --- Items: tarjeta grande estilo mini-ficha --- */
.carrito-items {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.carrito-item {
	display: grid;
	grid-template-columns: 160px 1fr auto;
	gap: 20px;
	padding-bottom: 24px;
	border-bottom: 1px solid #e5e5e5;
	align-items: start;
}

.carrito-item__imagen img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
}

.carrito-item__nombre {
	font-size: 1.1rem;
	margin: 0 0 8px;
}

.carrito-item__nombre a {
	color: #111;
	text-decoration: none;
}

.carrito-item__precio {
	color: #666;
	margin-bottom: 12px;
}

.carrito-item__cantidad {
	margin-bottom: 10px;
}

.carrito-item__cantidad .quantity input {
	width: 70px;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.carrito-item__eliminar {
	display: inline-block;
	font-size: 0.85rem;
	color: #c0392b;
	text-decoration: none;
}

.carrito-item__subtotal {
	font-weight: 600;
	white-space: nowrap;
	text-align: right;
}

.carrito-actualizar {
	margin-top: 24px;
}

/* --- Resumen (sidebar, usa el .cart_totals nativo de WooCommerce) --- */
.carrito-resumen {
	position: sticky;
	top: 20px;
	background: #f8f8f8;
	border-radius: 8px;
	padding: 24px;
}

.carrito-resumen .cart_totals h2 {
	font-size: 1.2rem;
	margin-top: 0;
	margin-bottom: 16px;
}

.carrito-resumen table.shop_table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.carrito-resumen table.shop_table th,
.carrito-resumen table.shop_table td {
	padding: 10px 0;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
}

.carrito-resumen .wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	text-align: center;
	padding: 14px;
	background: #111;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
}

.carrito-resumen .wc-proceed-to-checkout .checkout-button:hover {
	background: #333;
}

/* --- También te puede interesar --- */
.carrito-relacionados {
	max-width: 1300px;
	margin: 0 auto;
	padding: 20px 20px 60px;
}

.carrito-relacionados h2 {
	text-align: center;
	margin-bottom: 30px;
}

.carrito-relacionados ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.carrito-relacionados ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
}

@media (max-width: 900px) {
	.carrito-wrap {
		grid-template-columns: 1fr;
	}

	.carrito-resumen {
		position: static;
	}
}

@media (max-width: 600px) {
	.carrito-item {
		grid-template-columns: 100px 1fr;
	}

	.carrito-item__subtotal {
		grid-column: 1 / -1;
		text-align: left;
		margin-top: 10px;
	}

	.carrito-relacionados ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* ==========================================================================
   PÁGINA LEGAL (Términos y Condiciones)
   ========================================================================== */
.pagina-legal {
	padding: 60px 20px;
}

.pagina-legal__contenido {
	max-width: 720px;
	margin: 0 auto;
}

.pagina-legal__contenido h1 {
	font-size: 2rem;
	margin-bottom: 30px;
}

.pagina-legal__texto {
	font-size: 1rem;
	line-height: 1.7;
	color: #333;
}

.pagina-legal__texto h2,
.pagina-legal__texto h3 {
	margin-top: 32px;
	margin-bottom: 12px;
}

.pagina-legal__texto p {
	margin-bottom: 16px;
}

.pagina-legal__texto ul,
.pagina-legal__texto ol {
	margin: 0 0 16px 20px;
}

.pagina-legal__volver {
	margin-top: 50px;
	padding-top: 30px;
	border-top: 1px solid #e5e5e5;
}

.pagina-legal__volver .button {
	display: inline-block;
	padding: 12px 24px;
	background: #111;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
}

.pagina-legal__volver .button:hover {
	background: #333;
}

/* ==========================================================================
   GALLERY - Grilla editorial (masonry con CSS puro)
   ========================================================================== */
.galeria-editorial {
	max-width: 1300px;
	margin: 0 auto;
	padding: 60px 20px;
}

.galeria-editorial__header {
	text-align: center;
	margin-bottom: 40px;
}

.galeria-editorial__header h1 {
	font-size: 2rem;
	margin-bottom: 10px;
}

.galeria-editorial__intro {
	max-width: 600px;
	margin: 0 auto;
	color: #555;
}

.galeria-editorial__vacio {
	text-align: center;
	padding: 60px 0;
	color: #888;
}

/* Masonry vía CSS multi-column: no necesita JS ni librerías */
.galeria-editorial__grid {
	column-count: 3;
	column-gap: 20px;
}

.galeria-editorial__item {
	display: block;
	width: 100%;
	margin: 0 0 20px;
	padding: 0;
	border: none;
	background: none;
	cursor: zoom-in;
	break-inside: avoid; /* evita que una foto se corte entre columnas */
}

.galeria-editorial__item img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
	transition: opacity 0.2s ease;
}

.galeria-editorial__item:hover img {
	opacity: 0.85;
}

@media (max-width: 900px) {
	.galeria-editorial__grid {
		column-count: 2;
	}
}

@media (max-width: 600px) {
	.galeria-editorial__grid {
		column-count: 1;
	}
}

/* --- Lightbox --- */
.galeria-lightbox[hidden] {
	display: none;
}

.galeria-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.galeria-lightbox__fondo {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
}

.galeria-lightbox__contenido {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	text-align: center;
}

.galeria-lightbox__imagen {
	max-width: 90vw;
	max-height: 78vh;
	display: block;
	margin: 0 auto;
	border-radius: 4px;
}

.galeria-lightbox__cerrar {
	position: absolute;
	top: -44px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.galeria-lightbox__link-producto {
	display: inline-block;
	margin-top: 18px;
	padding: 12px 24px;
	background: #fff;
	color: #111;
	text-decoration: none;
	font-weight: 600;
	border-radius: 4px;
}

.galeria-lightbox__link-producto:hover {
	background: #eee;
}

/* Página de tienda / catálogo */
.woocommerce ul.products li.product {
	/* personalizar cards de producto */
}

/* Página de producto individual */
.single-product .summary {
	/* personalizar ficha de producto */
}

/* Carrito y checkout */
.woocommerce-cart table.cart,
.woocommerce-checkout form.checkout {
	/* personalizar carrito/checkout */
}
