/**
 * Estilos para el Sistema de Pedidos Online
 * Inspirado en la UX ágil de FuegosYa y adaptado a la paleta oficial de Grupo Sheina (Blocksy)
 */

:root {
	--theme-primary: #10452D;
	/* Verde bosque profundo */
	--theme-primary-hover: #0a2d1d;
	--theme-secondary: #287A3D;
	/* Verde medio corporativo */
	--theme-accent: #69B83F;
	/* Verde lima de acento y acciones */
	--theme-accent-hover: #579c32;
	--theme-whatsapp: #25D366;
	/* Verde WhatsApp oficial */
	--theme-whatsapp-hover: #20ba5a;
	--theme-text-dark: #1f2937;
	--theme-text-muted: #4b5563;
	--theme-bg-light: #f3f6f5;
	--theme-card-bg: #ffffff;
	--theme-border: #e2e8e5;
	--theme-card-light-bg: #d1e2de;
	--theme-radius: 12px;
	--theme-shadow: 0 4px 12px rgba(16, 69, 45, 0.08);
	--theme-shadow-lg: 0 10px 25px -5px rgba(16, 69, 45, 0.15);
	--font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

body {
	font-family: var(--font-sans);
	background-color: var(--theme-bg-light);
	color: var(--theme-text-dark);
	line-height: 1.5;
	padding-bottom: 90px;
	/* Espacio para barra flotante */
}

/* ==========================================================================
   Header & Store Info (Sticky Compacto Cero Parpadeos)
   ========================================================================== */
.store-header {
	background: #ffffff;
	border-bottom: 1px solid var(--theme-border);
	padding: 10px 16px;
	position: sticky;
	top: 0;
	z-index: 40;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.store-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 600px;
	margin: 0 auto;
}

.store-header__logo {
	max-height: 42px;
	max-width: 160px;
	object-fit: contain;
}

/* Bloque Hero con Título y Descripción (Scroll natural con el contenido) */
.store-hero {
	background: #ffffff;
	padding: 18px 16px 12px;
	text-align: center;
	border-bottom: 1px solid var(--theme-border);
}

.store-hero__title {
	font-size: 20px;
	font-weight: 700;
	color: var(--theme-primary);
	margin-bottom: 4px;
}

.store-hero__desc {
	font-size: 13px;
	color: var(--theme-text-muted);
	max-width: 500px;
	margin: 0 auto;
}

/* ==========================================================================
   Search & Quick Category Pills
   ========================================================================== */
.nav-filters {
	background: #ffffff;
	padding: 12px 16px;
	border-bottom: 1px solid var(--theme-border);
}

.nav-filters__inner {
	max-width: 600px;
	margin: 0 auto;
}

.search-input-wrap {
	position: relative;
	margin-bottom: 10px;
}

.search-input-wrap input {
	width: 100%;
	padding: 10px 14px 10px 38px;
	border: 1px solid var(--theme-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: var(--theme-bg-light);
	outline: none;
	transition: border-color 0.2s;
}

.search-input-wrap input:focus {
	border-color: var(--theme-secondary);
	background: #ffffff;
}

.search-input-wrap .search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--theme-text-muted);
	pointer-events: none;
}

.category-pills {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
	display: none;
}

.cat-pill {
	flex-shrink: 0;
	padding: 6px 14px;
	border-radius: 20px;
	background: var(--theme-bg-light);
	color: var(--theme-text-dark);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--theme-border);
	transition: all 0.2s;
}

.cat-pill:hover,
.cat-pill.active {
	background: var(--theme-primary);
	color: #ffffff;
	border-color: var(--theme-primary);
}

/* ==========================================================================
   Container & Section
   ========================================================================== */
.main-container {
	max-width: 600px;
	margin: 0 auto;
	padding: 16px;
}

.section-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--theme-primary);
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.section-title svg {
	width: 17px;
	height: 17px;
	fill: var(--theme-primary);
	display: inline-block;
	flex-shrink: 0;
}

