/* ======================================== */
/* products grid + tabs - Premium Style     */
/* ======================================== */

.products {
    position: relative;
    padding: 16px 0 30px;
    isolation: isolate;
}

/* soft ambient light behind section */
.products::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    z-index: -1;
    width: min(920px, 94%);
    height: 220px;
    transform: translateX(-50%);
    background:
        radial-gradient(circle at 50% 40%, rgba(31, 93, 85, 0.12), transparent 62%),
        radial-gradient(circle at 18% 50%, rgba(126, 231, 212, 0.08), transparent 36%),
        radial-gradient(circle at 82% 50%, rgba(0, 0, 0, 0.05), transparent 34%);
    filter: blur(14px);
    pointer-events: none;
}

.tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(14px);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.tab {
    position: relative;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    padding: 10px 18px;
    border-radius: 999px;
    color: rgba(16, 20, 22, 0.68);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.2px;
    transition:
        color 0.28s ease,
        background-color 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s ease;
}

.tab::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(31, 93, 85, 0.08), rgba(31, 93, 85, 0.03));
    opacity: 0;
    transition: opacity 0.28s ease;
}

.tab:hover {
    color: #163832;
    transform: translateY(-1px);
}

.tab:hover::before {
    opacity: 1;
}

.tab.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #1f5d55 0%, #123a35 100%);
    box-shadow:
        0 14px 26px rgba(18, 58, 53, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tab.is-active::before {
    opacity: 0;
}

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

.gcard {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-radius: 20px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 251, 252, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow:
        0 10px 24px rgba(16, 24, 22, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(0) scale(1);
    transition:
        transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gcard::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(31, 93, 85, 0.08), transparent 32%),
        radial-gradient(circle at 80% 100%, rgba(126, 231, 212, 0.08), transparent 28%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gcard::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(315deg, rgba(31, 93, 85, 0.06), transparent 36%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gcard:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(31, 93, 85, 0.14);
    box-shadow:
        0 18px 40px rgba(16, 24, 22, 0.14),
        0 0 0 1px rgba(31, 93, 85, 0.06);
}

.gcard:hover::before,
.gcard:hover::after {
    opacity: 1;
}

.gcard-imgwrap {
    position: relative;
    overflow: hidden;
    height: 176px;
    padding: 10px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 35%, rgba(31, 93, 85, 0.06), rgba(245, 246, 247, 1) 62%);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.gcard-imgwrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 34%),
        linear-gradient(320deg, rgba(31, 93, 85, 0.05), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.gcard-imgwrap img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 72% center;
    transform: scale(1.03);
    filter: brightness(0.98) saturate(1.03) contrast(1.02);
    transition:
        transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.35s ease,
        object-position 0.35s ease;
}

.gcard:hover .gcard-imgwrap img {
    object-position: 76% center;
    transform: scale(1.08);
    filter: brightness(1.02) saturate(1.08) contrast(1.05);
}

.gcard-title {
    margin-top: 12px;
    min-height: 42px;
    color: #15211f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.55;
    letter-spacing: -0.2px;
}

.gcard-price {
    margin-top: 8px;
    color: #0f5148;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.5;
    letter-spacing: -0.2px;
}

.gcard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
    padding: 0 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg, #1f5d55 0%, #123a35 100%);
    box-shadow:
        0 12px 24px rgba(18, 58, 53, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        filter 0.28s ease;
}

.gcard-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow:
        0 16px 30px rgba(18, 58, 53, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.gcard-btn:active {
    transform: translateY(0);
}

.old {
    color: rgba(17, 24, 22, 0.42);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

/* focus visibility */
.tab:focus-visible,
.gcard:focus-visible,
.gcard-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(126, 231, 212, 0.28),
        0 18px 40px rgba(16, 24, 22, 0.12);
}

/* Responsive */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .tabs {
        gap: 12px;
        padding: 8px 10px;
        flex-wrap: wrap;
    }

    .tab {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .products {
        padding: 12px 0 24px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .gcard {
        padding: 12px;
        border-radius: 18px;
    }

    .gcard-imgwrap {
        height: 160px;
    }

    .gcard-title {
        font-size: 12.5px;
        min-height: 38px;
    }

    .gcard-price {
        font-size: 13.5px;
    }

    .gcard-btn {
        min-height: 42px;
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    .tabs {
        gap: 8px;
        padding: 6px;
    }

    .tab {
        padding: 9px 14px;
        font-size: 13px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .gcard-imgwrap {
        height: 170px;
    }
}
