/* =========================================================
   DOOGER - SINGLE PRODUCT
   Stable WooCommerce-native gallery version
   v1.6.1
   ========================================================= */

body.single-product {
    background: #fffdf8;
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */

.dooger-product-breadcrumbs {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding-top: 115px;
    color: #91877c;
    font-size: 12px;
    direction: rtl;
}

.dooger-product-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.dooger-product-breadcrumbs .sep {
    margin: 0 8px;
    color: #c1b7aa;
}

/* =========================================================
   MAIN PRODUCT LAYOUT
   ========================================================= */

body.single-product div.product {
    width: min(1240px, calc(100% - 40px)) !important;
    margin: 0 auto !important;
    padding: 28px 0 60px !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr) !important;
    gap: 52px !important;
    align-items: start !important;

    direction: ltr !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box !important;
}

/* =========================================================
   WOOCOMMERCE NATIVE GALLERY
   IMPORTANT:
   FlexSlider owns slide width / transform / float / display.
   We intentionally do not override those properties.
   ========================================================= */

body.single-product div.product .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    direction: ltr !important;
    opacity: 1 !important;
}

/* Visible gallery viewport */
body.single-product div.product .woocommerce-product-gallery .flex-viewport {
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: #eee9df !important;
}

/* Keep WooCommerce/FlexSlider inline width and transform untouched */
body.single-product div.product .woocommerce-product-gallery__wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

/* Each slide keeps FlexSlider's inline layout values */
body.single-product div.product .woocommerce-product-gallery__image {
    margin: 0 !important;
    padding: 0 !important;
    background: #eee9df !important;
}

/* Image link fills the slide vertically without changing slide geometry */
body.single-product div.product .woocommerce-product-gallery__image > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 520px !important;
    background: #eee9df !important;
}

/* Product image itself */
body.single-product div.product .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
    display: block !important;
    width: 100% !important;
    height: 520px !important;
    max-width: 100% !important;
    max-height: 520px !important;

    object-fit: contain !important;
    object-position: center !important;

    margin: 0 auto !important;
    background: #eee9df !important;
}

/* Keep WooCommerce zoom image available for zoom functionality */
body.single-product div.product .woocommerce-product-gallery .zoomImg {
    max-width: none !important;
    max-height: none !important;
}

/* Fullscreen/zoom trigger */
body.single-product div.product .woocommerce-product-gallery__trigger {
    z-index: 20 !important;
}

/* =========================================================
   THUMBNAILS
   ========================================================= */

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;

    margin: 12px 0 0 !important;
    padding: 0 !important;

    list-style: none !important;
    direction: ltr !important;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 78px !important;
    width: 78px !important;
    height: 78px !important;

    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    list-style: none !important;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
    display: block !important;
    width: 78px !important;
    height: 78px !important;

    object-fit: cover !important;
    object-position: center !important;

    margin: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 10px !important;

    opacity: .62 !important;
    cursor: pointer !important;

    transition:
        opacity .2s ease,
        border-color .2s ease,
        transform .2s ease !important;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img:hover {
    opacity: 1 !important;
    transform: translateY(-1px);
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    opacity: 1 !important;
    border-color: #e31b23 !important;
}

/* =========================================================
   SUMMARY / PRODUCT DATA
   ========================================================= */

body.single-product div.product .summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 28px !important;

    direction: rtl !important;
    box-sizing: border-box !important;

    background: #fff;
    border: 1px solid rgba(176, 138, 69, .14);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .035);
}

body.single-product div.product .summary .product_title {
    margin: 0 0 14px !important;
    color: #1f1a14 !important;

    font-size: clamp(25px, 3vw, 34px) !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
}

body.single-product div.product .summary .price {
    margin: 0 0 18px !important;
    color: #e31b23 !important;

    font-size: 24px !important;
    line-height: 1.7 !important;
    font-weight: 800 !important;
}

body.single-product div.product .summary .woocommerce-product-details__short-description {
    margin: 0 0 22px !important;
    color: #5b544c !important;

    font-size: 14px !important;
    line-height: 2 !important;
}

body.single-product div.product .summary .woocommerce-product-rating,
.dooger-product-rating {
    margin: 0 0 16px !important;
    color: #e31b23;
    font-size: 13px;
}

/* Add to cart */
body.single-product div.product .summary form.cart {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;

    margin: 20px 0 0 !important;
    padding: 22px 0 0 !important;
    border-top: 1px solid #eee7df !important;
}

body.single-product div.product .summary .quantity {
    margin: 0 !important;
}

body.single-product div.product .summary .quantity input.qty {
    width: 78px !important;
    height: 48px !important;

    border: 1px solid #ccd3db !important;
    border-radius: 10px !important;
    background: #fff !important;
    text-align: center !important;
}

