/*
Theme Name: Adom Summit
Theme URI: https://example.com/adom-summit
Author: Adom Summit Pharmacy
Description: Custom theme for Adom Summit Pharmacy — "For the health of the community". Built for Elementor with a Full Width (Header + Footer) page template, prescription-first navigation and a navy, gold and red identity drawn from the logo. Pair with the Adom Summit Core plugin for the Elementor widgets, prescription uploads and schema.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adom-summit
Tags: custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready, blog
*/

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
	--asp-navy: #214986;
	--asp-night: #0e2341;
	--asp-gold: #e0cb70;
	--asp-gold-soft: #f3ead0;
	--asp-red: #c8102e;
	--asp-red-dark: #a00d24;
	--asp-ice: #f3f6fb;
	--asp-white: #ffffff;
	--asp-text: #1b2a44;
	--asp-muted: #4e5d75;
	--asp-line: #dbe2ee;
	--asp-font: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
	--asp-wrap: 1220px;
	--asp-gutter: clamp(16px, 4vw, 40px);
	--asp-r-sm: 6px;
	--asp-r-md: 14px;
	--asp-r-lg: 28px;
	--asp-shadow: 0 18px 40px -24px rgba(14, 35, 65, 0.45);
	--asp-header-h: 84px;
}

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

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

body {
	margin: 0;
	font-family: var(--asp-font);
	font-size: 17px;
	line-height: 1.6;
	color: var(--asp-text);
	background: var(--asp-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--asp-navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--asp-red); }

:focus-visible { outline: 3px solid var(--asp-gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--asp-font);
	color: var(--asp-night);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0 0 0.5em;
	font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }

hr { border: 0; border-top: 1px solid var(--asp-line); margin: 2.5em 0; }

blockquote {
	margin: 1.8em 0;
	padding: 0.4em 0 0.4em 1.4em;
	border-left: 4px solid var(--asp-gold);
	font-size: 1.2em;
	color: var(--asp-night);
}

table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
th, td { padding: 0.7em 0.9em; border-bottom: 1px solid var(--asp-line); text-align: left; }
th { color: var(--asp-night); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="search"], input[type="password"], input[type="number"], textarea, select {
	width: 100%;
	font: inherit;
	color: var(--asp-text);
	background: #fff;
	border: 1.5px solid var(--asp-line);
	border-radius: var(--asp-r-sm);
	padding: 0.75em 0.9em;
	transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--asp-navy); box-shadow: 0 0 0 3px rgba(33, 73, 134, 0.15); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important;
	width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: var(--asp-night);
	display: block; font-weight: 700; height: auto; left: 8px; padding: 12px 18px; top: 8px; width: auto; z-index: 100000;
}

.as-wrap { max-width: var(--asp-wrap); margin: 0 auto; padding-left: var(--asp-gutter); padding-right: var(--asp-gutter); }

/* Buttons (theme-level; widgets use the same look) */
.as-btn, .wp-block-button__link, button.as-btn, input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	font: 600 1rem/1 var(--asp-font);
	padding: 0.95em 1.45em;
	border-radius: 999px;
	border: 2px solid transparent;
	background: var(--asp-navy);
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.as-btn:hover, input[type="submit"]:hover { background: var(--asp-night); color: #fff; }
.as-btn--rx { background: var(--asp-red); }
.as-btn--rx:hover { background: var(--asp-red-dark); }
.as-btn--ghost { background: transparent; color: var(--asp-navy); border-color: currentColor; }
.as-btn--ghost:hover { background: var(--asp-navy); color: #fff; border-color: var(--asp-navy); }
.as-btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* ------------------------------------------------------------------
   Top bar + header
------------------------------------------------------------------ */
.as-topbar {
	background: var(--asp-night);
	color: #c9d4e6;
	font-size: 0.86rem;
}
.as-topbar .as-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 40px;
}
.as-topbar a { color: #fff; text-decoration: none; }
.as-topbar a:hover { color: var(--asp-gold); }
.as-topbar__items { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.as-topbar__item { display: inline-flex; align-items: center; gap: 0.45em; }
.as-topbar__item svg { width: 15px; height: 15px; color: var(--asp-gold); }
.as-topbar__licence { color: #9fb0cc; }

.as-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.97);
	border-bottom: 1px solid var(--asp-line);
	transition: box-shadow 0.2s;
}
.admin-bar .as-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .as-header { top: 0; } }
.as-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(14, 35, 65, 0.5); }
.as-header .as-wrap {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: var(--asp-header-h);
}

