/*=====================================
         AD-DETAILS PAGE STYLE

  Colours come from the :root palette in main.css. Nothing new is defined
  here beyond alpha variations of those, and there are no gradients.
======================================*/
.ad-details-part {
  padding: 60px 0px 70px;
  background: var(--chalk);
}

.ad-details-part .common-card {
  padding: 26px 28px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0px 1px 2px rgba(35, 45, 59, 0.04);
}

.ad-details-part .card-header {
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.ad-details-part .card-title {
  font-size: 14px;
  letter-spacing: 0.4px;
}

/* ── Header: breadcrumb, title, location, stats ─────── */
.ad-details-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ad-details-breadcrumb .flat-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  margin-right: 4px;
  text-transform: uppercase;
}

.ad-details-breadcrumb .breadcrumb-item,
.ad-details-breadcrumb .breadcrumb-item a {
  font-size: 13px;
  color: var(--gray);
}

.ad-details-breadcrumb .breadcrumb-item a:hover {
  color: var(--primary);
}

.ad-details-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
  color: var(--border);
  text-shadow: none;
}

.ad-details-breadcrumb .breadcrumb-item.active {
  color: var(--heading);
  text-shadow: none;
}

.ad-details-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 34px;
  margin-bottom: 10px;
  color: var(--heading);
  text-transform: none;
}

.ad-details-address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 16px;
  color: var(--text);
  text-transform: capitalize;
}

.ad-details-address i {
  font-size: 13px;
  color: var(--gray);
}

/* Quiet inline stats — no coloured discs competing with the photographs. */
.ad-details-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 14px 0px;
  margin-bottom: 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ad-details-meta a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  font-size: 13px;
  color: var(--gray);
}

.ad-details-meta a span {
  color: var(--gray);
  text-transform: none;
}

.ad-details-meta a i {
  width: auto;
  height: auto;
  font-size: 13px;
  line-height: 1;
  margin: 0px;
  border-radius: 0px;
  background: none;
  color: var(--gray);
}

.ad-details-meta a span strong {
  margin-right: 0px;
  font-weight: 600;
  color: var(--heading);
}

.ad-details-meta .rating i {
  background: none;
  color: var(--rating);
}

.ad-details-meta a.rating:hover span,
.ad-details-meta a.rating:hover strong {
  color: var(--primary);
}

/* ── Gallery ────────────────────────────────────────── */
.ad-details-slider-group {
  position: relative;
  margin-bottom: 14px;
}

.ad-details-slider .slick-slide {
  margin-bottom: 0px;
}

/* A fixed frame stops portrait and landscape uploads jolting the layout,
   and contain means nothing important is cropped away. */
/* The same frame applies before slick.js (deferred) has run, and only the
   first photo shows, so the gallery does not paint as a tall stack first. */
.ad-details-slider:not(.slick-initialized) > :not(:first-child) {
  display: none;
}

.ad-details-slider .slick-slide img,
.ad-details-slider:not(.slick-initialized) img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--chalk);
  border-radius: 8px;
}

.ad-gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--white);
  background: rgba(35, 45, 59, 0.72);
}

.ad-gallery-count i {
  margin-right: 5px;
  font-size: 11px;
}

.ad-thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.ad-thumb {
  padding: 0px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--chalk);
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  transition: border-color .2s ease, opacity .2s ease;
}

.ad-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0.62;
  transition: opacity .2s ease;
}

.ad-thumb:hover img,
.ad-thumb:focus-visible img {
  opacity: 1;
}

.ad-thumb.is-active {
  border-color: var(--primary);
}

.ad-thumb.is-active img {
  opacity: 1;
}

.ad-thumb:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Bookmark / share row ───────────────────────────── */
.ad-details-action {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ad-details-action .product-btn {
  display: contents;
}

.ad-details-action a,
.ad-details-action button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  flex: 1 1 140px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color .2s ease, border-color .2s ease;
}

.ad-details-action a i,
.ad-details-action button i {
  margin-right: 0px;
  font-size: 14px;
}

.ad-details-action a:hover,
.ad-details-action button:hover {
  color: var(--primary);
  background: var(--white);
  border-color: var(--primary);
}

.ad-details-action .wish.active,
.ad-details-action .wish.active:hover {
  color: var(--red);
  background: var(--white);
  border-color: var(--red);
}

/* ── Specification list ─────────────────────────────── */
.ad-details-specific {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  grid-gap: 0px;
  grid-column-gap: 40px;
}

.ad-details-specific li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 11px 0px;
  background: none;
  border-radius: 0px;
  border-bottom: 1px solid var(--border);
  text-transform: none;
}

.ad-details-specific li h6 {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--gray);
  text-transform: none;
}

.ad-details-specific li p {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  color: var(--heading);
  text-transform: capitalize;
}

/* ── Description ────────────────────────────────────── */
.ad-details-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

