/*
 * Dallianse Product Page Optimizer - front-end styles.
 * Uses the Gallianse brand tokens (--g-*) with self-contained fallbacks so it
 * works on any theme, including Blocksy.
 */

:root {
  --dlpp-wine: var(--g-wine, #7b1e2b);
  --dlpp-wine-dark: var(--g-wine-dark, #611722);
  --dlpp-ink: var(--g-ink, #1a1a1a);
  --dlpp-muted: var(--g-muted, #6b6b6b);
  --dlpp-line: var(--g-line, #e4e4e4);
  --dlpp-cream: var(--g-cream, #faf8f6);
  --dlpp-gold: #c9962e;
}

/* ---------- Announcement bar ---------- */
.dl-announcement {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  background: var(--dlpp-wine);
  color: #fff;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dl-announcement span {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- Social proof row ---------- */
.dl-social-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dlpp-muted);
}

.dl-social-proof .dl-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dlpp-ink);
}

.dl-social-proof .dl-rating b {
  font-size: 13px;
  font-weight: 800;
}

.dl-social-proof .dl-rating em {
  font-style: normal;
  color: var(--dlpp-muted);
}

.dl-social-proof .dl-stars {
  color: var(--dlpp-gold);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.dl-social-proof .dl-loved {
  font-weight: 700;
  color: var(--dlpp-wine);
  letter-spacing: 0.04em;
}

.dl-social-proof .dl-sep {
  color: var(--dlpp-line);
}

/* ---------- Tagline ---------- */
.dl-tagline {
  margin: 2px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.6vw, 20px);
  font-style: italic;
  line-height: 1.55;
  color: var(--dlpp-muted);
}

/* ---------- Shipping note under price ---------- */
.dl-shipping-note {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dlpp-muted);
}

/* ---------- Size guide link ---------- */
.dl-size-guide-wrap {
  margin: 4px 0 10px;
}

button.dl-size-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--dlpp-line);
  border-radius: 2px;
  color: var(--dlpp-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

button.dl-size-guide-btn::before {
  content: "SIZE";
  color: var(--dlpp-wine);
}

button.dl-size-guide-btn:hover,
button.dl-size-guide-btn:focus-visible {
  border-color: var(--dlpp-wine);
  color: var(--dlpp-wine);
}

/* Position the link next to the Size label inside the variations table. */
.single-product table.variations td.label .dl-size-guide-wrap,
.single-product .variations_form .dl-size-guide-wrap {
  margin: 0 0 0 8px;
  display: inline-block;
}

.single-product table.variations td.label .dl-size-guide-wrap button.dl-size-guide-btn {
  padding: 4px 8px;
  font-size: 9.5px;
}

/* ---------- CTA reassurance ---------- */
.dl-cta-note {
  margin: 14px 0 8px;
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
  color: var(--dlpp-ink);
}

.dl-cta-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin: 0 0 4px;
  padding: 10px 0;
  border-top: 1px solid var(--dlpp-line);
  border-bottom: 1px solid var(--dlpp-line);
  list-style: none;
}

.dl-cta-trust li {
  position: relative;
  padding-left: 14px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a3a3a;
}

.dl-cta-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--dlpp-wine);
}

/* ---------- Review summary strip ---------- */
.dl-reviews-summary {
  margin: 34px auto 0;
  padding: 20px 24px;
  max-width: 1180px;
  background: var(--dlpp-cream);
  border: 1px solid var(--dlpp-line);
  border-radius: 2px;
}

.dl-reviews-summary__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dl-reviews-summary__stars .dl-stars {
  color: var(--dlpp-gold);
  font-size: 19px;
  letter-spacing: 0.08em;
}

.dl-reviews-summary__line {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--dlpp-muted);
}

.dl-reviews-summary__cta {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 20px;
  background: var(--dlpp-wine);
  color: #fff !important;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.18s ease;
}

.dl-reviews-summary__cta:hover {
  background: var(--dlpp-wine-dark);
  color: #fff !important;
}

/* ---------- Size guide modal ---------- */
.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dl-modal.is-open {
  display: flex;
}

.dl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 16, 0.62);
}

.dl-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 30px 30px 34px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.dl-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--dlpp-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dl-modal__close:hover {
  color: var(--dlpp-wine);
}

.dl-modal__title {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--dlpp-ink);
}

.dl-modal__panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.dl-modal__panel th,
.dl-modal__panel td {
  border: 1px solid var(--dlpp-line);
  padding: 9px 12px;
  text-align: center;
}

.dl-modal__panel th {
  background: var(--dlpp-cream);
  font-weight: 700;
}

.dl-modal__note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--dlpp-muted);
}

.dl-modal__source {
  display: none;
}

/* ---------- Sticky mobile add-to-cart bar ---------- */
.dl-sticky-bar {
  display: none;
}

@media (max-width: 900px) {
  .dl-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--dlpp-line);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(6px);
  }

  .dl-sticky-bar__meta {
    min-width: 0;
    flex: 1;
  }

  .dl-sticky-bar__title {
    overflow: hidden;
    margin: 0 0 2px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--dlpp-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dl-sticky-bar__price {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--dlpp-wine);
  }

  .dl-sticky-bar__price del {
    margin-left: 6px;
    color: var(--dlpp-muted);
    font-weight: 400;
    font-size: 13px;
  }

  .dl-sticky-bar__btn {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 22px;
    background: var(--dlpp-wine);
    border: 0;
    border-radius: 2px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s ease;
  }

  .dl-sticky-bar__btn:hover {
    background: var(--dlpp-wine-dark);
  }

  .dl-sticky-bar__btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  body.admin-bar .dl-sticky-bar {
    bottom: 32px;
  }
}

/* ---------- Editorial description polish ---------- */
.single-product .woocommerce-Tabs-panel--description > p:first-of-type {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.7;
  color: var(--dlpp-ink);
}

.single-product .woocommerce-Tabs-panel--description h2,
.single-product .woocommerce-Tabs-panel--description h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.single-product .woocommerce-Tabs-panel--description ul {
  margin-left: 18px;
}

/* ---------- Native review polish ---------- */
.single-product #reviews .commentlist {
  max-width: none;
}

.single-product #reviews .commentlist li .comment-text .star-rating {
  color: var(--dlpp-gold);
}

.single-product #reviews .comment-reply-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

@media (max-width: 900px) {
  body.single-product {
    padding-bottom: 84px;
  }
}
