/**
 * FloresYa Blocks — Frontend styles.
 * Loaded on any theme that activates the FloresYa Blocks plugin.
 */

/* Shared button styles (fallback if theme doesn't provide .fy-btn) */
.fy-btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	transition: all 0.2s ease;
	border: 2px solid transparent;
	cursor: pointer;
}
.fy-btn-primary { background: #1a5c2a; color: #fff; }
.fy-btn-primary:hover { background: #143d1e; color: #fff; }
.fy-btn-secondary { background: transparent; color: #1a5c2a; border-color: #1a5c2a; }
.fy-btn-secondary:hover { background: #1a5c2a; color: #fff; }
.fy-btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* Section wrapper helpers */
.fy-section { padding: 48px 0; }
.fy-section__inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.fy-section__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	font-weight: 700;
	text-align: center;
	margin: 0 0 12px;
	color: #1a5c2a;
	letter-spacing: 0.3px;
	position: relative;
	padding-bottom: 16px;
}
.fy-section__title::after {
	content: "";
	display: block;
	width: 64px;
	height: 3px;
	background: linear-gradient(90deg, #c8a96e 0%, #b08d4e 100%);
	margin: 12px auto 0;
	border-radius: 2px;
}
.fy-section__subtitle {
	text-align: center;
	color: #555;
	margin: 0 0 32px;
	font-size: 1.05rem;
	font-style: italic;
}
.fy-section__cta { text-align: center; margin-top: 24px; }

/* Product grid (shared) */
.fy-product-grid {
	display: grid; gap: 16px;
}
.fy-product-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .fy-product-grid--cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .fy-product-grid--cols-4 { grid-template-columns: 1fr; } }
.fy-product-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	display: flex; flex-direction: column;
}
.fy-product-card__image { display: block; aspect-ratio: 1/1; overflow: hidden; }
.fy-product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.fy-product-card__body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.fy-product-card__title { margin: 0; font-size: 1rem; line-height: 1.3; }
.fy-product-card__title a { color: #1a1a1a; text-decoration: none; }
.fy-product-card__price { font-weight: 700; color: #1a5c2a; }

/* ============================================================
   Hero Compacto
   ============================================================ */
.fy-hero-compact {
	position: relative;
	display: flex; align-items: center;
	color: #fff;
	background-color: #1a5c2a;
	overflow: hidden;
}
.fy-hero-compact__overlay { position: absolute; inset: 0; z-index: 1; }
.fy-hero-compact__inner {
	position: relative; z-index: 2;
	max-width: 900px; margin: 0 auto;
	padding: 48px 24px; width: 100%;
}
.fy-hero-compact.fy-text-left  .fy-hero-compact__inner { text-align: left; }
.fy-hero-compact.fy-text-center .fy-hero-compact__inner { text-align: center; }
.fy-hero-compact.fy-text-right .fy-hero-compact__inner { text-align: right; }
.fy-hero-compact__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(1.8rem, 4vw, 3rem);
	margin: 0 0 12px; color: #fff;
}
.fy-hero-compact__text {
	font-size: 1.1rem; margin: 0 0 20px; color: #fff; opacity: 0.95;
}
.fy-hero-compact__cta { display: inline-block; }

/* ============================================================
   Seasonal Banner
   ============================================================ */
.fy-seasonal-banner {
	position: relative;
	display: flex; align-items: center;
	color: #fff;
	background-color: #1a5c2a;
	overflow: hidden;
}
.fy-seasonal-banner__overlay { position: absolute; inset: 0; z-index: 1; }
.fy-seasonal-banner__inner {
	position: relative; z-index: 2;
	max-width: 900px; margin: 0 auto;
	padding: 56px 24px; text-align: center; width: 100%;
}
.fy-seasonal-banner__badge {
	display: inline-block;
	background: rgba(255,255,255,0.2);
	color: #fff;
	padding: 4px 12px;
	border-radius: 99px;
	font-size: 0.8rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-bottom: 12px;
}
.fy-seasonal-banner__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(1.8rem, 4vw, 3rem);
	margin: 0 0 12px; color: #fff;
}
.fy-seasonal-banner__text {
	font-size: 1.1rem; margin: 0 0 20px; color: #fff; opacity: 0.95;
}
.fy-season-valentin { background-color: #b03a48; }
.fy-season-mujer    { background-color: #7b2cbf; }
.fy-season-madre    { background-color: #d94f70; }
.fy-season-amistad  { background-color: #e07a5f; }
.fy-season-navidad  { background-color: #1b4332; }

/* ============================================================
   Delivery Timer
   ============================================================ */
.fy-delivery-timer {
	padding: 12px 16px;
	text-align: center;
	font-weight: 600;
}
.fy-delivery-timer__inner {
	display: inline-flex;
	gap: 8px; align-items: center;
	flex-wrap: wrap; justify-content: center;
}
.fy-delivery-timer__count {
	font-family: 'Inter', monospace;
	font-size: 1.25rem;
	background: rgba(255,255,255,0.18);
	padding: 2px 10px;
	border-radius: 4px;
	letter-spacing: 1px;
}
.fy-delivery-timer__after { font-size: 1rem; }

/* ============================================================
   Addons Carousel
   ============================================================ */
.fy-addons-carousel {
	padding: 24px 0;
	background: #fafaf7;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	/* Critical: when embedded inside a constrained grid/flex parent
	   (e.g. .fy-product__summary is a `1fr` grid cell), the flex track
	   below has intrinsic width ~= cards × 180px. Without min-width:0
	   that min-content bubbles up, blowing out the parent grid column:
	   gallery collapses to 0 on desktop, and the carousel overflows
	   the viewport on mobile. */
	min-width: 0;
	max-width: 100%;
}
.fy-addons-carousel__inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; min-width: 0; }
.fy-addons-carousel__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.4rem; margin: 0 0 4px;
}
.fy-addons-carousel__subtitle { color: #666; margin: 0 0 16px; font-size: 0.95rem; }
.fy-addons-carousel__track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	-webkit-overflow-scrolling: touch;
	/* Same min-width:0 fix at the flex level. */
	min-width: 0;
	max-width: 100%;
}

/* When injected into the WC single-product summary column (grid cell
   with `1fr` width), force the grid item itself to accept shrinking.
   Without this, the grid cell would size to min-content of its kids. */
.fy-product__summary { min-width: 0; }
.fy-product__summary .fy-addons-carousel {
	/* Narrower look when embedded in the summary column: no banner
	   background/borders, less padding. */
	padding: 12px 0 8px;
	background: transparent;
	border-top: 1px solid #e5e5e5;
	border-bottom: 0;
	margin-top: 12px;
}
.fy-product__summary .fy-addons-carousel__inner { padding: 0; }
.fy-addons-carousel__track::-webkit-scrollbar { height: 6px; }
.fy-addons-carousel__track::-webkit-scrollbar-thumb { background: #c8a96e; border-radius: 3px; }
.fy-addon-card {
	flex: 0 0 180px;
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	display: flex; flex-direction: column;
}
.fy-addon-card__image { display: block; aspect-ratio: 1/1; overflow: hidden; }
.fy-addon-card__image img { width: 100%; height: 100%; object-fit: cover; }
.fy-addon-card__body { padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.fy-addon-card__name { font-size: 0.9rem; margin: 0; line-height: 1.3; }
.fy-addon-card__price { font-size: 0.9rem; font-weight: 700; color: #1a5c2a; }
.fy-addon-card__cta { margin-top: auto; font-size: 0.85rem; padding: 6px 10px; }

/* ============================================================
   Occasion Filter
   ============================================================ */
.fy-occasion-filter { padding: 48px 0; }
.fy-occasion-grid {
	display: grid;
	gap: 12px;
	margin: 24px 0;
}
.fy-occasion-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.fy-occasion-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.fy-occasion-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.fy-occasion-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.fy-occasion-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 768px) {
	.fy-occasion-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
.fy-occasion-chip {
	display: flex; flex-direction: column;
	align-items: center; gap: 8px;
	padding: 20px 12px;
	background: #fff;
	border: 2px solid #eee;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}
.fy-occasion-chip:hover { border-color: #c8a96e; transform: translateY(-2px); }
.fy-occasion-chip.is-active { border-color: #1a5c2a; background: #f3f8f4; }
.fy-occasion-chip__icon { font-size: 2rem; }
.fy-occasion-chip__label { font-size: 0.9rem; font-weight: 600; color: #1a1a1a; }
.fy-occasion-results { min-height: 80px; }
.fy-occasion-results__hint,
.fy-occasion-results__loading,
.fy-occasion-results__empty {
	text-align: center; color: #757575; font-style: italic; padding: 24px;
}

/* ============================================================
   Happy Customers Slider
   ============================================================ */
.fy-happy-customers {
	padding: 48px 0;
	background: #fff;
}
.fy-happy-customers__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}
.fy-happy-customers__viewport {
	position: relative;
	margin-top: 24px;
}
.fy-happy-customers__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 8px 4px 16px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.fy-happy-customers__track::-webkit-scrollbar { display: none; }
.fy-happy-customers__slide {
	flex: 0 0 calc( ( 100% - ( var(--fy-hc-visible-m, 2) - 1 ) * 16px ) / var(--fy-hc-visible-m, 2) );
	scroll-snap-align: start;
	margin: 0;
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(26, 26, 26, 0.08), 0 2px 4px rgba(26, 26, 26, 0.04);
	background: #f5f5f5;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fy-happy-customers__slide:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(26, 26, 26, 0.14), 0 4px 8px rgba(26, 26, 26, 0.06);
}
.fy-happy-customers__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
@media (min-width: 768px) {
	.fy-happy-customers__slide {
		flex: 0 0 calc( ( 100% - ( var(--fy-hc-visible-d, 4) - 1 ) * 16px ) / var(--fy-hc-visible-d, 4) );
	}
}
.fy-happy-customers__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: #fff;
	color: #1a5c2a;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s, transform 0.2s;
	z-index: 2;
}
.fy-happy-customers__nav:hover {
	background: #1a5c2a;
	color: #fff;
	transform: translateY(-50%) scale(1.08);
}
.fy-happy-customers__nav--prev { left: -8px; }
.fy-happy-customers__nav--next { right: -8px; }
@media (max-width: 600px) {
	.fy-happy-customers__nav { display: none; }
}

/* ============================================================
   Flower Care Accordion
   ============================================================ */
.fy-flower-care { padding: 24px 0; }
.fy-flower-care__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.3rem; margin: 0 0 12px;
}
.fy-accordion { border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden; }
.fy-accordion__item + .fy-accordion__item { border-top: 1px solid #e5e5e5; }
.fy-accordion__header {
	width: 100%;
	display: flex; align-items: center; gap: 12px;
	padding: 14px 16px;
	background: #fff;
	border: 0; cursor: pointer;
	font-family: inherit; font-size: 1rem; text-align: left;
	transition: background 0.15s;
}
.fy-accordion__header:hover { background: #fafaf7; }
.fy-accordion__icon { font-size: 1.3rem; }
.fy-accordion__label { flex: 1; font-weight: 600; color: #1a1a1a; }
.fy-accordion__chevron {
	font-size: 1.3rem; color: #1a5c2a; font-weight: 700;
	transition: transform 0.2s;
}
.fy-accordion__header[aria-expanded="true"] .fy-accordion__chevron { color: #b03a48; }
.fy-accordion__panel {
	padding: 0 16px 16px;
	color: #495057;
	line-height: 1.6;
}
.fy-accordion__panel p:first-child { margin-top: 0; }
