.farm-single-product-page {
    --farm-sp-primary: var(--primary-color, #2d8659);
    --farm-sp-primary-dark: var(--primary-dark, #1f5d3f);
    --farm-sp-accent: var(--accent-color, #f7931e);
    --farm-sp-text: var(--text-dark, #243447);
    --farm-sp-muted: var(--text-light, #64748b);
    --farm-sp-shadow: 0 20px 45px rgba(25, 59, 45, 0.14);
    position: relative;
    padding: clamp(1rem, 2vw, 1.6rem) 0 clamp(2rem, 4vw, 3.2rem);
    background:
        radial-gradient(circle at 12% 8%, rgba(45, 134, 89, 0.15), transparent 45%),
        radial-gradient(circle at 88% 12%, rgba(247, 147, 30, 0.12), transparent 42%),
        linear-gradient(180deg, #f4f8f6 0%, #eef4f1 100%);
}

.farm-single-product-page .farm-single-product-container {
    max-width: 1280px;
}

.farm-single-product {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.farm-glass-card {
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--farm-sp-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.farm-single-product-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    grid-template-areas: "info gallery";
    gap: 1.2rem;
    align-items: start;
    direction: ltr;
}

.farm-single-product-hero__info {
    grid-area: info;
    direction: rtl;
    text-align: right;
    padding: clamp(1rem, 1.8vw, 1.5rem);
}

.farm-single-product-hero__gallery {
    grid-area: gallery;
    padding: clamp(1rem, 1.8vw, 1.5rem);
}

.farm-single-product__breadcrumb {
    margin-bottom: 0.75rem;
}

.farm-single-product__breadcrumb .woocommerce-breadcrumb {
    margin: 0;
    color: var(--farm-sp-muted);
    font-size: 0.92rem;
    line-height: 1.8;
}

.farm-single-product__breadcrumb .woocommerce-breadcrumb a {
    color: var(--farm-sp-primary);
    text-decoration: none;
}

.farm-single-product__breadcrumb .woocommerce-breadcrumb a:hover {
    color: var(--farm-sp-primary-dark);
}

.farm-single-product__title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.4;
    color: var(--farm-sp-text);
    font-weight: 800;
}

.farm-single-product__excerpt {
    margin-top: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px dashed rgba(45, 134, 89, 0.28);
    background: linear-gradient(135deg, rgba(45, 134, 89, 0.08), rgba(255, 255, 255, 0.85));
    color: #234238;
}

.farm-single-product__excerpt p:last-child {
    margin-bottom: 0;
}

.farm-single-product-hero__info .farm-product-section {
    margin-top: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(45, 134, 89, 0.14);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(240, 248, 245, 0.92));
    padding: 0.9rem;
}

.farm-single-product-hero__info .farm-product-section__title {
    margin: 0 0 0.5rem;
    color: var(--farm-sp-primary-dark);
    font-size: 1.02rem;
}

.farm-single-product-hero__info .farm-product-section__content {
    color: var(--farm-sp-text);
}

.farm-single-product__meta-card {
    margin-top: 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(45, 134, 89, 0.16);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(234, 245, 239, 0.92));
    padding: 0.78rem 0.9rem;
    display: grid;
    gap: 0.55rem;
}

.farm-single-product__meta-row {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    color: var(--farm-sp-text);
    line-height: 1.8;
}

.farm-single-product__meta-label {
    color: #2f5b49;
    font-weight: 700;
    white-space: nowrap;
}

.farm-single-product__meta-value {
    color: #25463a;
}

.farm-single-product__meta-value a {
    color: var(--farm-sp-primary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(45, 134, 89, 0.35);
}

.farm-single-product__meta-value a:hover {
    color: var(--farm-sp-primary-dark);
}

.farm-product-order {
    margin-top: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(45, 134, 89, 0.17);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(237, 248, 242, 0.95));
    padding: 0.9rem;
}

.farm-product-order__title {
    margin: 0;
    color: var(--farm-sp-primary-dark);
    font-size: 1.02rem;
}

.farm-product-order__price {
    margin-top: 0.6rem;
}

.farm-product-order__price .price {
    margin: 0;
    color: #1e4738;
    font-size: clamp(1.15rem, 2.8vw, 1.45rem);
    font-weight: 800;
}

.farm-product-order__price del,
.farm-product-order .single_variation .price del {
    color: #6f867b;
    opacity: 1;
    font-size: 0.9em;
    margin-left: 0.25rem;
}

.farm-product-order__price del .amount,
.farm-product-order .single_variation .price del .amount {
    text-decoration-thickness: 2px;
}

.farm-product-order__price ins,
.farm-product-order .single_variation .price ins {
    text-decoration: none;
    color: #0f6a45;
    font-weight: 900;
    margin-right: 0.35rem;
}

.farm-product-order .cart,
.farm-product-order form.cart {
    margin-top: 0.7rem;
}

.farm-product-order .variations {
    margin: 0 0 0.75rem;
    width: 100%;
    border: 0;
}

.farm-product-order .variations tr,
.farm-product-order .variations td,
.farm-product-order .variations th {
    border: 0;
    padding: 0.2rem 0;
}

.farm-product-order .variations label {
    font-weight: 700;
    color: #2f5b49;
}

.farm-product-order .variations select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(45, 134, 89, 0.28);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.52rem 0.65rem;
    color: #25463a;
}

.farm-product-order .reset_variations {
    display: inline-block;
    margin-top: 0.2rem;
    color: var(--farm-sp-primary);
}

.farm-product-order .single_variation_wrap,
.farm-product-order .woocommerce-variation-add-to-cart,
.farm-product-order .cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.farm-product-order .single_variation {
    width: 100%;
    margin-bottom: 0.2rem;
}

.farm-product-order .single_variation .price {
    color: #1e4738;
    font-size: 1.2rem;
    font-weight: 800;
}

.farm-product-order .quantity {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(45, 134, 89, 0.22);
    border-radius: 999px;
    padding: 0.22rem;
    background: rgba(255, 255, 255, 0.92);
}

.farm-product-order .quantity .qty {
    width: 62px;
    min-width: 62px;
    border: 0;
    background: transparent;
    text-align: center;
    color: #203b31;
    font-weight: 700;
    outline: none;
}

.farm-product-order .farm-qty-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: rgba(45, 134, 89, 0.12);
    color: #23473a;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.farm-product-order .farm-qty-btn:hover {
    background: rgba(45, 134, 89, 0.2);
}

.farm-product-order .single_add_to_cart_button,
.farm-product-order .button.alt,
.farm-product-order button.button.alt {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--farm-sp-primary), var(--farm-sp-primary-dark));
    color: #fff;
    font-weight: 700;
    padding: 0.63rem 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.farm-product-order .single_add_to_cart_button:hover,
.farm-product-order .button.alt:hover,
.farm-product-order button.button.alt:hover {
    background: linear-gradient(135deg, var(--farm-sp-primary-dark), var(--farm-sp-primary));
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(33, 99, 69, 0.2);
}

.farm-product-order .disabled,
.farm-product-order .wc-variation-selection-needed {
    opacity: 0.55;
}

.farm-product-order__unavailable {
    margin: 0.65rem 0 0;
    border-radius: 12px;
    background: rgba(229, 70, 70, 0.1);
    color: #8a2f2f;
    padding: 0.65rem 0.75rem;
}

.farm-single-product-hero__gallery .onsale {
    top: 10px;
    left: 10px;
    right: auto;
    margin: 0;
    min-height: 2.1rem;
    line-height: 2.1rem;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: linear-gradient(140deg, #ff8f1f, #e45826);
    font-size: 0.78rem;
}

.farm-single-product-hero__gallery .woocommerce-product-gallery {
    margin: 0;
}

.farm-single-product-hero__gallery .woocommerce-product-gallery__image {
    border-radius: 18px;
    overflow: hidden;
}

.farm-single-product-hero__gallery .woocommerce-product-gallery__wrapper img {
    border-radius: 18px;
}

.farm-single-product-hero__gallery .flex-control-thumbs {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.farm-single-product-hero__gallery .flex-control-thumbs li {
    width: 70px;
}

.farm-single-product-hero__gallery .flex-control-thumbs img {
    border-radius: 12px;
    border: 1px solid rgba(45, 134, 89, 0.22);
}

.farm-product-tabs {
    padding: clamp(1rem, 1.8vw, 1.4rem);
}

.farm-product-tabs__head {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(45, 134, 89, 0.16);
}

.farm-product-tabs__trigger {
    border: 1px solid rgba(45, 134, 89, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: #2a4a3c;
    border-radius: 999px;
    padding: 0.52rem 1rem;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 700;
    transition: all 0.22s ease;
}

.farm-product-tabs__trigger:hover {
    border-color: rgba(45, 134, 89, 0.45);
    transform: translateY(-1px);
}

.farm-product-tabs__trigger.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--farm-sp-primary), var(--farm-sp-primary-dark));
    box-shadow: 0 10px 22px rgba(33, 99, 69, 0.24);
}

.farm-product-tabs__body {
    margin-top: 0.95rem;
}

.farm-product-tabs__panel {
    padding: 0.25rem 0.1rem;
    color: var(--farm-sp-text);
    line-height: 1.95;
}

.farm-product-tabs__panel[hidden] {
    display: none !important;
}

.farm-product-tabs__panel .farm-product-section {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.farm-product-tabs__panel .farm-product-section__title {
    display: none;
}

.farm-product-tabs__panel .farm-product-section__content {
    color: var(--farm-sp-text);
}

.farm-product-tabs__panel h1,
.farm-product-tabs__panel h2,
.farm-product-tabs__panel h3,
.farm-product-tabs__panel h4 {
    color: var(--farm-sp-primary-dark);
    margin-top: 0;
}

.farm-product-tabs__panel p:last-child {
    margin-bottom: 0;
}

.farm-product-tabs__empty {
    margin: 0;
    border-radius: 13px;
    background: rgba(45, 134, 89, 0.08);
    color: #355748;
    padding: 0.75rem 0.95rem;
}

.farm-product-related,
.farm-product-comments {
    padding: clamp(1rem, 1.8vw, 1.45rem);
}

.farm-product-related .related > h2 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    color: var(--farm-sp-text);
}

.farm-product-related .products {
    margin: 0 !important;
}

.farm-product-related ul.products li.product {
    border-radius: 18px;
    border: 1px solid rgba(45, 134, 89, 0.18);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.75rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.farm-product-related ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px rgba(24, 79, 54, 0.16);
}

.farm-product-comments__title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    color: var(--farm-sp-text);
}

