/*
 * Standard templates: small fixes on the product / service cards (the original designs are kept), a details popup, a proper
 * "Show more / Show less" button,. (Industry templates are not touched.)
 * Selectors are boosted so they win over the Pro / High-Profile skins.
 */

/* ── cards: buttons never overflow, equal heights, whole card is clickable ─────────────────────── */
html body .content-section .item-cards .item-card { cursor: pointer; min-width: 0; }
html body .content-section .item-cards .item-card-foot { flex-wrap: wrap; gap: 8px; min-width: 0; }
html body .content-section .item-cards .item-card-foot .btn-whatsapp-sm { min-width: 0; max-width: 100%; white-space: nowrap; flex: 0 1 auto; }

/* grid cards (set by card-items.js): same height per row, buttons pinned to the bottom, buttons share the width */
html body .content-section .item-cards.vp-g { align-items: stretch; }
html body .content-section .item-cards.vp-g .item-card { display: flex; flex-direction: column; height: 100%; }
html body .content-section .item-cards.vp-g .item-card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
html body .content-section .item-cards.vp-g .item-card-foot { margin-top: auto; }
html body .content-section .item-cards.vp-g .item-card-foot .btn-whatsapp-sm { flex: 1 1 auto; text-align: center; justify-content: center; padding-left: 10px; padding-right: 10px; }
html body .content-section .item-cards .item-card .hp-toggle { display: none; }

/* Products and Services use one-card swipe carousels on mobile and desktop. */
html body .content-section .item-cards {
  display: flex !important;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 4px 12px;
  margin-inline: -4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
html body .content-section .item-cards .item-card {
  flex: 0 0 min(78%, 360px);
  scroll-snap-align: center;
}
html body .content-section .item-cards::-webkit-scrollbar { height: 5px; }
html body .content-section .item-cards::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent, #6d28d9) 45%, transparent); border-radius: 99px; }
@media (max-width: 680px) {
  html body .content-section .item-cards .item-card { flex-basis: 86%; }
  html body .content-section .item-cards { scrollbar-width: none; }
  html body .content-section .item-cards::-webkit-scrollbar { display: none; }
}

/* ── Show more / Show less ──────────────────────────────────────────────────────────────────────── */
html body .content-section .load-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 12px 0 2px; padding: 12px 16px;
  border-radius: 10px; border: 1px solid #d9d6e2; background: #fff; color: var(--ink, #1a1814); font: 700 .82rem var(--font, system-ui); cursor: pointer;
  transition: background .2s, border-color .2s;
}
html body .content-section .load-more-btn:hover { background: #f6f5fa; border-color: var(--accent, #6d28d9); }
html body .content-section .load-more-btn::after {
  content: ""; width: 8px; height: 8px; margin-top: -3px; border: solid var(--accent, #6d28d9); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .25s, margin .25s;
}
html body .content-section .load-more-btn.is-less::after { transform: rotate(-135deg); margin-top: 3px; }

/* ── details popup ─────────────────────────────────────────────────────────────────────────────── */
.vp-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(18, 16, 28, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.vp-modal.is-open { opacity: 1; }
.vp-modal-box { position: relative; width: 100%; max-width: 440px; max-height: min(88vh, 720px); overflow: auto; background: #fff; border-radius: 18px; transform: translateY(14px) scale(.98); transition: transform .3s cubic-bezier(.2, .8, .2, 1); font-family: var(--font, system-ui, sans-serif); color: #1a1814; }
.vp-modal.is-open .vp-modal-box { transform: none; }
.vp-modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .92); color: #1a1814; font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.vp-modal-img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 18px 18px 0 0; background: #f2f3f8; }
.vp-modal-body { padding: 18px 20px 20px; }
.vp-modal-body h3 { margin: 0 0 6px; font-size: 1.2rem; line-height: 1.3; font-weight: 700; color: #1a1814; }
.vp-modal-price { display: inline-block; margin: 2px 0 10px; padding: 4px 11px; border-radius: 8px; font-weight: 800; font-size: .9rem; color: var(--accent, #6d28d9); background: color-mix(in srgb, var(--accent, #6d28d9) 10%, #fff); }
.vp-modal-body p { margin: 0 0 18px; font-size: .9rem; line-height: 1.65; color: #4a463f; white-space: pre-line; }
.vp-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vp-modal-actions a { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; font-size: .88rem; font-weight: 700; text-decoration: none; color: #1a1814; background: #fff; border: 1px solid #d9d6e2; }
.vp-modal-actions a.is-primary { color: #fff; background: var(--accent, #6d28d9); border-color: var(--accent, #6d28d9); }
html.vp-modal-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .vp-modal, .vp-modal-box { transition: none; } }
