/*
Theme Name: Doggie Loungers Modern
Theme URI: https://doggieloungers.com/
Description: Modern redesign of Doggie Loungers, built from the approved homepage mockup. Child of Twenty Twenty-Five. Navy and white design system, Nunito type, card layouts, accessible navigation. Styles the existing page content, so pages need no rewriting.
Author: Doggie Loungers
Template: twentytwentyfive
Version: 1.0.7
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: doggieloungers-modern
*/

/* ---------- Base ---------- */
:root {
	--dlm-radius: 8px;
	--dlm-ease: 160ms ease;
}
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
img { height: auto; }
:where(a, button, input, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
	border-radius: 4px;
}
.screen-reader-text:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.dlm-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .dlm-header { top: var(--wp-admin--admin-bar--height, 0); }
.dlm-header > .alignwide { gap: 1.5rem; }
.dlm-logo {
	display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none;
	color: var(--wp--preset--color--heading); flex-shrink: 0;
}
.dlm-logo__mark { width: 44px; height: 44px; color: var(--wp--preset--color--heading); }
.dlm-logo__text {
	display: flex; flex-direction: column; line-height: 0.98;
	font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em;
}
.dlm-logo:hover { color: var(--wp--preset--color--primary); }

.dlm-nav .wp-block-navigation-item__content {
	text-decoration: none; padding: 0.5rem 0; position: relative; color: var(--wp--preset--color--heading);
}
.dlm-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--primary); }
.dlm-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--primary); }
@media (min-width: 600px) {
	.dlm-nav .current-menu-item > .wp-block-navigation-item__content::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: -0.2rem; height: 2px;
		background: var(--wp--preset--color--primary); border-radius: 2px;
	}
}
.dlm-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem clamp(1rem, 5vw, 2rem);
}
.dlm-nav .is-menu-open .wp-block-navigation-item__content { font-size: 1.25rem; padding: 0.4rem 0; }
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { padding: 0.5rem; color: var(--wp--preset--color--heading); }
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }

.dlm-search .wp-block-search__button {
	background: transparent; color: var(--wp--preset--color--heading); border: 0; padding: 0.5rem;
	margin: 0; min-width: 44px; min-height: 44px;
}
.dlm-search .wp-block-search__button svg { width: 26px; height: 26px; }
.dlm-search .wp-block-search__input {
	border: 1px solid var(--wp--preset--color--border); border-radius: 999px; padding: 0.55rem 1rem;
	font-family: inherit; font-size: 0.95rem;
}
.dlm-search.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper { border: 0; }

/* ---------- Buttons ---------- */
.dlm-btn .wp-block-button__link { display: inline-flex; align-items: center; gap: 0.6rem; }
.dlm-btn--arrow .wp-block-button__link::after {
	content: ""; width: 1em; height: 1em; flex-shrink: 0;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16h19m-7-7 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16h19m-7-7 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform var(--dlm-ease);
}
.dlm-btn--arrow .wp-block-button__link:hover::after { transform: translateX(3px); }
.dlm-btn--sm .wp-block-button__link { font-size: 0.875rem; padding: 0.65rem 1.3rem; }
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1.5px solid var(--wp--preset--color--primary); color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--base);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base);
}

