/* Product detail — DrMediCart polish aligned (no chrome/footer overrides) */
:root {
  --pdp-purple: var(--purple, #4939A5);
  --pdp-purple-dark: var(--purple-dark, #351052);
  --pdp-soft: var(--purple-soft, #eeecfb);
  --pdp-ink: var(--ink, #292735);
  --pdp-line: var(--line, #E8E6EF);
  --pdp-muted: #121212;
  --pdp-green: #2f6b3a;
  --pdp-shadow: var(--shadow, 0 8px 24px rgba(41, 39, 53, 0.08));
}

#product {
  padding-bottom: 24px;
}

#product .breadcrumbs {
  min-height: 40px;
  height: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--pdp-muted);
  font-size: 12px;
  padding: 10px 0 6px;
}

#product .breadcrumbs a:hover { color: var(--pdp-purple); }
#product .breadcrumbs b {
  color: var(--pdp-ink);
  font-weight: 500;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 32px;
  align-items: start;
  padding: 4px 0 8px;
}

.gallery {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  position: sticky;
  top: 96px;
}

.thumb-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(520px, 68vh);
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.thumb {
  display: block;
  width: 68px;
  height: 76px;
  border: 1.5px solid #e2e4e5;
  background: #fff;
  padding: 4px;
  cursor: pointer;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumb:hover { border-color: #c9c4ef; }

.thumb.active {
  border-color: var(--pdp-purple);
  box-shadow: 0 0 0 3px rgba(73, 57, 165, 0.14);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-photo {
  aspect-ratio: 1;
  max-height: min(560px, 48vw);
  border: 1px solid var(--pdp-line);
  border-radius: 14px;
  position: relative;
  display: block;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(41, 39, 53, 0.04);
}

.main-photo > img {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center;
}

.image-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(41, 39, 53, 0.72);
  color: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 500;
}

.mobile-thumbs { display: none; }

.product-info { padding: 2px 0 0; }

.product-info .vendor {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--pdp-purple);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-info .vendor:hover { color: var(--pdp-purple-dark); }

.product-info h1 {
  font-family: var(--font, Poppins, "Segoe UI", sans-serif);
  font-size: clamp(20px, 2.2vw, 26px) !important;
  line-height: 1.28 !important;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 10px 0 10px !important;
  color: var(--pdp-ink) !important;
}

.review-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 2px;
}

.review-link > span {
  color: #f0a529;
  letter-spacing: 1px;
  font-size: 14px;
}

.review-link b { font-size: 13px; color: var(--pdp-ink); }
.review-link small {
  font-size: 12px;
  color: #5b6170;
}

.viewing-now {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px !important;
  font-size: 12px !important;
  color: #5b6170 !important;
  line-height: 1.4 !important;
}

.viewing-now strong {
  color: var(--pdp-ink);
  font-weight: 700;
}

.viewing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 0 rgba(34, 160, 107, 0.45);
  animation: viewing-pulse 1.8s ease-out infinite;
  flex: 0 0 auto;
}

@keyframes viewing-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 160, 107, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 160, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 160, 107, 0); }
}

.purchase-price {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 4px;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-label {
  font-size: 11px;
  color: #73757a;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.purchase-price strong {
  font-size: 26px;
  color: var(--pdp-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.purchase-price del {
  font-size: 15px;
  color: #9a9da1;
  line-height: 1.2;
}

.price-off {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ffe8e6;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}

.lowest-price-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--pdp-soft);
  color: var(--pdp-purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tariff-note {
  margin: 6px 0 0 !important;
  font-size: 12px !important;
  color: #5b6170 !important;
  line-height: 1.4 !important;
}

.delivery-block {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--pdp-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfcfe 0%, #fff 100%);
}

.delivery-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.delivery-kicker {
  font-size: 12px;
  font-weight: 600;
  color: #5b6170;
}

.delivery-row strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--pdp-ink);
  letter-spacing: -0.01em;
}

.delivery-sub {
  margin: 6px 0 0 !important;
  font-size: 12px !important;
  color: #5b6170 !important;
  line-height: 1.4 !important;
}

.free-ship-line {
  margin: 10px 0 0 !important;
  padding-top: 10px;
  border-top: 1px dashed var(--pdp-line);
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--pdp-green) !important;
  line-height: 1.35 !important;
}

