* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 94px;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

:root {
    --rbo-primary: #dc2626;
    --rbo-primary-dark: #b91c1c;
    --rbo-primary-soft: #fff0f0;
    --rbo-text-dark: #4a3500;
    --rbo-text-muted: #6b5208;
    --rbo-border: #efd98a;
    --rbo-white: #ffffff;
    --rbo-bg-light: #fff7d8;
}

/* Hero */
.factory-hero {
    position: relative;
    overflow: hidden;
}

.factory-hero-banner {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
}

.factory-hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(74, 53, 0, 0.16);
}

.factory-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 120px 0 70px;
}

.factory-hero-content .section-tag {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--rbo-white);
    background: rgba(255, 243, 191, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.20);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.factory-hero-content h1 {
    color: var(--rbo-white);
    font-family: "Barlow Condensed", sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.factory-hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    max-width: 640px;
    margin-bottom: 18px;
}

.breadcrumb-factory {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
}

.breadcrumb-factory a {
    color: #fff7d8;
    text-decoration: none;
}

/* Gallery */
.factory-gallery-section {
    padding: 90px 0;
    background: linear-gradient(180deg, #fff8df 0%, #ffefb7 100%);
}

.factory-gallery-card {
    background: #fffdf6;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(187, 148, 24, 0.18);
    box-shadow: 0 14px 38px rgba(156, 121, 14, 0.10);
    transition: 0.35s ease;
    cursor: pointer;
    height: 100%;
}

.factory-gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(156, 121, 14, 0.14);
}

.factory-gallery-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.factory-gallery-card .gallery-card-body {
    padding: 14px 16px 18px;
    text-align: center;
    background: #fffdf6;
}

.factory-gallery-card .gallery-card-body h3 {
    margin: 0;
    font-size: 1.45rem;
    font-family: "Barlow Condensed", sans-serif;
    text-transform: uppercase;
    color: var(--rbo-text-dark);
}

/* Modal */
.factory-modal {
    background: rgba(61, 43, 0, 0.92);
}

.factory-modal .modal-dialog {
    max-width: 1180px;
    margin: 1.5rem auto;
}

.factory-modal .modal-content {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.factory-modal .modal-body {
    position: relative;
    padding: 0;
    min-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.factory-modal-image-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 90px 90px 90px;
    overflow: hidden;
}

.factory-modal-image {
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    display: block;
}

/* Close / Nav / Zoom buttons */
.factory-modal-close,
.factory-modal-nav,
.factory-modal-zoom {
    position: absolute;
    z-index: 20;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 243, 191, 0.18);
    color: #fff;
    font-size: 1.2rem;
    transition: 0.25s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.factory-modal-close:hover,
.factory-modal-nav:hover,
.factory-modal-zoom:hover {
    background: rgba(220, 38, 38, 0.88);
    color: #fff;
}

.factory-modal-close {
    top: 18px;
    right: 18px;
}

.factory-modal-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.factory-modal-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.factory-modal-controls {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.factory-modal-caption {
    position: absolute;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    z-index: 20;
    width: calc(100% - 180px);
}

.factory-modal-caption h4 {
    margin: 0;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 991.98px) {
    .factory-hero-banner {
        min-height: 300px;
    }

    .factory-hero-content {
        padding: 110px 0 60px;
    }

    .factory-gallery-card img {
        height: 240px;
    }

    .factory-modal-image-wrap {
        padding: 80px 70px 90px;
    }

    .factory-modal-image {
        max-height: 68vh;
    }
}

@media (max-width: 575.98px) {
    .factory-hero-banner {
        min-height: 260px;
    }

    .factory-hero-content {
        padding: 95px 0 50px;
    }

    .factory-hero-content h1 {
        font-size: 2.2rem;
    }

    .factory-gallery-section {
        padding: 70px 0;
    }

    .factory-gallery-card img {
        height: 220px;
    }

    .factory-modal .modal-dialog {
        margin: 0.75rem;
    }

    .factory-modal-image-wrap {
        padding: 78px 14px 88px;
    }

    .factory-modal-image {
        max-height: 62vh;
    }

    .factory-modal-prev {
        left: 8px;
    }

    .factory-modal-next {
        right: 8px;
    }

    .factory-modal-caption {
        width: calc(100% - 30px);
    }

    .factory-modal-caption h4 {
        font-size: 1.2rem;
    }

    .factory-modal-close,
    .factory-modal-nav,
    .factory-modal-zoom {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}