/* ==== CSS RESET & BASE ==== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.6;
  background: #fff;
  color: #273447;
  font-family: 'Roboto', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: inherit; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img, svg { max-width: 100%; display: block; }

/* ==== BRAND COLORS AND TYPOGRAPHY ==== */
:root {
  --color-primary: #273447;
  --color-secondary: #F4C067; /* gold */
  --color-accent: #E1E7EF;
  --color-bg: #fff;
  --color-dark: #171b22;
  --color-card-bg: #fbfbfb;
  --color-border: #e0e0e0;
  --color-footer-bg: #232a36;
  --color-footer-text: #babfd7;
  --color-success: #288447;
  --color-error: #a62929;
  --shadow-main: 0 4px 32px rgba(39,52,71,0.08), 0 1.5px 5px rgba(0,0,0,0.05);
  --radius-main: 18px;
  --radius-small: 9px;
  --transition: 0.3s cubic-bezier(.45,.28,.63,.83);
  --font-display: 'Lora', serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--color-primary);
  background: var(--color-bg);
  font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-dark);
  letter-spacing: -0.5px;
}
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.15;
}
h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.2;
}
h3 {
  font-size: 1.22rem;
  font-weight: 600;
  margin-bottom: 12px;
}
h4,h5,h6 { font-weight: 500; }
p, li {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}
strong { color: var(--color-dark); font-weight: 600; }
a {
  color: var(--color-secondary);
  transition: color var(--transition);
}
a:hover, a:focus {
  color: #cfa147;
  text-decoration: underline;
}

/* ==== LAYOUT: CONTAINERS & SECTIONS ==== */
.container {
  max-width: 1200px;
  padding: 0 20px;
  margin: 0 auto;
  width: 100%;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: transparent;
}
.cta-content {
  align-items: center;
  text-align: center;
  gap: 18px;
}

/* ==== FLEX PATTERNS MANDATORY ==== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  box-shadow: var(--shadow-main);
  background: var(--color-card-bg);
  border-radius: var(--radius-main);
  padding: 28px 26px 24px 26px;
  position: relative;
  flex: 1 1 320px;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--color-accent);
  padding: 20px;
  border-radius: var(--radius-small);
  box-shadow:0 2px 10px rgba(39,52,71,0.07);
  margin-bottom: 20px;
  border-left: 5px solid var(--color-secondary);
  color: var(--color-dark);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ==== NAVIGATION ==== */
header {
  background: var(--color-bg);
  border-bottom: 1.5px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(39,52,71,0.03);
  position: sticky;
  top: 0;
  z-index: 50;
}
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 18px 0;
}
.desktop-nav > a {
  color: var(--color-primary);
  font-family: var(--font-body);
  padding: 6px 14px;
  font-weight: 500;
  border-radius: var(--radius-small);
  transition: color var(--transition), background var(--transition);
}
.desktop-nav > a.cta-primary {
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  margin-left: auto;
  margin-right: 6px;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(39,52,71,0.07);
  padding: 8px 32px;
  border: none;
  letter-spacing: 0.5px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.desktop-nav > a.cta-primary:hover, 
.desktop-nav > a.cta-primary:focus {
  background: #ffd990;
  color: #111;
  box-shadow:0 2px 18px rgba(244,192,103,0.20);
}
.desktop-nav > a:hover,
.desktop-nav > a:focus {
  background: var(--color-accent);
}
.desktop-nav img { height: 38px; margin-right: 12px; }

/* ==== MOBILE NAV ==== */
.mobile-menu-toggle {
  display: none;
  position: absolute;
  right: 20px;
  top: 19px;
  background: transparent;
  border: none;
  font-size: 2.2rem;
  color: var(--color-primary);
  cursor: pointer;
  z-index: 102;
  transition: color var(--transition);
}
.mobile-menu-toggle:focus, 
.mobile-menu-toggle:hover {
  color: var(--color-secondary);
}
.mobile-menu {
  display: none;
  background: var(--color-bg);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 200;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(.61,.36,.43,.95);
  box-shadow: 0 0 48px rgba(39,52,71,0.16);
  will-change: transform;
}
.mobile-menu.open {
  display: flex !important;
  transform: translateX(0%);
}
.mobile-menu-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--color-primary);
  padding: 26px 22px 10px 0;
  font-size: 2.1rem;
  cursor: pointer;
  transition: color var(--transition);
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  padding: 32px 20px;
  margin-top: 14px;
}
.mobile-nav a {
  font-size: 1.22rem;
  color: var(--color-primary);
  padding: 14px 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: left;
  width: 100%;
  border-radius: var(--radius-small);
  transition: background var(--transition), color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}