/* Badge circular moderno para el icono de título (estilo botones de cabecera) */
.section-title__icon-badge {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid var(--theme-border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(16, 69, 45, 0.06);
	flex-shrink: 0;
}

.section-title__icon-badge svg {
	width: 16px;
	height: 16px;
	fill: var(--theme-primary);
}

.section-desc {
	font-size: 13px;
	color: var(--theme-text-muted);
	margin-bottom: 14px;
}

/* ==========================================================================
   Featured / Top 4 Products Grid
   ========================================================================== */
.featured-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 24px;
}

.product-card {
	background: var(--theme-card-bg);
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-radius);
	padding: 12px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: var(--theme-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	position: relative;
	min-width: 0;
	width: 100%;
	overflow: hidden;
}

.product-card:active {
	transform: scale(0.99);
}

.product-card__img-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	overflow: hidden;
	background: #f9fafb;
	margin-bottom: 10px;
	position: relative;
}

.product-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.product-card:hover .product-card__img {
	transform: scale(1.04);
}

.product-card__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--theme-primary);
	line-height: 1.3;
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: break-word;
	word-break: break-word;
}

.product-card__desc {
	font-size: 12px;
	color: var(--theme-text-muted);
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: break-word;
	word-break: break-word;
}

.product-card__footer {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding-top: 6px;
}

.product-card__price {
	font-size: 14px;
	font-weight: 700;
	color: var(--theme-primary);
	white-space: nowrap;
}

.product-card__unpriced {
	font-size: 12px;
	font-weight: 600;
	color: var(--theme-secondary);
}

.product-card__footer .qty-action {
	margin-left: auto;
}

/* ==========================================================================
   Interactive Add / Quantity Button Controls
   ========================================================================== */
.qty-action {
	min-width: 82px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.btn-add {
	background: var(--theme-accent);
	color: #ffffff;
	border: none;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 12px;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.btn-add:hover {
	background: var(--theme-accent-hover);
}

.btn-add:active {
	transform: scale(0.96);
}

.qty-control {
	display: flex;
	align-items: center;
	background: var(--theme-primary);
	color: #ffffff;
	border-radius: 6px;
	overflow: hidden;
	height: 32px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qty-btn {
	background: transparent;
	border: none;
	color: #ffffff;
	width: 28px;
	height: 32px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.qty-btn:hover {
	background: rgba(255, 255, 255, 0.15);
}

.qty-value {
	font-size: 13px;
	font-weight: 700;
	min-width: 24px;
	text-align: center;
	padding: 0 2px;
}

/* ==========================================================================
   Category Accordions (Collapsibles)
   ========================================================================== */
.cat-accordion {
	background: var(--theme-card-bg);
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-radius);
	margin-bottom: 14px;
	overflow: hidden;
	box-shadow: var(--theme-shadow);
	transition: border-color 0.2s;
}

.cat-accordion.is-open {
	border-color: var(--theme-secondary);
}

.cat-accordion__header {
	width: 100%;
	padding: 14px 16px;
	background: #ffffff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	text-align: left;
	user-select: none;
}

.cat-accordion__title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.cat-accordion__thumb {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	object-fit: cover;
	background: var(--theme-bg-light);
}

.cat-accordion__name {
	font-size: 15px;
	font-weight: 700;
	color: var(--theme-primary);
}

.cat-accordion__count {
	font-size: 12px;
	color: var(--theme-text-muted);
	font-weight: 400;
}

.cat-accordion__icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #f3f4f6;
	border: 1px solid var(--theme-border);
	color: #111827;
	/* Negro elegante */
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
}

.cat-accordion__icon svg {
	width: 18px;
	height: 18px;
	stroke: #111827;
	display: block;
}

.cat-accordion__header:hover .cat-accordion__icon {
	background: #e5e7eb;
	border-color: #d1d5db;
}

.cat-accordion.is-open .cat-accordion__icon {
	transform: rotate(180deg);
	background: #e5e7eb;
}

.cat-accordion__content {
	display: none;
	padding: 0 16px 14px;
	border-top: 1px solid var(--theme-border);
}

.cat-accordion.is-open .cat-accordion__content {
	display: block;
}

/* List items inside accordion */
.accordion-product-list {
	list-style: none;
}

.accordion-product-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--theme-border);
}