.as-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--asp-night); margin-right: auto; }
.as-brand img, .as-brand .custom-logo { width: auto; height: 52px; max-height: 52px; }
.as-brand .custom-logo-link { display: block; }
.as-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.as-brand__name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--asp-night); }
.as-brand__tagline { font-size: 0.82rem; color: var(--asp-muted); }

.as-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.3rem; }
.as-nav li { position: relative; }
.as-nav ul a {
	white-space: nowrap;
	display: block;
	padding: 0.55em 0.85em;
	color: var(--asp-text);
	text-decoration: none;
	font-weight: 500;
	border-radius: var(--asp-r-sm);
}
.as-nav ul a:hover, .as-nav .current-menu-item > a, .as-nav .current_page_item > a { color: var(--asp-navy); background: var(--asp-ice); }
.as-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--asp-line);
	border-radius: var(--asp-r-md);
	padding: 0.4rem;
	box-shadow: var(--asp-shadow);
}
.as-nav li:hover > .sub-menu, .as-nav li:focus-within > .sub-menu { display: flex; }

.as-header__actions { display: flex; align-items: center; gap: 0.6rem; }
.as-header__cart.asp-cart-btn { flex: none; }
.as-header__cta { padding: 0.8em 1.2em; }

.as-burger {
	display: none;
	width: 46px; height: 46px;
	border: 1.5px solid var(--asp-line);
	background: #fff; border-radius: 50%;
	cursor: pointer; color: var(--asp-night);
	align-items: center; justify-content: center;
}
.as-burger svg { width: 22px; height: 22px; }

@media (max-width: 1080px) {
	.as-burger { display: inline-flex; }
	.as-nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(86vw, 360px);
		background: #fff;
		padding: 90px 22px 30px;
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
		z-index: 60;
		overflow-y: auto;
		box-shadow: -20px 0 60px -30px rgba(14, 35, 65, 0.6);
	}
	.as-nav.is-open { transform: none; visibility: visible; transition: transform 0.25s ease; }
	.as-nav ul { flex-direction: column; }
	.as-nav ul a {
	white-space: nowrap; padding: 0.85em 0.6em; font-size: 1.1rem; border-bottom: 1px solid var(--asp-line); border-radius: 0; }
	.as-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem; }
	.as-nav__close {
		position: absolute; top: 22px; right: 22px;
		width: 46px; height: 46px; border-radius: 50%;
		border: 1.5px solid var(--asp-line); background: #fff; cursor: pointer;
		display: inline-flex; align-items: center; justify-content: center; color: var(--asp-night);
	}
	.as-nav__close svg { width: 20px; height: 20px; }
	.as-nav-overlay {
		position: fixed; inset: 0; background: rgba(14, 35, 65, 0.45); z-index: 55;
		opacity: 0; pointer-events: none; transition: opacity 0.2s;
	}
	.as-nav-overlay.is-open { opacity: 1; pointer-events: auto; }
	.as-nav__mobile-cta { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
}
@media (min-width: 1081px) {
	.as-nav__close, .as-nav-overlay, .as-nav__mobile-cta { display: none; }
}
@media (max-width: 720px) {
	.as-topbar__licence, .as-topbar__hours { display: none; }
	.as-header__cta { display: none; }
	.as-brand__tagline { display: none; }
	.as-brand img, .as-brand .custom-logo { height: 42px; }
	:root { --asp-header-h: 70px; }
}

/* ------------------------------------------------------------------
   Page shells
------------------------------------------------------------------ */
.site-main { display: block; }
.site-main--full { width: 100%; max-width: none; padding: 0; }
.site-main--full > .entry-content > *:first-child { margin-top: 0; }

.as-pagehead {
	background: var(--asp-ice);
	border-bottom: 1px solid var(--asp-line);
	padding: clamp(48px, 7vw, 92px) 0 clamp(36px, 5vw, 60px);
	position: relative;
	overflow: hidden;
}
.as-pagehead::after {
	/* the sun from the logo, quietly cropped into the corner */
	content: "";
	position: absolute;
	width: 340px; height: 340px;
	border-radius: 50%;
	background: var(--asp-gold);
	opacity: 0.35;
	right: -110px; top: -150px;
}
.as-pagehead .as-wrap { position: relative; z-index: 1; }
.as-pagehead h1 { max-width: 18ch; margin-bottom: 0.3em; }
.as-pagehead__lede { color: var(--asp-muted); font-size: 1.15rem; max-width: 62ch; margin: 0; }
.as-crumbs { font-size: 0.9rem; color: var(--asp-muted); margin-bottom: 1.2rem; }
.as-crumbs a { color: var(--asp-muted); }

