/* ==========================================
   PET ISLAND — RAED TWIG V4.0
   MIDNIGHT & MUTED LIME
   ========================================== */

:root {
  --pet-midnight: #101820;
  --pet-charcoal: #1E2A32;
  --pet-emerald: #103D32;
  --pet-lime: #C4DB85;
  --pet-bright-lime: #D9FF74;
  --pet-white: #FFFFFF;
  --pet-card: #F4F6F5;
  --pet-border: #E3EAE5;
  --pet-text: #182721;
  --pet-muted: #667870;
  --pet-radius: 18px;
}

/* ==========================================
   1. GLOBAL
   ========================================== */

html body {
  background-color: var(--pet-midnight) !important;
  color: var(--pet-text);
  font-family: "Tajawal", "Cairo", sans-serif;
}

/* Headings on dark sections */

html body section h2,
html body section h3 {
  color: var(--pet-bright-lime) !important;
}

/* ==========================================
   2. HEADER
   ========================================== */

html body header[data-testid="store-header"],
html body header[data-testid="store-header"] > div,
html body header[data-testid="store-header"] > div > div,
html body header[data-testid="store-header"] nav,
html body header[data-testid="store-header"] .container {
  background-color: var(--pet-charcoal) !important;
}

html body header[data-testid="store-header"] {
  color: var(--pet-white) !important;
  border-bottom: 1px solid #35434A !important;
}

html body header[data-testid="store-header"] nav a {
  color: var(--pet-white) !important;
}

html body header[data-testid="store-header"] button,
html body header[data-testid="store-header"] button svg,
html body header[data-testid="store-header"] a svg {
  color: var(--pet-white) !important;
}

/* Hide contact details in header only */

html body header[data-testid="store-header"]
a[href^="mailto:"],
html body header[data-testid="store-header"]
a[href^="tel:"] {
  display: none !important;
}

/* ==========================================
   3. PRODUCT CARDS
   ========================================== */