@media (max-width: 990px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

@media (min-width: 991px) {
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none;
  }
}

/* ==== HERO SECTION, CTAS, LISTS ==== */
.hero-section {
  background: linear-gradient(135deg, #FCF7EF 65%, var(--color-accent) 100%);
  padding: 54px 0 32px 0;
  border-bottom: 2px solid var(--color-secondary);
}
.hero-section .content-wrapper {
  align-items: flex-start;
  gap: 22px;
}
.hero-section h1 {
  color: var(--color-primary);
  margin-top: 0;
}
.hero-section p {
  font-size: 1.13rem;
  max-width: 630px;
  color: #34425e;
  margin-bottom: 18px;
}
.cta-primary {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 12px 38px;
  border-radius: 999px;
  border: none;
  letter-spacing: 0.25px;
  box-shadow:0 3px 24px rgba(244,192,103,.08);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform 0.12s cubic-bezier(.61,.36,.43,.95);
  cursor: pointer;
  margin-top: 8px;
}
.cta-primary:hover, .cta-primary:focus {
  background: #ffd990;
  color: #171b22;
  transform: translateY(-2px) scale(1.035);
  box-shadow:0 4px 38px rgba(244,192,103,.20);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0 10px 0;
}
.category-filters button,
.pet-type-tabs button {
  background: none;
  border: 2px solid var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 8px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.category-filters button:hover, .category-filters button:focus,
.pet-type-tabs button:hover, .pet-type-tabs button:focus {
  background: var(--color-secondary);
  color: var(--color-dark);
  border-color: #e9bb5d;
  box-shadow:0 2px 12px rgba(244,192,103,0.13);
}

input[type="text"] {
  width: 100%;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: var(--radius-small);
  border: 1.5px solid var(--color-border);
  margin: 10px 0 16px 0;
  background: #f8fafc;
  color: var(--color-dark);
  transition: border var(--transition);
  font-family: var(--font-body);
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--color-secondary);
  background: #fffbe7;
}

ul > li {
  margin-bottom: 14px;
  padding-left: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
ul > li img {
  max-width: 30px;
  margin-bottom: 8px;
  align-self: flex-start;
}

/* ==== CARDS, PAGINATION, GRID CONTENT ==== */
.card-container,
.content-grid {
  gap: 24px;
}
.card {
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-main);
  border: 1.2px solid var(--color-accent);
  background: #fbfbfb;
}
.card:hover, .card:focus {
  box-shadow: 0 6px 28px rgba(244,192,103,0.14), 0 1.5px 5px rgba(0,0,0,0.10);
  transform: translateY(-3px) scale(1.013);
  border-color: var(--color-secondary);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  align-items: center;
  margin: 18px 0 4px 0;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  min-width: 36px;
  min-height: 36px;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--color-accent);
  border-radius: 50%;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 600;
  box-shadow:0 0px 3px #e1e7ef;
  transition: background var(--transition), color var(--transition);
  padding: 0 10px;
}
.pagination a:hover, .pagination a:focus {
  background: var(--color-secondary);
  color: #171b22;
}
.pagination span {
  background: var(--color-secondary);
  color: #171b22;
}

/* ==== TESTIMONIALS ==== */
.testimonial-card {
  background: var(--color-accent);
  color: #1d2433;
  border-radius: var(--radius-small);
  border-left: 5px solid var(--color-secondary);
  margin-bottom: 20px;
  box-shadow:0 2px 10px rgba(39,52,71,0.07);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.testimonial-card:hover, .testimonial-card:focus {
  box-shadow: 0 6px 14px rgba(244,192,103,0.17);
  border-color: #d8a849;
}
.testimonial-card p {
  color: #1d2433;
  font-size: 1.13rem;
  margin-bottom: 0;
  font-family: var(--font-display);
}
.testimonial-card strong {
  color: var(--color-primary);
  font-weight: 600;
  margin-left: 10px;
}

/* ==== FOOTER ==== */
footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 36px 0 22px 0;
  margin-top: 60px;
}
.footer-nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
  font-size: 1rem;
}
.footer-nav a {
  color: var(--color-footer-text);
  transition: color var(--transition);
  padding: 2px 0;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-secondary);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.footer-brand img {
  height: 44px;
  width: auto;
  margin-bottom: 5px;
}
.footer-brand p {
  font-size: .98rem;
  color: var(--color-footer-text);
}

