/* Product page — layout modelled on the Xelexon product page */

.pd-page
{
    --pd-bg: #f6f8fa;
    --pd-surface: #ffffff;
    --pd-text: #0f172a;
    --pd-muted: #64748b;
    --pd-border: #e2e8f0;
    --pd-primary: #0369a1;
    --pd-primary-dark: #075985;
    --pd-primary-soft: #eff6fb;
    --pd-dark: #1e293b;
    --pd-success: #15803d;
    --pd-success-soft: #dcfce7;
    --pd-radius: 12px;

    background: var(--pd-bg);
    color: var(--pd-text);
    font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    padding: 28px 0 72px;
}

.pd-page h1, .pd-page h2, .pd-page h3
{
    font-family: Lexend, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--pd-text);
}

.pd-page svg
{
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.pd-card
{
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
}

/* Breadcrumb */

.pd-breadcrumb
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--pd-muted);
    margin-bottom: 24px;
}

.pd-breadcrumb a
{
    color: var(--pd-muted);
}

.pd-breadcrumb a:hover
{
    color: var(--pd-primary);
}

.pd-breadcrumb-current
{
    color: var(--pd-text);
}

/* Top section: gallery + info */

.pd-top
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.pd-gallery
{
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    position: sticky;
    top: calc(var(--fi-header-offset, 124px) + 20px);
}

.pd-gallery.has-thumbs
{
    grid-template-columns: 64px 1fr;
}

.pd-thumbs
{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-thumb
{
    width: 64px;
    height: 64px;
    padding: 4px;
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: 8px;
    cursor: pointer;
}

.pd-thumb.is-active
{
    border: 2px solid var(--pd-primary);
}

.pd-thumb img
{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-main-image
{
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: hidden;
}

.pd-main-image img
{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-eyebrow
{
    font-family: Lexend, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pd-primary);
    margin-bottom: 10px;
}

.pd-title-row
{
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
}

.pd-title
{
    font-size: 30px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 14px;
}

.pd-brand-logo
{
    max-width: 96px;
    max-height: 48px;
    object-fit: contain;
    margin-top: 6px;
}

.pd-meta
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.pd-status
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pd-success-soft);
    color: var(--pd-success);
    font-size: 13px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
}

.pd-status-sm
{
    font-size: 11px;
    padding: 1px 8px;
}

.pd-dot
{
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.pd-sku
{
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--pd-muted);
    letter-spacing: .02em;
}

.pd-summary
{
    color: #334155;
    margin-bottom: 22px;
}

/* Price / actions card */

.pd-buy
{
    padding: 20px;
    margin-bottom: 16px;
}

.pd-price-label
{
    font-size: 13px;
    color: var(--pd-muted);
}

.pd-price
{
    font-family: Lexend, system-ui, sans-serif;
    font-size: 28px;
    font-weight: 600;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--pd-border);
}

.pd-price-request
{
    font-size: 22px;
}

.pd-actions
{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-actions-row
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.pd-btn
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Lexend, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s;
}

.pd-btn:hover
{
    text-decoration: none;
}

.pd-btn svg
{
    width: 17px;
    height: 17px;
}

.pd-btn-primary
{
    background: var(--pd-primary);
    color: #fff;
    font-size: 16px;
    padding: 14px 18px;
}

.pd-btn-primary:hover
{
    background: var(--pd-primary-dark);
    color: #fff;
}

.pd-btn-primary .icon-whatsapp
{
    font-size: 19px;
}

.pd-btn-outline
{
    background: var(--pd-surface);
    border-color: var(--pd-border);
    color: var(--pd-text);
    font-size: 14px;
    padding: 9px 14px;
}

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

.pd-btn-sm
{
    font-size: 13px;
    padding: 7px 12px;
    white-space: nowrap;
}

.pd-btn-dark
{
    background: var(--pd-dark);
    color: #fff;
    font-size: 14px;
    padding: 10px 14px;
    width: 100%;
}

/* Fact list */

.pd-facts
{
    background: var(--pd-primary-soft);
    border-color: #d6e6f2;
    overflow: hidden;
}

.pd-fact
{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--pd-primary);
}

.pd-fact + .pd-fact
{
    border-top: 1px solid #d6e6f2;
}

.pd-fact > div
{
    flex: 1;
    min-width: 0;
}

.pd-fact strong
{
    display: block;
    font-family: Lexend, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--pd-text);
}

.pd-fact small
{
    display: block;
    font-size: 13px;
    color: var(--pd-muted);
}

