/*
Theme Name: Tansun
Description: Child theme for Avada theme
Author: Gamble Designs
Author URI: https://gambledesigns.co.uk/
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/

/* -------------------------------------------------------
   Product Applications (mirrors original .NET icon list)
   ------------------------------------------------------- */

.product-applications {
    margin: 2.5em 0;
    text-align: center;
}

/*.product-applications .header-title {
    display: block;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin: 0 0 1.75em;
    font-size: 1.75rem;
    color: #c4a35a;
}*/

/* Reset any inherited list defaults from Avada / WP */
.product-applications .icon-listing,
.product-applications .icon-listing li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.product-applications .icon-listing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25em 2em;
    max-width: 1000px;
    margin: 0 auto;
}

.product-applications .icon-listing li {
    text-align: left;
}

.product-applications .icon-listing li::before,
.product-applications .icon-listing li::marker {
    content: none !important;
    display: none !important;
}

.product-applications .icon-listing a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85em;
    text-decoration: none;
    color: inherit;
}

.product-applications .icon-listing img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    object-fit: contain;
}

/* Reserve the icon slot when an item has no icon, so titles stay aligned. */
.product-applications .icon-listing a:not(:has(img))::before {
    content: '';
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.product-applications .icon-listing span {
    flex: 1 1 auto;
    line-height: 1.3;
}

.product-applications .icon-listing a:hover span {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .product-applications .icon-listing {
        grid-template-columns: 1fr;
    }
}


/* -------------------------------------------------------
   Case Study Stats — div format
   Use:  [case_study_stats format="div"]
   Layout: large value above, label below, centered.
   Multiple stats sit side-by-side and wrap on narrow screens.
   ------------------------------------------------------- */

.cs-stats--div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2.5em;
    margin: 1.5em 0;
    text-align: center;
}

.cs-stats--div .cs-stats__row {
    flex: 0 1 auto;
    min-width: 8em;
    max-width: 16em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cs-stats--div .cs-stats__value {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25em;
}

.cs-stats--div .cs-stats__label {
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* ------------------------------------------------------------------ */
/* [product_specifications] shortcode                                 */
/* ------------------------------------------------------------------ */

.product-specs {
    margin: 1.5em 0;
}

.product-specs__notes {
    margin: 0 0 1em;
    font-size: 0.95rem;
    line-height: 1.5;
}

.product-specs__notes p {
    margin: 0 0 0.5em;
}

.product-specs__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.product-specs__head {
    background: #b29c6e;
    color: #fff;
}

.product-specs__th,
.product-specs__td {
    padding: 0.75em 1em;
    border: 1px solid #d8cfb8;
    text-align: center;
    vertical-align: middle;
    line-height: 1.35;
}

.product-specs__th {
    font-weight: 600;
    font-size: 0.95rem;
}

.product-specs__td {
    background: #fff;
    color: #333;
    font-size: 0.95rem;
}

.product-specs__td--empty {
    color: #888;
}

/* Multi-line spec values (e.g. Apollo Recess has 3 model variants
   stored as <p>...</p><p>...</p><p>...</p>) — tighten the spacing so
   they stack neatly inside a single cell. */
.product-specs__td p {
    margin: 0;
}

.product-specs__td p+p {
    margin-top: 0.25em;
}

@media (max-width: 768px) {
    .product-specs__table {
        display: block;
        overflow-x: auto;
    }
}

/* ========================================================
   [product_technical_gallery] — gallery grid for Avada tabs
   ======================================================== */
.product-technical-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 1em 0;
}

.product-technical-gallery__item {
    margin: 0;
}

.product-technical-gallery__link {
    display: block;
    line-height: 0;
}

.product-technical-gallery__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.product-technical-gallery__caption {
    font-size: 0.85em;
    color: #666;
    margin-top: 6px;
    line-height: 1.3;
}

/* ========================================================
   [product_downloads] — buttoned PDF cards for Avada tabs
   ======================================================== */
.product-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 1em 0;
}