.s-product-card-entry,
.s-product-card,
.product-card {
  background-color: var(--pet-white) !important;
  border: 1px solid var(--pet-border) !important;
  border-radius: var(--pet-radius) !important;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(16, 61, 50, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.s-product-card-content-title {
  color: var(--pet-text) !important;
  font-weight: 700;
}

.s-product-card-price,
.product-price {
  color: var(--pet-emerald) !important;
  font-weight: 800;
}

/* Available-product buttons */

.s-product-card button[type="submit"]:not(:disabled),
.product-card .add-to-cart:not(:disabled),
.s-product-card-entry .s-button-primary:not(:disabled) {
  background-color: var(--pet-emerald) !important;
  color: var(--pet-white) !important;
  border-radius: 12px !important;
}

@media (hover: hover) {
  .s-product-card-entry:hover,
  .s-product-card:hover,
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(16, 61, 50, 0.12);
  }
}

/* ==========================================
   4. CATEGORY CARDS
   ========================================== */

a.slide-cat-entry,
a.slide--cat-entry {
  background-color: var(--pet-white) !important;
  border: 1px solid var(--pet-border) !important;
  border-radius: 20px !important;
  padding: 22px 12px !important;
  min-height: 145px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  text-decoration: none !important;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* Five pastel category colors */

.swiper-slide:nth-child(5n+1) > a.slide-cat-entry,
.swiper-slide:nth-child(5n+1) > a.slide--cat-entry {
  background-color: #E5F2EB !important;
}

.swiper-slide:nth-child(5n+2) > a.slide-cat-entry,
.swiper-slide:nth-child(5n+2) > a.slide--cat-entry {
  background-color: #EAF2F0 !important;
}

.swiper-slide:nth-child(5n+3) > a.slide-cat-entry,
.swiper-slide:nth-child(5n+3) > a.slide--cat-entry {
  background-color: #F0F5E6 !important;
}

.swiper-slide:nth-child(5n+4) > a.slide-cat-entry,
.swiper-slide:nth-child(5n+4) > a.slide--cat-entry {
  background-color: #E9F0F6 !important;
}

.swiper-slide:nth-child(5n+5) > a.slide-cat-entry,
.swiper-slide:nth-child(5n+5) > a.slide--cat-entry {
  background-color: #F2F3EC !important;
}

/* Dark category text and icons */

html body a.slide-cat-entry,
html body a.slide-cat-entry *,
html body a.slide--cat-entry,
html body a.slide--cat-entry * {
  color: var(--pet-emerald) !important;
}

html body a.slide-cat-entry svg,
html body a.slide-cat-entry svg *,
html body a.slide--cat-entry svg,
html body a.slide--cat-entry svg * {
  stroke: var(--pet-emerald) !important;
}

/* Category hover */

@media (hover: hover) {
  a.slide-cat-entry:hover,
  a.slide--cat-entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(16, 61, 50, 0.12);
  }
}

/* Keyboard accessibility */

a.slide-cat-entry:focus-visible,
a.slide--cat-entry:focus-visible {
  outline: 3px solid var(--pet-emerald);
  outline-offset: 3px;
}

/* ==========================================
   5. FEATURE CARDS
   ========================================== */

html body .s-block--features__item {
  background-color: var(--pet-card) !important;
  border: 1px solid #263D42 !important;
  border-radius: 18px !important;
  padding: 28px 18px !important;
}

html body .s-block--features__item h2,
html body .s-block--features__item h3,
html body .s-block--features__item h4,
html body .s-block--features__item p,
html body .s-block--features__item span {
  color: var(--pet-emerald) !important;
}

/* Muted lime icon circles */

html body .s-block--features__item .feature-icon,
html body .s-block--features__item .icon,
html body .s-block--features__item > div:first-child {
  background-color: var(--pet-lime) !important;
  color: var(--pet-emerald) !important;
}

/* Dark feature icons */

html body .s-block--features__item svg,
html body .s-block--features__item svg * {
  color: var(--pet-emerald) !important;
  stroke: var(--pet-emerald) !important;
}

/* ==========================================
   6. FOOTER
   ========================================== */

html body footer[data-testid="store-footer"],
html body footer[data-testid="store-footer"] .store-footer__inner,
html body footer[data-testid="store-footer"] .store-footer__top {
  background-color: var(--pet-charcoal) !important;
}

html body footer[data-testid="store-footer"] {
  color: #E7EFF0 !important;
  border-top: 1px solid #35444B !important;
}

html body footer[data-testid="store-footer"] h2,
html body footer[data-testid="store-footer"] h3,
html body footer[data-testid="store-footer"] h4 {
  color: var(--pet-bright-lime) !important;
}

html body footer[data-testid="store-footer"] a,
html body footer[data-testid="store-footer"] p,
html body footer[data-testid="store-footer"] li,
html body footer[data-testid="store-footer"] span {
  color: #E7EFF0 !important;
}

html body footer[data-testid="store-footer"] hr {
  border-color: #425158 !important;
}

/* ==========================================
   7. PRODUCT DETAIL PAGES
   ========================================== */

/* Readable product title */

html body .container--product-details
h1[data-testid="store-product-title"] {
  color: #F3F7F5 !important;
}

/* Product description */

html body .container--product-details
[data-testid="store-product-description"],
html body .container--product-details
.product__description {
  color: #D2DFDA !important;
}

/* Top product price */

html body .container--product-details
[data-testid="store-product-price"] {
  color: var(--pet-lime) !important;
}

/* Bottom price inside purchase panel */

html body .container--product-details h2.total-price {
  color: var(--pet-lime) !important;
}

/* ==========================================
   8. MOBILE
   ========================================== */

@media (max-width: 767px) {
  .s-product-card-entry,
  .s-product-card,
  .product-card {
    border-radius: 14px !important;
  }

  a.slide-cat-entry,
  a.slide--cat-entry {
    min-height: 115px;
    padding: 16px 8px !important;
    border-radius: 16px !important;
    gap: 8px;
  }

  html body .s-block--features__item {
    padding: 20px 14px !important;
  }
}

/* ==========================================
   9. ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  .s-product-card-entry,
  .s-product-card,
  .product-card,
  a.slide-cat-entry,
  a.slide--cat-entry {
    transition: none !important;
  }
}

/* ==========================================
   END — PET ISLAND V4.0
   ========================================== */

/* PET ISLAND — DESKTOP CATEGORY DROPDOWN FIX */

@media (min-width: 768px) {

  /* Keep dropdown background white */
  html body header[data-testid="store-header"]
  nav ul ul,
  html body header[data-testid="store-header"]
  nav .sub-menu,
  html body header[data-testid="store-header"]
  nav .sub-menu * {
    background-color: #FFFFFF;
  }

  /* Make dropdown text dark and readable */
  html body header[data-testid="store-header"]
  nav ul ul a,
  html body header[data-testid="store-header"]
  nav .sub-menu a {
    color: #103D32 !important;
  }

  /* Highlight category on hover */
  html body header[data-testid="store-header"]
  nav ul ul a:hover,
  html body header[data-testid="store-header"]
  nav .sub-menu a:hover {
    background-color: #E5F2EB !important;
    color: #103D32 !important;
  }
}
/* PET ISLAND — Hide problematic More dropdown */
@media (min-width: 1024px) {
  #more-menu-dropdown {
    display: none !important;
  }
}

/* PET ISLAND — BRANDS PAGE FIX */

/* Make the brands page readable */
body:has(a[href*="/brands"]) .brands-page {
  color: #182721;
}

/* Improve brand cards */
a[href*="/brand/"] {
  border-radius: 16px !important;
  overflow: hidden;
}

/* Improve brand logo appearance */
a[href*="/brand/"] img {
  object-fit: contain !important;
}

/* PET ISLAND — Hide Brands from desktop navigation */
@media (min-width: 1024px) {
  header[data-testid="store-header"] li#brands {
    display: none !important;
  }
}

/* ==========================================
   PET ISLAND — DARK THEME TEXT FIX
   ========================================== */

/* Breadcrumbs on dark backgrounds */
html body .breadcrumb,
html body .breadcrumb a,
html body .breadcrumbs,
html body .breadcrumbs a {
  color: #C9D5D0 !important;
}

/* Product page title and description */
html body .container--product-details h1,
html body .container--product-details .product__description,
html body .container--product-details .product__description p {
  color: #F5F7F6 !important;
}

/* Product page prices */
html body .container--product-details .total-price {
  color: #C8F36B !important;
}

/* Category and listing page headings */
html body .s-block__title,
html body .products-container h1,
html body .products-container h2 {
  color: #C8F36B !important;
}

/* Keep product card text dark on white cards */
html body .s-product-card-entry,
html body .s-product-card-entry h3,
html body .s-product-card-content-title {
  color: #182721 !important;
}

/* PET ISLAND — Product page finishing touches */

/* Make tax label visible */
html body .container--product-details small.color-grey {
  color: #AFC0B8 !important;
}

/* Strong emerald Add to Cart button */
html body .container--product-details button[type="submit"].s-button-primary {
  background-color: #103D32 !important;
  color: #FFFFFF !important;
  border-color: #103D32 !important;
}