.variant-group,
.option-picker {
  border-top: 1px solid var(--pdp-line);
  padding-top: 16px;
  margin-top: 16px;
}

.option-row + .option-row {
  margin-top: 14px;
}

.variant-label {
  font-size: 13px;
  margin-bottom: 10px;
  color: #65676c;
  font-weight: 600;
}

.pack-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pack-option {
  min-width: 88px;
  min-height: 40px;
  border: 1.5px solid #d9dcdf;
  border-radius: 10px;
  background: #fff;
  color: #292735;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.pack-option:hover:not(:disabled) { border-color: #c9c4ef; }

.pack-option.selected {
  border-color: var(--pdp-purple);
  color: #fff;
  background: var(--pdp-purple);
  box-shadow: 0 0 0 3px rgba(73, 57, 165, 0.14);
  font-weight: 600;
}

.pack-option.is-unavailable {
  opacity: 0.55;
  background: #f7f8fa;
  color: #6b7280;
  border-style: dashed;
}

.pack-option.is-unavailable:hover {
  opacity: 0.9;
  border-color: var(--pdp-purple);
  color: var(--pdp-purple);
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 13px;
  color: #4d4f54;
}

.quantity {
  height: 40px;
  display: flex;
  border: 1.5px solid #d7dade;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.quantity button {
  width: 38px;
  border: 0;
  background: white;
  color: #555;
  font-size: 18px;
  cursor: pointer;
}

.quantity button:hover {
  background: #f7f8fa;
  color: var(--pdp-purple);
}

.quantity input {
  width: 42px;
  text-align: center;
  border: 0;
  border-inline: 1px solid #eceef0;
  outline: 0;
  font-size: 14px;
  font-weight: 600;
  -moz-appearance: textfield;
}

.quantity input::-webkit-inner-spin-button,
.quantity input::-webkit-outer-spin-button { -webkit-appearance: none; }

.buy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.buy-actions .add-to-cart,
.buy-actions .buy-now {
  height: 46px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.add-to-cart {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgb(54, 16, 82);
  border: 1.5px solid rgb(54, 16, 82);
  color: #d4ff4a !important;
}

.add-to-cart::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0.38) 50%,
    rgba(255, 255, 255, 0.08) 58%,
    transparent 70%
  );
  transform: translateX(-130%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.add-to-cart:hover {
  background: rgb(42, 10, 68);
  border-color: rgb(42, 10, 68);
  color: #e8ff7a !important;
}

.add-to-cart:hover::after {
  transform: translateX(130%);
}

.buy-now {
  background: #fff;
  border: 1.5px solid var(--pdp-ink);
  color: var(--pdp-ink) !important;
}

.buy-now:hover {
  border-color: var(--pdp-purple);
  color: var(--pdp-purple) !important;
}

.trust-promises {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trust-promises li {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--pdp-line);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.trust-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--pdp-soft);
  color: var(--pdp-purple);
}

.trust-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.trust-copy {
  min-width: 0;
}

.trust-promises b {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--pdp-ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.trust-promises .trust-copy > span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
  color: #5b6170;
}

.shipping-card {
  margin-top: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--pdp-line);
  border-radius: 12px;
  background: var(--pdp-soft);
}

.ship-icon {
  width: 40px;
  height: 40px;
  background: #fff;
  color: var(--pdp-purple);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: 0 0 auto;
  border: 1px solid rgba(73, 57, 165, 0.12);
}

.shipping-card > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.shipping-card b { font-size: 13px; color: var(--pdp-ink); }
.shipping-card span {
  font-size: 12px;
  color: #5b6170;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .trust-promises {
    grid-template-columns: 1fr;
  }
}