/* ---------- Hero ---------- */
.dlm-hero.wp-block-cover { padding-top: 3rem; padding-bottom: 3rem; }
.dlm-hero.wp-block-cover::before {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(90deg, rgba(12, 30, 52, .78) 0%, rgba(12, 30, 52, .55) 38%, rgba(12, 30, 52, 0) 68%);
}
.dlm-hero .wp-block-cover__inner-container { z-index: 2; }
.dlm-hero__content { max-width: 34rem; color: #fff; }
.dlm-eyebrow {
	font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
	margin: 0 0 1rem; color: #fff;
}
.dlm-hero__title { color: #fff !important; font-size: var(--wp--preset--font-size--xx-large); line-height: 1.08; margin: 0; }
.dlm-hero__text { font-size: 1.125rem; line-height: 1.55; margin: 1.1rem 0 1.75rem; max-width: 28rem; color: #fff; }
.dlm-hero .wp-block-button__link { padding: 0.95rem 1.7rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }

/* ---------- Benefits strip ---------- */
.dlm-benefits__grid { gap: 0 !important; margin: 0; }
.dlm-benefit { text-align: center; padding: 0.5rem 1rem; }
.dlm-benefit + .dlm-benefit { border-left: 1px solid #d5dfeb; }
.dlm-benefit__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; border-radius: 50%;
	background: var(--wp--preset--color--primary); color: #fff; margin-bottom: 0.75rem;
}
.dlm-benefit__icon .dlm-icon { width: 30px; height: 30px; }
.dlm-benefit__title { font-size: 1.0625rem; margin: 0 0 0.25rem; color: var(--wp--preset--color--heading); }
.dlm-benefit__text { font-size: 0.9375rem; color: var(--wp--preset--color--muted); margin: 0 auto; max-width: 15rem; line-height: 1.45; }

/* ---------- Section heads ---------- */
.dlm-section__head { margin-bottom: 1.75rem; gap: 1rem 2rem; }
.dlm-section__head h2 { margin: 0; }
.dlm-section__sub { margin: 0.35rem 0 0; color: var(--wp--preset--color--muted); font-size: 1.0625rem; }

/* ---------- Featured cards ---------- */
.dlm-cards { gap: 1.25rem; }
.dlm-card { display: flex; flex-direction: column; gap: 0; }
.dlm-card__media { margin: 0 0 1rem; border-radius: var(--dlm-radius); overflow: hidden; background: var(--wp--preset--color--panel); aspect-ratio: 4 / 3; }
.dlm-card__media a, .dlm-card__media img { display: block; width: 100%; height: 100%; }
.dlm-card__media img { object-fit: cover; transition: transform 300ms ease; }
.dlm-card:hover .dlm-card__media img { transform: scale(1.03); }
.dlm-card__title { font-size: 1.0625rem; margin: 0 0 0.35rem; padding: 0 0.25rem; }
.dlm-card__text { font-size: 0.9375rem; color: var(--wp--preset--color--muted); margin: 0 0 0.75rem; padding: 0 0.25rem; line-height: 1.5; }
.dlm-card__link { margin: auto 0 0; padding: 0 0.25rem; }
.dlm-card__link a, .dlm-text-link {
	font-weight: 700; font-size: 0.9375rem; text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem;
}
.dlm-card__link a::after {
	content: "\2192"; transition: transform var(--dlm-ease);
}
.dlm-card__link a:hover { text-decoration: underline; }
.dlm-card__link a:hover::after { transform: translateX(3px); }

/* ---------- Product tiles ---------- */
.dlm-tiles { gap: 1rem; }
.dlm-tile {
	display: flex; flex-direction: column; background: #fff; border-radius: var(--dlm-radius);
	overflow: hidden; text-decoration: none; box-shadow: var(--wp--preset--shadow--card);
	transition: transform var(--dlm-ease), box-shadow var(--dlm-ease);
}
.dlm-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(23, 55, 94, .12); }
.dlm-tile__media { display: block; aspect-ratio: 5 / 4; background: var(--wp--preset--color--panel); }
.dlm-tile__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlm-tile__label {
	display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
	padding: 0.75rem 0.85rem; font-size: 0.875rem; font-weight: 700; color: var(--wp--preset--color--heading);
}
.dlm-tile__label .dlm-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--wp--preset--color--primary); }