body.single-product div.product .summary button.single_add_to_cart_button {
    min-height: 48px !important;
    padding: 0 28px !important;

    border: 0 !important;
    border-radius: 10px !important;

    background: #171c22 !important;
    color: #fff !important;

    font-weight: 700 !important;
    cursor: pointer !important;
}

body.single-product div.product .summary button.single_add_to_cart_button:hover {
    background: #e31b23 !important;
}

/* =========================================================
   REMOVE UNWANTED DEFAULT UI
   ========================================================= */

body.single-product .product_meta,
body.single-product .woocommerce-tabs,
body.single-product .upsells.products {
    display: none !important;
}

/* =========================================================
   CUSTOM DESCRIPTION
   ========================================================= */

body.single-product .dooger-product-description {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto 52px;
    padding-top: 32px;

    border-top: 1px solid #e5ddd2;
    clear: both;
    direction: rtl;
}

body.single-product .dooger-product-description-inner {
    max-width: 930px;
}

body.single-product .dooger-product-description h2 {
    margin: 0 0 18px;
    color: #151a20;
    font-size: 24px;
    font-weight: 700;
}

body.single-product .dooger-product-description-content {
    color: #625c54;
    font-size: 14px;
    line-height: 2.15;
}

body.single-product .dooger-product-description-content p {
    margin: 0 0 14px;
}

body.single-product .dooger-product-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

/* =========================================================
   PRODUCT DETAILS / FURNITURE INFO
   ========================================================= */

.dooger-product-extra {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto 52px;

    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 46px;

    direction: rtl;
}

.dooger-product-details,
.dooger-product-purchase-notes {
    padding-top: 28px;
    border-top: 1px solid #e5ddd2;
}

.dooger-product-details h2,
.dooger-product-purchase-notes h2 {
    margin: 0 0 18px;
    color: #151a20;
    font-size: 22px;
    font-weight: 700;
}

.dooger-product-attributes table {
    width: 100%;
    border-collapse: collapse;

    overflow: hidden;
    background: #fff;

    border: 1px solid #e7dfd5;
    border-radius: 12px;
}

.dooger-product-attributes tr:nth-child(even) {
    background: #fbfaf8;
}

.dooger-product-attributes th,
.dooger-product-attributes td {
    padding: 13px 15px;

    border-bottom: 1px solid #eee7df;

    text-align: right;
    font-size: 13px;
}

.dooger-product-attributes th {
    width: 30%;
    color: #625b53;
    font-weight: 600;
}

.dooger-product-attributes td {
    color: #3e3832;
}

.dooger-product-meta-list {
    overflow: hidden;
    background: #fff;

    border: 1px solid #e7dfd5;
    border-radius: 12px;
}

.dooger-product-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding: 13px 15px;

    border-bottom: 1px solid #eee7df;
    font-size: 13px;
}

.dooger-product-meta-row:last-child {
    border-bottom: 0;
}

.dooger-product-meta-label {
    color: #81786e;
}

.dooger-product-meta-value {
    color: #39332d;
    font-weight: 600;
    text-align: left;
}

.dooger-product-stock.in-stock {
    color: #55764d;
}

.dooger-product-stock.out-of-stock {
    color: #a04e45;
}

.dooger-product-purchase-notes {
    padding: 24px;
    background: #fff8ea;
    border: 1px solid rgba(176, 138, 69, .18);
    border-radius: 16px;
}

.dooger-product-purchase-notes ul {
    display: grid;
    gap: 12px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.dooger-product-purchase-notes li {
    display: flex;
    gap: 10px;
    align-items: flex-start;

    color: #655e56;
    font-size: 13px;
    line-height: 1.9;
}

.dooger-product-purchase-notes li::before {
    content: "✓";
    flex: 0 0 auto;

    color: #e31b23;
    font-weight: 800;
}

/* =========================================================
   RELATED PRODUCTS
   ========================================================= */

body.single-product .related.products {
    width: min(1240px, calc(100% - 40px)) !important;
    margin: 0 auto 75px !important;
    padding-top: 30px !important;

    border-top: 1px solid #e5ddd2 !important;
    clear: both !important;
}

body.single-product .related.products > h2 {
    margin: 0 0 24px !important;
    color: #151a20 !important;

    font-size: 24px !important;
    font-weight: 700 !important;
    text-align: right !important;
}

body.single-product .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;

    margin: 0 !important;
    padding: 0 !important;
}

body.single-product .related.products ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
}

/* =========================================================
   CART BADGE
   ========================================================= */

