/* Dr Penguin product detail refinement — existing cream and brown palette */

/* Gallery controls sit over the image and remain easy to tap. */
#product-id .p_gallery_container > .mx-4 {
  position: relative !important;
}
#product-id .p_gallery_container > .mx-4 > div:has(> button[aria-label="prev-button"]) {
  position: absolute !important;
  inset: 0 8px !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  pointer-events: none !important;
}
#product-id .p_gallery_container button[aria-label="prev-button"],
#product-id .p_gallery_container button[aria-label="next-button"] {
  box-sizing: border-box !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #e3d8cf !important;
  border-radius: 50% !important;
  background: #fffdfb !important;
  color: #4b2516 !important;
  box-shadow: 0 3px 12px #4b251620 !important;
  pointer-events: auto !important;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s !important;
}
#product-id .p_gallery_container button[aria-label="prev-button"] svg,
#product-id .p_gallery_container button[aria-label="next-button"] svg {
  width: 20px !important;
  height: 20px !important;
}
#product-id .p_gallery_container button[aria-label="prev-button"]:not(:disabled):hover,
#product-id .p_gallery_container button[aria-label="next-button"]:not(:disabled):hover {
  border-color: #4b2516 !important;
  background: #4b2516 !important;
  color: #fffdfb !important;
  transform: scale(1.04);
}
#product-id .p_gallery_container button[aria-label="prev-button"]:disabled,
#product-id .p_gallery_container button[aria-label="next-button"]:disabled {
  opacity: .55 !important;
  cursor: not-allowed !important;
}
#product-id .p_gallery_container > .mx-4 > div:has(> button[aria-label="prev-button"]) > span {
  position: absolute !important;
  bottom: 12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  padding: 5px 12px !important;
  border: 1px solid #e3d8cf !important;
  border-radius: 999px !important;
  background: #fffdfb !important;
  color: #4b2516 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  box-shadow: 0 2px 8px #4b251614 !important;
  pointer-events: none !important;
}
#product-id .p_gallery_container img.sphinx_product_images_img {
  box-sizing: border-box !important;
  border-radius: 10px !important;
  object-fit: contain !important;
  outline-color: #e3d8cf !important;
}
#product-id .p_gallery_container img.sphinx_product_images_img[class*="outline-2"] {
  outline: 2px solid #4b2516 !important;
  outline-offset: 1px !important;
}
#product-id .p_gallery_container .sphinx_product_active_img {
  border-radius: 18px !important;
  background: #f7f2ed !important;
}

/* Purchase controls share one shape and a clear primary/secondary order. */
#product-id .add_to_cart_btn,
#product-id .checkout_btn,
#product-id .dp-product-contact {
  min-height: 52px !important;
  border-radius: 12px !important;
  letter-spacing: 0 !important;
}
#product-id .add_to_cart_btn:focus-visible,
#product-id .checkout_btn:focus-visible,
#product-id .dp-product-contact:focus-visible,
#product-id .p_gallery_container button[aria-label="prev-button"]:focus-visible,
#product-id .p_gallery_container button[aria-label="next-button"]:focus-visible {
  outline: 3px solid #b28b75 !important;
  outline-offset: 3px !important;
}
#product-id .add_to_cart_btn {
  background: #4b2516 !important;
  color: #fffdfb !important;
  border-color: #4b2516 !important;
  box-shadow: 0 4px 12px #4b25161c !important;
}
#product-id .checkout_btn {
  background: #fffdfb !important;
  color: #4b2516 !important;
  border: 1.5px solid #b28b75 !important;
}
#product-id .dp-product-contact {
  background: #f0f8f2 !important;
  color: #17683c !important;
  border: 1px solid #b7d9c2 !important;
}
#product-id .add_to_cart_btn + div {
  min-height: 48px !important;
  border: 1px solid #e3d8cf !important;
  border-radius: 12px !important;
  background: #fffdfb !important;
}
#product-id .add_to_cart_btn + div button {
  width: 34px !important;
  height: 34px !important;
  margin: 0 5px !important;
  border-radius: 50% !important;
  background: #f7f2ed !important;
  color: #4b2516 !important;
}
#product-id .add_to_cart_btn + div p {
  color: #4b2516 !important;
  font-weight: 700 !important;
}