/* Tabs */
.tabs-section {
  margin: 36px 0 0;
  border: 1px solid var(--pdp-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(41, 39, 53, 0.04);
}

.detail-tabs {
  min-height: 48px;
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 0 18px;
  border-bottom: 1px solid var(--pdp-line);
  background: #f7f8fa;
  overflow-x: auto;
  scrollbar-width: none;
}

.detail-tabs::-webkit-scrollbar { display: none; }

.detail-tab {
  position: relative;
  border: 0;
  background: none;
  color: #73757a;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  padding: 14px 0;
}

.detail-tab.active {
  color: var(--pdp-ink);
  font-weight: 650;
}

.detail-tab.active::after {
  content: "";
  height: 2px;
  background: var(--pdp-purple);
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}

.tab-content {
  display: none;
  padding: 22px 22px 26px;
}

.tab-content.active { display: block; }

.tab-content > h2 {
  font-size: var(--fs-body, 14px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  color: var(--pdp-purple);
  font-weight: 700;
}

.tab-content > p {
  font-size: var(--fs-body, 14px);
  line-height: 1.7;
  color: #000;
  margin: 0 0 12px;
  max-width: none;
  width: 100%;
}

/* Product description — full width, theme headings, consistent type.
   Imported Shopify/Excel HTML often ships inline font-size/family — force one size. */
.product-rte {
  width: 100%;
  max-width: none;
  font-size: var(--fs-body, 14px) !important;
  line-height: 1.75 !important;
  color: #000;
  letter-spacing: 0.01em;
  font-family: var(--font, inherit) !important;
}

.product-rte,
.product-rte * {
  font-size: var(--fs-body, 14px) !important;
  line-height: 1.75 !important;
  font-family: inherit !important;
}

.product-rte,
.product-rte p,
.product-rte li,
.product-rte span,
.product-rte div,
.product-rte font,
.product-rte strong,
.product-rte b,
.product-rte em,
.product-rte i,
.product-rte td,
.product-rte th {
  color: #000 !important;
}

.product-rte > *:first-child { margin-top: 0; }
.product-rte > *:last-child { margin-bottom: 0; }

.product-rte__lead {
  margin: 0 0 14px;
  font-size: var(--fs-body, 14px) !important;
  line-height: 1.75 !important;
  color: #000 !important;
  font-weight: 500;
}

.product-rte h1,
.product-rte h2,
.product-rte h3,
.product-rte h4,
.product-rte h5,
.product-rte h6 {
  margin: 1.2em 0 0.4em;
  color: var(--pdp-purple) !important;
  font-size: var(--fs-body, 14px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  line-height: 1.45 !important;
}

.product-rte h1:first-child,
.product-rte h2:first-child,
.product-rte h3:first-child {
  margin-top: 0;
}

.product-rte p,
.product-rte div:not([class]) {
  margin: 0 0 0.85em;
}

.product-rte ul,
.product-rte ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.product-rte ul { list-style: disc; }
.product-rte ol { list-style: decimal; }

.product-rte li {
  margin: 0.35em 0;
  padding-left: 0.15em;
}

.product-rte li::marker {
  color: var(--pdp-purple);
}

.product-rte a {
  color: var(--pdp-purple);
  font-weight: 600;
  text-decoration: none;
}

.product-rte a:hover {
  text-decoration: underline;
  color: var(--pdp-purple-dark);
}

.product-rte strong,
.product-rte b {
  font-weight: 700;
  color: #000;
}

.product-rte em,
.product-rte i {
  font-style: italic;
}

.product-rte blockquote {
  margin: 1em 0;
  padding: 12px 16px;
  border-left: 3px solid var(--pdp-purple);
  background: var(--pdp-soft);
  border-radius: 0 10px 10px 0;
  color: #000;
  font-size: inherit;
}

.product-rte hr {
  border: 0;
  border-top: 1px solid var(--pdp-line);
  margin: 1.2em 0;
}

.product-rte img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border-radius: 10px;
  border: 1px solid var(--pdp-line);
}

.product-rte table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: inherit;
  overflow: hidden;
  border-radius: 10px;
}

.product-rte th,
.product-rte td {
  border: 1px solid var(--pdp-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: inherit;
}

.product-rte th {
  background: var(--pdp-soft);
  color: var(--pdp-purple);
  font-weight: 650;
}

.product-rte figure {
  margin: 1em 0;
  width: 100%;
}

.product-rte figcaption {
  margin-top: 6px;
  font-size: inherit;
  color: #000;
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--pdp-line);
}

.reviews-summary > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.reviews-summary > div:first-child strong { font-size: 32px; }
.reviews-summary > div:first-child span {
  color: #eda72a;
  letter-spacing: 2px;
}

.reviews-summary small {
  color: var(--pdp-muted);
  font-size: 12px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.review-card {
  border: 1px solid var(--pdp-line);
  padding: 14px;
  border-radius: 12px;
  background: #fff;
}

.review-stars {
  font-size: 13px;
  color: #efa727;
  letter-spacing: 1px;
}

.review-card h3 {
  font-size: 14px !important;
  margin: 10px 0 6px !important;
}

.review-card p {
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: #6e7076 !important;
  margin: 0 0 12px !important;
}

.review-card footer {
  border-top: 1px solid #eee;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--pdp-muted);
}

.review-card footer b { color: var(--pdp-ink); }

/* Related */
.related { padding: 36px 0 28px; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 14px;
}

.section-heading p {
  margin: 0 0 4px !important;
  color: var(--pdp-purple) !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3 !important;
}

.section-heading h2 {
  font-size: 22px !important;
  margin: 0 !important;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--pdp-ink) !important;
}

.section-heading > a {
  font-size: 13px;
  color: var(--pdp-purple);
  font-weight: 600;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.related-card {
  border: 1px solid #e7e9ee;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--pdp-shadow);
}

.related-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  background: #fafbfc;
  border-radius: 8px;
  overflow: hidden;
}

.related-image img {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center;
}

.related-title {
  height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.35;
  color: var(--pdp-ink);
  font-weight: 500;
  margin-top: 8px;
}

.related-card > b {
  font-size: 13px;
  margin: 8px 0;
  color: var(--pdp-ink);
}

.related-add {
  display: grid;
  place-items: center;
  height: 36px;
  border: 1.5px solid rgb(54, 16, 82);
  border-radius: 8px;
  background: rgb(54, 16, 82);
  color: #d4ff4a !important;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  text-decoration: none;
}

.related-add:hover {
  background: rgb(42, 10, 68);
  border-color: rgb(42, 10, 68);
  color: #e8ff7a !important;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--pdp-ink);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s;
  pointer-events: none;
  box-shadow: var(--pdp-shadow);
}

.toast.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 1020px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .gallery {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
  }

  .thumb {
    width: 54px;
    height: 60px;
  }

  .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related-grid .related-card:nth-child(n+4) { display: none; }
}

@media (max-width: 760px) {
  .product-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .gallery {
    display: flex;
    flex-direction: column-reverse;
    position: static;
    width: 100%;
    gap: 10px;
  }

  .thumb-rail { display: none; }

  .main-photo {
    aspect-ratio: 1;
    max-height: none;
    width: 100%;
    border-radius: 12px;
    background: #fafafa;
  }

  .mobile-thumbs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 2px 0 4px;
    scrollbar-width: none;
  }

  .mobile-thumbs::-webkit-scrollbar { display: none; }

  .mobile-thumbs .thumb {
    width: 62px;
    height: 66px;
    flex: 0 0 62px;
  }

  .buy-actions { grid-template-columns: 1fr; }

  .tabs-section { margin-top: 24px; border-radius: 12px; }

  .detail-tabs {
    gap: 16px;
    padding: 0 14px;
  }

  .tab-content { padding: 16px 14px 20px; }

  .review-grid { grid-template-columns: 1fr; }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .related-grid .related-card:nth-child(n+4) { display: flex; }
}