/* ---------- CTA band ---------- */
.dlm-cta { position: relative; overflow: hidden; }
.dlm-cta__inner { gap: 1.25rem 2rem; }
.dlm-cta__msg { gap: 1.25rem; }
.dlm-cta__paw { width: 56px; height: 56px; color: #fff; flex-shrink: 0; }
.dlm-cta__title { font-size: 1.375rem; margin: 0; }
.dlm-cta__text { margin: 0.2rem 0 0; font-size: 1rem; color: #e6edf6; }
.dlm-cta .wp-block-button__link:hover { background: var(--wp--preset--color--tint) !important; }

/* ---------- Footer ---------- */
.dlm-footer { font-size: 0.9375rem; }
.dlm-footer a { color: #e6edf6; text-decoration: none; }
.dlm-footer a:hover { color: #fff; text-decoration: underline; }
.dlm-footer .dlm-logo, .dlm-footer .dlm-logo__mark { color: #fff; }
.dlm-footer__brand p { color: #c9d6e6; max-width: 17rem; margin-top: 0.75rem; }
.dlm-footer__title { color: #fff !important; font-size: 1rem; font-weight: 700; margin: 0.25rem 0 0.9rem; letter-spacing: 0; }
.dlm-footer__list { list-style: none; margin: 0; padding: 0; }
.dlm-footer__list li { margin: 0 0 0.5rem; color: #e6edf6; }
.dlm-contact li { display: flex; align-items: center; gap: 0.6rem; }
.dlm-contact svg { width: 18px; height: 18px; flex-shrink: 0; color: #fff; }
.dlm-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 2rem; padding-top: 1.1rem;
	font-size: 0.8125rem; color: #c9d6e6;
}

/* ---------- Inner pages: existing content restyled ---------- */
.dlm-page h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 1rem; text-align: left; font-style: normal; }
.dlm-content > * + * { margin-block-start: 1.1rem; }
.dlm-content h2 { font-size: 1.4rem; margin-top: 2rem; }
.dlm-content p, .dlm-content li { font-size: 1.0625rem; color: var(--wp--preset--color--contrast); }
.dl-small { font-size: 0.875rem; }
.dl-center, .dlm-content .dl-center { text-align: center; }
.dl-title { font-weight: 700; color: var(--wp--preset--color--heading); }
.dl-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.dl-catalog-note {
	background: var(--wp--preset--color--tint); border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 6px; padding: 0.85rem 1.1rem; font-size: 0.9375rem !important; color: var(--wp--preset--color--heading) !important;
}

/* Other Products blurbs as cards */
.dl-product {
	display: grid; grid-template-columns: 140px 1fr; gap: 0.25rem 1.25rem; align-items: start;
	border: 1px solid var(--wp--preset--color--border); border-radius: var(--dlm-radius);
	padding: 1.1rem; background: #fff; box-shadow: var(--wp--preset--shadow--card);
}
.dl-product > * { margin: 0 !important; }
.dl-product .wp-block-image { grid-row: 1 / span 3; width: 140px; }
.dl-product .wp-block-image img { width: 140px !important; height: 140px; object-fit: contain; background: var(--wp--preset--color--panel); border-radius: 6px; }
.dl-product h2 { font-size: 1.2rem; margin: 0.1rem 0 0.35rem !important; }
.dl-product p { font-size: 1rem; }
.dl-product .alignright { float: none; margin: 0; }

/* Price and catalog tables */
.dlm-content .wp-block-table { margin-top: 0.5rem; overflow-x: auto; }
.dlm-content .wp-block-table table { width: 100%; border-collapse: collapse; border: 1px solid var(--wp--preset--color--border); border-radius: var(--dlm-radius); overflow: hidden; }
.dlm-content .wp-block-table th {
	background: var(--wp--preset--color--primary); color: #fff; text-align: left; font-weight: 700;
	padding: 0.65rem 0.9rem; border: 0; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.dlm-content .wp-block-table td { padding: 0.65rem 0.9rem; border: 0; border-top: 1px solid var(--wp--preset--color--border); }
.dlm-content .wp-block-table tbody tr:nth-child(even) td { background: var(--wp--preset--color--tint); }
.dlm-content .wp-block-table td:last-child { font-weight: 700; color: var(--wp--preset--color--heading); white-space: nowrap; }
.dlm-content .dl-catalog-table tr:target td { background: #fff4cc !important; }
.dlm-content .dl-price-heading { text-align: left !important; font-size: 1.2rem; margin-top: 2.25rem; }

/* Catalog grids and tiles */
.dl-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.dl-catalog-grid > * { margin: 0 !important; }
.dl-catalog-grid .wp-block-image { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: var(--dlm-radius); overflow: hidden; }
.dl-catalog-grid .wp-block-image img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.dl-catalog-grid figcaption { font-size: 0.8125rem; padding: 0.5rem 0.6rem; margin: 0; color: var(--wp--preset--color--heading); font-weight: 600; }
.dl-catalog-item {
	border: 1px solid var(--wp--preset--color--border); border-radius: var(--dlm-radius); background: #fff;
	box-shadow: var(--wp--preset--shadow--card); overflow: hidden; transition: transform var(--dlm-ease);
}
.dl-catalog-item:hover { transform: translateY(-2px); }
.dl-catalog-item a { display: block; text-decoration: none; padding-bottom: 0.75rem; }
.dl-catalog-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--wp--preset--color--panel); }
.dl-catalog-item p { margin: 0.6rem 0.75rem 0 !important; text-align: left !important; font-size: 0.9375rem !important; color: var(--wp--preset--color--heading); }
.dl-catalog-item > p { color: var(--wp--preset--color--muted); font-size: 0.8125rem !important; margin-bottom: 0.75rem !important; margin-top: -0.5rem !important; }

/* Lounger photo swapper */
.dl-swap { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr; gap: 1.5rem; align-items: start; }
.dl-swap-target { margin: 0; border-radius: var(--dlm-radius); overflow: hidden; background: var(--wp--preset--color--panel); }
.dl-swap-target img { width: 100%; display: block; }
.dl-swap-buttons p { font-weight: 700; color: var(--wp--preset--color--heading); margin: 0 0 0.5rem; }
.dl-swap-buttons button {
	display: flex; align-items: center; width: 100%; min-height: 44px; margin: 0 0 0.5rem; padding: 0.4rem 0.75rem;
	background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 999px; cursor: pointer;
}
.dl-swap-buttons button:hover, .dl-swap-buttons button[aria-pressed="true"] { border-color: var(--wp--preset--color--primary); background: var(--wp--preset--color--tint); }

/* Slideshow galleries (if used in page content) */
.dl-slideshow { max-width: 420px; }

/* Awards, links, checkers */
.dlm-content .wp-block-columns { gap: 1.5rem; }
.dl-checkers { text-align: center; }
.dl-checkers table { margin: 0 auto; border-collapse: collapse; }
.dl-checkers table td { line-height: 0; font-size: 0; padding: 0; }
.dl-checkers img { display: inline-block; vertical-align: top; }
.dl-checkers textarea { font-family: inherit; font-size: 0.95rem; max-width: 100%; border-radius: 6px; border: 1px solid var(--wp--preset--color--border); padding: 0.5rem; }
.dl-checkers input[type="button"] {
	font-family: inherit; font-weight: 700; color: #fff; background: var(--wp--preset--color--primary);
	border: 0; border-radius: 999px; padding: 0.6rem 1.3rem; cursor: pointer;
}

/* Search results */
.dlm-results { list-style: none; padding: 0; }
.dlm-results > li { padding: 1rem 0; border-bottom: 1px solid var(--wp--preset--color--border); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.dlm-nav { --wp--style--block-gap: 1.25rem; }
}
@media (max-width: 781px) {
	.dlm-benefits__grid { flex-wrap: wrap !important; }
	.dlm-benefit { flex-basis: 50% !important; padding: 1rem 0.5rem; }
	.dlm-benefit + .dlm-benefit { border-left: 0; }
	.dlm-benefit:nth-child(even) { border-left: 1px solid #d5dfeb; }
	.dlm-benefit:nth-child(n+3) { border-top: 1px solid #d5dfeb; }
	.dlm-hero.wp-block-cover { min-height: 420px !important; }
	.dlm-hero.wp-block-cover::before { background: linear-gradient(180deg, rgba(12, 30, 52, .2) 0%, rgba(12, 30, 52, .78) 70%); }
	.dlm-hero .wp-block-cover__inner-container { align-self: flex-end; }
	.dlm-footer__cols { gap: 1.75rem; }
	.dl-swap { grid-template-columns: 1fr; }
	.dl-product { grid-template-columns: 96px 1fr; }
	.dl-product .wp-block-image, .dl-product .wp-block-image img { width: 96px !important; height: 96px; }
}
@media (max-width: 480px) {
	.dlm-logo__text { font-size: 1.3rem; }
	.dlm-logo__mark { width: 38px; height: 38px; }
	.dlm-hero__text { font-size: 1rem; }
	.dlm-cta__msg { flex-wrap: wrap !important; }
	.dl-product { grid-template-columns: 1fr; }
	.dl-product .wp-block-image { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Layout fixes from first preview review ---------- */
/* Hero text aligns with the 1200px page container, as in the mockup. */
.dlm-hero .wp-block-cover__inner-container {
	width: 100% !important; max-width: 1200px; margin-inline: auto !important;
	padding-inline: clamp(1rem, 4vw, 2rem); box-sizing: border-box;
}
/* Exactly 4 featured cards and 7 product tiles per row on desktop. */
.dlm-cards.is-layout-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.dlm-tiles.is-layout-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
/* Uniform tile and card image crops. */
.dlm-tile__media { overflow: hidden; }
.dlm-tile__media img, .dlm-card__media img { aspect-ratio: inherit; width: 100%; height: 100% !important; object-fit: cover; }
.dlm-card__media img { aspect-ratio: 4 / 3; }
.dlm-tile__media img { aspect-ratio: 5 / 4; }
@media (max-width: 1024px) {
	.dlm-tiles.is-layout-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
	.dlm-cards.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) {
	.dlm-tiles.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 380px) {
	.dlm-cards.is-layout-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
/* Hero text block sits on the left of the container (constrained layout would centre it). */
.dlm-hero .wp-block-cover__inner-container > .dlm-hero__content { margin-left: 0 !important; margin-right: auto !important; }

/* ---------- Responsive fixes from mobile/tablet review ---------- */
/* Header: menu button and search sit together on the right. */
@media (max-width: 1023px) {
	.dlm-nav { flex: 0 0 auto !important; margin-left: auto; }
	.dlm-header > .alignwide { gap: 0.25rem; }
}
/* Collapse the navigation into the menu button below 1024px (core only collapses below 600px). */
@media (min-width: 600px) and (max-width: 1023px) {
	.dlm-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.dlm-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
/* Benefits strip: 2 x 2 grid on small screens. */
@media (max-width: 781px) {
	.dlm-benefits__grid.wp-block-columns { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dlm-benefit.wp-block-column { flex-basis: auto !important; }
}
@media (max-width: 340px) {
	.dlm-benefits__grid.wp-block-columns { grid-template-columns: minmax(0, 1fr); }
	.dlm-benefit:nth-child(even) { border-left: 0 !important; }
	.dlm-benefit + .dlm-benefit { border-top: 1px solid #d5dfeb; }
}
