/*
=====================================================================
AMIABLE IMPEX — PRODUCT LISTINGS + PRODUCT DETAIL PAGES (round 2)
Used with nx-inner.css + nx-category.css (sidebar / grid / cards).
Body: "nx-ui nx-inner nx-cat nx-cat-list nx-prod".
Gallery / quote dialog / lightbox: js/lightning-products.js (data-lp-*).
Views: cable-lugs/*, brass-glands/*, copper-products/product,
earthing/*, lightning/*.
=====================================================================
*/

/* Breadcrumb sits above the title in every product banner */
.nx-prod .ph-copy { gap: 18px; }
.nx-prod .ph-copy > .ph-crumbs { order: -1; }
html body.nx-ui.nx-prod main .ph-title, .nx-prod .ph-title { --h-fs: clamp(32px, 3.4vw, 50px); }

/* ---------- Sidebar extras (category links, groups, sub-products) ---------- */
.nx-prod .lp-side-link {
    display: block;
    padding: 12px 22px;
    font: 500 14px/1.4 var(--nx-sans);
    color: var(--nx-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--nx-line);
    transition: color .3s var(--nx-ease), background .3s var(--nx-ease);
}
.nx-prod .lp-side-link:hover { color: var(--nx-ink); background: var(--nx-paper); }
.nx-prod .lp-side-link.is-active { color: var(--nx-copper-3); font-weight: 600; box-shadow: inset 3px 0 0 var(--nx-copper); }
.nx-prod .lp-side-products a.is-active { color: var(--nx-copper-3); font-weight: 600; background: rgba(229, 52, 59, .07); }
.nx-prod .lp-side-products a.is-active::before { background: var(--nx-copper); border-color: var(--nx-copper); }
.nx-prod .lp-side-products a.lp-side-group { display: flex; justify-content: space-between; gap: 10px; color: var(--nx-ink); font-weight: 600; }
.nx-prod .lp-side-products a.lp-side-group::before { border-color: var(--nx-green-deep); background: var(--nx-copper-2); }
.nx-prod .lp-side-group span { color: var(--nx-green-deep); }
.nx-prod .lp-side-subproducts { margin: 2px 0 8px 18px; padding-left: 6px; border-left: 1px dashed rgba(111, 154, 28, .45); }
.nx-prod .lp-side-subproducts a { font-size: 13px; }

/* ---------- Category copy two-up (earthing / lightning listing) ---------- */
.nx-prod .lp-category-copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; margin-top: 8px; }
.nx-prod .lp-category-copy-grid > div { display: grid; gap: 8px; padding: 22px 22px; background: var(--nx-paper); border: 1px solid var(--nx-line); border-radius: 16px; }
html body.nx-ui.nx-prod main .lp-category-copy-grid h3, .nx-prod .lp-category-copy-grid h3 { --h-ff: var(--nx-serif); --h-fs: 18px; --h-fw: 500; color: var(--nx-ink); }
.nx-prod .lp-category-copy-grid p { font-size: 14.5px; }

/* =====================================================================
   PRODUCT DETAIL
===================================================================== */
.nx-prod .lp-message { padding: 14px 18px; font-size: 14.5px; color: #2f4a08; background: rgba(166, 207, 63, .18); border: 1px solid rgba(111, 154, 28, .4); border-radius: 14px; }
.nx-prod .lp-message.lp-error { color: #8a1218; background: rgba(229, 52, 59, .08); border-color: rgba(229, 52, 59, .35); }

.nx-prod .lp-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 36px;
    align-items: start;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--nx-line);
    border-radius: 26px;
    box-shadow: 0 40px 80px -60px rgba(11, 12, 15, .5);
}