.dooger-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 22px;
    height: 22px;
    padding: 0 6px;

    border-radius: 999px;
    background: #e31b23;
    color: #fff;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .dooger-product-breadcrumbs {
        width: min(100% - 28px, 720px);
        padding-top: 90px;
    }

    body.single-product div.product {
        width: min(100% - 28px, 720px) !important;

        grid-template-columns: 1fr !important;
        gap: 26px !important;

        padding: 22px 0 45px !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image > a {
        min-height: 460px !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
        height: 460px !important;
        max-height: 460px !important;
    }

    body.single-product .dooger-product-description,
    .dooger-product-extra,
    body.single-product .related.products {
        width: min(100% - 28px, 720px) !important;
    }

    .dooger-product-extra {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    body.single-product .related.products ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    body.single-product div.product .summary {
        padding: 20px !important;
    }

    body.single-product div.product .summary .product_title {
        font-size: 24px !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image > a {
        min-height: 360px !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
        height: 360px !important;
        max-height: 360px !important;
    }

    body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
        flex-basis: 64px !important;
        width: 64px !important;
        height: 64px !important;
    }

    body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
        width: 64px !important;
        height: 64px !important;
    }

    body.single-product .related.products ul.products {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   DOOGER v2.4 - Furniture Product Specifications
   ========================================================= */

.dooger-product-purchase-notes {
    display: grid;
    gap: 9px;
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e8e0d6;
    border-radius: 13px;
    background: #fbfaf8;
}

.dooger-product-purchase-notes > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid #eee7df;
}

.dooger-product-purchase-notes > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dooger-product-purchase-notes span {
    color: #8a8177;
    font-size: 11px;
}

.dooger-product-purchase-notes strong {
    color: #3a332d;
    font-size: 12px;
    text-align: left;
}

.dooger-product-specs-section {
    clear: both;
    width: min(1180px, calc(100% - 40px));
    margin: 40px auto 0;
    padding: 32px 0 10px;
    border-top: 1px solid #e7ded3;
}

.dooger-product-section-heading {
    margin-bottom: 22px;
}

.dooger-product-section-heading h2 {
    margin: 0;
    color: #2c2722;
    font-size: clamp(24px, 4vw, 32px);
}

.dooger-product-eyebrow {
    margin: 0 0 7px;
    color: #c5161d;
    font-size: 9px;
    letter-spacing: 3px;
    font-weight: 800;
}

.dooger-product-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dooger-product-spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 58px;
    padding: 12px 15px;
    border: 1px solid #e8e0d7;
    border-radius: 11px;
    background: #fff;
}

.dooger-product-spec-item span {
    color: #8a8177;
    font-size: 11px;
}

.dooger-product-spec-item strong {
    color: #39332d;
    font-size: 12px;
    text-align: left;
}

@media(max-width:700px) {
    .dooger-product-specs-grid {
        grid-template-columns: 1fr;
    }

    .dooger-product-specs-section {
        width: min(100% - 28px, 720px);
    }
}


/* DOOGER v2.4.1 - Product specifications RTL alignment */
.dooger-product-specs-section,
.dooger-product-specs-grid,
.dooger-product-spec-item {
    direction: rtl;
}

.dooger-product-section-heading {
    text-align: right;
}

.dooger-product-spec-item {
    text-align: right;
}

.dooger-product-spec-item span,
.dooger-product-spec-item strong {
    text-align: right;
}

.dooger-product-spec-item strong {
    margin-right: auto;
    margin-left: 0;
}


/* =========================================================
   DOOGER v3.4 - Variable product purchase UX
   ========================================================= */

.single-product form.variations_form {
    margin-top: 18px;
}

.single-product table.variations {
    width: 100%;
    margin: 0 0 14px;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.single-product table.variations tr {
    display: grid;
    grid-template-columns: 92px minmax(0,1fr);
    gap: 12px;
    align-items: center;
}

.single-product table.variations th,
.single-product table.variations td {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: right !important;
}

.single-product table.variations label {
    color: #62594f;
    font-size: 11px;
    font-weight: 800;
}

.single-product table.variations select {
    width: 100%;
    min-height: 46px;
    padding: 0 13px 0 38px;
    border: 1px solid #ded5ca;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #342e29;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.single-product table.variations select:focus {
    border-color: #e31b23;
    box-shadow: 0 0 0 3px rgba(227,27,35,.08);
}

.single-product .reset_variations {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin-top: 7px !important;
    padding: 0 10px;
    border: 1px solid #e0d7cd;
    border-radius: 7px;
    background: #faf8f5;
    color: #7a7067 !important;
    text-decoration: none !important;
    font-size: 9px !important;
    font-weight: 700;
}

.single-product .reset_variations:hover {
    border-color: #e31b23;
    color: #8a682e !important;
}

.single-product .single_variation_wrap {
    margin-top: 14px;
}

.single-product .woocommerce-variation-price {
    margin-bottom: 12px;
}

.single-product .woocommerce-variation-price .price {
    color: #8a682e;
    font-size: 18px;
    font-weight: 800;
}

.single-product .woocommerce-variation-availability {
    margin: 6px 0 12px;
    color: #70675f;
    font-size: 10px;
}

@media(max-width:560px) {
    .single-product table.variations tr {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}