.farm-product-comments #reviews #comments ol.commentlist li img.avatar {
    border-radius: 999px;
}

.farm-product-comments .comment-form-comment textarea,
.farm-product-comments .comment-form input[type="text"],
.farm-product-comments .comment-form input[type="email"] {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(45, 134, 89, 0.25);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.65rem 0.85rem;
}

.farm-product-comments .form-submit input[type="submit"] {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--farm-sp-primary), var(--farm-sp-primary-dark));
    color: #fff;
    padding: 0.58rem 1.2rem;
    cursor: pointer;
    font-weight: 700;
}

@media (max-width: 980px) {
    .farm-single-product-hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "gallery"
            "info";
        direction: rtl;
    }
}

@media (max-width: 680px) {
    .farm-glass-card {
        border-radius: 18px;
    }

    .farm-single-product__meta-row {
        flex-wrap: wrap;
    }

    .farm-product-order .single_variation_wrap,
    .farm-product-order .woocommerce-variation-add-to-cart,
    .farm-product-order .cart {
        align-items: stretch;
    }

    .farm-product-order .single_add_to_cart_button,
    .farm-product-order .button.alt,
    .farm-product-order button.button.alt {
        width: 100%;
    }

    .farm-product-tabs__head {
        position: relative;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.45rem;
        padding-inline-start: 0.2rem;
        padding-inline-end: 2.2rem;
        padding-bottom: 0.45rem;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scroll-padding-inline-start: 0.2rem;
        scrollbar-width: thin;
        box-shadow:
            inset 18px 0 14px -14px rgba(45, 134, 89, 0.25),
            inset -18px 0 14px -14px rgba(45, 134, 89, 0.25);
    }

    .farm-product-tabs__head::-webkit-scrollbar {
        height: 6px;
    }

    .farm-product-tabs__head::-webkit-scrollbar-thumb {
        background: rgba(45, 134, 89, 0.35);
        border-radius: 999px;
    }

    .farm-product-tabs__trigger {
        width: auto;
        flex: 0 0 clamp(142px, 42vw, 188px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        scroll-snap-align: start;
    }
}