/* Gallery */
.nx-prod .lp-gallery { display: grid; gap: 12px; min-width: 0; }
.nx-prod .lp-gallery-stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    padding: 26px;
    overflow: hidden;
    background:
        linear-gradient(rgba(11, 12, 15, .045) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(11, 12, 15, .045) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--nx-paper);
    border-radius: 20px;
}
.nx-prod .lp-gallery-stage::before, .nx-prod .lp-gallery-stage::after { content: ""; position: absolute; width: 20px; height: 20px; border: 0 solid var(--nx-copper); }
.nx-prod .lp-gallery-stage::before { left: 14px; top: 14px; border-left-width: 2px; border-top-width: 2px; }
.nx-prod .lp-gallery-stage::after { right: 14px; bottom: 14px; border-right-width: 2px; border-bottom-width: 2px; }
.nx-prod .lp-gallery-stage img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.nx-prod .lp-gallery-stage [data-lp-kind] {
    position: absolute;
    left: 16px; bottom: 16px;
    padding: 7px 13px;
    font: 500 11.5px/1 var(--nx-sans);
    color: #fff;
    background: var(--nx-ink);
    border-radius: 999px;
}
.nx-prod .lp-gallery-zoom {
    position: absolute;
    right: 16px; top: 16px;
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    font-size: 18px;
    color: var(--nx-ink);
    background: #fff;
    border: 1px solid var(--nx-line);
    border-radius: 50%;
    cursor: pointer;
    transition: background .3s var(--nx-ease), color .3s var(--nx-ease), border-color .3s var(--nx-ease);
}
.nx-prod .lp-gallery-zoom:hover { color: #fff; background: var(--nx-copper); border-color: var(--nx-copper); }
.nx-prod .lp-gallery-controls { display: flex; align-items: center; justify-content: center; gap: 12px; font: 500 12.5px/1 var(--nx-mono); color: var(--nx-muted); }
.nx-prod .lp-gallery-controls button {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    font-size: 19px;
    color: var(--nx-ink);
    background: #fff;
    border: 1px solid var(--nx-line);
    border-radius: 50%;
    cursor: pointer;
    transition: background .3s var(--nx-ease), color .3s var(--nx-ease);
}
.nx-prod .lp-gallery-controls button:hover { color: #fff; background: var(--nx-ink); }
.nx-prod .lp-gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.nx-prod .lp-gallery-thumbs::-webkit-scrollbar { display: none; }
.nx-prod .lp-gallery-thumbs button {
    flex: none;
    width: 68px; height: 60px;
    padding: 5px;
    background: var(--nx-paper);
    border: 1px solid var(--nx-line);
    border-radius: 11px;
    cursor: pointer;
    opacity: .7;
    transition: opacity .3s var(--nx-ease), border-color .3s var(--nx-ease), box-shadow .3s var(--nx-ease);
}
.nx-prod .lp-gallery-thumbs button img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.nx-prod .lp-gallery-thumbs button:hover { opacity: 1; }
.nx-prod .lp-gallery-thumbs button.is-active { opacity: 1; border-color: var(--nx-copper); box-shadow: 0 0 0 3px rgba(229, 52, 59, .14); }

/* Summary */
.nx-prod .lp-section-tag { text-transform: uppercase; }
.nx-prod .lp-summary { display: grid; justify-items: start; gap: 18px; padding: 10px 8px 6px 0; }
html body.nx-ui.nx-prod main .lp-summary h2, .nx-prod .lp-summary h2 { --h-ff: var(--nx-serif); --h-fs: clamp(26px, 2.4vw, 36px); --h-lh: 1.15; --h-fw: 400; color: var(--nx-ink); }
.nx-prod .lp-summary > p { color: var(--nx-muted); font-size: 15px; line-height: 1.85; }
.nx-prod .lp-summary-facts { display: grid; gap: 8px; width: 100%; }
.nx-prod .lp-summary-facts span {
    position: relative;
    padding: 12px 14px 12px 44px;
    font-size: 14px;
    color: var(--nx-ink);
    background: var(--nx-paper);
    border: 1px solid var(--nx-line);
    border-radius: 12px;
}
.nx-prod .lp-summary-facts span::before {
    content: "";
    position: absolute;
    left: 14px; top: 50%;
    width: 18px; height: 18px;
    margin-top: -9px;
    border-radius: 50%;
    background: var(--nx-copper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0c0f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.nx-prod .lp-summary small { font-size: 13px; line-height: 1.6; color: var(--nx-muted); }

/* Quote button (all instances) */
.nx-prod .lp-quote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 28px;
    font: 500 14.5px/1 var(--nx-sans);
    color: #fff;
    background: var(--nx-copper-grad);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 18px 36px -18px rgba(229, 52, 59, .8);
    transition: transform .4s var(--nx-ease), box-shadow .4s var(--nx-ease);
}
.nx-prod .lp-quote-button span { transition: transform .4s var(--nx-ease); }
.nx-prod .lp-quote-button:hover { transform: translateY(-2px); box-shadow: 0 24px 44px -18px rgba(229, 52, 59, .95); }
.nx-prod .lp-quote-button:hover span { transform: translate(2px, -2px); }
.nx-prod .lp-quote-button:focus-visible { outline: 2px solid var(--nx-copper-2); outline-offset: 3px; }

/* Four info sections → 2 × 2 cards */
.nx-prod .lp-detail-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nx-prod .lp-detail-sections > section {
    position: relative;
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 12px;
    padding: 28px 26px;
    background: #fff;
    border: 1px solid var(--nx-line);
    border-radius: 20px;
    transition: transform .5s var(--nx-ease), border-color .5s var(--nx-ease), box-shadow .5s var(--nx-ease);
}
.nx-prod .lp-detail-sections > section::before { content: ""; position: absolute; left: 26px; right: 26px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--nx-copper-grad); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--nx-ease); }
.nx-prod .lp-detail-sections > section:hover { transform: translateY(-4px); border-color: rgba(229, 52, 59, .3); box-shadow: 0 30px 56px -40px rgba(11, 12, 15, .45); }
.nx-prod .lp-detail-sections > section:hover::before { transform: scaleX(1); }
html body.nx-ui.nx-prod main .lp-detail-sections h2, .nx-prod .lp-detail-sections h2 { --h-ff: var(--nx-serif); --h-fs: 21px; --h-fw: 500; color: var(--nx-ink); }
.nx-prod .lp-detail-sections p { color: var(--nx-muted); font-size: 14.5px; line-height: 1.8; }

/* FAQ */
.nx-prod .lp-faq { display: grid; justify-items: start; gap: 14px; padding: 34px 32px; background: #fff; border: 1px solid var(--nx-line); border-radius: 22px; }
html body.nx-ui.nx-prod main .lp-faq h2, .nx-prod .lp-faq h2 { --h-ff: var(--nx-serif); --h-fs: clamp(24px, 2.2vw, 30px); --h-fw: 400; margin-bottom: 8px; color: var(--nx-ink); }
.nx-prod .lp-faq details { width: 100%; overflow: hidden; background: var(--nx-paper); border: 1px solid var(--nx-line); border-radius: 14px; transition: border-color .4s var(--nx-ease), background .4s var(--nx-ease); }
.nx-prod .lp-faq details[open] { background: #fff; border-color: rgba(229, 52, 59, .4); box-shadow: inset 3px 0 0 var(--nx-copper); }
.nx-prod .lp-faq summary {
    position: relative;
    padding: 16px 56px 16px 20px;
    font: 500 15px/1.45 var(--nx-sans);
    color: var(--nx-ink);
    list-style: none;
    cursor: pointer;
}
.nx-prod .lp-faq summary::-webkit-details-marker { display: none; }
.nx-prod .lp-faq summary::after {
    content: "+";
    position: absolute;
    right: 14px; top: 50%;
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    margin-top: -15px;
    font: 400 18px/1 var(--nx-sans);
    color: var(--nx-ink);
    background: #fff;
    border: 1px solid var(--nx-line);
    border-radius: 9px;
    transition: transform .4s var(--nx-ease), background .4s var(--nx-ease), color .4s var(--nx-ease);
}
.nx-prod .lp-faq details[open] summary { color: var(--nx-copper-3); }
.nx-prod .lp-faq details[open] summary::after { content: "−"; color: #fff; background: var(--nx-copper-grad); border-color: transparent; transform: rotate(180deg); }
.nx-prod .lp-faq details p { margin: 0 20px !important; padding: 14px 0 18px; font-size: 14.5px; line-height: 1.8; color: var(--nx-muted); border-top: 1px dashed rgba(196, 31, 39, .25); }

/* Bottom CTA */
.nx-prod .lp-bottom-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 36px;
    overflow: hidden;
    background: var(--nx-ink);
    border-radius: 24px;
}
.nx-prod .lp-bottom-cta::before { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; background: radial-gradient(closest-side, rgba(229, 52, 59, .35), transparent); }
.nx-prod .lp-bottom-cta::after { content: ""; position: absolute; left: 36px; right: 36px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--nx-copper) 0 70%, var(--nx-copper-2) 70% 100%); }
.nx-prod .lp-bottom-cta > * { position: relative; z-index: 1; }
.nx-prod .lp-bottom-cta span { display: block; font: 500 11px/1.4 var(--nx-mono); letter-spacing: .16em; color: var(--nx-copper-2); }
html body.nx-ui.nx-prod main .lp-bottom-cta h2, .nx-prod .lp-bottom-cta h2 { --h-ff: var(--nx-serif); --h-fs: clamp(22px, 2.2vw, 30px); --h-fw: 400; margin-top: 8px; color: #f6f2eb; }
.nx-prod .lp-bottom-cta .lp-quote-button { flex: none; }
.nx-prod .lp-bottom-cta .lp-quote-button span { display: inline; font: inherit; letter-spacing: 0; color: #fff; }

/* Related products */
.nx-prod .lp-related { display: grid; gap: 28px; }

/* =====================================================================
   QUOTE DIALOG + LIGHTBOX
===================================================================== */
.lp-dialog, .lp-lightbox { margin: auto; max-height: calc(100vh - 32px); }
.nx-prod .lp-dialog {
    width: min(560px, calc(100% - 32px));
    overflow-y: auto;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--nx-ink);
    font-family: var(--nx-sans);
    box-shadow: 0 50px 120px rgba(0, 0, 0, .4);
}
.nx-prod .lp-dialog::backdrop, .nx-prod .lp-lightbox::backdrop { background: rgba(11, 12, 15, .7); backdrop-filter: blur(4px); }
.nx-prod .lp-dialog-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 26px 28px; color: #fff; background: var(--nx-ink); }
.nx-prod .lp-dialog-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--nx-copper) 70%, var(--nx-copper-2) 70%); }
.nx-prod .lp-dialog-head span { font: 500 11px/1.4 var(--nx-mono); letter-spacing: .16em; color: var(--nx-copper-2); }
html body.nx-prod .lp-dialog-head h2 { margin: 6px 0 2px; font: 400 26px/1.15 var(--nx-serif) !important; color: #fff; }
.nx-prod .lp-dialog-head p { margin: 0; color: var(--nx-muted-d); font-size: 14px; }
.nx-prod .lp-dialog-head button, .nx-prod .lp-lightbox > button {
    flex: none;
    width: 38px; height: 38px;
    font-size: 20px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    cursor: pointer;
}
.nx-prod .lp-dialog-head button:hover, .nx-prod .lp-lightbox > button:hover { background: var(--nx-copper); border-color: var(--nx-copper); }
.nx-prod .lp-quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 24px 28px 28px; }
.nx-prod .lp-form-wide { grid-column: 1 / -1; }
.nx-prod .lp-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nx-prod .lp-quote-form label { display: grid; gap: 6px; font: 600 12.5px/1.3 var(--nx-sans); color: var(--nx-ink); }
.nx-prod .lp-quote-form input, .nx-prod .lp-quote-form textarea {
    width: 100%;
    padding: 12px 14px;
    font: 500 14px/1.4 var(--nx-sans);
    color: var(--nx-ink);
    background: var(--nx-paper);
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    transition: border-color .25s, background .25s, box-shadow .25s;
}
.nx-prod .lp-quote-form input:focus, .nx-prod .lp-quote-form textarea:focus { outline: none; border-color: var(--nx-copper); background: #fff; box-shadow: 0 0 0 4px rgba(229, 52, 59, .1); }
.nx-prod .lp-quote-form textarea { resize: vertical; }
.nx-prod .lp-lightbox { width: min(820px, calc(100% - 32px)); padding: 18px; border: 0; border-radius: 22px; background: #fff; overflow: hidden; }
.nx-prod .lp-lightbox img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
.nx-prod .lp-lightbox > button { position: absolute; right: 14px; top: 14px; background: var(--nx-ink); }

/* =====================================================================
   RESPONSIVE
===================================================================== */
@media (max-width: 1200px) {
    .nx-prod .lp-detail-grid { grid-template-columns: 1fr; }
    .nx-prod .lp-gallery-stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 760px) {
    .nx-prod .lp-detail-grid { padding: 14px; border-radius: 20px; }
    .nx-prod .lp-detail-sections, .nx-prod .lp-category-copy-grid, .nx-prod .lp-quote-form { grid-template-columns: 1fr; }
    .nx-prod .lp-faq { padding: 26px 20px; }
    .nx-prod .lp-bottom-cta { flex-direction: column; align-items: flex-start; padding: 30px 24px; }
}
