/**
 * Elphguard catalog product template (Elementor template ID 29306)
 *
 * Design goals:
 * - Mobile-first, with the product content before the supporting sidebar.
 * - A clean industrial/factory style with restrained separators and no card shadows.
 * - A true 1440px content area on large screens, including Woodmart outer containers.
 * - The image gallery keeps its natural height instead of stretching with the summary.
 * - The independent variant-selector widget controls the existing image carousel.
 * - Scoped to catalog-product pages and the Elementor template preview only.
 */

:where(body.single-catalog_product, body.elementor-page-29306) {
    --eg-ink: #172b35;
    --eg-muted: #61727b;
    --eg-line: #dce6ea;
    --eg-surface: #ffffff;
    --eg-surface-soft: #f3f7f8;
    --eg-primary: #1286a3;
    --eg-primary-dark: #0b6177;
    --eg-accent: #e8812f;
    --eg-radius: 4px;
}

/*
 * Reserve the two Woodmart header-logo variants at their real aspect ratio.
 * Their inline max-width still chooses 220px (desktop) or 179px (mobile).
 */
body.single-catalog_product .site-logo .wd-logo,
body.single-catalog_product .site-logo .wd-logo img {
    display: block;
    line-height: 0;
}

body.single-catalog_product .site-logo .wd-logo img.attachment-full[src*="cropped-elphguard_logo_"] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1664 / 358;
    object-fit: contain;
}

/*
 * Woodmart normally limits #main-content to about 1222px. The outer shell is
 * 1480px so its 20px left/right gutters leave a true 1440px content area.
 */
body.single-catalog_product main#main-content.wd-content-layout.container {
    width: 100% !important;
    max-width: 1480px !important;
    margin-inline: auto !important;
    padding: 0 20px 72px !important;
}

body.single-catalog_product main#main-content > .elementor {
    width: 100% !important;
    max-width: none !important;
}

/* Main template shell: mobile is intentionally one column. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7a42043 {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 28px !important;
    width: 100% !important;
    max-width: 1440px !important;
    margin-inline: auto !important;
    padding: 20px 0 48px !important;
    box-sizing: border-box;
}

/* Main content is presented first on small screens. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-71f6256 {
    order: 1;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    width: 100% !important;
    min-width: 0;
    padding: 0 !important;
}

/* Supporting Product/News lists move below the product on mobile. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-2dde045 {
    order: 2;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0;
    padding: 20px !important;
    overflow: hidden;
    background: var(--eg-surface-soft);
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Existing empty container in the product loop has no visual purpose. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-29317 .elementor-element-f9e412d {
    display: none !important;
}

/* Sidebar headings and dynamic loop rows. */
:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-element-e6fc207, .elementor-element-8e3f843) .elementor-heading-title {
    margin: 0;
    padding: 0 0 12px;
    color: var(--eg-ink);
    font-size: 18px;
    line-height: 1.3;
    border-bottom: 2px solid var(--eg-primary);
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-8e3f843 {
    margin-top: 28px;
}

:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-element-66a98dc, .elementor-element-32face7) {
    margin: 0 !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-element-66a98dc, .elementor-element-32face7) .elementor-loop-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-29317, .elementor-29318) .e-loop-item,
:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-29317, .elementor-29318) .e-con,
:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-29317, .elementor-29318) .e-con-inner {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-29317, .elementor-29318) .elementor-heading-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-29317, .elementor-29318) .elementor-heading-title a {
    display: block;
    padding: 11px 2px;
    color: var(--eg-muted);
    border-bottom: 1px solid var(--eg-line);
    transition: color 160ms ease, padding-inline-start 160ms ease;
}

:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-29317, .elementor-29318) .elementor-heading-title a:hover,
:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-29317, .elementor-29318) .elementor-heading-title a:focus-visible {
    padding-inline-start: 7px;
    color: var(--eg-primary-dark);
}

