/* =========================================================
   Dream Gomla - Single Product
   single-product.css
   ========================================================= */


/* =========================================================
   GLOBAL
   ========================================================= */

.dg-product-main,
.dg-product-tabs,
.dg-section-title,
.dg-product-main ~ * {
    box-sizing: border-box;
}

.dg-product-main img {
    max-width: 100%;
    height: auto;
}

.dg-product-main button,
.dg-product-main input,
.dg-product-main select,
.dg-product-main textarea {
    font-family: inherit;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.dg-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    list-style: none;

    margin: 0 0 30px;
    padding: 18px 0;

    font-size: 14px;

    direction: rtl;
}

.dg-breadcrumb li {
    display: flex;
    align-items: center;
    color: #777;
}

.dg-breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 8px;
    color: #aaa;
}

.dg-breadcrumb a {
    color: #555;
    text-decoration: none;

    transition: color 0.2s ease;
}

.dg-breadcrumb a:hover {
    color: #D10024;
}

.dg-breadcrumb .active {
    color: #D10024;
    font-weight: 600;
}


/* =========================================================
   MAIN PRODUCT
   ========================================================= */

.dg-product-main {
    direction: rtl;

    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, 0.95fr);

    gap: 55px;

    margin-bottom: 60px;

    align-items: start;
}


/* =========================================================
   PRODUCT GALLERY
   ========================================================= */

.dg-product-gallery {
    min-width: 0;
    direction: rtl;
}

.dg-product-main-image {
    width: 100%;
    height: 500px;

    background: #fff;

    border: 1px solid #e6e6e6;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    overflow: hidden;

    box-sizing: border-box;
}

.dg-main-product-image {
    width: auto;
    max-width: 100%;

    height: 450px;
    max-height: 100%;

    object-fit: contain;

    display: block;
}


/* =========================================================
   PRODUCT THUMBNAILS
   ========================================================= */

.dg-product-thumbnails {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 12px;

    margin-top: 15px;

    overflow-x: auto;

    padding: 3px;

    scrollbar-width: thin;
}

.dg-product-thumb {
    flex: 0 0 82px;

    width: 82px;
    height: 82px;

    padding: 5px;

    background: #fff;

    border: 1px solid #ddd;
    border-radius: 6px;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.dg-product-thumb img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.dg-product-thumb:hover {
    border-color: #D10024;

    transform: translateY(-2px);
}

.dg-product-thumb.active {
    border-color: #D10024;

    box-shadow: 0 0 0 1px #D10024;
}


/* =========================================================
   PRODUCT DETAILS
   ========================================================= */

.dg-product-details {
    min-width: 0;
    direction: rtl;
}

.dg-product-name {
    margin: 0 0 18px;

    color: #222;

    font-size: 32px;
    line-height: 1.45;

    font-weight: 700;
}


/* =========================================================
   RATING
   ========================================================= */

.dg-product-rating-row {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}

.dg-product-rating {
    direction: ltr;
}

.dg-product-rating .star-rating {
    margin: 0;
}

.dg-review-link {
    color: #777;

    font-size: 14px;

    text-decoration: none;
}

.dg-review-link:hover {
    color: #D10024;
}


/* =========================================================
   PRICE + STOCK
   ========================================================= */

.dg-price-stock {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 18px;

    padding: 18px 0;

    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;

    margin-bottom: 22px;
}

.dg-single-price {
    color: #D10024;

    font-size: 28px;
    line-height: 1.2;

    font-weight: 700;
}

.dg-single-price del {
    color: #999;

    font-size: 17px;
    font-weight: 400;

    margin-left: 7px;
}

.dg-single-price ins {
    text-decoration: none;
    color: #D10024;
}

.dg-stock {
    display: inline-flex;
    align-items: center;

    padding: 6px 12px;

    border-radius: 4px;

    font-size: 13px;
    font-weight: 600;
}

.dg-in-stock {
    color: #198754;
    background: #eaf7ef;
}

.dg-out-stock {
    color: #dc3545;
    background: #fdebec;
}


/* =========================================================
   SHORT DESCRIPTION
   ========================================================= */

.dg-short-description {
    color: #555;

    font-size: 15px;
    line-height: 1.9;

    margin-bottom: 25px;
}

.dg-short-description p {
    margin: 0 0 10px;
}

.dg-short-description p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   ADD TO CART
   ========================================================= */

.dg-add-to-cart {
    margin: 25px 0;
}

.dg-add-to-cart form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    margin: 0;
}

