/* ==========================================================================
   Design System - Guayacán Style
   ========================================================================== */

:root {
	/* Primary Colors */
	--color-primary: #000000;
	--color-primary-hover: #333333;
	--color-accent: #000000;
	--color-accent-hover: #333333;
	
	/* Neutral Colors */
	--color-text: #000000;
	--text-primary: #000000;
	--text-secondary: #475569;
	--text-tertiary: #64748b;
	--text-muted: #c7c7c7;
	
	/* Background Colors */
	--bg-primary: #ffffff;
	--bg-secondary: #f8fafc;
	--bg-tertiary: #f1f5f9;
	
	/* Border Colors */
	--border-light: #e2e8f0;
	--border-medium: #cbd5e1;
	
	/* Status Colors */
	--color-success: #10b981;
	--color-warning: #f59e0b;
	--color-error: #ef4444;
	
	/* Typography Scale */
	--text-xs: 0.75rem;
	--text-sm: 0.875rem;
	--text-base: 1rem;
	--text-lg: 1.125rem;
	--text-xl: 1.25rem;
	--text-2xl: 1.5rem;
	--text-3xl: 1.875rem;
	--text-4xl: 2.25rem;
	--text-5xl: 3rem;
	--text-6xl: 3.75rem;
	
	/* Spacing Scale */
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.25rem;
	--space-6: 1.5rem;
	--space-8: 2rem;
	--space-10: 2.5rem;
	--space-12: 3rem;
	--space-16: 4rem;
	--space-20: 5rem;
	--space-24: 6rem;
	
	/* Layout */
	--max-width: 1280px;
	--header-height: 72px;
	
	/* Shadows */
	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
	
	/* Transitions */
	--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
	
	/* Border Radius */
	--radius-sm: 0.375rem;
	--radius-md: 0.5rem;
	--radius-lg: 0.75rem;
	--radius-xl: 1rem;
	--radius-2xl: 1.5rem;
	--radius-full: 9999px;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
	font-size: var(--text-base);
	line-height: 1.6;
	color: var(--text-primary);
	background: var(--bg-primary);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
	cursor: pointer;
	border: none;
	background: none;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.container {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 var(--space-6);
}

@media (max-width: 1024px) {
	.container {
		padding: 0 12px;
	}
}

/* ==========================================================================
   Skip Link
   ========================================================================== */

.skip-link {
	position: absolute;
	left: var(--space-4);
	top: -100%;
	background: var(--color-primary);
	color: white;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-md);
	z-index: 100;
	font-weight: 500;
	font-size: var(--text-sm);
	transition: top var(--transition-fast);
}

.skip-link:focus {
	top: var(--space-4);
}

/* ==========================================================================
   Header
   ========================================================================== */

.top-banner {
	background: #000000;
	color: #ffffff;
}

.top-banner__inner {
	min-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-align: center;
	text-transform: uppercase;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-light);
	height: var(--header-height);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-6);
	height: 100%;
}

/* Left section: Menu button + Brand */
.site-header__left {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	flex-shrink: 0;
}

/* Right section: Actions */
.site-header__right {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	flex-shrink: 0;
}

.site-header__right .storefront-search {
	width: min(480px, 44vw);
}

.whatsapp-fab {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 62px;
	height: 62px;
	border-radius: var(--radius-full);
	background: #25d366;
	box-shadow: 0 10px 24px rgba(9, 94, 46, 0.35);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 55;
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.whatsapp-fab:hover {
	transform: translateY(-2px) scale(1.03);
	box-shadow: 0 14px 28px rgba(9, 94, 46, 0.38);
}

.whatsapp-fab img {
	width: 34px;
	height: 34px;
	object-fit: contain;
}

/* Menu Toggle */
.menu-toggle {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-lg);
	color: var(--text-secondary);
	transition: all var(--transition-fast);
}

.menu-toggle:hover {
	background: var(--bg-secondary);
	color: var(--text-primary);
}

.menu-toggle i {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

/* Brand */
.brand {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.brand__name {
	font-size: var(--text-lg);
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

@keyframes cart-button-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 480px) {
	#open-cart-button .tiendu-button__label {
		display: none;
	}

	#open-cart-button button {
		padding: 0 0.5rem;
	}
}

.cart-quantity {
	min-width: 20px;
	height: 20px;
	padding: 0 var(--space-1);
	border-radius: 10px;
	background: var(--color-primary);
	color: white;
	font-size: var(--text-xs);
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ==========================================================================
   Carousel / Slider Support
   ========================================================================== */

ui-product-list {
	--columns: 4;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--space-6);
    padding-bottom: var(--space-4);
    scrollbar-width: none; /* Hide for Firefox */
}

ui-product-list::-webkit-scrollbar {
    display: none; /* Hide for Chrome/Safari */
}

ui-product-list ui-product-item {
    flex: 0 0 calc((100% - (var(--space-6) * (3))) / 4);
    scroll-snap-align: start;
}

/* Home Section Layout */
.section {
    margin-bottom: var(--space-20);
}

.section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: var(--space-2);
}

.section__title {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
	ui-product-list ui-product-item {
        flex: 0 0 calc((100% - (var(--space-6) * 2)) / 3);
    }
}

@media (max-width: 640px) {
	ui-product-list ui-product-item {
        flex: 0 0 calc((100% - var(--space-4)) / 1.5); /* Muestra un item y medio aprox en móvil */
    }
    ui-product-list {
        gap: var(--space-4);
    }
}
