/*
 * Sunsgoods Theme — Factory Page Styles
 *
 * @package Sunsgoods
 */

/* =========================================================================
 * Page wrapper
 * ========================================================================= */
.factory-page {
    max-width: 100%;
    overflow-x: hidden;
}

/* =========================================================================
 * Shared
 * ========================================================================= */
.factory-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.factory-section-title {
    font-family: 'Times New Roman', 'oxygen-bold', Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: #222;
    margin: 0 0 40px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* =========================================================================
 * 4-column grid
 * ========================================================================= */
.factory-grid {
    display: grid;
    gap: 20px;
}

.factory-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.factory-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.factory-grid__item {
    text-align: center;
}

.factory-grid__item img {
    width: 100%;
    height: auto;
    display: block;
}

.factory-grid__img {
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 10px;
}

.factory-grid__img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.factory-grid__item:hover .factory-grid__img img {
    transform: scale(1.03);
}

.factory-grid__info {
    font-family: 'Times New Roman', 'oxygen-regular', Arial, sans-serif;
    font-size: 16px;
    color: #444;
    padding: 8px 4px;
    line-height: 1.5;
    text-align: center;
}

.factory-grid__step-num {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 700;
    margin-right: 4px;
    color: #333;
}

/* =========================================================================
 * Production Workshop
 * ========================================================================= */
.factory-workshop {
    padding: 60px 0;
    background: #fff;
}

/* =========================================================================
 * Videos — 3 side-by-side
 * ========================================================================= */
.factory-videos {
    padding: 0 0 60px;
    background: #fff;
}

.factory-videos__row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.factory-videos__item {
    position: relative;
    height: 225px;
}

.factory-videos__item iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================================================
 * Production Area (single large image)
 * ========================================================================= */
.factory-area {
    padding: 50px 0;
    background: #fff;
}

.factory-area__inner {
    text-align: center;
}

.factory-area__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* =========================================================================
 * Process sections
 * ========================================================================= */
.factory-process {
    padding: 60px 0;
    background: #fff;
}

.factory-process__video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-top: 40px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.factory-process__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================================================
 * Quality section
 * ========================================================================= */
.factory-quality {
    padding: 60px 0;
    background: #fff;
}

.factory-quality__row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: stretch;
}

.factory-quality__row--reverse {
    flex-direction: row;
}

.factory-quality__pic {
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
}

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

.factory-quality__badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.factory-quality__badge img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.factory-quality__badge-text {
    font-family: 'Times New Roman', 'oxygen-regular', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    text-align: center;
}

.factory-quality__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'Times New Roman', 'oxygen-regular', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.factory-quality__text p {
    margin: 0 0 16px;
}

.factory-quality__text p:last-child {
    margin-bottom: 0;
}

/* =========================================================================
 * Responsive
 * ========================================================================= */
@media (max-width: 960px) {
    .factory-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .factory-quality__row,
    .factory-quality__row--reverse {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .factory-container {
        padding: 0 20px;
    }

    .factory-section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .factory-workshop,
    .factory-process,
    .factory-area,
    .factory-quality {
        padding: 40px 0;
    }

    .factory-videos__row {
        grid-template-columns: 1fr;
    }

    .factory-videos__item {
        height: 0;
        padding-bottom: 56.25%;
        position: relative;
    }

    .factory-videos__item iframe {
        position: absolute;
        top: 0;
        left: 0;
    }
}

@media (max-width: 480px) {
    .factory-grid--4 {
        grid-template-columns: 1fr;
    }

    .factory-section-title {
        font-size: 20px;
    }
}
