/*
Theme Name: Farmacia Cuernavaca
Theme URI: https://farmaciacuernavaca.com.mx/
Author: Farmacia Cuernavaca
Description: Tema ligero y orientado a rendimiento para la farmacia. Incluye soporte de WooCommerce y una plantilla sin cabecera para el kiosco.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: farmacia
Tags: e-commerce, custom-menu, custom-logo, featured-images
*/

:root {
	--fc-primary: #0b6ea8;
	--fc-primary-dark: #084f79;
	--fc-accent: #2bbef9;
	--fc-text: #16303f;
	--fc-muted: #5b7484;
	--fc-line: #dce7ee;
	--fc-bg: #f5f9fc;
	--fc-card: #ffffff;
	--fc-radius: 12px;
	--fc-shadow: 0 10px 30px rgba(12, 55, 90, 0.08);
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--fc-bg);
	color: var(--fc-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

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

a {
	color: var(--fc-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--fc-primary-dark);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: #fff;
	color: var(--fc-primary);
	border-radius: 8px;
}

/* ===== Cabecera ===== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	border-bottom: 1px solid var(--fc-line);
}

.site-header-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	width: min(1200px, 100% - 32px);
	margin: 0 auto;
	padding: 12px 0;
}

.site-branding {
	flex: 0 0 auto;
}

.site-branding img {
	display: block;
	max-height: 56px;
	width: auto;
}

.site-title {
	color: var(--fc-primary-dark);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	text-decoration: none;
}

.site-nav {
	flex: 1 1 auto;
}

.site-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-menu a {
	color: var(--fc-text);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	padding: 6px 0;
}

.site-menu a:hover,
.site-menu .current-menu-item > a {
	color: var(--fc-primary);
}

.site-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.header-cart {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: var(--fc-primary);
	color: #fff;
	border-radius: 999px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
}

.header-cart:hover {
	background: var(--fc-primary-dark);
	color: #fff;
}

.header-cart .count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	background: rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	font-size: 12px;
}

.menu-toggle {
	display: none;
}

/* ===== Contenido ===== */
.site-main {
	min-height: 60vh;
}

.content-wrap {
	width: min(1200px, 100% - 32px);
	margin: 0 auto;
	padding: 32px 0 56px;
}

.entry {
	margin: 0 0 32px;
	padding: 28px;
	background: var(--fc-card);
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	box-shadow: var(--fc-shadow);
}

.entry-title {
	margin: 0 0 8px;
	font-size: clamp(24px, 2.4vw, 34px);
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.entry-title a {
	color: var(--fc-text);
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--fc-primary);
}

.entry-meta {
	margin-bottom: 16px;
	color: var(--fc-muted);
	font-size: 14px;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-thumb {
	display: block;
	margin: 0 0 20px;
	border-radius: var(--fc-radius);
	overflow: hidden;
}

.entry-thumb img {
	display: block;
	width: 100%;
}

.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

.posts-grid .entry {
	margin: 0;
}

.page-header {
	margin: 0 0 24px;
}

.page-header .page-title {
	margin: 0;
	font-size: clamp(26px, 3vw, 38px);
	letter-spacing: -0.02em;
}

.pagination,
.woocommerce-pagination {
	display: flex;
	justify-content: center;
	margin: 24px 0 0;
}

.pagination .nav-links,
.woocommerce-pagination ul {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pagination .page-numbers,
.woocommerce-pagination a,
.woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	background: #fff;
	border: 1px solid var(--fc-line);
	border-radius: 10px;
	color: var(--fc-text);
	text-decoration: none;
	font-weight: 600;
}

.pagination .current,
.woocommerce-pagination span.current {
	background: var(--fc-primary);
	border-color: var(--fc-primary);
	color: #fff;
}

/* ===== Páginas de contenido (legales, acerca, contacto) ===== */
.farmacia-page {
	max-width: 1000px;
	margin: 0 auto;
}

.farmacia-page-hero {
	width: 100%;
	margin: 0 0 32px;
	border-radius: var(--fc-radius);
}

.farmacia-page-intro {
	max-width: 780px;
	font-size: 18px;
	line-height: 1.7;
}

.farmacia-card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 32px 0 40px;
}

.farmacia-card {
	padding: 24px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	background: #fff;
	box-shadow: var(--fc-shadow);
}

.farmacia-card h3 {
	margin-top: 0;
}

.farmacia-card p:last-child {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.farmacia-card-grid {
		grid-template-columns: 1fr;
	}
}

/* ===== Kiosco: documento sin cabecera ===== */
.kiosko-body {
	margin: 0;
	background: #eef4f9;
}

.kiosko-body .site-header,
.kiosko-body .site-footer {
	display: none;
}

.kiosko-body .kiosko-wrap {
	min-height: 100vh;
}

/* ===== Pie ===== */
.site-footer {
	margin-top: 40px;
	background: #0d2b3e;
	color: #cfe0ea;
}

.site-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: min(1200px, 100% - 32px);
	margin: 0 auto;
	padding: 28px 0;
	font-size: 14px;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--fc-accent);
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.whatsapp-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 11px 20px;
	border-radius: 999px;
	background: #25d366;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
}

.whatsapp-btn:hover {
	opacity: 0.9;
}

.whatsapp-btn svg {
	width: 20px;
	height: 20px;
}

/* ===== WooCommerce ===== */
.woocommerce-wrap {
	padding-top: 28px;
}

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 24px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
}

.woocommerce ul.products li.product a img {
	border-radius: 10px;
	margin-bottom: 12px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px;
	line-height: 1.35;
	padding: 0;
}

.woocommerce ul.products li.product .price {
	color: var(--fc-primary-dark);
	font-weight: 700;
}

.woocommerce div.product div.images img {
	border-radius: var(--fc-radius);
}

.woocommerce div.product .product_title {
	font-size: clamp(24px, 3vw, 34px);
	line-height: 1.2;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--fc-primary-dark);
	font-weight: 800;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button {
	border-radius: 999px;
	background: var(--fc-primary);
	color: #fff;
	font-weight: 700;
	padding: 11px 20px;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background: var(--fc-primary-dark);
	color: #fff;
}

.woocommerce-cart table.cart,
.woocommerce-checkout form.checkout,
.woocommerce-account .woocommerce {
	padding: 24px;
	background: #fff;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
}

@media (max-width: 860px) {
	.site-header-inner {
		flex-wrap: wrap;
		gap: 10px 16px;
	}

	.site-nav {
		order: 3;
		flex-basis: 100%;
	}

	.site-menu {
		gap: 4px 16px;
	}

	.site-actions {
		margin-left: auto;
	}

	.entry {
		padding: 22px;
	}
}
