/* ==========================================================================
   Products Section Styles
   ========================================================================== */

.products {
    position: relative;
    width: 100%;
    padding: 120px 0;
    background-color: #ffffff;
}


/* Section Header */
.products__header {
    text-align: center;
    margin-bottom: 80px;
}

.products__main-title {
    color: #023421;
    font-size: 48px;
    font-family: var(--second-family);
    text-align: center;
    margin: 0 0 16px 0;
    font-weight: 400;
}

.products__main-subtitle {
    color: #686868;
    font-size: 24px;
    font-family: var(--second-family);
    text-align: center;
    margin: 0;
}

/* Grid Layout */
.products__grid {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.products__row {
    display: flex;
    gap: 20px;
}

.products__row--large {
    width: 100%;
}

.products__row--mixed {
    width: 100%;
    align-items: stretch;
}

.products__row--small {
    width: 100%;
}

/* Small Column for items 4 and 5 */
.products__small-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    max-width: 50%;
}

/* Product Items */
.products__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background-color: transparent;
    overflow: hidden;
}

.products__item--large {
    flex: 1;
}

.products__small-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 20px;
    background-color: #f1f2f2;
    border-radius: 64px;
}

/* Product Image */
.products__image {
    width: 100%;
    border-radius: 64px;
    overflow: hidden;
    position: relative;
}

.products__image--large {
    display: flex;
}

.products__image--small {
    width: 50%;
    height: 100%;
    display: flex;
    border-radius: 47px;
    overflow: hidden;
    flex-shrink: 0;
}

.products__image img {
    width: 100%;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 810 / 622;
}

.products__item--small .products__image {
    position: relative;
    background-color: transparent;
}

.products__item--large .products__image {
    aspect-ratio: 810 / 580;
}

/* Content */
.products__content {
    display: flex;
    gap: 48px;
    justify-content: center;
    align-items: end;
}

.products__content--small {
    flex: 1;
    justify-content: center;
    gap: 8px;
    flex-direction: column;
    align-items: start;
    max-width: 210px;
    margin-right: 44px;
}

.products__title {
    color: #023421;
    font-size: 32px;
    font-family: var(--second-family);
    text-align: right;
    margin: 0;
    font-weight: 400;
}

.products__subtitle {
    color: #686868;
    font-size: 20px;
    font-family: var(--second-family);
    text-align: right;
    margin: 0;
}

.products__button {
    padding: 14px 32px;
    background-color: #ffd46e;
    color: #023421;
    font-size: 16px;
    font-family: var(--second-family);
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 0 16px;
    transition: all 0.3s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 114px;
    height: 56px;
}

.products__item--small .products__button {
    margin-top: 32px;
}

.products__button:hover {
    color: #ffd46e;
    background-color: #034d31;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 212, 110, 0.3);
}

/* Responsive */

@media (max-width: 1024px) {
    .products {
        padding: 80px 0;
    }

    .products__header {
        margin-bottom: 64px;
    }

    .products__main-title {
        font-size: 36px;
    }

    .products__main-subtitle {
        font-size: 20px;
    }

    .products__small-wrapper {
        padding: 24px;
    }

    .products__title {
        font-size: 28px;
    }

    .products__subtitle {
        font-size: 18px;
    }

    .products__content--small {
        margin-right: 0;
    }
}

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

    .products__content {
        gap: 20px;
        max-width: 100%;
    }

    .products__item {
        gap: 12px;
    }

    .products__row {
        gap: 40px;
    }

    .products__header {
        margin-bottom: 40px;
    }

    .products__main-title {
        font-size: 40px;
        line-height: 1;
    }

    .products__main-subtitle {
        font-size: 20px;
        line-height: 1.4;
    }

    .products__row,
    .products__row--mixed {
        flex-direction: column;
    }

    .products__item--large,
    .products__small-column {
        max-width: 100%;
    }

    .products__image--large {
        border-radius: 32px;
    }

    .products__small-wrapper {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }

    .products__image--small {
        width: 100%;
    }

    .products__title {
        font-size: 24px;
        line-height: 32px;
    }

    .products__subtitle {
        font-size: 16px;
    }

    .products__small-wrapper {
        background: transparent;
        border-radius: 0;
        padding: 0;
    }

    .products__content--small {
        order: 2;
        display: grid;
        grid-template-columns: auto auto;
        align-items: stretch;
        align-content: stretch;
        gap: 20px;
    }

    .products__image--small {
        order: 1;
    }

    .products__content .products__button {
        grid-row: 1 / 3;
        order: 2;
        grid-column: 2 / 3;
        align-self: end;
        margin: 0;
    }
}

@media (max-width: 500px) {
    .products__content {
        gap: 8px;
        justify-content: space-between;
        width: 100%;
    }
}
