/* PetPaw Haven — shared styles across all pages */

:root {
  --ink: #101314;
  --panel: #171C1E;
  --panel-light: #1F2528;
  --foam: #F1F3F2;
  --foam-rgb: 241, 243, 242;
  --teal: #2FA79E;
  --teal-light: #6FCFC6;
  --line: rgba(241, 243, 242, 0.1);
}

[data-theme="light"] {
  --ink: #F5F6F7;
  --panel: #FFFFFF;
  --panel-light: #ECEEF0;
  --foam: #1C1F21;
  --foam-rgb: 28, 31, 33;
  --teal: #1F8F86;
  --teal-light: #17726B;
  --line: rgba(28, 31, 33, 0.1);
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--foam);
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.6;
  transition: background .2s ease, color .2s ease;
}

h1,
h2,
h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mono {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- NAV ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 44px 1fr 44px 44px;
  align-items: center;
  gap: 12px;
  padding: 16px 6vw;
  background: rgba(var(--foam-rgb), 0.02);
  background-color: var(--ink);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  justify-self: center;
}

.wordmark span {
  color: var(--teal-light);
}

.nav-links {
  display: none;
}

.cart-btn,
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--foam);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: border-color .2s ease, background .2s ease;
  justify-self: end;
}

.cart-btn:hover,
.theme-toggle-btn:hover {
  border-color: var(--teal);
  background: rgba(47, 167, 158, 0.08);
}

.cart-btn i {
  font-size: 19px;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--teal);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--ink);
}

.search-row {
  padding: 12px 6vw;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.search-row input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--foam);
  padding: 11px 16px;
  border-radius: 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
}

.search-row input::placeholder {
  color: rgba(var(--foam-rgb), 0.4);
}

.search-row input:focus {
  outline: 1px solid var(--teal);
}

.trust-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 14px 6vw;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: rgba(var(--foam-rgb), 0.6);
  text-align: center;
}

.trust-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.burger-btn {
  display: flex;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--foam);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  justify-self: start;
}

.burger-btn span {
  width: 16px;
  height: 2px;
  background: var(--foam);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.burger-btn.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.burger-btn.open span:nth-child(2) {
  opacity: 0;
}

.burger-btn.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  z-index: 49;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  padding: 12px 6vw 20px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 14px 0;
  font-size: 1rem;
  color: rgba(var(--foam-rgb), 0.8);
  border-bottom: 1px solid var(--line);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a.active {
  color: var(--teal-light);
}

/* ---------- HERO ---------- */
.hero {
  padding: 14vh 6vw 8vh;
  max-width: 900px;
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--teal-light);
  font-weight: 600;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero h1 span {
  color: var(--teal-light);
}

.hero p {
  max-width: 520px;
  color: rgba(var(--foam-rgb), 0.68);
  font-size: 1.05rem;
  margin-bottom: 34px;
}

.hero-cta {
  display: inline-block;
  background: var(--teal);
  color: var(--ink);
  padding: 15px 32px;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 28px;
  transition: background .2s ease;
}

.hero-cta:hover {
  background: var(--teal-light);
}

/* ---------- SECTIONS / SHELF ---------- */
.shelf {
  padding: 2vh 6vw 14vh;
}

.shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 44px;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 44px;
}

.shelf-head h2 {
  font-size: 1.7rem;
}

.shelf-head .mono {
  font-size: 0.8rem;
  color: rgba(var(--foam-rgb), 0.5);
  font-weight: 500;
}

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

.p-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}

.p-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
}

