/**
 * Secciones reutilizables de los patrones del tema.
 *
 * Aquí va solo la forma (radios, alturas, márgenes internos, rejillas).
 * Colores y textos se eligen en el editor con los atributos de cada bloque.
 */

/* ---------------------------------------------------------------
 * Hero de promoción (patrón deposito-dental/home-hero)
 * ------------------------------------------------------------- */
.dd-home-hero {
	margin-block: 0;
}

.dd-hero {
	position: relative;
	height: 100%;
	min-height: 380px;
	padding: 2.5rem;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-hero__columns {
	height: 100%;
	margin: 0;
}

.dd-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
}

.dd-hero__content > * {
	margin: 0;
}

.dd-hero__content h1 {
	line-height: 1.21;
	text-wrap: balance;
}

.dd-hero__buttons {
	margin-top: 0.375rem;
	gap: 0.75rem;
}

.dd-hero__media {
	align-self: stretch;
}

.dd-hero__image,
.dd-hero__image img {
	height: 100%;
	margin: 0;
}

.dd-hero__image img {
	width: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--lg);
}

/* Tarjetas de promoción (columna derecha) */
.dd-home-hero__promos {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

.dd-promo-card {
	position: relative;
	flex: 1;
	min-height: 180px;
	margin: 0;
	padding: 1.75rem;
	border-radius: var(--wp--custom--radius--xl);
	transition: box-shadow 0.15s ease;
}

.dd-promo-card:hover {
	box-shadow: var(--wp--preset--shadow--card-hover);
}

.dd-promo-card p {
	margin: 0;
}

.dd-promo-card__title {
	font-weight: 700;
	line-height: 1.32;
}

/* Toda la tarjeta es clicable: el enlace se estira sobre ella. */
.dd-promo-card .is-style-arrow-link a::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

/* ---------------------------------------------------------------
 * Panel de búsqueda (patrón deposito-dental/home-search)
 * ------------------------------------------------------------- */
.dd-search-panel {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	padding: 2.25rem 3rem;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-search-panel > *,
.dd-search-panel__popular p {
	margin: 0;
}

.dd-search-panel__popular .wp-block-buttons {
	margin: 0;
}

/* ---------------------------------------------------------------
 * Beneficios (patrón deposito-dental/benefits)
 * Las líneas divisorias son el fondo asomándose entre celdas (gap 1px),
 * así se ven bien aunque la rejilla cambie de columnas en móvil.
 * ------------------------------------------------------------- */
.dd-benefits {
	gap: 1px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--xl);
	background-color: var(--wp--preset--color--border);
}

.dd-benefit {
	gap: 1rem;
	padding: 1.75rem 1.5rem;
	background-color: var(--wp--preset--color--base);
}

.dd-benefit p {
	margin: 0;
}

.dd-benefit__title {
	font-size: 0.9375rem;
	font-weight: 600;
}

.dd-benefit__text {
	font-size: 0.8125rem;
	line-height: 1.54;
	text-wrap: pretty;
}

/* ---------------------------------------------------------------
 * Quiénes somos (patrón deposito-dental/about)
 * ------------------------------------------------------------- */
.dd-about__image {
	margin: 0;
}

.dd-about__image img {
	width: 100%;
	height: 440px;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-about__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.125rem;
}

.dd-about__content > * {
	margin: 0;
}

.dd-about__content h2 {
	line-height: 1.24;
}

.dd-about__content p:not(.is-style-eyebrow) {
	line-height: 1.625;
	text-wrap: pretty;
}

.dd-about__buttons {
	margin-top: 0.5rem;
	gap: 0.75rem;
}

/* ---------------------------------------------------------------
 * Tableta y móvil
 * ------------------------------------------------------------- */
@media (max-width: 781px) {
	.dd-hero {
		min-height: 0;
		padding: 1.75rem 1.5rem;
	}

	.dd-hero__image img {
		height: 200px;
	}

	.dd-promo-card {
		min-height: 160px;
		padding: 1.5rem;
	}

	.dd-search-panel {
		padding: 1.5rem;
	}

	.dd-about__image img {
		height: 280px;
	}
}

/* ---------------------------------------------------------------
 * Encabezado de sección: título + enlace "Ver todas →"
 * (patrones categories, product-tabs y brands)
 * ------------------------------------------------------------- */
.dd-section > * + * {
	margin-block-start: var(--wp--preset--spacing--50);
}

.dd-section h2,
.dd-section__head > * {
	margin: 0;
}

/* "Ver todo" de las pestañas: a la derecha, alineado con la lista de pestañas. */
.dd-product-tabs {
	position: relative;
}

.dd-product-tabs__more {
	position: absolute;
	top: 0.25rem;
	right: 0;
	z-index: 1;
	margin: 0;
}

.dd-product-tabs .dd-tabs {
	margin-block-start: 0;
}

@media (max-width: 781px) {
	/* En móvil "Ver todo" va debajo de los productos. */
	.dd-product-tabs {
		display: flex;
		flex-direction: column;
	}

	.dd-product-tabs .dd-tabs {
		order: 1;
	}

	.dd-product-tabs__more {
		position: static;
		order: 2;
		margin-block-start: var(--wp--preset--spacing--40);
	}
}

/* ---------------------------------------------------------------
 * Catálogo (patrones catalog-header, catalog-search-header, catalog)
 * ------------------------------------------------------------- */
/* Las migas van más pegadas al encabezado que el resto de secciones. */
.dd-catalog-page > .wc-block-breadcrumbs + .dd-catalog-hero {
	margin-block-start: var(--wp--preset--spacing--50);
}

.dd-catalog-hero {
	gap: 2.5rem;
	padding: 2rem 2.5rem;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-catalog-hero__text {
	flex: 1 1 22rem;
	max-width: 620px;
}

.dd-catalog-hero__text > * {
	margin: 0;
}

.dd-catalog-hero__title {
	font-size: 2rem;
	line-height: 1.25;
}

.dd-catalog-hero__description,
.dd-catalog-hero__description p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.53;
	text-wrap: pretty;
}

.dd-catalog-hero .dd-product-search {
	max-width: 520px;
}

/* Tarjeta de ayuda por WhatsApp (toda clicable) */
.dd-help-card {
	position: relative;
	flex: none;
	padding: 1rem 1.375rem 1rem 1rem;
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: 0 1px 3px rgba(11, 37, 64, 0.06);
	transition: box-shadow 0.15s ease;
}

.dd-help-card:hover {
	box-shadow: var(--wp--preset--shadow--card-hover);
}

.dd-help-card p {
	margin: 0;
	line-height: 1.43;
}

.dd-help-card .dd-icon-circle {
	--dd-icon-size: 1.5rem;
	width: 2.75rem;
	height: 2.75rem;
	background-color: var(--wp--preset--color--mint);
	box-shadow: none;
}

.dd-help-card__title {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.dd-help-card__link {
	font-size: 0.8125rem;
	font-weight: 500;
}

.dd-help-card__link a {
	text-decoration: none;
}

.dd-help-card__link a::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

/* Barra lateral + resultados */
.dd-catalog {
	margin-block-end: 0;
}

.dd-catalog__results > * {
	margin-block: 0;
}

.dd-catalog__results > * + * {
	margin-block-start: var(--wp--preset--spacing--50);
}

.dd-catalog__toolbar {
	gap: 0.75rem;
}

.dd-catalog__empty {
	padding: 3rem 1rem;
	border: 1px dashed var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--lg);
	text-align: center;
}

.dd-catalog__empty p {
	margin: 0;
}

@media (max-width: 781px) {
	.dd-catalog-hero {
		gap: 1.25rem;
		padding: 1.5rem;
	}

	.dd-catalog-hero__title {
		font-size: 1.625rem;
	}

	.dd-help-card {
		flex: 1 1 100%;
	}
}

/* ---------------------------------------------------------------
 * Página Quiénes somos (patrones about-*, plantilla page-sections)
 * ------------------------------------------------------------- */

/* Las migas van más pegadas a la portada que el resto de secciones. */
.dd-sections-page > .wc-block-breadcrumbs + .wp-block-post-content {
	margin-block-start: var(--wp--preset--spacing--50);
}

/* Portada */
.dd-about-hero {
	padding: 3rem;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-about-hero__columns {
	margin: 0;
}

.dd-about-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
}

.dd-about-hero__content > * {
	margin: 0;
}

.dd-about-hero__content h1 {
	line-height: 1.18;
	text-wrap: balance;
}

.dd-about-hero__content p:not(.is-style-eyebrow) {
	line-height: 1.6;
	text-wrap: pretty;
}

.dd-about-hero__buttons {
	margin-top: 0.5rem;
	gap: 0.75rem;
}

.dd-about-hero__media {
	position: relative;
}

.dd-about-hero__image {
	margin: 0;
}

.dd-about-hero__image img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--lg);
}