/* Product hero: image and information stack on mobile. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-72f0eef {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 18px !important;
    width: 100%;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) :is(.elementor-element-7daba95, .elementor-element-81bd279) {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0 !important;
    box-sizing: border-box;
}

/*
 * Gallery: no card chrome. align-self/height prevent the gallery background
 * from becoming as tall as the text-heavy summary beside it.
 */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7daba95 {
    align-self: flex-start !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible;
    background: var(--eg-surface);
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-8802133 {
    width: 100%;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-8802133 :is(.swiper, .swiper-container) {
    width: 100%;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/*
 * The product assets use a 1536x960 (8:5) presentation area. Reserving this
 * ratio before download prevents the first image and pagination from shifting.
 */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-8802133 .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-8802133 img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 560px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
}

/* Product summary and metadata. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-81bd279 {
    padding: 20px 4px 4px !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-6014823 {
    margin-bottom: 18px;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-6014823 .elementor-heading-title {
    margin: 0;
    color: var(--eg-ink);
    font-size: clamp(26px, 6vw, 38px);
    line-height: 1.16;
    letter-spacing: -0.025em;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-fd39464 {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 0 18px !important;
    padding: 15px 16px !important;
    background: var(--eg-surface-soft);
    border-inline-start: 3px solid var(--eg-primary);
    border-radius: 0;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-fd39464 :is(.elementor-widget, .wd-text-block, p) {
    margin: 0 !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-fd39464 .wd-text-block {
    color: var(--eg-ink);
    font-size: 14px;
    line-height: 1.55;
}

/*
 * Variant selector: this is an independent Elementor widget. It contains only
 * controls and targets the existing Image Carousel without changing its layout.
 */
:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector {
    width: 100%;
    margin: 0 0 18px;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__heading {
    margin: 0 0 9px;
    color: var(--eg-ink);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    margin: 0;
    padding: 8px 13px;
    color: var(--eg-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    background: var(--eg-surface);
    border: 1px solid var(--eg-line);
    border-radius: var(--eg-radius);
    box-shadow: none;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__button:hover,
:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__button:focus-visible {
    color: var(--eg-primary-dark);
    border-color: var(--eg-primary);
    background: var(--eg-surface-soft);
    outline: none;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__button.is-active {
    color: #fff;
    border-color: var(--eg-primary-dark);
    background: var(--eg-primary-dark);
}

:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__swatch {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    background: var(--eg-variant-color);
    border: 1px solid rgb(23 43 53 / 22%);
    border-radius: 50%;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elphguard-variant-selector__empty {
    padding: 10px 12px;
    color: var(--eg-muted);
    font-size: 13px;
    line-height: 1.45;
    background: var(--eg-surface-soft);
    border-inline-start: 3px solid var(--eg-line);
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-dca12f5 {
    margin: 0 0 20px;
    color: var(--eg-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Existing action buttons: compact, square-edged and shadow-free. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7a42043 :is(.elementor-element-9a23faa, .elementor-widget-button) .elementor-button {
    min-height: 46px;
    padding: 13px 22px;
    color: #fff;
    font-weight: 650;
    background: var(--eg-accent);
    border: 0;
    border-radius: var(--eg-radius);
    box-shadow: none !important;
    transition: background-color 160ms ease;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7a42043 :is(.elementor-element-9a23faa, .elementor-widget-button) .elementor-button:hover,
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7a42043 :is(.elementor-element-9a23faa, .elementor-widget-button) .elementor-button:focus-visible {
    color: #fff;
    background: #cf681d;
    box-shadow: none !important;
}

/* Product details: a plain content section rather than a floating card. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-fcc49ac {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 20px 0 0 !important;
    overflow: visible;
    background: var(--eg-surface);
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-d55a227 {
    margin: 0 !important;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--eg-line);
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-d55a227 .elementor-heading-title {
    margin: 0;
    color: var(--eg-ink);
    font-size: clamp(22px, 5vw, 30px);
    line-height: 1.25;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    color: var(--eg-muted);
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
    word-break: normal;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 :is(h2, h3, h4) {
    margin: 1.25em 0 0.55em;
    color: var(--eg-ink);
    line-height: 1.3;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 > .elementor-widget-container > :first-child {
    margin-top: 0;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 p {
    margin: 0 0 1em;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 :is(table, figure) {
    max-width: 100%;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-5e09211 :is(th, td) {
    padding: 10px 12px;
    border: 1px solid var(--eg-line);
    text-align: start;
    vertical-align: top;
}

/* The untouched empty trailing Elementor container should not add page height. */
:where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-56722b2:empty {
    display: none !important;
}

/* Tablet: product image and information sit side by side, sidebar remains below. */
@media (min-width: 700px) {
    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7a42043 {
        padding: 28px 0 64px !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-72f0eef {
        flex-direction: row !important;
        gap: 22px !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7daba95 {
        width: 46% !important;
        align-self: center !important;
        padding: 0 !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-81bd279 {
        width: 54% !important;
        padding: 22px 4px 10px 18px !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-fcc49ac {
        padding: 24px 0 0 !important;
    }
}

/* Desktop: persistent left sidebar and spacious product content. */
@media (min-width: 992px) {
    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7a42043 {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: clamp(28px, 3vw, 44px) !important;
        padding: 36px 0 80px !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-2dde045 {
        order: 1;
        flex: 0 0 clamp(240px, 23%, 290px);
        width: clamp(240px, 23%, 290px) !important;
        padding: 24px !important;
        position: sticky;
        top: 92px;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-71f6256 {
        order: 2;
        flex: 1 1 auto;
        width: auto !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-72f0eef {
        gap: clamp(24px, 3vw, 40px) !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-7daba95 {
        width: 48% !important;
        /* Keep the gallery naturally sized, center it against the summary,
         * and keep it visible while a long product summary is scrolled. */
        /*align-self: center !important;*/
        /*position: sticky;*/
        /*top: 0px;*/
        padding: 0 !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-81bd279 {
        width: 52% !important;
        padding: 28px 8px 20px 8px !important;
    }

    :where(body.single-catalog_product, body.elementor-page-29306) .elementor-element-fcc49ac {
        padding: 28px 0 0 !important;
    }
}

/* Narrow screens use compact page gutters without changing any Elementor module. */
@media (max-width: 699px) {
    body.single-catalog_product main#main-content.wd-content-layout.container {
        padding-inline: 14px !important;
        padding-bottom: 48px !important;
    }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    :where(body.single-catalog_product, body.elementor-page-29306) * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