.p-card .p-image {
  aspect-ratio: 1/1;
  background: repeating-linear-gradient(45deg, rgba(var(--foam-rgb), 0.03) 0 2px, transparent 2px 14px), var(--panel-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(var(--foam-rgb), 0.4);
  font-size: 0.82rem;
  padding: 20px;
}

.p-card .p-body {
  padding: 24px;
}

.p-card .p-tag {
  font-size: 0.75rem;
  color: var(--teal-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 10px;
}

.p-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.p-card p {
  color: rgba(var(--foam-rgb), 0.6);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.p-card .p-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.p-card .price {
  font-size: 1.1rem;
  font-weight: 700;
}

.view-link {
  font-size: 0.85rem;
  color: var(--teal-light);
  font-weight: 600;
}

/* ---------- TRUST STRIP ---------- */
.trust-strip {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding: 6vh 6vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-item .mono {
  font-size: 0.75rem;
  color: var(--teal-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.trust-item p {
  font-size: 0.9rem;
  color: rgba(var(--foam-rgb), 0.65);
  max-width: 220px;
}

footer {
  padding: 50px 6vw;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(var(--foam-rgb), 0.4);
  border-top: 1px solid var(--line);
}

footer .f-links {
  display: flex;
  gap: 24px;
}

footer a:hover {
  color: var(--teal-light);
}

/* ---------- PRODUCT PAGE ---------- */
.breadcrumb {
  padding: 24px 6vw 0;
  font-size: 0.85rem;
  color: rgba(var(--foam-rgb), 0.5);
}

.breadcrumb a {
  color: var(--teal-light);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  padding: 5vh 6vw 10vh;
  max-width: 1100px;
}

@media (max-width:760px) {
  .product-detail {
    grid-template-columns: 1fr;
    padding: 4vh 6vw 8vh;
  }
}

.product-detail .p-image {
  aspect-ratio: 1/1;
  border-radius: 16px;
  background: repeating-linear-gradient(45deg, rgba(var(--foam-rgb), 0.03) 0 2px, transparent 2px 14px), var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(var(--foam-rgb), 0.4);
  font-size: 0.85rem;
  padding: 20px;
}

.product-detail .p-tag {
  font-size: 0.8rem;
  color: var(--teal-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 16px;
}

.product-detail h1 {
  font-size: 2.2rem;
  margin-bottom: 18px;
}

.product-detail .desc {
  color: rgba(var(--foam-rgb), 0.68);
  margin-bottom: 28px;
  max-width: 440px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.price-row .price {
  font-size: 1.6rem;
  font-weight: 700;
}

.stock-badge {
  font-size: 0.8rem;
  color: var(--teal-light);
  background: rgba(47, 167, 158, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
}

.trust-row {
  display: flex;
  gap: 24px;
  margin-top: 30px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(var(--foam-rgb), 0.55);
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
}

/* ---------- ABOUT / CONTACT PAGE ---------- */
.page-content {
  padding: 12vh 6vw 12vh;
  max-width: 720px;
}

.page-content h1 {
  font-size: 2.6rem;
  margin-bottom: 24px;
}

.page-content p {
  color: rgba(var(--foam-rgb), 0.7);
  margin-bottom: 20px;
  font-size: 1.02rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 12vh 6vw 12vh;
  max-width: 1000px;
}

@media (max-width:760px) {
  .contact-grid {
    grid-template-columns: 1fr;
    padding: 8vh 6vw;
  }
}

.contact-info h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.contact-info p {
  color: rgba(var(--foam-rgb), 0.68);
  margin-bottom: 16px;
}

.contact-info .detail {
  margin-top: 28px;
}

.contact-info .detail .mono {
  color: var(--teal-light);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
}

.contact-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
}

.contact-form h3 {
  font-size: 1.2rem;
  margin-bottom: 22px;
}

/* ---------- CART/CHECKOUT MODALS ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 9, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 6vh 20px;
  overflow-y: auto;
}

.overlay.open {
  display: flex;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  animation: rise .25s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-size: 1.15rem;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(var(--foam-rgb), 0.6);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--foam);
}

.modal-body {
  padding: 24px 26px;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:last-of-type {
  border-bottom: none;
}

.cart-line-name {
  font-size: 0.92rem;
}

.cart-line-price {
  font-size: 0.88rem;
  color: rgba(var(--foam-rgb), 0.7);
  font-weight: 600;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--foam);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.qty-btn:hover {
  border-color: var(--teal);
}

.cart-empty {
  color: rgba(var(--foam-rgb), 0.5);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 26px;
  border-top: 1px solid var(--line);
}

.cart-total .amount {
  font-size: 1.3rem;
  color: var(--teal-light);
  font-weight: 700;
}

.modal-actions {
  padding: 20px 26px 26px;
}

.btn-primary {
  background: var(--teal);
  color: var(--ink);
  border: none;
  padding: 14px 30px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s ease;
  width: 100%;
}

.btn-primary:hover {
  background: var(--teal-light);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(var(--foam-rgb), 0.55);
  margin-bottom: 7px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--foam);
  padding: 11px 13px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  border-radius: 8px;
}

.field input:focus,
.field textarea:focus {
  outline: 1px solid var(--teal);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-summary {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.checkout-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.checkout-summary .row.total {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
  color: var(--teal-light);
  font-weight: 700;
}

.payfast-note {
  font-size: 0.75rem;
  color: rgba(var(--foam-rgb), 0.4);
  margin-top: 14px;
  text-align: center;
  line-height: 1.5;
}

.qv-image {
  aspect-ratio: 1/1;
  border-radius: 12px;
  margin: 0 26px 0;
  background: repeating-linear-gradient(45deg, rgba(var(--foam-rgb), 0.03) 0 2px, transparent 2px 14px), var(--panel-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(var(--foam-rgb), 0.4);
  font-size: 0.8rem;
  width: calc(100% - 52px);
}

.qv-tag {
  font-size: 0.75rem;
  color: var(--teal-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin: 20px 0 8px;
}

.qv-name {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.qv-desc {
  color: rgba(var(--foam-rgb), 0.65);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.qv-price {
  font-size: 1.3rem;
  font-weight: 700;
  display: block;
  margin-bottom: 18px;
}

.qv-view-link {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: var(--teal-light);
  font-weight: 600;
  margin-top: 12px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--teal);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transition: all .3s ease;
  z-index: 200;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cart-line-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 25px;
  color: var(--foam);
  opacity: 0.9;
  line-height: 1;
}

.cart-remove-btn:hover {
  opacity: 1;
}

.related-products {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

.related-products h2 {
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.related-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.related-name {
  font-weight: 600;
}

.related-price {
  color: var(--teal-light);
}

.related-more {
  text-align: center;
  margin-top: 24px;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--teal-light);
  border: 1px solid var(--teal);
  padding: 13px 28px;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 24px;
  transition: background .2s ease, color .2s ease;
}

.btn-secondary:hover {
  background: var(--teal);
  color: var(--ink);
}