.product-downloads__card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #d8dadc;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.product-downloads__card:hover,
.product-downloads__card:focus-visible {
    border-color: var(--awb-color5, #65bc7b);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transform: translateY(-1px);
}

.product-downloads__icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    color: #e81c24;
}

.product-downloads__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.product-downloads__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-downloads__title {
    font-weight: 600;
    line-height: 1.3;
}

.product-downloads__meta {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
    letter-spacing: 0.02em;
}

/* ========================================================
   [product_accessories] — intro + thumbnail grid for Avada tabs
   ======================================================== */
.product-accessories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 1em 0;
}

@media (min-width: 768px) {
    .product-accessories--split {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.product-accessories__intro>*:first-child {
    margin-top: 0;
}

.product-accessories__intro>*:last-child {
    margin-bottom: 0;
}

.product-accessories__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product-accessories[data-columns="1"] .product-accessories__grid {
    grid-template-columns: 1fr;
}

.product-accessories[data-columns="3"] .product-accessories__grid {
    grid-template-columns: repeat(3, 1fr);
}

.product-accessories[data-columns="4"] .product-accessories__grid {
    grid-template-columns: repeat(4, 1fr);
}

.product-accessories__item {
    margin: 0;
}

.product-accessories__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
}

.product-accessories__link:hover,
.product-accessories__link:focus-visible {
    text-decoration: none;
    color: var(--awb-color5, #65bc7b);
}

.product-accessories__img-wrap {
    display: block;
    line-height: 0;
}

.product-accessories__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.product-accessories__title {
    font-weight: 600;
    line-height: 1.3;
}


/* -------------------------------------------------------
   Product Colours (icon-list row per available colour)
   ------------------------------------------------------- */

.product-colours,
.product-colours li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.product-colours {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.product-colours__row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85em;
}

.product-colours__row::before,
.product-colours__row::marker {
    content: none !important;
    display: none !important;
}

.product-colours__swatch {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.product-colours__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-colours__label {
    flex: 1 1 auto;
    line-height: 1.3;
}


/* -------------------------------------------------------
   Product Spec Icons (full icon list — one block, all rows)
   ------------------------------------------------------- */

.spec-icons,
.spec-icons li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.spec-icons {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.spec-icons__row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85em;
}

.spec-icons__row::before,
.spec-icons__row::marker {
    content: none !important;
    display: none !important;
}

.spec-icons__swatch {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.spec-icons__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.spec-icons__label {
    flex: 1 1 auto;
    line-height: 1.3;
}

/* Shared layout for custom Avada-Post-Cards-styled grids.
   Tile internals inherit Avada Post Cards styling via .fusion-* classes; this
   layer defines the row/column layout because Avada's per-element width CSS
   (generated for builder instances) isn't applied to our custom shortcodes.
   Used by .hs-related (heating-solution-related) and .prf-featured
   (product-range-featured); both also carry .range-grid. */
.range-grid.fusion-post-cards,
.hs-related.fusion-post-cards,
.prf-featured.fusion-post-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    margin: 1em 0;
    padding: 0;
}

.hs-related>.fusion-post-cards-grid-column,
.prf-featured>.fusion-post-cards-grid-column {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0;
    width: auto;
}

/* Card body columns inherit --awb-col-width from the host Avada column.
   On mobile that resolves to auto, so the column sizes to its text and
   overflows or underfills the card. Pin it to the card width. */
.range-tile__body>.fusion-layout-column,
.downloads-grid__body>.fusion-layout-column {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 600px) {

    .hs-related[data-columns="2"]>.fusion-post-cards-grid-column,
    .hs-related[data-columns="3"]>.fusion-post-cards-grid-column,
    .hs-related[data-columns="4"]>.fusion-post-cards-grid-column,
    .hs-related[data-columns="5"]>.fusion-post-cards-grid-column,
    .hs-related[data-columns="6"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="2"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="3"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="4"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="5"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="6"]>.fusion-post-cards-grid-column {
        flex: 0 0 calc((100% - 30px) / 2);
        max-width: calc((100% - 30px) / 2);
    }
}

@media (min-width: 900px) {

    .hs-related[data-columns="3"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="3"]>.fusion-post-cards-grid-column {
        flex: 0 0 calc((100% - 60px) / 3);
        max-width: calc((100% - 60px) / 3);
    }

    .hs-related[data-columns="4"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="4"]>.fusion-post-cards-grid-column {
        flex: 0 0 calc((100% - 90px) / 4);
        max-width: calc((100% - 90px) / 4);
    }

    .hs-related[data-columns="5"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="5"]>.fusion-post-cards-grid-column {
        flex: 0 0 calc((100% - 120px) / 5);
        max-width: calc((100% - 120px) / 5);
    }

    .hs-related[data-columns="6"]>.fusion-post-cards-grid-column,
    .prf-featured[data-columns="6"]>.fusion-post-cards-grid-column {
        flex: 0 0 calc((100% - 150px) / 6);
        max-width: calc((100% - 150px) / 6);
    }
}

/* ========================================================
   [downloads_grid] — gated brochure / data-sheet cards
   ======================================================== */
.downloads-grid__section {
    margin: 0 0 2.5em;
}

.downloads-grid__heading {
    margin: 0 0 0.75em;
}

.downloads-grid__list.fusion-post-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    margin: 1em 0;
    padding: 0;
}

.downloads-grid__list>.downloads-grid__card {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0;
    width: auto;
}

@media (min-width: 600px) {

    .downloads-grid__list[data-columns="2"]>.downloads-grid__card,
    .downloads-grid__list[data-columns="3"]>.downloads-grid__card,
    .downloads-grid__list[data-columns="4"]>.downloads-grid__card,
    .downloads-grid__list[data-columns="5"]>.downloads-grid__card,
    .downloads-grid__list[data-columns="6"]>.downloads-grid__card {
        flex: 0 0 calc((100% - 30px) / 2);
        max-width: calc((100% - 30px) / 2);
    }
}

@media (min-width: 900px) {
    .downloads-grid__list[data-columns="3"]>.downloads-grid__card {
        flex: 0 0 calc((100% - 60px) / 3);
        max-width: calc((100% - 60px) / 3);
    }

    .downloads-grid__list[data-columns="4"]>.downloads-grid__card {
        flex: 0 0 calc((100% - 90px) / 4);
        max-width: calc((100% - 90px) / 4);
    }

    .downloads-grid__list[data-columns="5"]>.downloads-grid__card {
        flex: 0 0 calc((100% - 120px) / 5);
        max-width: calc((100% - 120px) / 5);
    }

    .downloads-grid__list[data-columns="6"]>.downloads-grid__card {
        flex: 0 0 calc((100% - 150px) / 6);
        max-width: calc((100% - 150px) / 6);
    }
}

.downloads-grid__cover {
    margin: 0 0 14px;
}

.downloads-grid__cover-link {
    display: block;
    border: 1px solid #d8dadc;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.downloads-grid__cover-link:hover,
.downloads-grid__cover-link:focus-visible {
    border-color: var(--awb-color5, #65bc7b);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.downloads-grid__cover-link img {
    display: block;
    width: 100%;
    height: auto;
}

.downloads-grid__desc {
    color: #555;
    font-size: 0.9em;
    line-height: 1.45;
    margin: 6px 0 14px;
}

.downloads-grid__desc p:last-child {
    margin-bottom: 0;
}

.downloads-grid__btn {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    padding: 10px 18px;
    border-radius: 4px;
    background: rgba(192, 156, 79, 1.000);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.2;
    transition: background 0.15s, transform 0.15s;
}

.downloads-grid__btn:hover,
.downloads-grid__btn:focus-visible {
    background: rgba(192, 156, 79, 0.8);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.downloads-grid__btn-meta {
    font-size: 0.78em;
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 0.02em;
}