/* Products: catalog list and product page. Loaded after projects.css, whose shared pieces (hero, search, chips, pager,
   CTA, section titles, description prose, share buttons) the product pages reuse so both sections look like one family. */
:root {
    --prd-navy: var(--pb-navy, #123957);
    --prd-red: var(--pb-red, #c32c35);
    --prd-ink: var(--pb-ink, #172d40);
    --prd-line: var(--pb-line, #dce5ed);
    --prd-muted: #5a6b7b;
    --prd-soft: #f3f7fa;
    --prd-radius: 20px;
    --prd-shadow: 0 16px 38px rgba(8, 45, 72, .1);
    --prd-green: #1a8f4c;
}

/* ---------- Shared ---------- */
.prd-brand { position: absolute; z-index: 2; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); min-height: 28px; padding: 3px 11px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--prd-navy); font-size: .74rem; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 6px 16px rgba(4, 24, 40, .14); }
.prd-brand--inline { position: static; max-width: none; background: #e9f1f8; box-shadow: none; }
.prd-brand--inline svg, .prd-brand--inline i { color: var(--prd-navy); font-size: .8em; }
.prd-empty__actions { justify-content: center; margin-top: 0; }
.prd-empty__actions .pb-secondary { border-color: var(--prd-line); background: #fff; color: var(--prd-navy) !important; backdrop-filter: none; }
.prd-empty__actions .pb-secondary:hover { border-color: var(--prd-navy); color: var(--prd-navy) !important; background: #fff; }

/* ---------- Grid and cards ---------- */
.prd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }

.prd-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--prd-line); border-radius: var(--prd-radius); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.prd-card:hover { transform: translateY(-5px); box-shadow: var(--prd-shadow); border-color: #c9d6e2; }
.prd-card:has(.prd-card__title a:focus-visible) { outline: 3px solid #cd3540; outline-offset: 3px; }
.prd-card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f4f7fa; }
.prd-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.prd-card:hover .prd-card__media img { transform: scale(1.06); }
.prd-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px 16px; }
.prd-card__title { display: -webkit-box; min-height: calc(2 * 1.85em); margin: 0; overflow: hidden; font-size: 1rem; font-weight: 800; line-height: 1.85; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.prd-card__title a { color: var(--prd-ink) !important; text-decoration: none !important; }
.prd-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.prd-card__title a:hover { color: var(--prd-red) !important; }
.prd-card__title a:focus-visible { outline: none; }
.prd-card__excerpt { display: -webkit-box; margin: 0; overflow: hidden; color: var(--prd-muted); font-size: .84rem; line-height: 1.95; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.prd-card__specs { width: 100%; margin: 2px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--prd-soft); font-size: .78rem; }
.prd-card__specs > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.prd-card__specs > div + div { border-top: 1px dashed #d6e0e8; }
.prd-card__specs dt { flex: none; max-width: 50%; overflow: hidden; color: var(--prd-muted); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.prd-card__specs dd { min-width: 0; margin: 0; overflow: hidden; color: var(--prd-ink); font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.prd-card__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--prd-line); }
.prd-card__more { display: inline-flex; align-items: center; gap: 8px; color: var(--prd-red); font-size: .86rem; font-weight: 800; white-space: nowrap; }
.prd-card__more svg, .prd-card__more i { transition: transform .25s; }
.prd-card:hover .prd-card__more svg, .prd-card:hover .prd-card__more i { transform: translateX(-4px); }
.prd-card__ask { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 1px solid var(--prd-line); border-radius: 10px; background: #fff; color: var(--prd-navy) !important; font-size: .78rem; font-weight: 800; text-decoration: none !important; white-space: nowrap; transition: border-color .2s, background-color .2s, color .2s; }
.prd-card__ask:hover { border-color: var(--prd-navy); background: var(--prd-navy); color: #fff !important; }
.prd-card__ask:focus-visible { outline: 3px solid #cd3540; outline-offset: 2px; }
.prd-card__ask .fa-whatsapp, .prd-card__ask svg[data-icon="whatsapp"] { color: var(--prd-green); }
.prd-card__ask:hover .fa-whatsapp, .prd-card__ask:hover svg[data-icon="whatsapp"] { color: #fff; }

/* ---------- Product page ---------- */
.prd-detail { max-width: 1220px; margin: 0 auto; padding: 0 24px; color: var(--prd-ink); }
.prd-detail__top { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 36px; align-items: start; margin: 8px 0 36px; }
.prd-detail__gallery { position: sticky; top: 96px; min-width: 0; }
/* Product photos are shown whole (the shared gallery crops project photos to fill the frame). */
.prd-detail .project-gallery__slide { aspect-ratio: 4 / 3; background: #fff; }
.prd-detail .project-gallery__slide img { object-fit: contain; }

.prd-summary { min-width: 0; }
.prd-summary__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.prd-summary__title { margin: 0 0 12px; color: var(--prd-navy); font-size: clamp(1.55rem, 3.2vw, 2.3rem); font-weight: 900; line-height: 1.65; }
.prd-summary__lead { margin: 0 0 20px; color: #3f5263; font-size: clamp(.98rem, 1.5vw, 1.08rem); line-height: 2.1; }

.prd-keyspecs { margin: 0 0 20px; padding: 16px 18px; border: 1px solid var(--prd-line); border-radius: 16px; background: #fff; }
.prd-keyspecs__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--prd-navy); font-size: .95rem; font-weight: 800; }
.prd-keyspecs__title svg, .prd-keyspecs__title i { color: var(--prd-red); }
.prd-keyspecs dl { margin: 0; }
.prd-keyspecs dl > div { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf1f4; }
.prd-keyspecs dl > div:last-child { border-bottom: 0; }
.prd-keyspecs dt { color: var(--prd-muted); font-size: .84rem; font-weight: 600; }
.prd-keyspecs dd { margin: 0; font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.prd-keyspecs__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--prd-red) !important; font-size: .84rem; font-weight: 800; text-decoration: none !important; }

.prd-inquiry { position: relative; overflow: hidden; margin: 0 0 18px; padding: 22px; border-radius: 20px; color: #e8f1f7; background: linear-gradient(125deg, #0a2c47, #0d4167 60%, #0b5483); box-shadow: 0 20px 44px rgba(8, 45, 72, .18); }
.prd-inquiry::after { content: ""; position: absolute; left: -90px; bottom: -120px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(195, 44, 53, .25) 0 14%, transparent 14.5% 32%, rgba(255, 255, 255, .05) 32.5% 46%, transparent 46.5%); pointer-events: none; }
.prd-inquiry__title { position: relative; margin: 0 0 6px; color: #fff; font-size: 1.1rem; font-weight: 800; }
.prd-inquiry__text { position: relative; margin: 0 0 16px; color: rgba(232, 241, 247, .86); font-size: .88rem; line-height: 2; }
.prd-inquiry__actions { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.prd-action { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 8px 16px; border-radius: 14px; font-size: .9rem; text-align: center; text-decoration: none !important; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.prd-action span { display: flex; flex-direction: column; line-height: 1.5; }
.prd-action b { font-weight: 850; }
.prd-action small { font-size: .78rem; font-weight: 600; opacity: .9; }
.prd-action svg, .prd-action i { flex: none; font-size: 1.15em; }
.prd-action:hover { transform: translateY(-2px); }
.prd-action:focus-visible { outline: 3px solid #ff7b83; outline-offset: 2px; }
.prd-action--call { grid-column: 1 / -1; min-height: 60px; background: linear-gradient(135deg, #dc3945, #bd232e); color: #fff !important; box-shadow: 0 12px 28px rgba(195, 44, 53, .32); }
.prd-action--call:hover { background: linear-gradient(135deg, #e34651, #ae1e28); box-shadow: 0 16px 32px rgba(195, 44, 53, .4); }
.prd-action--whatsapp { background: #1f9d55; color: #fff !important; }
.prd-action--whatsapp:hover { background: #188747; }
.prd-action--form { border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .07); color: #fff !important; }
.prd-action--form:hover { background: rgba(255, 255, 255, .14); }
/* Without WhatsApp the form button takes the whole row. */
.prd-inquiry__actions > .prd-action--form:first-child,
.prd-inquiry__actions > .prd-action--call + .prd-action--form { grid-column: 1 / -1; }

.prd-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.prd-share__title { margin: 0; color: var(--prd-muted); font-size: .86rem; font-weight: 700; }
.prd-share .prj-share__list { gap: 6px; }
.prd-share__btn { justify-content: center; width: 44px; padding: 0; }
.prd-share .prj-share__status { flex-basis: 100%; margin: 0; }

.prd-tabs { position: sticky; z-index: 5; top: 76px; display: flex; gap: 6px; margin: 0 0 22px; padding: 6px; overflow-x: auto; border: 1px solid var(--prd-line); border-radius: 16px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); scrollbar-width: none; }
.prd-tabs::-webkit-scrollbar { display: none; }
.prd-tabs a { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 6px 18px; border-radius: 11px; color: var(--prd-navy) !important; font-size: .9rem; font-weight: 800; text-decoration: none !important; transition: background-color .2s; }
.prd-tabs a:hover { background: var(--prd-soft); }
.prd-tabs svg, .prd-tabs i { color: var(--prd-red); }
.prd-section { scroll-margin-top: 150px; }

.prd-specs { width: 100%; margin: 0; overflow: hidden; border: 1px solid var(--prd-line); border-radius: 14px; border-collapse: separate; border-spacing: 0; font-size: .92rem; line-height: 1.9; }
.prd-specs th, .prd-specs td { padding: .75em 1.1em; border-bottom: 1px solid var(--prd-line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.prd-specs th { width: 34%; color: var(--prd-muted); font-weight: 700; background: #f7fafc; border-inline-end: 1px solid var(--prd-line); }
.prd-specs td { color: var(--prd-ink); font-weight: 600; }
.prd-specs tr:nth-child(even) th { background: #eef3f7; }
.prd-specs tr:nth-child(even) td { background: #f7fafc; }
.prd-specs tr:last-child th, .prd-specs tr:last-child td { border-bottom: 0; }

.prd-after { margin-top: 12px; }
.prd-after .prj-cta { margin: 48px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .prd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
    .prd-detail__top { gap: 28px; }
}
@media (max-width: 991.98px) {
    .prd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prd-detail__top { grid-template-columns: minmax(0, 1fr); }
    .prd-detail__gallery { position: static; }
}
@media (max-width: 767.98px) {
    .prd-detail { padding: 0 16px; }
    .prd-inquiry { padding: 18px; }
    .prd-tabs { top: 64px; }
}
@media (max-width: 575.98px) {
    /* Phones: compact horizontal cards (image beside the text). */
    .prd-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .prd-card { display: grid; grid-template-columns: 38% minmax(0, 1fr); border-radius: 16px; }
    .prd-card__media { aspect-ratio: auto; min-height: 150px; }
    .prd-card__media img { position: absolute; inset: 0; }
    .prd-brand { top: 8px; right: 8px; max-width: calc(100% - 16px); font-size: .68rem; }
    .prd-card__body { gap: 6px; padding: 12px 14px; }
    .prd-card__title { min-height: 0; font-size: .95rem; }
    .prd-card__excerpt { font-size: .8rem; }
    .prd-card__actions { padding-top: 10px; }
    .prd-card__more { font-size: .8rem; }
    .prd-card__ask { min-height: 34px; padding: 4px 10px; }
    .prd-inquiry__actions { grid-template-columns: minmax(0, 1fr); }
    .prd-inquiry__actions > .prd-action { grid-column: auto; }
    .prd-specs th { width: 40%; }
    .prd-specs th, .prd-specs td { padding: .65em .8em; font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) {
    .prd-card, .prd-card__media img, .prd-action { transition: none; }
    .prd-card:hover, .prd-card:hover .prd-card__media img, .prd-action:hover { transform: none; }
}
@media print {
    .prd-inquiry, .prd-share, .prd-tabs, .prd-after, .prd-card__ask { display: none !important; }
    .prd-detail__top { display: block; }
    .prd-detail__gallery { position: static; }
}
