/* Starter Theme — Base CSS (Mobile-First, CSS Variables desde Customizer) */

:root {
	--st-primary: #1A1A1A;
	--st-primary-dark: #000000;
	--st-secondary: #6B87C8;
	--st-accent: #FE5007;
	--st-bg: #FFFFFF;
	--st-surface: #F8F6F2;
	--st-text: #1F2937;
	--st-text-muted: #6B7280;
	--st-logo-w: 160px;
	--st-logo-h: 64px;
	--st-logo-w-mobile: 120px;
	--st-footer-logo-w: 180px;
	--st-radius: 12px;
	--st-border: #E5E7EB;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
	margin: 0;
	font-family: 'Nunito', system-ui, -apple-system, sans-serif;
	background: var(--st-bg);
	color: var(--st-text);
	line-height: 1.5;
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.st-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

.st-topbar {
	background: var(--st-primary);
	color: #fff;
	text-align: center;
	padding: 8px 16px;
	font-size: 0.875rem;
	font-weight: 700;
}

/* Header & Decoraciones opcionales */
.st-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--st-bg);
	border-bottom: 1px solid var(--st-border);
}
.st-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 72px;
}
.st-logo img, .st-logo .custom-logo {
	max-width: var(--st-logo-w-mobile);
	max-height: var(--st-logo-h);
	width: auto;
	height: auto;
	object-fit: contain;
}
.st-logo__text {
	font-family: 'Poppins', sans-serif;
	font-weight: 800;
	font-size: 1.25rem;
	text-decoration: none;
}
.st-nav { display: none; }
.st-nav__list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 24px;
}
.st-nav__list a {
	text-decoration: none;
	font-weight: 700;
	padding: 8px 4px;
}
.st-header__actions { display: flex; align-items: center; gap: 10px; }

.st-cart-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--st-surface);
	border: 1px solid var(--st-border);
	text-decoration: none;
	font-weight: 800;
}
.st-cart-count {
	background: var(--st-accent);
	color: #fff;
	border-radius: 999px;
	padding: 1px 7px;
	font-size: 0.8rem;
}
.st-burger {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	background: transparent;
	border: 1px solid var(--st-border);
	border-radius: 8px;
	cursor: pointer;
	padding: 0 10px;
}
.st-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--st-text);
}

/* Header Wave & Toldito */
.st-header-wave svg {
	display: block;
	width: 100%;
	height: 22px;
	fill: var(--st-surface);
}
.st-toldito {
	display: flex;
	width: 100%;
	height: 18px;
	overflow: hidden;
}
.st-toldito__scallop {
	flex: 1 0 36px;
	height: 18px;
	border-radius: 0 0 18px 18px;
	background: var(--st-primary);
}
.st-toldito__scallop:nth-child(even) {
	background: var(--st-secondary);
}

/* Menú Mobile */
.st-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	justify-content: flex-end;
}
.st-mobile-menu[hidden] { display: none; }
.st-mobile-menu__panel {
	width: min(320px, 85vw);
	height: 100%;
	background: var(--st-bg);
	padding: 20px;
	overflow-y: auto;
}
.st-mobile-menu__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}
.st-mobile-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.st-mobile-menu__list a {
	display: block;
	padding: 12px 4px;
	text-decoration: none;
	font-weight: 700;
	border-bottom: 1px solid var(--st-border);
}

/* Botones */
.st-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: var(--st-radius);
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: opacity .15s ease, transform .15s ease;
}
.st-btn--primary { background: var(--st-primary); color: #fff; }
.st-btn--secondary { background: var(--st-secondary); color: #fff; }
.st-btn--ghost { background: transparent; border-color: var(--st-border); color: var(--st-text); }
.st-btn--full { width: 100%; }

/* Secciones & Productos */
.st-main, .st-section { padding: 36px 0; }
.st-section--surface { background: var(--st-surface); }
.st-hero { padding: 48px 0; background: var(--st-surface); }
.st-hero__grid { display: grid; gap: 28px; align-items: center; }
.st-hero__title { font-family: 'Poppins', sans-serif; font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.15; margin: 8px 0 12px; }
.st-kicker { display: inline-block; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--st-accent); }
.st-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }

.st-cat-grid, .st-products-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	list-style: none;
	padding: 0;
	margin: 0;
}
.st-cat-card, .st-product-card {
	background: var(--st-bg);
	border: 1px solid var(--st-border);
	border-radius: var(--st-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.st-cat-card { padding: 12px; text-decoration: none; font-weight: 800; text-align: center; gap: 8px; }
.st-product-card__media { position: relative; aspect-ratio: 1 / 1; background: var(--st-surface); }
.st-product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.st-badge-sale {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--st-accent);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 999px;
}
.st-product-card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.st-product-card__title { margin: 0; font-size: 1rem; }
.st-product-card__title a { text-decoration: none; }
.st-product-card__price { font-weight: 800; font-size: 1.05rem; }
.st-product-card__actions { margin-top: auto; }

/* Filtros Tienda */
.st-shop-hero { padding: 28px 0 16px; background: var(--st-surface); }
.st-filter-bar { border-bottom: 1px solid var(--st-border); padding: 12px 0; }
.st-filter-bar__list { display: flex; flex-wrap: wrap; gap: 8px; }
.st-filter-pill {
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid var(--st-border);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.9rem;
}
.st-filter-pill.is-active { background: var(--st-primary); color: #fff; border-color: var(--st-primary); }

/* Cart Drawer */
.st-cart-drawer { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; }
.st-cart-drawer[hidden] { display: none; }
.st-cart-drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.st-cart-drawer__panel {
	position: relative;
	width: min(420px, 92vw);
	height: 100%;
	background: var(--st-bg);
	display: flex;
	flex-direction: column;
	z-index: 1;
}
.st-cart-drawer__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--st-border);
}
.st-close-btn { width: 44px; height: 44px; font-size: 1.5rem; background: none; border: 0; cursor: pointer; }
.st-cart-drawer__body { padding: 16px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.st-shipping-meter__track { height: 8px; background: var(--st-surface); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.st-shipping-meter__fill { height: 100%; background: var(--st-accent); transition: width .25s ease; }
.st-drawer-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.st-drawer-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; border-bottom: 1px solid var(--st-border); padding-bottom: 12px; }
.st-drawer-item__img img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.st-drawer-item__controls { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.st-qty-control { display: inline-flex; align-items: center; border: 1px solid var(--st-border); border-radius: 8px; }
.st-qty-btn { width: 32px; height: 32px; background: transparent; border: 0; cursor: pointer; font-weight: 800; }
.st-qty-val { padding: 0 8px; font-weight: 700; }
.st-drawer-item__remove { background: none; border: 0; font-size: 1.25rem; cursor: pointer; padding: 4px 8px; }
.st-drawer-footer { margin-top: auto; border-top: 1px solid var(--st-border); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.st-drawer-subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; }
.st-drawer-actions { display: flex; flex-direction: column; gap: 8px; }

/* Footer & WhatsApp */
.st-footer { background: var(--st-primary); color: #fff; padding: 40px 0 24px; margin-top: 48px; }
.st-footer__grid { display: grid; gap: 24px; }
.st-footer__logo { max-width: var(--st-footer-logo-w); height: auto; }
.st-footer__links, .st-footer__contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.st-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 24px; padding-top: 16px; font-size: 0.875rem; }
.st-wa-float {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 50;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #25D366;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(0,0,0,.22);
}

@media (max-width: 767px) {
	.st-footer { padding-bottom: 78px; }
	.st-wa-float { width: 46px; height: 46px; bottom: 14px; right: 14px; font-size: 0.78rem; }
}

@media (min-width: 768px) {
	.st-logo img, .st-logo .custom-logo { max-width: var(--st-logo-w); }
	.st-nav { display: block; }
	.st-burger { display: none; }
	.st-hero__grid { grid-template-columns: 1.1fr 0.9fr; }
	.st-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.st-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.st-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