.dg-add-to-cart .quantity {
    margin: 0 !important;
}

.dg-add-to-cart .quantity .qty {
    width: 65px;
    height: 48px;

    padding: 0 8px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: #fff;

    color: #333;

    text-align: center;

    font-size: 15px;

    outline: none;
}

.dg-add-to-cart .quantity .qty:focus {
    border-color: #D10024;
}

.dg-add-to-cart .single_add_to_cart_button {
    min-height: 48px;

    padding: 0 30px;

    border: none;
    border-radius: 5px;

    background: #D10024;
    color: #fff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.dg-add-to-cart .single_add_to_cart_button:hover {
    background: #b90020;

    transform: translateY(-1px);
}

.dg-add-to-cart .single_add_to_cart_button:disabled,
.dg-add-to-cart .single_add_to_cart_button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* =========================================================
   VARIABLE PRODUCT
   ========================================================= */

.dg-add-to-cart .variations {
    width: 100%;

    margin: 0 0 15px;

    border: 0;
}

.dg-add-to-cart .variations tr {
    display: flex;
    align-items: center;

    gap: 15px;

    margin-bottom: 12px;
}

.dg-add-to-cart .variations td,
.dg-add-to-cart .variations th {
    padding: 0;
    border: 0;
}

.dg-add-to-cart .variations .label {
    min-width: 90px;
}

.dg-add-to-cart .variations label {
    color: #333;

    font-weight: 600;
}

.dg-add-to-cart .variations select {
    min-width: 180px;
    height: 42px;

    padding: 0 12px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: #fff;

    outline: none;
}

.dg-add-to-cart .variations select:focus {
    border-color: #D10024;
}

.dg-add-to-cart .reset_variations {
    color: #D10024;

    font-size: 13px;

    text-decoration: none;
}


/* =========================================================
   PRODUCT META
   ========================================================= */

.dg-product-meta {
    margin-top: 25px;

    padding-top: 20px;

    border-top: 1px solid #eee;
}

.dg-meta-row {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    margin-bottom: 10px;

    color: #666;

    font-size: 14px;
    line-height: 1.7;
}

.dg-meta-row strong {
    min-width: 70px;
    color: #222;
}

.dg-meta-row span {
    color: #666;
}

.dg-meta-row a {
    color: #666;
    text-decoration: none;
}

.dg-meta-row a:hover {
    color: #D10024;
}


/* =========================================================
   SHARE
   ========================================================= */

.dg-product-share {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-top: 22px;
    padding-top: 20px;

    border-top: 1px solid #eee;
}

.dg-product-share > span {
    margin-left: 5px;

    color: #333;

    font-size: 14px;
    font-weight: 600;
}