.accordion-product-item:last-child {
	border-bottom: none;
}

.accordion-product-item__img {
	width: 60px;
	height: 60px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--theme-bg-light);
}

.accordion-product-item__info {
	flex-grow: 1;
}

.accordion-product-item__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--theme-primary);
	margin-bottom: 2px;
}

.accordion-product-item__desc {
	font-size: 12px;
	color: var(--theme-text-muted);
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.accordion-product-item__price {
	font-size: 14px;
	font-weight: 700;
	color: var(--theme-primary);
	margin-top: 4px;
}

/* ==========================================================================
   Sticky Cart Bar (Bottom Floating)
   ========================================================================== */
.sticky-cart-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #ffffff;
	border-top: 1px solid var(--theme-border);
	padding: 12px 16px;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	z-index: 50;
	transform: translateY(120%);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cart-bar.is-visible {
	transform: translateY(0);
}

.sticky-cart-bar__inner {
	max-width: 600px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sticky-cart-bar__info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sticky-cart-bar__badge {
	background: var(--theme-primary);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sticky-cart-bar__text {
	line-height: 1.2;
}

.sticky-cart-bar__label {
	font-size: 12px;
	color: var(--theme-text-muted);
}

.sticky-cart-bar__total {
	font-size: 16px;
	font-weight: 800;
	color: var(--theme-primary);
}

.sticky-cart-bar__btn {
	background: var(--theme-accent);
	color: #ffffff;
	border: none;
	font-size: 14px;
	font-weight: 700;
	padding: 10px 18px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: background 0.2s;
}

.sticky-cart-bar__btn:hover {
	background: var(--theme-accent-hover);
}

/* ==========================================================================
   Drawer / Offcanvas (Deslizamiento de Izquierda a Derecha a Pantalla Completa)
   Unificado para Cart, FAQs y Búsqueda como en pedidos.fuegosya.com
   ========================================================================== */
.drawer-backdrop,
.search-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(3px);
	z-index: 100;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.drawer-backdrop.is-open,
.search-modal-backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

.drawer,
.search-modal {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	max-width: 100%;
	height: 100%;
	background: #ffffff;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	z-index: 101;
	transform: translateX(-100%);
	transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
}

.drawer-backdrop.is-open .drawer,
.search-modal-backdrop.is-open .search-modal {
	transform: translateX(0);
}

@media (min-width: 640px) {

	.drawer,
	.search-modal {
		max-width: 480px;
		border-right: 1px solid var(--theme-border);
	}
}

.drawer__header,
.search-modal__header {
	padding: 18px 20px;
	border-bottom: 1px solid var(--theme-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
	position: sticky;
	top: 0;
	z-index: 10;
}

.drawer__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--theme-primary);
}

.drawer__close,
.search-modal__close {
	background: var(--theme-bg-light);
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 22px;
	font-weight: 700;
	color: var(--theme-text-dark);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.drawer__close:hover,
.search-modal__close:hover {
	background: #e5e7eb;
	color: #000;
}

.drawer__body,
.search-modal__body {
	padding: 20px;
	overflow-y: auto;
	flex-grow: 1;
	background: #ffffff;
}

.drawer__footer {
	padding: 16px 20px;
	border-top: 1px solid var(--theme-border);
	background: #f9fafb;
	position: sticky;
	bottom: 0;
}

/* Cart items inside drawer */
.cart-items-list {
	list-style: none;
	margin-bottom: 16px;
}

.cart-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px dashed var(--theme-border);
}

.cart-item__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--theme-primary);
}

.cart-item__sub {
	font-size: 12px;
	color: var(--theme-text-muted);
}

.cart-item__price {
	font-size: 13px;
	font-weight: 700;
	color: var(--theme-primary);
}

/* Form inputs in checkout drawer */
.form-group {
	margin-bottom: 12px;
}

.form-group label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--theme-text-muted);
	margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--theme-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	border-color: var(--theme-secondary);
}

