/**
 * 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
   ========================================================================== */
.store-header {
	background: #ffffff;
	border-bottom: 1px solid var(--theme-border);
	padding: 20px 16px 16px;
	text-align: center;
	position: sticky;
	top: 0;
	z-index: 40;
	box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

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

.store-header__logo {
	max-height: 52px;
	max-width: 180px;
	object-fit: contain;
}

.store-header__btn-faq {
	background: transparent;
	border: 1px solid var(--theme-border);
	color: var(--theme-primary);
	font-size: 13px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 20px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
}

.store-header__btn-faq:hover {
	background: var(--theme-bg-light);
	border-color: var(--theme-secondary);
}

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

.store-header__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: 4px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.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, 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;
}

.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;
}

.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;
}

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

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

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

/* ==========================================================================
   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 {
	color: var(--theme-secondary);
	transition: transform 0.25s ease;
}

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

.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);
}

/* 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);
}

.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;
}
