.farm-detail-page {
    background-image: url('../images/2bg.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center top;
    min-height: 100vh;
    overflow-x: hidden;
}

.farm-hero {
    padding-top: 150px;
    padding-bottom: 100px;
}

.farm-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    width: 100%;
}

.farm-layout > * {
    min-width: 0;
}

/* Gallery */
.farm-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.splide__slide-img-wrap {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    border-radius: 16px;
    background: transparent;
    display: block;
}

@media (max-width: 900px) {
    .splide__slide-img-wrap {
        height: 350px;
    }
}

.splide__slide-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    border-radius: 16px;
}

.zoom-hint {
    position: absolute;
    right: 16px;
    top: 16px;
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-size: 20px;
}

.splide__slide-img-wrap:hover .zoom-hint {
    opacity: 1;
}

/* Thumbs */
.farm-thumbs .splide__slide {
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.3s;
    border-radius: 8px;
    overflow: hidden;
    height: 80px;
}

.farm-thumbs .splide__slide.is-active {
    opacity: 1;
    border-color: #2D5A27;
}

.farm-thumbs .splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix Splide arrows causing horizontal scroll */
.splide__arrow--prev {
    left: 10px !important;
}

.splide__arrow--next {
    right: 10px !important;
}

.farm-thumbs .splide__arrows {
    display: none;
}

/* Info */
.farm-info {
    position: sticky;
    top: 150px;
}

.farm-info__badge-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.cert-badge {
    background: #2D5A27;
    color: white;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.cert-date {
    font-size: 0.85rem;
    color: #718096;
    font-style: italic;
}

.farm-name {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #1a202c;
    line-height: 1.1;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.farm-section {
    margin-bottom: 35px;
    margin-right: 30px;
}

.farm-section h3 {
    font-size: 0.75rem;
    font-weight: 800;
    color: #2D5A27;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.farm-description {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.farm-section--contacts {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-item {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item .label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.contact-item a {
    color: #2D5A27;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    transition: opacity 0.3s ease;
    word-break: break-all;
    word-wrap: break-word;
    /* Ensure long links/emails don't overflow */
}

.contact-item a:hover {
    opacity: 0.7;
}

.map-link {
    text-decoration: underline !important;
}

/* Icons using Masks */
.icon-location,
.icon-phone {
    width: 24px;
    height: 24px;
    background-color: #2D5A27;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.icon-location {
    -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3e%3c/path%3e%3ccircle cx='12' cy='10' r='3'%3e%3c/circle%3e%3c/svg%3e");
}

.icon-phone {
    -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l2.27-2.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3e%3c/path%3e%3c/svg%3e");
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    color: #718096;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: #2D5A27;
}



@media (max-width: 1024px) {
    .farm-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .farm-gallery {
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }

    .farm-info {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .farm-name {
        margin-bottom: 20px;
    }

    .farm-info__badge-row {
        justify-content: center;
    }

    .farm-section {
        margin-right: 0;
        width: 100%;
        text-align: center;
    }

    .contact-item {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .farm-gallery {
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }

    .farm-hero {
        padding-top: 100px;
        padding-bottom: 60px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .farm-info__badge-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .farm-description {
        font-size: 1rem;
    }

    .farm-section--contacts {
        padding: 20px;
    }


}

@media (max-width: 480px) {
    .farm-gallery {
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }

    .farm-hero {
        padding-bottom: 40px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .contact-item {
        flex-direction: column;
        gap: 5px;
    }
}

/* Social Links Styles */
.farm-section--socials {
    margin-top: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #2D5A27;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(45, 90, 39, 0.15);
    background: #2D5A27;
}

.social-link:hover svg {
    stroke: white;
}

@media (max-width: 1024px) {
    .social-links {
        justify-content: center;
    }
}

/* Partner Products Link */
.farm-section--products-link {
    margin-top: 20px;
}

.btn-partner-products {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(45, 90, 39, 0.08);
    border: 1px solid rgba(45, 90, 39, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-partner-products:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(45, 90, 39, 0.15);
    border-color: #2D5A27;
}

.btn-partner-products .icon {
    font-size: 28px;
}

.btn-partner-products .text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2D5A27;
}

@media (max-width: 768px) {
    .btn-partner-products {
        padding: 15px 20px;
        justify-content: center;
    }
    .btn-partner-products .text {
        font-size: 1rem;
    }
}