.dg-product-share a {
    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f1f1f1;
    color: #555;

    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.dg-product-share a:hover {
    background: #D10024;
    color: #fff;

    transform: translateY(-2px);
}


/* =========================================================
   PRODUCT TABS
   ========================================================= */

.dg-product-tabs {
    direction: rtl;

    margin-top: 30px;
    margin-bottom: 70px;
}

.dg-tabs-nav {
    display: flex;
    align-items: center;

    gap: 5px;

    list-style: none;

    margin: 0;
    padding: 0;

    border-bottom: 1px solid #ddd;
}

.dg-tabs-nav li {
    margin: 0;
    padding: 0;
}

.dg-tabs-nav a {
    display: block;

    padding: 14px 24px;

    color: #555;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

    border-bottom: 3px solid transparent;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.dg-tabs-nav li.active a,
.dg-tabs-nav a:hover {
    color: #D10024;

    border-bottom-color: #D10024;
}


/* =========================================================
   TAB CONTENT
   ========================================================= */

.dg-tabs-content {
    padding: 30px 5px;
}

.dg-tab-panel {
    display: none;

    color: #555;

    font-size: 15px;
    line-height: 2;
}

.dg-tab-panel.active {
    display: block;
}

.dg-tab-panel p {
    margin-top: 0;
}

.dg-tab-panel img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   ATTRIBUTES TABLE
   ========================================================= */

.dg-attributes-table {
    width: 100%;

    border-collapse: collapse;

    margin: 0;
}

.dg-attributes-table tr:nth-child(even) {
    background: #f8f8f8;
}

.dg-attributes-table th,
.dg-attributes-table td {
    padding: 14px 18px;

    border: 1px solid #e5e5e5;

    text-align: right;
}

.dg-attributes-table th {
    width: 30%;

    color: #222;

    font-weight: 700;
}

.dg-attributes-table td {
    color: #666;
}


/* =========================================================
   REVIEWS
   ========================================================= */

#dg-reviews {
    direction: rtl;
}

#dg-reviews #comments {
    margin: 0;
}

#dg-reviews .commentlist {
    margin: 0;
    padding: 0;

    list-style: none;
}

#dg-reviews .comment-text {
    padding: 15px;

    border: 1px solid #eee;
    border-radius: 6px;
}

#dg-reviews .star-rating {
    direction: ltr;
}


/* =========================================================
   SECTION TITLE
   ========================================================= */

.dg-section-title {
    direction: rtl;

    margin-bottom: 25px;

    border-bottom: 1px solid #ddd;
}

.dg-section-title h2 {
    position: relative;

    display: inline-block;

    margin: 0;

    padding-bottom: 12px;

    color: #222;

    font-size: 24px;
    font-weight: 700;
}

.dg-section-title h2::after {
    content: "";

    position: absolute;

    right: 0;
    bottom: -1px;

    width: 60px;
    height: 3px;

    background: #D10024;
}





/* =========================================================
   RELATED PRODUCTS
   ========================================================= */

.dg-related-products {
    width: 100%;
    max-width: 100%;

    margin: 50px 0 0;
    padding: 10px;

    box-sizing: border-box;
}


/* =========================================================
   RELATED PRODUCTS GRID
   ========================================================= */

.dg-related-products .dg-related-grid {
    width: 100%;
    max-width: 100%;

    margin: 0;
   
    padding: 10px;

    box-sizing: border-box;

    overflow: hidden;
}
.dg-related-products .dg-related-grid .dg-card {
     margin-left:5px;
    margin-right:5px;
    
}
 

/* =========================================================
   RELATED PRODUCT CARD
   IMPORTANT:
   content-product.php outputs .dg-card directly
   ========================================================= */
    
   
   .dg-related-products .dg-related-grid > .dg-card {
    width: calc(25% - 18px);

    margin-right: 24px;
    margin-bottom: 30px;

    box-sizing: border-box;

    display: inline-block;
    vertical-align: top;
}

.dg-related-products .dg-related-grid > .dg-card:nth-child(4n) {
    margin-left: 0;
}




/* =========================================================
   IMAGE AREA
   ========================================================= */

.dg-related-products .dg-card .dg-image {
    position: relative;

    width: 100% !important;
    max-width: 100% !important;

    height: 330px;

    margin: 0 !important;
    padding: 0 !important;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    box-sizing: border-box;
}


/* =========================================================
   MAIN PRODUCT IMAGE
   FULL IMAGE
   ========================================================= */

