/* ==========================================================
   Fuego Dulce · Carrusel de dulces (widget fd-carrusel)
   ========================================================== */
@font-face {
	font-family: 'FD Cookies';
	src: url('fonts/Cookies.ttf') format('truetype');
	font-display: swap;
}

.fdc {
	--fdc-ink: #26101b;
	--fdc-ink-2: #6b5560;
	--fdc-brand: #c60342;
	--fdc-bg: #fffaf8;
	--fdc-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--fdc-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--fdc-col: clamp(230px, 19vw, 310px);
	color: var(--fdc-ink); font-family: 'DM Sans', system-ui, sans-serif;
}
.fdc *, .fdc *::before, .fdc *::after { box-sizing: border-box; }
.fdc img { display: block; max-width: 100%; height: auto; }
.fdc-fun { font-family: 'FD Cookies', 'Bricolage Grotesque', sans-serif !important; font-weight: 400 !important; }
.fdc .fdb-acc { position: relative; display: inline-block; }
.fdc .fdb-acc::after { content: ''; position: absolute; left: 50%; top: -0.08em; width: 0.16em; height: 0.3em; border-radius: 0.1em; background: currentColor; transform: translateX(-30%) rotate(28deg); }
.fdc .fdb-acc--i::after { top: -0.2em; height: 0.26em; }

/* Encabezado */
.fdc-head { display: grid; justify-items: center; gap: 18px; padding: 0 16px; text-align: center; }
.fdc .fdc-title {
	margin: 0; padding: 0; color: var(--fdc-ink); font-family: 'Anton', 'Arial Narrow', sans-serif !important; font-weight: 400 !important;
	font-size: clamp(2.8rem, 1.6rem + 4.4vw, 5.4rem); line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em;
}
.fdc-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.fdc .fdc-tab {
	margin: 0; padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--fdc-ink); background: transparent; color: var(--fdc-ink);
	font: 600 15px/1.2 'DM Sans', sans-serif; letter-spacing: 0; text-transform: none; box-shadow: none; cursor: pointer;
	transition: background 0.2s, color 0.2s, transform 0.3s var(--fdc-spring);
}
.fdc .fdc-tab:hover { transform: translateY(-2px); background: transparent; color: var(--fdc-ink); }
.fdc .fdc-tab.is-on, .fdc .fdc-tab.is-on:hover { background: var(--fdc-ink); color: #fff; }
.fdc .fdc-note { margin: -4px 0 0; color: var(--fdc-brand); font-size: 1.15rem; }

/* Carrusel a todo lo ancho de la pantalla */
.fdc-viewport { position: relative; width: 100vw; margin: clamp(24px, 4vw, 48px) 0 0 calc(50% - 50vw); }
.fdc .fdc-rail {
	display: grid; grid-auto-flow: column; grid-auto-columns: var(--fdc-col); gap: 24px;
	margin: 0; padding: 12px max(24px, calc((100vw - 1500px) / 2)) 24px; list-style: none;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc((100vw - 1500px) / 2));
	scrollbar-width: none; cursor: grab;
}
.fdc-rail::-webkit-scrollbar { display: none; }
.fdc-rail.is-drag { cursor: grabbing; scroll-snap-type: none; }
.fdc-rail.is-drag .fdc-card { pointer-events: none; }
.fdc .fdc-item { margin: 0; padding: 0; scroll-snap-align: start; list-style: none; }
.fdc-item[hidden] { display: none; }