/* Tabs */

.pd-tabs
{
    margin-top: 48px;
}

.pd-tablist
{
    display: flex;
    gap: 4px;
    padding: 0 12px;
    border-bottom: 1px solid var(--pd-border);
    overflow-x: auto;
}

.pd-tab
{
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 16px 14px 14px;
    font-family: Lexend, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
}

.pd-tab:focus
{
    outline: none;
}

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

.pd-tab.is-active
{
    color: var(--pd-primary);
    border-bottom-color: var(--pd-primary);
}

.pd-count
{
    display: inline-block;
    min-width: 20px;
    margin-left: 4px;
    padding: 0 6px;
    font-size: 12px;
    text-align: center;
    background: #f1f5f9;
    border-radius: 4px;
    color: var(--pd-muted);
}

.pd-panel
{
    padding: 26px 30px 30px;
}

/* Normalise the CKEditor HTML stored in product descriptions */

.pd-desc
{
    max-width: 760px;
    color: #334155;
}

.pd-desc *
{
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    background-color: transparent !important;
}

.pd-desc strong, .pd-desc b
{
    color: var(--pd-text) !important;
    font-weight: 600;
}

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

.pd-desc p > strong:only-child,
.pd-desc p > span:only-child > span:only-child > span:only-child > strong:only-child
{
    display: block;
    font-family: Lexend, system-ui, sans-serif !important;
    font-size: 18px !important;
    margin-top: 10px;
}

.pd-desc ul, .pd-desc ol
{
    padding-left: 20px;
    margin-bottom: 16px;
}

.pd-desc li
{
    margin-bottom: 6px;
}

.pd-desc table
{
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 18px;
    font-size: 15px;
}

.pd-desc th, .pd-desc td
{
    border: 1px solid var(--pd-border);
    padding: 9px 12px;
    vertical-align: top;
}

.pd-desc th, .pd-desc td:first-child
{
    background: #f8fafc !important;
    font-weight: 600;
    color: var(--pd-text) !important;
}

.pd-desc img
{
    max-width: 100%;
    height: auto;
}

.pd-doc
{
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--pd-border);
    border-radius: 10px;
    color: var(--pd-primary);
}

.pd-doc:hover
{
    border-color: var(--pd-primary);
    text-decoration: none;
}

.pd-doc strong
{
    display: block;
    color: var(--pd-text);
    font-weight: 600;
}

.pd-doc small
{
    color: var(--pd-muted);
}

.pd-muted
{
    color: var(--pd-muted);
}

.pd-contact a
{
    color: var(--pd-primary);
}

/* Related products */

.pd-related
{
    margin-top: 48px;
}

.pd-related h2
{
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 18px;
}

.pd-related-grid
{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.pd-related-card
{
    display: flex;
    flex-direction: column;
    padding: 10px 10px 14px;
    color: var(--pd-text);
    transition: box-shadow .15s, transform .15s;
}

.pd-related-card:hover
{
    color: var(--pd-text);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.pd-related-img
{
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin-bottom: 14px;
    overflow: hidden;
}

.pd-related-img img
{
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.pd-related-meta
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 26px;
    padding: 0 4px;
    margin-bottom: 10px;
}

.pd-related-logo
{
    max-width: 64px;
    max-height: 22px;
    object-fit: contain;
}

.pd-related-card h3
{
    font-family: "Source Sans 3", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    padding: 0 4px;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pd-related-card .pd-sku
{
    padding: 0 4px;
}

.pd-related-price
{
    font-family: Lexend, system-ui, sans-serif;
    font-weight: 600;
    padding: 0 4px;
    margin: 14px 0 12px;
    flex: 1;
}

/* Responsive */

@media (max-width: 991px)
{
    .pd-top
    {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .pd-gallery
    {
        position: static;
    }

    .pd-related-grid
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px)
{
    .pd-page
    {
        padding-top: 18px;
    }

    .pd-gallery.has-thumbs
    {
        grid-template-columns: 1fr;
    }

    .pd-thumbs
    {
        flex-direction: row;
        order: 2;
        overflow-x: auto;
    }

    .pd-title
    {
        font-size: 24px;
    }

    .pd-brand-logo
    {
        max-width: 72px;
    }

    .pd-panel
    {
        padding: 20px 16px;
    }

    .pd-related-grid
    {
        gap: 12px;
    }

    .pd-fact
    {
        flex-wrap: wrap;
    }
}
