/* ============================================================================
   Global Suntech — catalogue section + product modal.

   Loaded by every landing page together with gs-products.js. Colours come
   from the page's own CSS custom properties (--accent, --bg2, --border,
   --text, --muted), with fallbacks, so the section inherits each theme.
   ========================================================================= */

.gsp-wrap {
    width: min(1260px, 92%);
    margin-inline: auto;
}

.gsp-head {
    max-width: 760px;
    margin-bottom: clamp(34px, 4vw, 60px);
}

.gsp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--accent, #059669);
}

.gsp-eyebrow i {
    width: 26px;
    height: 1px;
}

.gsp-title {
    font-size: clamp(1.9rem, 4.2vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.08;
    margin: .5em 0 .4em;
    color: var(--text, #07231a);
}

.gsp-sub {
    color: var(--muted, #3f5a50);
    font-size: clamp(.95rem, 1.2vw, 1.05rem);
    line-height: 1.65;
    max-width: 62ch;
}

/* ---- cards ---- */
.gsp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 26px);
}

.gsp-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid var(--border, rgba(6, 95, 70, .14));
    background: var(--bg2, #ffffff);
    cursor: pointer;
    transition: transform .5s cubic-bezier(.22, .85, .24, 1), border-color .4s, box-shadow .5s;
}

.gsp-card:hover {
    transform: translateY(-7px);
    border-color: var(--accent, #059669);
    box-shadow: 0 34px 60px -40px var(--accent-glow, rgba(5, 150, 105, .3));
}

.gsp-card__ph {
    border-radius: 14px;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface, rgba(6, 95, 70, .05));
}

.gsp-card__ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(.22, .85, .24, 1);
}

.gsp-card:hover .gsp-card__ph img {
    transform: scale(1.06);
}

.gsp-card__body {
    padding: 18px 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.gsp-card__tag {
    font-size: .66rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent, #059669);
}

.gsp-card__body h3 {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text, #07231a);
}

.gsp-card__body p {
    color: var(--muted, #3f5a50);
    font-size: .9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gsp-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: .88rem;
    color: var(--accent, #059669);
}

/* ---- modal ---- */
.gsp-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 4vw, 40px);
    overflow-y: auto;
}

.gsp-modal[hidden] {
    display: none;
}

.gsp-modal__bd {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(4, 20, 14, .52);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.gsp-modal__card {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg2, #ffffff);
    border: 1px solid var(--border, rgba(6, 95, 70, .14));
    border-radius: 26px;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .5);
    padding: clamp(22px, 3.4vw, 38px);
}

.gsp-modal__x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border, rgba(6, 95, 70, .14));
    border-radius: 50%;
    background: var(--surface, rgba(6, 95, 70, .05));
    color: var(--muted, #3f5a50);
    cursor: pointer;
    transition: color .3s, border-color .3s, transform .4s cubic-bezier(.22, .85, .24, 1);
    z-index: 2;
}

.gsp-modal__x:hover {
    color: var(--text, #07231a);
    border-color: var(--accent, #059669);
    transform: rotate(90deg);
}

.gsp-modal__hero {
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 22px;
    aspect-ratio: 16/8;
    background: var(--surface, rgba(6, 95, 70, .05));
}

.gsp-modal__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gsp-chip {
    display: inline-block;
    padding: .35rem .85rem;
    border-radius: 100px;
    border: 1px solid var(--border, rgba(6, 95, 70, .14));
    background: var(--surface, rgba(6, 95, 70, .05));
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent, #059669);
    margin-bottom: 12px;
}

.gsp-h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.15;
    color: var(--text, #07231a);
    margin-bottom: .5em;
}

.gsp-h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text, #07231a);
    margin: 0 0 .5em;
}

.gsp-lead {
    color: var(--muted, #3f5a50);
    font-size: .97rem;
    line-height: 1.75;
    max-width: 62ch;
}

/* ---- specs table ---- */
.gsp-specs {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 26px;
    font-size: .92rem;
}

.gsp-specs td {
    padding: 11px 4px;
    border-bottom: 1px solid var(--border, rgba(6, 95, 70, .14));
    vertical-align: top;
}

.gsp-specs td:first-child {
    color: var(--dim, #6b857b);
    width: 38%;
    font-weight: 600;
}

.gsp-specs td:last-child {
    color: var(--text, #07231a);
}

/* ---- content sections: image left/right ---- */
.gsp-sec {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(18px, 3vw, 34px);
    align-items: start;
    padding: 22px 0;
    border-top: 1px solid var(--border, rgba(6, 95, 70, .14));
}

.gsp-sec--flip {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.gsp-sec--flip .gsp-sec__img {
    order: 2;
}

.gsp-sec__img {
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface, rgba(6, 95, 70, .05));
}

.gsp-sec__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gsp-sec__txt p {
    color: var(--muted, #3f5a50);
    font-size: .94rem;
    line-height: 1.75;
}

/* ---- responsive ---- */
@media (max-width: 900px) {
    .gsp-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .gsp-grid {
        grid-template-columns: 1fr;
    }

    .gsp-sec,
    .gsp-sec--flip {
        grid-template-columns: 1fr;
    }

    .gsp-sec--flip .gsp-sec__img {
        order: 0;
    }
}