.as-content { padding: clamp(40px, 6vw, 80px) 0; }
.as-content--narrow .as-wrap { max-width: 820px; }

.entry-content > * { max-width: 72ch; }
.entry-content > .alignwide { max-width: 1100px; }
.entry-content > .alignfull,
.entry-content > .elementor,
.entry-content--full > * { max-width: none; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content img { border-radius: var(--asp-r-md); }
.entry-content .wp-caption-text, .entry-content figcaption { font-size: 0.9rem; color: var(--asp-muted); margin-top: 0.5em; }
.alignleft { float: left; margin: 0.3em 1.6em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.6em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.sticky, .bypostauthor, .gallery-caption { outline: 0; }

/* Elementor pages that use the default template still get breathing room */
.page-template-default .elementor { margin: 0 calc(-1 * var(--asp-gutter)); }

/* ------------------------------------------------------------------
   Blog
------------------------------------------------------------------ */
.as-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); }
.as-layout--single { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 960px) { .as-layout, .as-layout--single { grid-template-columns: 1fr; } }

.as-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
@media (max-width: 680px) { .as-posts { grid-template-columns: 1fr; } }

.as-post-card { display: flex; flex-direction: column; }
.as-post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--asp-r-md); background: var(--asp-ice); margin-bottom: 1.1rem; }
.as-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.as-post-card__meta { font-size: 0.88rem; color: var(--asp-muted); margin-bottom: 0.4rem; }
.as-post-card__title { font-size: 1.35rem; margin-bottom: 0.45rem; }
.as-post-card__title a { color: var(--asp-night); text-decoration: none; }
.as-post-card__title a:hover { color: var(--asp-navy); text-decoration: underline; }
.as-post-card__excerpt { color: var(--asp-muted); }
.as-post-card__excerpt p { margin: 0; }

.as-single__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--asp-muted); font-size: 0.95rem; }
.as-single__thumb { margin: 0 0 2.4rem; border-radius: var(--asp-r-lg); overflow: hidden; }
.as-single__thumb img { width: 100%; }
.as-single__tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.as-single__tags a { font-size: 0.88rem; padding: 0.35em 0.85em; border: 1px solid var(--asp-line); border-radius: 999px; text-decoration: none; color: var(--asp-muted); }
.as-single__tags a:hover { border-color: var(--asp-navy); color: var(--asp-navy); }

.as-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; border-top: 1px solid var(--asp-line); padding-top: 1.5rem; }
.as-postnav a { text-decoration: none; display: block; }
.as-postnav span { display: block; font-size: 0.85rem; color: var(--asp-muted); }
.as-postnav strong { color: var(--asp-night); }
.as-postnav .nav-next { text-align: right; }