/* ==== FORMS, BUTTONS, UTILS ==== */
button {
  font-family: var(--font-body);
  background: var(--color-secondary);
  color: var(--color-dark);
  border: none;
  border-radius: var(--radius-small);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 22px;
  box-shadow:0 2px 8px rgba(244,192,103,0.07);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform .15s cubic-bezier(.61,.36,.43,.95);
}
button:hover, button:focus {
  background: #e9bb5d;
  color: var(--color-dark);
  transform: translateY(-1.5px) scale(1.015);
}

/* ==== COOKIE CONSENT ==== */
.cookie-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  z-index: 10000;
  background: var(--color-card-bg);
  border-top: 2px solid var(--color-secondary);
  box-shadow:0 -2px 20px rgba(39,52,71,0.09);
  padding: 24px 18px 18px 18px;
  transition: transform 0.30s cubic-bezier(.65,.15,.33,1.1), opacity .2s ease;
}
.cookie-banner[hidden] {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner .cookie-btns {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.cookie-banner button {
  background: var(--color-secondary);
  color: var(--color-primary);
  border: none;
  padding: 8px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-body);
  transition: background var(--transition), color var(--transition);
}
.cookie-banner button:hover, .cookie-banner button:focus {
  background: #ffd990;
  color: var(--color-dark);
}
.cookie-banner .cookie-settings {
  background: #fff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-secondary);
}
.cookie-banner .cookie-settings:hover {
  background: var(--color-secondary);
  color: #fff;
}

/* -- Cookie Modal -- */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 10010;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(39,52,71,0.42);
  align-items: center;
  justify-content: center;
}
.cookie-modal.active {
  display: flex !important;
}
.cookie-modal-dialog {
  background: var(--color-card-bg);
  box-shadow: 0 6px 48px rgba(39,52,71,0.12);
  border-radius: var(--radius-main);
  padding: 36px 28px;
  min-width: 340px;
  max-width: 90vw;
  transition: transform .28s cubic-bezier(.61,.36,.43,.95);
  transform: scale(1) translateY(0);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal-close {
  position: absolute;
  right: 24px;
  top: 16px;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--color-primary);
  cursor: pointer;
  z-index: 10011;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.cookie-category {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cookie-category label {
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 500;
}
.cookie-category input[type="checkbox"] {
  transform: scale(1.25);
  accent-color: var(--color-secondary);
}
.cookie-category .cookie-essential {
  opacity: 0.75;
  pointer-events: none;
}
.cookie-modal-action-row {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 768px) {
  .container {
    padding: 0 9px;
  }
  .section {
    margin-bottom: 38px;
    padding: 28px 2px;
  }
  .hero-section {
    padding: 34px 0 17px 0;
  }
  .content-wrapper, .cta-content {
    gap: 15px;
  }
  .card-container, .content-grid {
    gap: 12px;
    flex-direction: column;
  }
  .card {
    padding: 18px 10px 15px 12px;
    font-size: 15px;
  }
  .category-filters, .pagination {
    gap: 8px;
  }
  .testimonial-card {
    flex-direction: column;
    gap: 8px;
    font-size: 1rem;
    padding: 16px;
  }
  .desktop-nav {
    display: none !important;
  }
  .mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100vw;
    max-width: 100vw;
  }
  .text-image-section {
    flex-direction: column;
    gap: 16px;
  }
}

/* Maintain flex even on smallest screens! */
@media (max-width: 500px) {
  .footer-nav {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    font-size: 0.98rem;
  }
  .cta-primary {
    width: 100%;
    text-align: center;
    min-width: unset;
  }
  .cookie-modal-dialog {
    min-width: unset;
    padding: 20px 6px;
  }
}

/* ==== MISC/ORNAMENTS ==== */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 44px 0 32px 0;
}
.text-section {
  background: none;
  padding: 0;
  margin: 0;
}

/* ==== UTILITY CLASSES ==== */
.hidden { display: none !important; }

/* ==== ACCESSIBILITY ==== */
:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ====== PRINT OVERRIDES ====== */
@media print {
  header, nav, .cookie-banner, .mobile-menu, .mobile-menu-toggle, footer {
    display: none !important;
  }
  section, .container {
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
  }
}