.ad-details-desc p {
  margin-bottom: 14px;
}

.ad-details-desc p:last-child {
  margin-bottom: 0px;
}

.ad-details-desc h1,
.ad-details-desc h2,
.ad-details-desc h3,
.ad-details-desc h4,
.ad-details-desc h5,
.ad-details-desc h6 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0px 8px;
  color: var(--heading);
}

.ad-details-desc ul,
.ad-details-desc ol {
  margin: 0px 0px 14px 18px;
}

.ad-details-desc li {
  list-style: inherit;
  margin-bottom: 6px;
}

.ad-details-desc a {
  color: var(--primary);
  text-decoration: underline;
}

.ad-details-desc img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ── Sidebar ────────────────────────────────────────── */
@media (min-width: 992px) {
  .ad-details-sidebar {
    position: sticky;
    top: 20px;
  }
}

/* Price and order */
.ad-order-card {
  padding: 24px;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0px 1px 2px rgba(35, 45, 59, 0.04);
}

.ad-order-price {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.ad-order-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 6px;
}

.ad-order-price h3 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
  word-break: break-word;
}

.ad-order-price h3.soft {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.ad-order-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(17, 183, 107, 0.1);
}

.ad-order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.ad-order-btn:last-of-type {
  margin-bottom: 0px;
}

.ad-order-btn i {
  font-size: 16px;
}

.ad-order-btn-primary {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.ad-order-btn-primary:hover {
  color: var(--white);
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.ad-order-btn-wa {
  color: var(--green);
  background: var(--white);
  border-color: var(--green);
}

.ad-order-btn-wa:hover {
  color: var(--white);
  background: var(--green);
}

.ad-order-empty {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

.ad-order-empty i {
  color: var(--primary);
  margin-right: 5px;
}

.ad-order-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--gray);
}

.ad-order-note i {
  margin-top: 2px;
  color: var(--green);
}

/* Seller */
.seller-card {
  padding: 24px;
}

.seller-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.seller-info-col {
  flex: 1;
  min-width: 0;
}

.seller-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-name:hover {
  color: var(--primary);
}

.seller-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray);
  margin: 0px 0px 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-meta i {
  width: 12px;
  font-size: 11px;
  color: var(--gray);
  text-align: center;
}

.seller-stats-row {
  display: flex;
  padding: 14px 0px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.seller-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border-left: 1px solid var(--border);
}

.seller-stat:first-child {
  border-left: none;
}

.seller-stat-num {
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
}

.seller-stat-label {
  font-size: 10.5px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.seller-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.seller-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.seller-btn i {
  font-size: 13px;
}

.seller-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.seller-btn-follow.is-following {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.seller-btn:disabled {
  opacity: .65;
  cursor: default;
}

/* An odd one out spans the row rather than leaving a gap. */
.seller-actions .seller-btn:nth-child(odd):last-child {
  grid-column: 1 / -1;
}

.seller-website-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.seller-website-link:hover {
  text-decoration: underline;
}

/* ── Reviews ────────────────────────────────────────── */
.ad-review-score {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
}

.ad-review-score i {
  font-size: 13px;
  color: var(--rating);
}

.ad-review-score small {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray);
}

.ad-review-card {
  padding: 16px 0px;
  border-bottom: 1px solid var(--border);
}

.ad-review-card:first-child {
  padding-top: 0px;
}

.ad-review-card:last-of-type {
  border-bottom: none;
  padding-bottom: 0px;
}

.ad-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ad-review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.ad-review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-review-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ad-review-meta strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.ad-review-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--heading);
  background: var(--chalk);
  padding: 2px 8px;
  border-radius: 4px;
}

.ad-review-rating i {
  font-size: 10px;
  color: var(--rating);
}

.ad-review-date {
  font-size: 11.5px;
  color: var(--gray);
  margin-left: auto;
  white-space: nowrap;
}

.ad-review-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  margin: 0px;
  padding-left: 46px;
}

.ad-review-empty {
  padding: 24px 0px;
  text-align: center;
  color: var(--gray);
}

.ad-review-empty i {
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--border);
}

.ad-review-empty p {
  font-size: 14px;
  margin: 0px;
}

.ad-review-form {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.ad-review-form-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--heading);
}

.ad-review-form-row {
  margin-bottom: 14px;
}

.ad-review-form-row label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 7px;
  color: var(--text);
}

.ad-review-form-row label span {
  font-weight: 400;
  color: var(--gray);
}

.ad-review-form-row select,
.ad-review-form-row textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--heading);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s ease;
}

.ad-review-form-row select:focus,
.ad-review-form-row textarea:focus {
  border-color: var(--primary);
}

.ad-review-form-row textarea {
  resize: vertical;
  min-height: 84px;
}

.ad-review-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--primary);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.ad-review-submit:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.ad-review-signin {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text);
}