/* Product details: a horizontal tab-like row on desktop, accordions on mobile. */
#product-id [role="tablist"] {
  gap: 8px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px solid #e3d8cf !important;
  border-radius: 0 !important;
  background: transparent !important;
}
#product-id [role="tablist"] [role="tab"] {
  min-height: 44px !important;
  padding: 10px 16px !important;
  border: 1px solid transparent !important;
  border-radius: 10px 10px 0 0 !important;
  background: transparent !important;
  color: #76675d !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}
#product-id [role="tablist"] [role="tab"][aria-selected="true"] {
  border-color: #e3d8cf !important;
  border-bottom-color: #4b2516 !important;
  background: #f7f2ed !important;
  color: #4b2516 !important;
}
#product-id .product_description .ql-editor {
  padding: 18px 4px !important;
  direction: rtl !important;
  text-align: right !important;
  color: #51443c !important;
  font-size: 15px !important;
  line-height: 1.9 !important;
}
#product-id .product_description .ql-editor > h2.dp-product-redundant-title {
  display: none !important;
}
#product-id .product_description .ql-editor > p:first-of-type {
  margin: 0 0 16px !important;
  padding: 7px 12px !important;
  border-right: 3px solid #b28b75 !important;
  color: #76675d !important;
  font-size: 15px !important;
  line-height: 1.9 !important;
}
#product-id .dp-product-sections {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 8px !important;
  align-items: start !important;
  margin-top: 16px !important;
}
#product-id .dp-product-accordion {
  display: contents !important;
}
#product-id .dp-product-accordion > summary {
  grid-row: 1 !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 11px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  border: 1px solid #e3d8cf !important;
  border-radius: 10px 10px 0 0 !important;
  background: #f7f2ed !important;
  color: #4b2516 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  list-style: none !important;
  cursor: pointer !important;
}
#product-id .dp-product-accordion > summary::-webkit-details-marker { display: none !important; }
#product-id .dp-product-accordion > summary::after {
  content: "+" !important;
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #b28b75 !important;
  border-radius: 50% !important;
  color: #4b2516 !important;
  font-size: 17px !important;
  line-height: 1 !important;
}
#product-id .dp-product-accordion[open] > summary {
  border-color: #4b2516 !important;
  background: #4b2516 !important;
  color: #fffdfb !important;
}
#product-id .dp-product-accordion[open] > summary::after {
  content: "−" !important;
  border-color: #fffdfb80 !important;
  color: #fffdfb !important;
}
#product-id .dp-product-accordion > .dp-product-accordion-body {
  display: none !important;
  grid-row: 2 !important;
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 1px solid #e3d8cf !important;
  border-top: 3px solid #4b2516 !important;
  border-radius: 0 0 12px 12px !important;
  background: #fffdfb !important;
  color: #51443c !important;
}
#product-id .dp-product-accordion[open] > .dp-product-accordion-body { display: block !important; }
#product-id .dp-product-accordion-body > p {
  margin: 0 0 10px !important;
  line-height: 1.9 !important;
}
#product-id .dp-product-accordion-body > p:has(> strong) {
  padding: 9px 12px !important;
  border: 1px solid #eee5dd !important;
  border-radius: 9px !important;
  background: #fbf7f3 !important;
}
#product-id .dp-product-accordion-body h4 {
  margin: 16px 0 5px !important;
  padding-right: 10px !important;
  border-right: 3px solid #b28b75 !important;
  color: #4b2516 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}
#product-id .dp-product-accordion-body a {
  color: #603622 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