.btn-whatsapp-submit {
	width: 100%;
	background: var(--theme-whatsapp);
	color: #ffffff;
	border: none;
	font-size: 16px;
	font-weight: 700;
	padding: 14px;
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
	transition: background 0.2s, transform 0.1s;
}

.btn-whatsapp-submit:hover {
	background: var(--theme-whatsapp-hover);
}

.btn-whatsapp-submit:active {
	transform: scale(0.98);
}

.btn-whatsapp-submit__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn-whatsapp-submit svg,
.btn-whatsapp-submit__icon svg,
.btn-whatsapp-submit__icon svg path {
	width: 22px;
	height: 22px;
	fill: #ffffff !important;
	color: #ffffff !important;
	display: block;
	flex-shrink: 0;
}

/* Miniatura de imagen en el carrito */
.cart-item__thumb {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	object-fit: cover;
	background: var(--theme-bg-light);
	flex-shrink: 0;
}

/* Acciones en la cabecera (Buscador y FAQ rediseñados) */
.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.header-action-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--theme-bg-light);
	border: 1px solid var(--theme-border);
	color: var(--theme-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s ease;
}

.header-action-btn:hover {
	background: #ffffff;
	border-color: var(--theme-secondary);
	transform: scale(1.05);
}

.header-action-btn--search svg {
	width: 22px;
	height: 22px;
	fill: var(--theme-primary-hover);
	display: block;
	transition: transform 0.2s ease;
}

.header-action-btn--faq svg {
	width: 20px;
	height: 20px;
	fill: var(--theme-primary-hover);
	display: block;
	transition: transform 0.2s ease;
}

.search-modal__input {
	flex: 1;
	border: none;
	background: var(--theme-bg-light);
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	outline: none;
}

.search-modal__close {
	background: transparent;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: var(--theme-text-muted);
	padding: 6px;
}

.search-modal__body {
	padding: 14px 16px;
	overflow-y: auto;
	flex: 1;
}

/* Botón de WhatsApp y Carrito en el Header */
.header-action-btn--wa {
	background: #e8f8ee;
	border-color: #a3e6be;
	color: var(--theme-whatsapp);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.header-action-btn--wa svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
	display: block;
	transition: transform 0.2s ease;
}

.header-action-btn--wa:hover {
	background: var(--theme-whatsapp);
	border-color: var(--theme-whatsapp);
	color: #ffffff;
}

.header-action-btn--wa:hover svg {
	transform: scale(1.08);
}

.header-action-btn--cart {
	position: relative;
}

.header-action-btn--cart svg {
	width: 24px;
	height: 24px;
	fill: var(--theme-primary-hover);
	display: block;
	transition: transform 0.2s ease;
}

.header-cart-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: var(--theme-accent);
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Clases auxiliares para marca, totales y FAQs */
.store-header__brand-text {
	font-weight: 800;
	font-size: 20px;
	color: var(--theme-primary);
}

.drawer-section-heading {
	font-size: 14px;
	font-weight: 700;
	color: var(--theme-primary);
	margin-bottom: 12px;
}

.drawer-total-amount {
	font-size: 18px;
	font-weight: 800;
	color: var(--theme-primary);
}

.faq-item {
	margin-bottom: 16px;
	border-bottom: 1px solid var(--theme-border);
	padding-bottom: 12px;
}

.faq-item__q {
	font-weight: 700;
	color: var(--theme-primary);
	margin-bottom: 4px;
}

.faq-item__a {
	color: var(--theme-text-muted);
	margin: 0;
}

/* ==========================================================================
   Modo Oscuro (Dark Mode) configurable desde WP-Admin
   Fondo oscuro personalizable (--theme-dark-bg), textos blancos y botones con color primario
   ========================================================================== */