.fdc .fdc-card { display: grid; justify-items: center; text-align: center; color: var(--fdc-ink); text-decoration: none; -webkit-user-drag: none; }
.fdc-card img { -webkit-user-drag: none; user-select: none; }
.fdc-stage { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.08; }
.fdc-stage::after {
	content: ''; position: absolute; left: 50%; bottom: 7%; width: 56%; height: 7%; translate: -50% 0; z-index: 0;
	border-radius: 50%; background: radial-gradient(closest-side, rgba(38, 16, 27, 0.22), transparent); transition: width 0.5s var(--fdc-ease);
}
.fdc .fdc-gummy {
	position: absolute; left: 50%; top: 46%; z-index: 2; width: 82%; max-width: none; translate: -50% -50%;
	filter: drop-shadow(0 14px 14px rgba(38, 16, 27, 0.18)); transition: transform 0.6s var(--fdc-spring), filter 0.4s;
}
.fdc .fdc-gummy.is-tira { width: 72%; }
.fdc .fdc-bag {
	position: absolute; left: 50%; bottom: 6%; z-index: 1; width: 54%; max-width: none; translate: -50% 0;
	opacity: 0; transform: translateY(30%) rotate(6deg) scale(0.9);
	filter: drop-shadow(0 18px 16px rgba(38, 16, 27, 0.25)); transition: transform 0.6s var(--fdc-spring), opacity 0.35s;
}
/* Sin foto de gomita: la bolsa en grande */
.fdc .is-bag-only .fdc-bag { opacity: 1; width: 58%; transform: none; }
.fdc-cta {
	position: absolute; left: 50%; bottom: 0; z-index: 3; translate: -50% 8px; opacity: 0; display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 18px; border-radius: 999px; background: var(--fdc-ink); color: #fff; font-weight: 700; font-size: 14px; line-height: 1; white-space: nowrap;
	transition: opacity 0.3s, translate 0.45s var(--fdc-spring);
}
.fdc-cta svg { width: 16px; height: 16px; }
.fdc-cat { margin-top: 14px; color: var(--fdc-ink-2); font-size: 15px; line-height: 1.3; }
.fdc-name { margin-top: 2px; font-weight: 700; font-size: clamp(1.1rem, 1rem + 0.3vw, 1.3rem); line-height: 1.2; }
.fdc-price { margin-top: 4px; color: var(--fdc-brand); font-weight: 600; font-size: 14px; }

@media (hover: hover) {
	.fdc-card:hover .fdc-gummy, .fdc-card:focus-visible .fdc-gummy { transform: translate(-36%, -40%) scale(0.42) rotate(-16deg); filter: drop-shadow(0 8px 8px rgba(38, 16, 27, 0.25)); }
	.fdc-card:hover .fdc-bag, .fdc-card:focus-visible .fdc-bag { opacity: 1; transform: translateY(0) rotate(-3deg) scale(1); }
	.fdc .is-bag-only:hover .fdc-bag { transform: translateY(-8px) rotate(-3deg); }
	.fdc-card:hover .fdc-stage::after { width: 46%; }
	.fdc-card:hover .fdc-cta, .fdc-card:focus-visible .fdc-cta { opacity: 1; translate: -50% -6px; }
}
/* En celular: gomita grande y la bolsa asomándose en la esquina */
@media (hover: none) {
	.fdc .fdc-gummy { top: 42%; width: 74%; translate: -56% -50%; }
	.fdc .fdc-card:not(.is-bag-only) .fdc-bag { opacity: 1; left: 74%; width: 34%; transform: rotate(8deg); }
}

/* Flechas */
.fdc .fdc-arrow {
	position: absolute; top: calc(12px + var(--fdc-col) * 1.08 / 2); z-index: 5; translate: 0 -50%; margin: 0; padding: 0;
	display: grid; place-items: center; width: 48px; height: 48px; min-height: 0; border-radius: 50%; border: 1.5px solid var(--fdc-ink);
	background: var(--fdc-bg); color: var(--fdc-ink); box-shadow: none; cursor: pointer; transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.fdc-arrow svg { width: 22px; height: 22px; }
.fdc .fdc-arrow:hover:not(:disabled) { background: var(--fdc-ink); color: #fff; }
.fdc .fdc-arrow:disabled { opacity: 0; pointer-events: none; }
.fdc-arrow--prev { left: 18px; }
.fdc-arrow--prev svg { transform: rotate(180deg); }
.fdc-arrow--next { right: 18px; }

.fdc-foot { display: flex; justify-content: center; margin-top: 12px; }
.fdc .fdc-all {
	display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 999px; background: var(--fdc-brand); color: #fff;
	font-weight: 700; font-size: 16px; line-height: 1; text-decoration: none; box-shadow: 0 5px 0 rgba(38, 16, 27, 0.35); transition: transform 0.35s var(--fdc-spring);
}
.fdc .fdc-all:hover { color: #fff; transform: translateY(-3px) rotate(-1.5deg); }
.fdc-all svg { width: 18px; height: 18px; }

@media (max-width: 640px) {
	.fdc { --fdc-col: 62vw; }
	.fdc .fdc-rail { gap: 14px; padding-inline: 20px; scroll-padding-inline: 20px; }
	.fdc .fdc-arrow { display: none; }
	.fdc .fdc-tab { padding: 8px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.fdc *, .fdc *::before, .fdc *::after { transition-duration: 0.01ms !important; }
}