.dg-related-products .dg-card .dg-product-img-main {
    display: block;

    width: auto !important;
    height: auto !important;

    max-width: 100% !important;
    max-height: 300px !important;

    object-fit: contain;
    object-position: center;

    margin: 0 auto !important;
    padding: 0 !important;

    box-sizing: border-box;
}


/* =========================================================
   HOVER IMAGE
   ========================================================= */

.dg-related-products .dg-card .dg-product-img-hover {
    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain;

    box-sizing: border-box;
}


/* =========================================================
   PRODUCT CONTENT
   ========================================================= */

.dg-related-products .dg-card .dg-product-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 15px 12px !important;

    box-sizing: border-box;

    text-align: center;

    direction: rtl;
}


/* =========================================================
   CATEGORY
   ========================================================= */

.dg-related-products .dg-card .dg-product-category {
    width: 100%;
    max-width: 100%;

    margin: 0 0 6px;

    padding: 0;

    box-sizing: border-box;

    text-align: center;

    overflow: hidden;
}

.dg-related-products .dg-card .dg-product-category a {
    color: #999;

    text-decoration: none;
}

.dg-related-products .dg-card .dg-product-category a:hover {
    color: #D10024;
}


/* =========================================================
   PRODUCT TITLE
   ========================================================= */

.dg-related-products .dg-card .dg-product-title {
    display: block;

    width: 100% !important;
    max-width: 100% !important;

    min-height: 48px;

    margin: 0 0 8px !important;
    padding: 0 !important;

    box-sizing: border-box;

    text-align: center;

    line-height: 1.6;

    overflow: hidden;
}

.dg-related-products .dg-card .dg-product-title a {
    display: block;

    width: 100%;
    max-width: 100%;

    color: #222;

    text-decoration: none;

    overflow-wrap: break-word;
}

.dg-related-products .dg-card .dg-product-title a:hover {
    color: #D10024;
}


/* =========================================================
   RATING
   ========================================================= */

.dg-related-products .dg-card .dg-product-rating {
    width: 100%;

    min-height: 20px;

    margin: 0 0 8px;
    padding: 0;

    box-sizing: border-box;

    text-align: center;
}

.dg-related-products .dg-card .dg-product-rating .star-rating {
    display: inline-block;

    float: none;

    margin: 0;
}


/* =========================================================
   PRICE
   ========================================================= */

.dg-related-products .dg-card .dg-product-price {
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 0 12px !important;
    padding: 0 !important;

    box-sizing: border-box;

    text-align: center;

    white-space: normal;
}

.dg-related-products .dg-card .dg-product-price del {
    color: #999;

    font-size: 13px;
}

.dg-related-products .dg-card .dg-product-price ins {
    color: #D10024;

    text-decoration: none;
}


/* =========================================================
   ADD TO CART
   ========================================================= */

.dg-related-products .dg-card .dg-product-cart {
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box;

    text-align: center;
}

.dg-related-products .dg-card .dg-product-cart .button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 8px 20px;

    box-sizing: border-box;

    border: none;
    border-radius: 4px;

    background: #D10024;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.dg-related-products .dg-card .dg-product-cart .button:hover {
    background: #b90020;

    color: #fff;

    transform: translateY(-1px);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .dg-related-products .dg-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 20px;
    }


    .dg-related-products .dg-related-grid > .dg-card {
        width: 100% !important;
        max-width: 100% !important;
    }


    .dg-related-products .dg-card .dg-image {
        height: 300px;
    }


    .dg-related-products .dg-card .dg-product-img-main {
        max-height: 270px !important;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575px) {

    .dg-related-products .dg-related-grid {
        grid-template-columns: 1fr;

        gap: 20px;
    }


    .dg-related-products .dg-related-grid > .dg-card {
        width: 100% !important;
        max-width: 100% !important;
    }


    .dg-related-products .dg-card .dg-image {
        height: 280px;
    }


    .dg-related-products .dg-card .dg-product-img-main {
        max-height: 250px !important;
    }

}