body.theme-dark {
	color-scheme: dark;
	--theme-bg-light: var(--theme-dark-bg, #000000);
	--theme-dark-surface: #141417;
	--theme-dark-surface: color-mix(in srgb, var(--theme-dark-bg, #000000) 90%, #ffffff 10%);
	--theme-dark-elevated: #1e1e24;
	--theme-dark-elevated: color-mix(in srgb, var(--theme-dark-bg, #000000) 82%, #ffffff 18%);
	--theme-card-bg: var(--theme-dark-surface);
	--theme-text-dark: #ffffff;
	--theme-text-muted: #b3b8c2;
	--theme-border: rgba(255, 255, 255, 0.14);
	--theme-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
	--theme-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.65);

	background-color: var(--theme-bg-light);
	color: var(--theme-text-dark);
}

body.theme-dark .store-header,
body.theme-dark .store-hero,
body.theme-dark .nav-filters,
body.theme-dark .sticky-cart-bar {
	background: var(--theme-dark-surface);
	border-color: var(--theme-border);
}

body.theme-dark .store-header {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

body.theme-dark .sticky-cart-bar {
	box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.55);
}

/* Textos y títulos en blanco claro */
body.theme-dark .store-header__brand-text,
body.theme-dark .store-hero__title,
body.theme-dark .section-title,
body.theme-dark .product-card__title,
body.theme-dark .product-card__price,
body.theme-dark .cat-accordion__name,
body.theme-dark .accordion-product-item__title,
body.theme-dark .accordion-product-item__price,
body.theme-dark .sticky-cart-bar__total,
body.theme-dark .drawer__title,
body.theme-dark .drawer-section-heading,
body.theme-dark .drawer-total-amount,
body.theme-dark .cart-item__title,
body.theme-dark .cart-item__price,
body.theme-dark .faq-item__q {
	color: #ffffff;
}

body.theme-dark .product-card__unpriced {
	color: var(--theme-text-muted);
}

/* Tarjetas, imágenes placeholder y acordeones */
body.theme-dark .product-card__img-wrap,
body.theme-dark .cat-accordion__thumb,
body.theme-dark .accordion-product-item__img,
body.theme-dark .cart-item__thumb {
	background: var(--theme-dark-elevated);
}

body.theme-dark .cat-accordion.is-open {
	border-color: var(--theme-primary);
}

body.theme-dark .cat-accordion__header {
	background: var(--theme-dark-surface);
}

body.theme-dark .cat-accordion__icon {
	background: var(--theme-dark-elevated);
	border-color: var(--theme-border);
	color: #ffffff;
}

body.theme-dark .cat-accordion__icon svg {
	stroke: #ffffff;
}

body.theme-dark .cat-accordion__header:hover .cat-accordion__icon,
body.theme-dark .cat-accordion.is-open .cat-accordion__icon {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.25);
}

/* Badges de secciones e iconos de cabecera en blanco */
body.theme-dark .section-title__icon-badge {
	background: var(--theme-dark-elevated);
	border-color: var(--theme-border);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.theme-dark .section-title svg,
body.theme-dark .section-title__icon-badge svg {
	fill: #ffffff;
}

body.theme-dark .header-action-btn {
	background: var(--theme-dark-elevated);
	border-color: var(--theme-border);
	color: #ffffff;
}

body.theme-dark .header-action-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: var(--theme-primary);
}

body.theme-dark .header-action-btn--search svg,
body.theme-dark .header-action-btn--faq svg,
body.theme-dark .header-action-btn--cart svg {
	fill: #ffffff;
}

body.theme-dark .header-action-btn--wa {
	background: rgba(37, 211, 102, 0.16);
	border-color: rgba(37, 211, 102, 0.45);
	color: var(--theme-whatsapp);
}

body.theme-dark .header-action-btn--wa:hover {
	background: var(--theme-whatsapp);
	border-color: var(--theme-whatsapp);
	color: #ffffff;
}

/* Píldoras de categorías */
body.theme-dark .cat-pill {
	background: var(--theme-dark-elevated);
	color: #ffffff;
	border-color: var(--theme-border);
}

body.theme-dark .cat-pill:hover,
body.theme-dark .cat-pill.active {
	background: var(--theme-primary);
	color: #ffffff;
	border-color: var(--theme-primary);
}

/* Drawers y Modal de Búsqueda */
body.theme-dark .drawer,
body.theme-dark .search-modal,
body.theme-dark .drawer__header,
body.theme-dark .search-modal__header,
body.theme-dark .drawer__body,
body.theme-dark .search-modal__body {
	background: var(--theme-bg-light);
	color: #ffffff;
}

body.theme-dark .drawer__header,
body.theme-dark .search-modal__header,
body.theme-dark .drawer__footer {
	background: var(--theme-dark-surface);
	border-color: var(--theme-border);
}

body.theme-dark .drawer__close,
body.theme-dark .search-modal__close {
	background: var(--theme-dark-elevated);
	color: #ffffff;
}

body.theme-dark .drawer__close:hover,
body.theme-dark .search-modal__close:hover {
	background: rgba(255, 255, 255, 0.22);
	color: #ffffff;
}

/* Formularios e Inputs en Modo Oscuro */
body.theme-dark .form-group input,
body.theme-dark .form-group select,
body.theme-dark .form-group textarea,
body.theme-dark .search-modal__input,
body.theme-dark .search-input-wrap input {
	background: var(--theme-dark-elevated);
	color: #ffffff;
	border-color: var(--theme-border);
}

body.theme-dark .form-group input::placeholder,
body.theme-dark .form-group textarea::placeholder,
body.theme-dark .search-modal__input::placeholder {
	color: #8b929e;
}

body.theme-dark .form-group input:focus,
body.theme-dark .form-group select:focus,
body.theme-dark .form-group textarea:focus,
body.theme-dark .search-input-wrap input:focus {
	border-color: var(--theme-primary);
	background: var(--theme-dark-elevated);
}

/* ==========================================================================
   Modal / Drawer de Detalle de Producto y Productos Sugeridos
   ========================================================================== */
[data-action="open-product-detail"] {
	cursor: pointer;
}

.product-card__title[data-action="open-product-detail"]:hover,
.accordion-product-item__title[data-action="open-product-detail"]:hover {
	text-decoration: underline;
}

.product-detail__img-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 360px;
	border-radius: var(--theme-radius);
	overflow: hidden;
	background: #f9fafb;
	border: 1px solid var(--theme-border);
	margin-bottom: 16px;
}

.product-detail__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.product-detail__title {
	font-size: 20px;
	font-weight: 800;
	color: var(--theme-primary);
	line-height: 1.25;
	margin-bottom: 10px;
}

.product-detail__desc {
	font-size: 14px;
	line-height: 1.6;
	color: var(--theme-text-muted);
	white-space: pre-line;
	margin-bottom: 18px;
}

.product-detail__action-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-radius: var(--theme-radius);
	background: var(--theme-bg-light);
	border: 1px solid var(--theme-border);
	margin-bottom: 24px;
}

.product-detail__price {
	font-size: 20px;
	font-weight: 800;
	color: var(--theme-primary);
	white-space: nowrap;
}

.product-detail__price-label {
	font-size: 12px;
	color: var(--theme-text-muted);
	display: block;
	font-weight: 600;
}

.product-detail__action-bar .btn-add {
	padding: 10px 18px;
	font-size: 14px;
	border-radius: 8px;
}

.product-detail__action-bar .qty-action {
	height: auto;
	margin-left: auto;
}

.product-detail__action-bar .qty-control {
	height: 38px;
	border-radius: 8px;
}

.product-detail__action-bar .qty-btn {
	width: 34px;
	height: 38px;
	font-size: 18px;
}

.product-detail__action-bar .qty-value {
	font-size: 15px;
	min-width: 28px;
}

.product-detail__suggested {
	border-top: 1px solid var(--theme-border);
	padding-top: 18px;
}

.product-detail__suggested-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--theme-primary);
	margin-bottom: 10px;
}

/* Dark Mode overrides para Detalle de Producto */
body.theme-dark .product-detail__img-wrap {
	background: var(--theme-dark-elevated);
	border-color: var(--theme-border);
}

body.theme-dark .product-detail__title,
body.theme-dark .product-detail__price,
body.theme-dark .product-detail__suggested-title {
	color: #ffffff;
}

body.theme-dark .product-detail__action-bar {
	background: var(--theme-dark-surface);
	border-color: var(--theme-border);
}