/* Page container */
#natural-products-page {
  padding: 20px;
}

.catalog-container {
  max-width: 1200px;
  margin: 0 auto;
}

.catalog-title {
  margin: 20px 0 30px;
  font-size: 2.4em;
  color: #333;
}

/* Shared card utility used across catalog intro, product cards and price card */
.card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 18px;
}

/* Intro block above the catalog list */
.catalog-intro {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.catalog-intro-inner {
  /* Make the intro visually match the product/price cards */
  width: 100%;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  direction: rtl;
  text-align: right;
  font-size: large;
  margin-bottom: 24px;
}

.catalog-intro-inner p {
  margin: 0 0 10px 0;
  color: #4f4f4f;
  line-height: 1.8; /* comfortable spacing similar to other cards */
  font-size: 1.08em; /* slightly larger but consistent */
}

@media (max-width: 600px) {
  .catalog-intro-inner {
    padding: 14px 12px;
    border-radius: 12px;
  }

  .catalog-intro-inner p {
    font-size: 1em;
  }
}

/* List */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Card */
.product-card {
  display: grid;
  grid-template-columns: 1fr 2fr; /* image 1/3, content 2/3 */
  gap: 24px;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 18px;
}

.product-card.reverse {
  grid-template-columns: 2fr 1fr; /* swap widths for symmetry */
}

.product-card.reverse .product-media {
  order: 2;
}

.product-card.reverse .product-content {
  order: 1;
}

/* Media */
.product-media {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8e8e8;
  /* Default (desktop): keep a predictable square media block */
  flex: 0 0 320px;
  height: 320px;
  aspect-ratio: 1 / 1;
}

.product-media img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

/* Content */
.product-content {
  text-align: right;
  direction: rtl;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px 8px 0;
}

.product-name {
  margin: 6px 0 4px;
  font-size: 1.9em;
  color: #333;
}

/* Toggle */
.product-toggle {
  margin-top: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6b7280; /* grey */
  font-size: 1.05em;
  padding: 6px 2px;
}

/* Remove default focus ring / tap highlight on click, but preserve keyboard accessibility */
.product-toggle {
  -webkit-tap-highlight-color: transparent; /* mobile blue flash */
  outline: none; /* remove default outline on click */
}

/* Visible focus only for keyboard users */
.product-toggle:focus:not(:focus-visible) {
  box-shadow: none;
}

.product-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(173, 178, 212, 0.35);
  border-radius: 8px;
}

.toggle-emblem {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px dotted #adb2d4; /* brand blue */
  background: linear-gradient(135deg, #c7d9dd 0%, #adb2d4 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(173, 178, 212, 0.35);
  transition: transform 0.25s ease, box-shadow 0.2s ease;
}

/* In RTL layout we want the emblem to appear before the text visually (left of label)
   Use logical ordering: since the document is RTL, inline-flex will place children left-to-right
   by default, but we ensure consistent alignment by forcing order and margins. */
.product-toggle .toggle-emblem {
  order: 0;
  margin-inline-end: 8px; /* gap to label */
}

.product-toggle .toggle-label {
  order: 1;
}

/* Make SVG arrow color transition smooth */
.product-toggle .arrow path {
  transition: transform 0.25s ease, fill 0.2s ease;
}

.product-toggle[aria-expanded="true"] .toggle-emblem {
  transform: rotate(180deg);
  box-shadow: 0 4px 14px rgba(173, 178, 212, 0.45);
}

.toggle-label {
  position: relative;
}

/* Details */
.product-details {
  overflow: hidden;
  max-height: 0px; /* start collapsed */
  transition: max-height 0.4s ease, opacity 0.25s ease, margin 0.25s ease;
  opacity: 0;
  margin: 0; /* reset default margins so we control spacing */
}

/* Note: visibility is toggled via JS by adding .open to .product-details */

.product-details.open {
  max-height: 800px; /* large enough for most descriptions */
  opacity: 1;
  margin: 10px 0 6px; /* open a gap between name and toggle */
}

.product-details p {
  margin: 0 0 10px 0;
  color: #4f4f4f;
  font-size: 1.15em;
  line-height: 1.7;
  text-align: justify;
}

/* Make links inside product cards match site CTA/button style */
.catalog-intro-inner a {
  display: inline-block;
  background: linear-gradient(135deg, #adb2d4 0%, #c7d9dd 100%);
  color: white;
  padding: 10px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 15px rgba(173, 178, 212, 0.28);
  margin-top: 12px;
}

.product-details a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(173, 178, 212, 0.45);
}

/* Accessibility: visible focus for keyboard users */
.product-details a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(173, 178, 212, 0.35);
  border-radius: 20px;
}

.product-details a:active {
  transform: translateY(0);
}

/* Empty state (kept from previous) */
.coming-soon-box-container {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-box {
  height: 260px;
  width: 260px;
  background-color: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 15px;
  padding: 30px;
  margin: 0 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease-in-out;
}

.coming-soon-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.coming-soon-box p {
  font-size: 2em;
  color: #4f4f4f;
  text-align: right;
  direction: rtl;
}

/* Responsive */
@media (max-width: 1100px) {
  .product-card,
  .product-card.reverse {
    grid-template-columns: 1fr; /* stack */
  }

  /* Make media responsive on smaller screens: allow it to stretch to full column
     width while preserving a sensible aspect ratio and letting the image cover */
  .product-media {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* keep square on mobile */
    max-height: 420px; /* cap extreme heights on large phones */
  }

  .product-media img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toggle-emblem,
  .product-details {
    transition: none;
  }
}