@media (max-width: 767px) {
  #product-id .p_gallery_container > .mx-4 > div:has(> button[aria-label="prev-button"]) {
    inset-inline: 6px !important;
  }
  #product-id .p_gallery_container button[aria-label="prev-button"],
  #product-id .p_gallery_container button[aria-label="next-button"] {
    width: 42px !important;
    height: 42px !important;
  }
  #product-id .p_gallery_container > .mx-4 > div:has(> button[aria-label="prev-button"]) > span {
    bottom: 10px !important;
    font-size: 11px !important;
  }
  #product-id .p_details_container .relative.flex.flex-col > div:has(> .add_to_cart_btn) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  #product-id .p_details_container .relative.flex.flex-col > div:has(> .add_to_cart_btn) > .add_to_cart_btn {
    grid-row: 2 !important;
    width: 100% !important;
    min-height: 54px !important;
  }
  #product-id .p_details_container .relative.flex.flex-col > div:has(> .add_to_cart_btn) > .add_to_cart_btn + div {
    grid-row: 1 !important;
    justify-self: end !important;
    min-width: 146px !important;
  }
  #product-id .dp-product-sections { display: block !important; margin-top: 12px !important; }
  #product-id .dp-product-accordion {
    display: block !important;
    margin: 9px 0 !important;
    overflow: hidden !important;
    border: 1px solid #e3d8cf !important;
    border-radius: 12px !important;
    background: #fffdfb !important;
    box-shadow: 0 2px 8px #4b25160a !important;
  }
  #product-id .dp-product-accordion > summary {
    min-height: 52px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fffdfb !important;
    font-size: 14px !important;
  }
  #product-id .dp-product-accordion[open] > summary {
    border-bottom: 1px solid #e3d8cf !important;
    background: #f7f2ed !important;
    color: #4b2516 !important;
  }
  #product-id .dp-product-accordion[open] > summary::after {
    border-color: #b28b75 !important;
    color: #4b2516 !important;
  }
  #product-id .dp-product-accordion > .dp-product-accordion-body {
    display: none !important;
    padding: 13px 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fffdfb !important;
    font-size: 14px !important;
  }
  #product-id .dp-product-accordion[open] > .dp-product-accordion-body { display: block !important; }
  #product-id .product_description .ql-editor { padding: 14px 2px !important; font-size: 14px !important; }
  #product-id .product_description .ql-editor > p:first-of-type { font-size: 14px !important; }
  #product-id [role="tablist"] { padding-bottom: 6px !important; }
  #product-id [role="tablist"] [role="tab"] { min-height: 42px !important; padding: 9px 13px !important; font-size: 14px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #product-id .p_gallery_container button[aria-label="prev-button"],
  #product-id .p_gallery_container button[aria-label="next-button"],
  #product-id .add_to_cart_btn,
  #product-id .checkout_btn,
  #product-id .dp-product-contact { transition: none !important; }
}

/* Keep product information full width on desktop as well as mobile. */
@media (min-width: 769px) {
  #product-id .dp-product-sections {
    display: block !important;
    margin-top: 16px !important;
  }
  #product-id .dp-product-accordion {
    display: block !important;
    margin: 0 0 10px !important;
    overflow: hidden !important;
    border: 1px solid #e3d8cf !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px #4b25160a !important;
  }
  #product-id .dp-product-accordion > summary {
    grid-row: auto !important;
    width: 100% !important;
    border-radius: 0 !important;
    background: #f7f2ed !important;
    color: #4b2516 !important;
    font-size: 15px !important;
  }
  #product-id .dp-product-accordion[open] > summary {
    border-bottom: 1px solid #e3d8cf !important;
    background: #4b2516 !important;
    color: #fffdfb !important;
  }
  #product-id .dp-product-accordion > .dp-product-accordion-body {
    grid-column: auto !important;
    grid-row: auto !important;
    padding: 18px 20px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fffdfb !important;
  }
}
