/*
Theme Name: Petthinker
Author: Petthinker
Description: An editorial habitat product catalogue and trade enquiry theme.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: petthinker
*/

:root {
  --ink: #1e2922;
  --muted: #515b53;
  --forest: #294635;
  --forest-dark: #1b3428;
  --porcelain: #fbfaf6;
  --line: #d9dcd3;
  --gutter: clamp(1.35rem, 6.1vw, 6.5rem);
  --header-height: 4.75rem;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 1rem); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--porcelain);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body, input, textarea, select, button { font-size: 1rem; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .form-status:focus {
  outline: 3px solid #be762f;
  outline-offset: 4px;
}
::selection { color: white; background: #49624d; }
.wrap { width: min(83rem, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 1000; top: .65rem; left: .65rem; padding: .75rem 1.2rem; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid #dedfd6;
  background: #fcfbf8;
}
.admin-bar .site-header { top: 32px; }
.header-inner { height: var(--header-height); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: .6rem; width: fit-content; color: var(--forest-dark); font-size: 1.65rem; font-weight: 700; line-height: 1; letter-spacing: -.076em; }
.brand-mark { position: relative; display: inline-block; width: 1.72rem; height: 1.8rem; flex: none; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 1.11rem; height: 1.15rem; border: .185rem solid currentColor; border-radius: .42rem .4rem .4rem .06rem; background: #fcfbf8; }
.brand-mark::before { top: .57rem; left: .04rem; }
.brand-mark::after { top: .06rem; right: .05rem; }
.desktop-nav { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 3rem); }
.desktop-nav a, .mobile-menu nav a { color: #3c493e; font-size: .93rem; font-weight: 500; }
.desktop-nav a { padding-block: .7rem; }
.desktop-nav a:hover, .mobile-menu nav a:hover { color: #172c1d; text-decoration: underline; text-underline-offset: .33rem; }
.nav-actions { display: flex; align-items: center; justify-self: end; gap: .5rem; }
.button {
  display: inline-flex; min-height: 3rem; padding: .76rem 1.48rem; justify-content: center; align-items: center; width: fit-content;
  border: 1px solid transparent; border-radius: 2.5rem; background: var(--forest); color: white;
  font-size: .94rem; line-height: 1.3; font-weight: 600; text-align: center;
}
.button:hover { background: #1c3426; }
.header-enquiry { min-height: 2.55rem; padding: .57rem 1.13rem; font-size: .875rem; }
.mobile-menu { position: relative; display: none; }
.mobile-menu summary { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.menu-glyph, .menu-glyph::before { display: block; width: 1.18rem; height: 2px; background: var(--forest); }
.menu-glyph { position: relative; transform: translateY(3px); }
.menu-glyph::before { content: ""; position: absolute; bottom: 6px; }
.mobile-menu[open] .menu-glyph { transform: rotate(45deg); }
.mobile-menu[open] .menu-glyph::before { bottom: 0; transform: rotate(90deg); }
.mobile-menu nav { position: absolute; right: 0; top: calc(100% + .35rem); min-width: 10.5rem; padding: .5rem; background: var(--porcelain); border: 1px solid var(--line); border-radius: .7rem; box-shadow: 0 .65rem 2rem #1e2b201a; }
.mobile-menu nav a { display: block; padding: .7rem .85rem; border-radius: .3rem; }

.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(36rem, 48vw, 48rem); overflow: hidden; background: #ede9e2; }
.hero-picture { position: absolute; inset: 0; z-index: -2; display: block; }
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: 65% center; }
.hero-picture.default-wide { left: auto; right: clamp(-7rem, calc(13vw - 10.5rem), 0rem); width: auto; height: 100%; aspect-ratio: 3 / 2; mask-image: linear-gradient(90deg, transparent, black 18%); }
.hero-picture.default-wide img { object-fit: contain; object-position: right center; }
.hero::before { position: absolute; inset: 0; z-index: -1; content: ""; pointer-events: none; background: linear-gradient(90deg, #f1eee7 0%, #f1eee7f5 18%, #f1eee7db 30%, #f1eee77a 43%, transparent 60%); }
.hero-inner { padding-block: 4.5rem; }
.hero-copy { width: min(45%, 33rem); }
.eyebrow { display: flex; align-items: center; gap: .7rem; color: var(--forest); font-size: .78rem; font-weight: 650; line-height: 1.4; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow-rule { display: inline-block; width: 1.8rem; height: 1px; flex: none; background: currentColor; }
.hero h1 { margin: .25em 0 .22em -.055em; font-size: clamp(5.5rem, 8.3vw, 9.15rem); font-weight: 500; letter-spacing: -.074em; line-height: .9; }
.hero h1 em, .contact-copy h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.hero h1 em { color: #38523d; font-size: 1.055em; letter-spacing: -.071em; }
.hero-description { max-width: 24rem; color: #404a41; font-size: clamp(1.05rem, 1.36vw, 1.23rem); line-height: 1.53; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.45rem; margin-top: 1.85rem; }
.text-link { width: fit-content; color: var(--forest); font-size: .95rem; font-weight: 600; text-decoration: underline; text-decoration-color: #829383; text-underline-offset: .32rem; }
.text-link:hover { text-decoration-color: currentColor; }
.section { padding-block: clamp(4.15rem, 7.9vw, 8rem); }
.section-heading { margin-bottom: clamp(1.85rem, 3.2vw, 3rem); }
.section-heading .eyebrow, .contact-copy .eyebrow, .product-intro .eyebrow { margin-bottom: .95rem; }
.section-heading h1, .section-heading h2, .product-overview h2, .standard-page h1 { font-size: clamp(2.65rem, 5.15vw, 5.15rem); font-weight: 500; letter-spacing: -.068em; line-height: 1.02; }
.section-note { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; }

.design-viewer { display: grid; grid-template-columns: 1.24fr 1fr; overflow: hidden; border-radius: 1rem; background: #ecede5; }
.detail-photo { position: relative; min-height: clamp(21rem, 33vw, 33rem); overflow: hidden; background: #c8c5b8; }
.detail-photo img { position: absolute; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 55% 6%; transform: scale(1.45); transform-origin: 60% 15%; }
.design-viewer:has(.feature-trays[open]) .detail-photo img { object-position: 65% 48%; transform: scale(1.33); transform-origin: 80% 52%; }
.design-viewer:has(.feature-base[open]) .detail-photo img { object-position: 63% 100%; transform: scale(1.4); transform-origin: 77% 100%; }
.design-details { align-self: center; padding: clamp(2rem, 4.7vw, 4.8rem); }
.feature { border-bottom: 1px solid #c0c9ba; }
.feature:first-child { border-top: 1px solid #c0c9ba; }
.feature summary { position: relative; display: block; padding: 1.2rem 2.2rem 1.2rem 0; color: #273d2d; font-size: clamp(1.19rem, 1.8vw, 1.65rem); letter-spacing: -.035em; line-height: 1.4; font-weight: 500; list-style: none; cursor: pointer; }
.feature summary::before, .feature summary::after { position: absolute; top: 50%; right: .2rem; content: ""; width: .82rem; height: 1.5px; background: currentColor; }
.feature summary::after { transform: rotate(90deg); }
.feature[open] summary::after { transform: rotate(0); }
.feature[open] summary { padding-bottom: .5rem; }
.feature p { padding: 0 1.7rem 1.3rem 0; color: var(--muted); line-height: 1.6; }

.catalogue-section { background: #efefe8; }
.catalogue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.4rem; }
.catalogue-card { min-width: 0; overflow: hidden; border-radius: 1rem; background: #fcfbf7; }
.catalogue-photo { display: block; height: clamp(17rem, 26vw, 25rem); overflow: hidden; background: #e1dfd6; }
.catalogue-photo img { width: 100%; height: 100%; object-fit: contain; }
.catalogue-copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.6rem, 3.7vw, 3.9rem); }
.catalogue-copy h3 { font-size: clamp(1.7rem, 2.5vw, 2.8rem); font-weight: 500; letter-spacing: -.054em; line-height: 1.08; overflow-wrap: anywhere; }
.catalogue-copy h3 a:hover { text-decoration: underline; text-underline-offset: .14em; text-decoration-thickness: 1px; }
.catalogue-copy > p { margin-top: 1rem; max-width: 33rem; color: var(--muted); font-size: 1.05rem; }
.catalogue-copy .text-link { margin-top: 1.8rem; }
.finish { display: flex; align-items: center; column-gap: .57rem; width: fit-content; margin-top: 1.5rem; color: var(--muted); font-size: .88rem; }
.finish span { width: .92rem; height: .92rem; border: 1px solid #bdbcb2; border-radius: 50%; background: #f3f0e8; }
.single-card .catalogue-card { display: grid; grid-template-columns: 1fr 1.07fr; align-items: center; }
.single-card .catalogue-photo { height: clamp(23rem, 33vw, 31rem); }
.single-card .catalogue-copy { padding-inline: clamp(2.1rem, 5.25vw, 5.8rem); }
.single-card .catalogue-copy h3 { max-width: 27rem; font-size: clamp(2.4rem, 3.5vw, 3.95rem); }
.single-card .text-card { display: block; }
.empty-copy { padding-block: 1rem; }

.promo-layout.solo-promo { display: grid; grid-template-columns: .81fr 1fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.solo-promo .section-heading { margin: 0; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; }
.promo-grid figure { min-width: 0; }
.promo-link { position: relative; display: grid; place-items: center; height: clamp(18rem, 32vw, 29rem); padding: 1.3rem; overflow: hidden; background: #e8e9e0; border-radius: .9rem; }
.solo-promo .promo-link { height: clamp(24rem, 39vw, 34rem); }
.promo-link img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.promo-grid figcaption { margin: .7rem .15rem 0; color: var(--muted); font-size: .9rem; }
.zoom-glyph { position: absolute; bottom: .85rem; right: .85rem; width: 2.35rem; height: 2.35rem; border-radius: 50%; background: var(--porcelain); color: var(--forest); box-shadow: 0 1px 8px #29372821; }
.zoom-glyph::before { content: ""; position: absolute; left: .69rem; top: .62rem; width: .8rem; height: .8rem; border: 1.7px solid currentColor; border-radius: 50%; }
.zoom-glyph::after { content: ""; position: absolute; left: 1.31rem; top: 1.35rem; width: .37rem; height: 1.7px; background: currentColor; transform: rotate(45deg); }
.promo-dialog { width: min(65rem, calc(100vw - 2rem)); max-width: 100%; max-height: calc(100dvh - 2rem); padding: 1rem; overflow: auto; border: 0; border-radius: .85rem; background: #f5f5ee; color: var(--ink); }
.promo-dialog:not([open]) { display: none; }
.promo-dialog::backdrop { background: #142019c9; }
.viewer-toolbar, .viewer-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.viewer-toolbar { margin-bottom: .85rem; }
.viewer-toolbar a, .viewer-toolbar button, .viewer-controls button { padding: .48rem .8rem; border: 1px solid #b5bfb2; border-radius: 2rem; background: none; color: var(--forest); font-size: .9rem; }
.viewer-toolbar a:hover, .viewer-toolbar button:hover, .viewer-controls button:hover { background: #e6ebdf; }
.viewer-canvas { height: min(70vh, 65rem); height: min(70dvh, 65rem); }
.viewer-canvas img { width: 100%; height: 100%; object-fit: contain; }
.viewer-controls { margin-top: .85rem; }
.viewer-count { font-size: .9rem; color: var(--muted); }

.contact-section { padding-block: clamp(4.7rem, 8.4vw, 8.5rem); background: #223e2f; color: #f9faf2; }
.contact-grid { display: grid; grid-template-columns: .87fr 1.13fr; align-items: start; gap: clamp(2.3rem, 7vw, 8rem); }
.contact-copy .eyebrow { color: #d1ddc4; }
.contact-copy h2 { max-width: 29rem; font-size: clamp(3.2rem, 5.7vw, 6.15rem); font-weight: 500; letter-spacing: -.073em; line-height: 1.01; }
.contact-copy h2 em { color: #d9e4cd; }
.contact-copy > p:last-child { max-width: 22rem; margin-top: 1.3rem; color: #e2e9dc; font-size: clamp(1rem, 1.3vw, 1.16rem); line-height: 1.6; }
.enquiry-form { position: relative; display: grid; gap: 1.1rem; }
.form-row { display: flex; gap: 1rem; }
.form-field { min-width: 0; flex: 1; }
.form-field label { display: block; margin-bottom: .42rem; color: #fff; font-size: .92rem; font-weight: 500; }
.form-field label span { color: #ccd8c8; font-size: .85rem; }
.form-field input, .form-field select, .form-field textarea { display: block; width: 100%; min-height: 2.95rem; padding: .62rem .83rem; border: 1px solid #839788; border-radius: .4rem; background: #2b4737; color: #fff; line-height: 1.45; }
.form-field textarea { resize: vertical; }
.form-field select { appearance: none; padding-right: 2rem; }
.form-field select option { color: #17281c; background: white; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: .92rem; top: 40%; width: .46rem; height: .46rem; border: solid #e4eadf; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.contact-button { margin-top: .15rem; background: #e8efde; color: #223a28; }
.contact-button:hover { background: #fff; }
.trap { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; overflow: hidden; }
.form-status { padding: .9rem 1rem; border: 1px solid #b3c4a8; border-radius: .4rem; background: #e7efdf; color: #1b3626; }
.form-error { border-color: #f1bb9f; background: #ffebdc; color: #612c14; }
.site-footer { background: #fcfbf8; color: var(--muted); }
.footer-inner { display: flex; align-items: center; gap: 2rem; padding-block: 2rem; }
.footer-inner .brand { font-size: 1.35rem; }
.footer-inner .brand-mark { transform: scale(.86); transform-origin: left center; margin-right: -.25rem; }
.footer-inner small, .footer-top { font-size: .86rem; }
.footer-top { margin-left: auto; text-decoration: underline; text-underline-offset: .24rem; }

.product-shell { padding-top: 1.75rem; padding-bottom: clamp(4rem, 7vw, 7rem); }
.breadcrumbs { display: flex; gap: .66rem; align-items: center; margin-bottom: 1.6rem; color: var(--muted); font-size: .88rem; }
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: .2rem; }
.breadcrumbs span { color: #8a9286; }
.product-lead { display: grid; grid-template-columns: 1.04fr 1fr; align-items: center; gap: clamp(2rem, 6.7vw, 7rem); }
.product-gallery, .product-intro { min-width: 0; }
.product-canvas { height: clamp(23rem, 45vw, 39rem); overflow: hidden; border-radius: .9rem; background: #e6e3da; }
.product-canvas .product-cover { width: 100%; height: 100%; object-fit: contain; }
.thumbnails { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .85rem; }
.thumbnails a { display: grid; width: 3.5rem; height: 3.5rem; padding: 2px; overflow: hidden; border-radius: .4rem; border: 1px solid var(--line); }
.thumbnails a[aria-current] { border: 2px solid var(--forest); }
.thumbnails img { width: 100%; height: 100%; object-fit: cover; border-radius: .2rem; }
.product-intro h1 { font-size: clamp(3rem, 4.8vw, 5.7rem); font-weight: 500; line-height: .99; letter-spacing: -.066em; overflow-wrap: anywhere; }
.product-excerpt { margin-top: 1.4rem; color: var(--muted); font-size: 1.18rem; }
.product-intro .button { margin-top: 2.1rem; }
.product-text-only { display: block; }
.product-text-only .product-intro { max-width: 48rem; padding-block: 2rem; }
.product-overview { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; border-top: 1px solid var(--line); margin-top: clamp(3rem, 6vw, 6rem); padding-top: clamp(2.3rem, 4.7vw, 4.4rem); }
.product-overview h2 { font-size: clamp(2.3rem, 3.3vw, 3.9rem); }
.prose { min-width: 0; overflow-wrap: anywhere; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; color: var(--muted); font-size: 1.07rem; line-height: 1.68; }
.prose h2, .prose h3 { margin: 1.2em 0 .45em; line-height: 1.19; letter-spacing: -.035em; }
.prose > :first-child { margin-top: 0; }
.prose a { text-decoration: underline; text-underline-offset: .2em; }
.standard-page { min-height: 55vh; padding-block: clamp(4rem, 7vw, 7rem); }
.standard-page h1 { margin-bottom: 1.7rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .text-link { transition: background-color .17s ease, text-decoration-color .17s ease; }
  .detail-photo img { transition: transform .35s ease, object-position .35s ease; }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 55rem) {
  .header-inner { gap: 1rem; }
  .desktop-nav { gap: 1.35rem; }
  .design-details { padding: 1.8rem; }
  .contact-grid { gap: 2.35rem; }
}
@media (min-width: 48rem) and (max-width: 64rem) {
  .hero { min-height: clamp(27rem, 51vw, 33rem); }
  .hero-inner { padding-block: 3.3rem; }
  .hero h1 { font-size: clamp(4.45rem, 8.6vw, 6rem); }
  .hero-picture:not(.default-wide) { left: 15%; }
}
@media (max-width: 47.99rem) {
  :root { --header-height: 4rem; --gutter: clamp(1.25rem, 5.5vw, 2rem); }
  .header-inner { display: flex; justify-content: space-between; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .brand { font-size: 1.5rem; gap: .45rem; }
  .header-enquiry { min-height: 2.4rem; padding: .52rem .91rem; }
  .hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; background: #f0ede6; }
  .hero::before { display: none; }
  .hero-inner { order: -1; padding-block: clamp(2.6rem, 8vw, 3.7rem) 2.15rem; }
  .hero-copy { width: 100%; max-width: 35rem; }
  .hero h1 { margin: .19em 0 .2em -.045em; font-size: clamp(3.1rem, 11.3vw, 4.8rem); line-height: 1; }
  .hero h1 br { display: none; }
  .hero h1 em { margin-left: .15em; }
  .hero-description { max-width: 29rem; }
  .hero-actions { gap: 1.25rem; margin-top: 1.25rem; }
  .hero-picture, .hero-picture.default-wide { position: relative; z-index: auto; inset: auto; width: 100%; height: clamp(21rem, 100vw, 33rem); aspect-ratio: auto; mask-image: none; background: #dfdbd0; }
  .hero-picture img, .hero-picture.default-wide img { object-fit: cover; object-position: center; }
  .hero-picture.default-narrow { align-self: center; width: min(100%, 30rem); height: auto; aspect-ratio: 941 / 1332; }
  .hero-picture.default-narrow img { width: 100%; height: auto; }
  .section { padding-block: 3.8rem; }
  .section-heading { margin-bottom: 1.65rem; }
  .section-heading h1, .section-heading h2, .standard-page h1 { font-size: clamp(2.5rem, 8.9vw, 3.5rem); }
  .design-viewer, .single-card .catalogue-card, .promo-layout.solo-promo, .contact-grid, .product-lead, .product-overview { grid-template-columns: 1fr; }
  .detail-photo { min-height: 0; height: clamp(14rem, 56vw, 21rem); }
  .design-details { padding: 1rem 1.4rem 1.45rem; }
  .feature:first-child { border-top: 0; }
  .feature summary { padding-block: .95rem; }
  .feature p { padding-bottom: 1.1rem; }
  .single-card .catalogue-photo { height: clamp(18rem, 73vw, 26rem); }
  .single-card .catalogue-copy { padding: 1.6rem; }
  .single-card .catalogue-copy h3 { font-size: clamp(2rem, 7.2vw, 2.7rem); }
  .catalogue-copy .text-link { margin-top: 1.4rem; }
  .promo-layout.solo-promo { gap: 1.6rem; }
  .promo-link, .solo-promo .promo-link { height: clamp(20rem, 96vw, 30rem); }
  .contact-section { padding-block: 3.9rem; }
  .contact-grid { gap: 2.2rem; }
  .contact-copy h2 { max-width: none; }
  .contact-copy > p:last-child { max-width: 29rem; }
  .product-shell { padding-top: 1.2rem; }
  .breadcrumbs { margin-bottom: 1rem; }
  .product-lead { gap: 1.8rem; }
  .product-canvas { height: clamp(20rem, 93vw, 31rem); }
  .product-intro h1 { max-width: 37rem; font-size: clamp(2.65rem, 9.5vw, 4.6rem); }
  .product-intro .button { margin-top: 1.6rem; }
  .product-overview { gap: 1.2rem; }
  .footer-inner { flex-wrap: wrap; gap: .9rem 1.5rem; }
}
@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}
@media (max-width: 29rem) {
  .form-row { flex-direction: column; gap: 1.1rem; }
  .footer-inner { justify-content: space-between; }
  .footer-inner .brand { width: 100%; }
}