.as-pagination { margin-top: 3rem; }
.as-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.as-pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 0.8em;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--asp-line); border-radius: 999px;
	text-decoration: none; color: var(--asp-text);
}
.as-pagination .page-numbers.current { background: var(--asp-navy); border-color: var(--asp-navy); color: #fff; }

/* Sidebar */
.as-sidebar .widget { margin-bottom: 2.2rem; }
.as-sidebar .widget-title, .as-sidebar h2 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.as-sidebar ul { list-style: none; padding: 0; margin: 0; }
.as-sidebar li { padding: 0.5em 0; border-bottom: 1px solid var(--asp-line); }
.as-sidebar a { text-decoration: none; color: var(--asp-text); }
.as-sidebar a:hover { color: var(--asp-navy); }

.as-rx-card {
	background: var(--asp-night);
	color: #d6deeb;
	padding: 28px;
	border-radius: var(--asp-r-lg);
	position: relative;
	overflow: hidden;
}
.as-rx-card::before {
	content: "";
	position: absolute; right: -56px; top: -56px;
	width: 120px; height: 120px; border-radius: 50%;
	background: var(--asp-gold);
}
.as-rx-card > * { position: relative; }
.as-rx-card h3 { color: #fff; font-size: 1.35rem; max-width: 12ch; }
.as-rx-card p { font-size: 0.98rem; }
.as-rx-card .as-btn { width: 100%; margin-top: 0.4rem; }
.as-sidebar .as-btn, .as-sidebar .as-btn:hover, .as-footer .as-btn, .as-footer .as-btn:hover { color: #fff; }

/* Search form */
.as-search { display: flex; gap: 0.5rem; }
.as-search input[type="search"] { flex: 1; border-radius: 999px; padding-left: 1.1em; }
.as-search button { flex: none; }

/* Comments */
.comments-area { margin-top: 3.5rem; border-top: 1px solid var(--asp-line); padding-top: 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.6rem; }
.comment-body { padding: 1.2rem 0; border-bottom: 1px solid var(--asp-line); }
.comment-meta { font-size: 0.9rem; color: var(--asp-muted); margin-bottom: 0.5rem; }
.comment-author img { border-radius: 50%; float: left; margin-right: 0.8rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }

/* Services archive / single (from the plugin's Service post type) */
.as-services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--asp-line); border-left: 1px solid var(--asp-line); }
@media (max-width: 960px) { .as-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .as-services-grid { grid-template-columns: 1fr; } }
.as-service-tile { padding: 32px 28px; border-right: 1px solid var(--asp-line); border-bottom: 1px solid var(--asp-line); display: flex; flex-direction: column; }
.as-service-tile h2 { font-size: 1.35rem; }
.as-service-tile h2 a { color: var(--asp-night); text-decoration: none; }
.as-service-tile h2 a:hover { color: var(--asp-navy); text-decoration: underline; }
.as-service-tile p { color: var(--asp-muted); }
.as-service-tile__more { margin-top: auto; font-weight: 600; }
.as-service-tile__badge { align-self: flex-start; font-size: 0.82rem; font-weight: 600; color: var(--asp-night); background: var(--asp-gold-soft); padding: 0.25em 0.75em; border-radius: 999px; margin-bottom: 1rem; }
.as-service-thumb { border-radius: var(--asp-r-lg); overflow: hidden; margin-bottom: 2rem; aspect-ratio: 16/8; }
.as-service-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 404 */
.as-404 { padding: clamp(60px, 10vw, 140px) 0; }
.as-404__code { font-size: clamp(5rem, 16vw, 11rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; color: var(--asp-navy); margin: 0 0 1rem; }
.as-404 .as-search { max-width: 480px; margin: 2rem 0; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.as-footer {
	background: var(--asp-night);
	color: #b8c5da;
	font-size: 0.97rem;
	position: relative;
	overflow: hidden;
}
.as-footer::before {
	/* the two white stripes of the logo, stretched into a quiet watermark */
	content: "";
	position: absolute;
	right: -4%;
	bottom: -10%;
	width: 420px;
	height: 520px;
	background: linear-gradient(60deg, transparent 0 46%, rgba(255,255,255,0.05) 46% 54%, transparent 54% 62%, rgba(255,255,255,0.05) 62% 70%, transparent 70%);
	pointer-events: none;
}
.as-footer a { color: #e6ecf5; text-decoration: none; }
.as-footer a:hover { color: var(--asp-gold); }
.as-footer__main { padding: clamp(56px, 7vw, 88px) 0 40px; position: relative; }
.as-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1fr; gap: 40px; }
@media (max-width: 960px) { .as-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .as-footer__grid { grid-template-columns: 1fr; } }
.as-footer h2 { color: #fff; font-size: 1.05rem; letter-spacing: -0.01em; margin-bottom: 1rem; }
.as-footer__brand img { height: 56px; width: auto; margin-bottom: 1rem; background: #fff; border-radius: 12px; padding: 6px; }
.as-footer__name { color: #fff; font-size: 1.35rem; font-weight: 700; margin: 0 0 0.2rem; letter-spacing: -0.02em; }
.as-footer__tagline { color: var(--asp-gold); margin: 0 0 1rem; }
.as-footer ul { list-style: none; margin: 0; padding: 0; }
.as-footer li { margin-bottom: 0.55rem; }
.as-footer__contact li { display: flex; gap: 0.6rem; align-items: flex-start; }
.as-footer__contact svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--asp-gold); }
.as-footer__licence { font-size: 0.88rem; color: #8c9cb8; margin-top: 1rem; }
.as-footer__social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.as-footer__social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: inline-flex; align-items: center; justify-content: center; }
.as-footer__social a:hover { border-color: var(--asp-gold); }
.as-footer__social svg { width: 18px; height: 18px; }
.as-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; font-size: 0.88rem; color: #8c9cb8; position: relative; }
.as-footer__bottom .as-wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.as-footer__bottom ul { display: flex; gap: 1.2rem; }

/* Floating WhatsApp */
.as-wa-float {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 40;
	width: 58px; height: 58px;
	border-radius: 50%;
	background: #1f9d55;
	color: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	box-shadow: 0 14px 30px -12px rgba(14, 35, 65, 0.6);
}
.as-wa-float:hover { background: #17834a; color: #fff; }
.as-wa-float svg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
	.as-topbar, .as-header, .as-footer, .as-wa-float { display: none; }
}