/* Etiqueta flotante sobre la foto. */
.dd-about-hero__badge {
	--dd-icon-color: var(--wp--preset--color--primary);
	position: absolute;
	bottom: 1.25rem;
	left: 1.25rem;
	margin: 0;
	padding: 0.625rem 1rem;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--card-hover);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* Historia */
.dd-about-story {
	margin-block-end: 0;
}

.dd-about-story__image {
	margin: 0;
}

.dd-about-story__image img {
	width: 100%;
	height: 520px;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-about-story__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.125rem;
}

.dd-about-story__content > * {
	margin: 0;
}

.dd-about-story__content h2 {
	line-height: 1.24;
	text-wrap: balance;
}

.dd-about-story__content p:not(.is-style-eyebrow) {
	line-height: 1.7;
	text-wrap: pretty;
}

.dd-about-story__content .dd-about-story__signature {
	margin-top: 0.25rem;
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

/* Valores */
.dd-about-values__head {
	gap: 0.5rem;
	margin-block-end: var(--wp--preset--spacing--50);
}

.dd-about-values__head > * {
	margin: 0;
}

.dd-about-values__grid {
	gap: var(--wp--preset--spacing--50);
}

.dd-about-value {
	gap: 0.875rem;
	padding: 1.75rem;
}

.dd-about-value > * {
	margin: 0;
}

.dd-about-value p:not(.dd-icon-badge) {
	line-height: 1.65;
	text-wrap: pretty;
}

/* Mensaje de la dueña */
.dd-about-quote {
	padding: 3.5rem 3rem;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-about-quote > * {
	margin-block: 0;
}

.dd-about-quote__text {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	line-height: 1.5;
	text-wrap: pretty;
}

/* Comillas grandes de adorno. */
.dd-about-quote__text::before {
	content: "\201C";
	display: block;
	height: 2.25rem;
	margin-bottom: 0.75rem;
	color: var(--wp--preset--color--primary);
	font-size: 4.5rem;
	font-weight: 700;
	line-height: 1;
}

.dd-about-quote > .dd-about-quote__author {
	margin-block-start: 1.5rem;
}

.dd-about-quote__author p {
	margin: 0;
}

.dd-about-quote__name {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

/* Visítenos */
.dd-about-cta {
	padding: 3rem;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-about-cta__columns {
	margin: 0;
}

.dd-about-cta__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
}

.dd-about-cta__content > * {
	margin: 0;
}

.dd-about-cta__content h2 {
	line-height: 1.24;
	text-wrap: balance;
}

.dd-about-cta__content p {
	opacity: 0.9;
	line-height: 1.6;
	text-wrap: pretty;
}

.dd-about-cta__buttons {
	margin-top: 0.5rem;
	gap: 0.75rem;
}

/* Recuadro con dirección y horario. */
.dd-about-cta__info {
	--dd-icon-color: var(--wp--preset--color--sky);
	padding: 1.75rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--wp--custom--radius--lg);
	background-color: rgba(255, 255, 255, 0.08);
}

.dd-about-cta__info p {
	margin: 0;
	line-height: 1.5;
}

.dd-about-cta__info p + .dd-about-cta__label {
	margin-top: 1.25rem;
}

.dd-about-cta__info .dd-about-cta__label {
	margin-bottom: 0.375rem;
	opacity: 0.75;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

@media (max-width: 781px) {
	.dd-about-hero,
	.dd-about-cta {
		padding: 1.75rem 1.5rem;
	}

	.dd-about-hero__image img {
		height: 240px;
	}

	.dd-about-hero__badge {
		bottom: 0.75rem;
		left: 0.75rem;
	}

	.dd-about-story__image img {
		height: 320px;
	}

	.dd-about-quote {
		padding: 2.25rem 1.5rem;
	}

	.dd-about-quote__text {
		font-size: var(--wp--preset--font-size--large);
	}

	.dd-about-cta__info {
		padding: 1.25rem;
	}
}

/* ---------------------------------------------------------------
 * Página Contacto (patrones contact-*, plantilla page-sections)
 * ------------------------------------------------------------- */

/* Encabezado */
.dd-contact-hero {
	padding: 3.5rem 2rem;
	border-radius: var(--wp--custom--radius--xl);
}

.dd-contact-hero > * {
	margin-block: 0;
}

.dd-contact-hero > * + * {
	margin-block-start: 1rem;
}

.dd-contact-hero h1 {
	line-height: 1.18;
	text-wrap: balance;
}

.dd-contact-hero p:not(.is-style-eyebrow) {
	line-height: 1.6;
	text-wrap: pretty;
}

.dd-contact-hero > .dd-contact-hero__buttons {
	margin-block-start: 1.75rem;
	gap: 0.75rem;
}

/* Canales: toda la tarjeta es clicable (el enlace se estira sobre ella). */
.dd-contact-channels {
	gap: var(--wp--preset--spacing--50);
}

.dd-contact-card {
	position: relative;
	gap: 0.5rem;
	padding: 1.5rem;
}

.dd-contact-card > * {
	margin: 0;
}

.dd-contact-card .dd-icon-badge {
	margin-bottom: 0.5rem;
}

.dd-contact-card__title {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.dd-contact-card__value {
	color: var(--wp--preset--color--contrast);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.dd-contact-card__text {
	font-size: 0.8125rem;
	line-height: 1.55;
	text-wrap: pretty;
}

.dd-contact-card > .dd-contact-card__link {
	margin-top: auto;
	padding-top: 0.5rem;
}

.dd-contact-card__link .wp-block-button__link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.dd-contact-card__link .wp-block-button__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.dd-contact-card__link .wp-block-button__link:focus-visible {
	outline: none;
}

.dd-contact-card:has(.wp-block-button__link:focus-visible) {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Preguntas frecuentes */
.dd-contact-faq__head {
	gap: 0.5rem;
	margin-block-end: var(--wp--preset--spacing--50);
}

.dd-contact-faq__head > * {
	margin: 0;
}

.dd-faq {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.dd-faq > * {
	margin: 0;
}

.dd-faq__item {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--lg);
	background-color: var(--wp--preset--color--base);
	transition: border-color 0.15s ease;
}

.dd-faq__item[open],
.dd-faq__item:hover {
	border-color: var(--wp--preset--color--primary);
}

.dd-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 48px;
	padding: 1rem 1.25rem;
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
}

.dd-faq__item summary::-webkit-details-marker {
	display: none;
}

/* Flecha que gira al abrir. */
.dd-faq__item summary::after {
	content: "";
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: url(../icons/chevron-down.svg) center / contain no-repeat;
	mask: url(../icons/chevron-down.svg) center / contain no-repeat;
	transition: transform 0.2s ease;
}

.dd-faq__item[open] summary::after {
	transform: rotate(180deg);
}

.dd-faq__item summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: var(--wp--custom--radius--lg);
}

.dd-faq__item > :not(summary) {
	margin: 0;
	padding: 0 1.25rem 1.25rem;
	line-height: 1.65;
	text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
	.dd-faq__item summary::after {
		transition: none;
	}
}

@media (max-width: 781px) {
	.dd-contact-hero {
		padding: 2.25rem 1.25rem;
	}
}