.ad-review-signin a {
  font-weight: 600;
  color: var(--primary);
}

/* ── Safety tips ────────────────────────────────────── */
.ad-safety-card summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.ad-safety-card summary::-webkit-details-marker {
  display: none;
}

.ad-safety-card summary .card-title {
  flex: 1;
  margin: 0px;
}

.ad-safety-card summary>i:first-child {
  color: var(--green);
}

.ad-safety-chevron {
  font-size: 11px;
  color: var(--gray);
  transition: transform .2s ease;
}

.ad-safety-card[open] .ad-safety-chevron {
  transform: rotate(180deg);
}

.ad-safety-card[open] summary {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.ad-details-safety p {
  margin-bottom: 12px;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  position: relative;
}

.ad-details-safety p::before {
  position: absolute;
  content: "\f00c";
  top: 3px;
  left: 0px;
  font-size: 11px;
  font-weight: 900;
  font-family: 'Font Awesome 5 Free';
  color: var(--green);
}

.ad-details-safety p:last-child {
  margin-bottom: 0px;
}

/* ── Sticky order bar (small screens) ───────────────── */
.ad-sticky-order {
  position: fixed;
  left: 0px;
  right: 0px;
  bottom: 0px;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0px -2px 12px rgba(35, 45, 59, 0.08);
  transform: translateY(110%);
  transition: transform .25s ease;
}

.ad-sticky-order.show {
  transform: translateY(0);
}

.ad-sticky-price {
  min-width: 0;
}

.ad-sticky-price strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-sticky-price span {
  display: block;
  font-size: 11.5px;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.ad-sticky-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ad-sticky-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 18px;
  color: var(--green);
  background: var(--white);
  border: 1px solid var(--green);
}

.ad-sticky-wa:hover {
  color: var(--white);
  background: var(--green);
}

.ad-sticky-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--primary);
}

.ad-sticky-btn:hover {
  color: var(--white);
  background: var(--primary-hover);
}

/* ── Related ────────────────────────────────────────── */
.related-part .product-card {
  margin: 0px 10px;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1199px) {
  .ad-details-part {
    padding: 50px 0px 60px;
  }
}

@media (max-width: 991px) {
  .ad-details-sidebar {
    position: static;
  }

  .ad-sticky-order {
    display: flex;
    /* clear of the fixed mobile nav */
    bottom: 56px;
  }

  /* Keep the last card from hiding under the sticky bar. */
  .ad-details-sidebar>*:last-child {
    margin-bottom: 76px;
  }
}

@media (max-width: 767px) {
  .ad-details-part {
    padding: 30px 0px 40px;
  }

  .ad-details-part .common-card,
  .ad-order-card,
  .seller-card {
    padding: 20px 18px;
    margin-bottom: 18px;
  }

  .ad-details-title {
    font-size: 21px;
    line-height: 29px;
  }

  .ad-details-meta {
    gap: 8px 18px;
    padding: 12px 0px;
    margin-bottom: 18px;
  }

  .ad-details-specific {
    grid-template-columns: minmax(0, 1fr);
    grid-column-gap: 0px;
  }

  .ad-order-price h3 {
    font-size: 26px;
  }

  .ad-review-body {
    padding-left: 0px;
  }
}

@media (max-width: 575px) {
  .ad-details-part .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ad-details-part .common-card,
  .ad-order-card,
  .seller-card {
    padding: 18px 16px;
  }

  .ad-details-title {
    font-size: 19px;
    line-height: 27px;
  }

  .ad-details-action a,
  .ad-details-action button {
    flex-basis: calc(50% - 5px);
    padding: 10px 12px;
    font-size: 13px;
  }

  .ad-gallery-count {
    right: 8px;
    bottom: 8px;
    font-size: 11px;
    padding: 3px 9px;
  }

  .ad-sticky-order {
    padding: 8px 12px;
    gap: 10px;
  }

  .ad-sticky-btn {
    padding: 11px 16px;
    font-size: 14px;
  }

  .seller-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .related-part .product-card {
    margin: 0px 5px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .ad-order-btn,
  .ad-sticky-order,
  .ad-safety-chevron,
  .ad-details-action a,
  .ad-details-action button,
  .seller-btn,
  .ad-thumb img {
    transition: none;
  }
}


/* The narrower container padding above left bootstrap's -15px row margins
   poking 3px past the screen on each side, so the page scrolled sideways. */
@media (max-width: 575px) {
  .ad-details-part .container > .row {
    margin-left: -12px;
    margin-right: -12px;
  }

  .ad-details-part .container > .row > [class*="col-"] {
    padding-left: 12px;
    padding-right: 12px;
  }
}


/* On phones the title banner filled the first screen and pushed the photos
   below the fold; the title is repeated right under it anyway. */
@media (max-width: 767px) {
  .ad-page-banner {
    display: none;
  }
}
