/* =========================================================
   LEMARA - PRODUCT PAGE CSS
   File: assets/css/products.css
   فقط مخصوص صفحه محصول و محصولات مشابه
   ========================================================= */


/* =========================================================
   PRODUCT DETAIL
   ========================================================= */

.product-detail {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 30px;

    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;

    gap: 40px;

    direction: ltr;
}


/* =========================================================
   PRODUCT GALLERY
   ========================================================= */

.product-gallery {
    width: 55%;
}


/* کادر اصلی تصویر */

.main-image-box {
    position: relative;
    width: 100%;
    overflow: hidden;
}


/* کادر تصویر محصول */

.product-image {
    width: 100%;
    aspect-ratio: 3 / 4;

    overflow: hidden;

    border-radius: 25px;

    background: #fff;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* تصویر اصلی */

.main-product-image {
    width: 100%;
    aspect-ratio: 3 / 4;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}


.main-product-image img,
#mainProductImage {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    display: block;

    margin: auto;

    transition: transform .4s ease;
}


/* جلوگیری از تغییر اندازه تصویر */

.main-product-image img:hover,
#mainProductImage:hover {
    transform: none;
}


/* =========================================================
   IMAGE ZOOM BUTTON
   ========================================================= */

.image-zoom-btn {
    position: absolute;

    bottom: 15px;
    right: 15px;

    width: 42px;
    height: 42px;

    border-radius: 50%;
    border: none;

    background: #111;
    color: #fff;

    font-size: 18px;

    cursor: pointer;

    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    margin: 0;
}


.image-zoom-btn:hover {
    background: #b08d57;
}


/* =========================================================
   DISCOUNT BADGE
   ========================================================= */

.product-image-discount {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 55px;
    height: 55px;

    border-radius: 50%;

    background: #b08d57;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    font-weight: bold;

    z-index: 30;
}


/* =========================================================
   PRODUCT THUMBNAILS
   ========================================================= */

.product-thumbnails {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 15px;

    margin-top: 20px;

    flex-wrap: wrap;
}


.product-thumbnails .thumb {
    width: 75px !important;
    height: 95px !important;

    object-fit: cover !important;
    object-position: center;

    border-radius: 12px;

    cursor: pointer;

    border: 2px solid transparent;

    background: #fff;

    transition: .3s;
}


.product-thumbnails .thumb:hover {
    transform: translateY(-3px);
    border-color: #b08d57;
}


.product-thumbnails .thumb.active {
    border-color: #b08d57;
}


/* =========================================================
   PRODUCT INFO
   ========================================================= */

.product-info {
    width: 45%;

    direction: rtl;
}


.product-info h1 {
    font-size: 34px;

    margin: 0 0 15px;

    color: #222;
}


.product-info h2 {
    font-size: 28px;

    color: #b08d57;

    margin: 12px 0;
}


.product-info p {
    font-size: 16px;

    line-height: 2;

    color: #555;
}


/* =========================================================
   PRODUCT TITLE + WISHLIST
   ========================================================= */

.product-title-row {
    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-bottom: 15px;
}


.product-title-row h1 {
    flex: 1;

    margin: 0;
}


/* Wishlist */

.wishlist-btn {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #ddd;

    border-radius: 50%;

    font-size: 24px;

    text-decoration: none;

    color: #222;

    background: #fff;

    transition: .3s;
}


.wishlist-btn:hover {
    background: #111;

    color: #fff;

    transform: scale(1.08);
}


.wishlist-btn.active {
    background: #111;

    color: #fff;
}


/* =========================================================
   PRICE
   ========================================================= */

.product-old-price {
    text-decoration: line-through;

    color: #999;

    font-size: 18px;

    margin-left: 10px;
}


/* =========================================================
   PRODUCT OPTIONS
   ========================================================= */

.options-row {
    width: 100%;

    display: flex;

    gap: 20px;

    margin: 20px 0 15px;
}


.options-row .product-option {
    flex: 1;
}


.options-row .product-option h3 {
    font-size: 14px;

    font-weight: 600;

    margin-bottom: 8px;
}


.options-row select {
    width: 100%;

    height: 48px;

    padding: 0 15px;

    border: 1px solid #ddd;

    border-radius: 14px;

    background: #fff;

    font-family: Vazirmatn, sans-serif;

    font-size: 14px;

    color: #222;

    cursor: pointer;

    outline: none;

    transition: .3s;
}


.options-row select:hover,
.options-row select:focus {
    border-color: #b08d57;

    box-shadow:
        0 0 0 3px rgba(176,141,87,.15);
}


/* =========================================================
   ADD TO CART
   ========================================================= */

.product-info form {
    width: 100%;
}


.product-info form button,
#addToCartBtn {
    display: block !important;

    width: 100% !important;

    min-width: 0 !important;

    min-height: 50px;

    margin-top: 15px;

    padding: 14px 20px !important;

    border: none;

    border-radius: 30px;

    background: #8b6b4a;

    color: #fff;

    font-family: Vazirmatn, sans-serif;

    font-size: 16px;

    cursor: pointer;

    transition: .3s;

    position: relative;

    z-index: 1;
}


.product-info form button:hover,
#addToCartBtn:hover {
    background: #b08d57;
}


/* =========================================================
   PRODUCT DESCRIPTION
   ========================================================= */

.product-description-box {
    max-width: 1300px;

    margin: 40px auto;

    padding: 0 30px;

    direction: rtl;
}


.product-description-box h2 {
    font-size: 26px;

    margin-bottom: 20px;
}

.description-content {
    font-size: 16px;
    line-height: 2.4;
    color: #555;
    text-align: right;
    direction: rtl;
    white-space: normal;
    word-wrap: break-word;
}

.description-content p {
    margin-bottom: 15px;
}

.description-content strong {
    color: #222;
}


/* =========================================================
   PRODUCT FEATURES
   ========================================================= */

.product-features-box {
    max-width: 1300px;

    margin: 30px auto;

    padding: 0 30px;

    direction: rtl;
}


.product-features-box h2 {
    font-size: 24px;

    margin-bottom: 20px;
}


.features-list p {
    font-size: 16px;

    line-height: 2;

    color: #555;

    margin: 5px 0;
}


.features-list strong {
    color: #111;
}


/* =========================================================
   SIMILAR PRODUCTS
   ========================================================= */

.similar-products {
    max-width: 1300px;

    margin: 50px auto;

    padding: 0 30px;

    direction: rtl;
}


.similar-products h2 {
    font-size: 28px;

    margin-bottom: 30px;

    color: #222;

    text-align: center;
}


.similar-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 25px;
}


.similar-card {
    background: #fff;

    border-radius: 18px;

    overflow: hidden;

    border: 1px solid #eee;

    transition: .35s;

    display: flex;

    flex-direction: column;

    align-items: center;
}


.similar-card:hover {
    transform: translateY(-8px);

    box-shadow:
        0 15px 40px rgba(17,17,17,.11);
}


.similar-card a {
    width: 100%;

    color: #222;

    text-decoration: none;

    display: block;
}


/* تصویر محصولات مشابه */

.similar-card img {
    width: 100% !important;

    height: 320px !important;

    object-fit: contain !important;

    object-position: center center !important;

    display: block;

    background: #fff;
}


.similar-card h3 {
    font-size: 17px;

    margin: 14px 15px 5px;

    text-align: center;
}


.similar-card p {
    font-size: 18px;

    font-weight: bold;

    color: #b08d57;

    margin: 0 15px 18px;

    text-align: center;
}


/* =========================================================
   IMAGE MODAL
   ========================================================= */

.image-modal {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.9);

    z-index: 99999;

    justify-content: center;

    align-items: center;
}


.image-modal img {
    max-width: 90%;

    max-height: 90%;

    object-fit: contain;
}


.image-modal .close-image {
    position: absolute;

    top: 15px;
    right: 20px;

    width: 60px;
    height: 60px;

    border: none;

    background: rgba(0,0,0,.5);

    color: #fff;

    font-size: 55px !important;

    font-weight: bold;

    line-height: 50px;

    text-align: center;

    cursor: pointer;

    z-index: 999999;

    border-radius: 50%;

    display: block;

    padding: 0;

    margin: 0;
}


/* =========================================================
   MOBILE PRODUCT PAGE
   max-width: 768px
   ========================================================= */

@media (max-width: 768px) {

    /* Product Detail */

    .product-detail {
        display: block;

        width: 100%;

        max-width: 100%;

        margin: 20px auto;

        padding: 0 12px;

        direction: rtl;
    }


    /* Gallery */

    .product-gallery {
        width: 100%;
    }


    .main-image-box {
        width: 100%;
    }


    .product-image {
        width: 100%;

        aspect-ratio: 3 / 4;

        border-radius: 20px;
    }


    .main-product-image {
        width: 100%;

        aspect-ratio: 3 / 4;
    }


    .main-product-image img,
    #mainProductImage {
        width: 100% !important;

        height: 100% !important;

        object-fit: contain !important;

        object-position: center center !important;
    }


    /* Zoom */

    .image-zoom-btn {
        width: 38px;

        height: 38px;

        bottom: 10px;

        right: 10px;

        font-size: 16px;
    }


    /* Discount */

    .product-image-discount {
        width: 48px;

        height: 48px;

        top: 10px;

        right: 10px;

        font-size: 13px;
    }


    /* Thumbnails */

    .product-thumbnails {
        gap: 10px;

        margin-top: 15px;

        justify-content: center;
    }


    .product-thumbnails .thumb {
        width: 55px !important;

        height: 70px !important;
    }


    /* Product Info */

    .product-info {
        width: 100%;

        margin-top: 25px;

        direction: rtl;
    }


    .product-title-row {
        gap: 10px;

        margin-bottom: 12px;
    }


    .product-info h1 {
        font-size: 22px;

        line-height: 1.7;
    }


    .product-info h2 {
        font-size: 20px;
    }


    .product-info p {
        font-size: 14px;

        line-height: 1.8;
    }


    /* Wishlist */

    .wishlist-btn {
        width: 40px;

        height: 40px;

        font-size: 20px;
    }


    /* Options */

    .options-row {
        flex-direction: column;

        gap: 12px;

        margin: 18px 0 12px;
    }


    .options-row .product-option {
        width: 100%;
    }


    .options-row select {
        height: 44px;
    }


    /* Add to cart */

    .product-info form button,
    #addToCartBtn {
        width: 100% !important;

        min-width: 100% !important;

        min-height: 50px;

        padding: 14px 20px !important;

        font-size: 15px;

        margin-top: 15px;
    }


    /* Description */

    .product-description-box {
        width: 100%;

        padding: 0 12px;

        margin: 25px auto;
    }


    .product-description-box h2 {
        font-size: 20px;
    }


   


    /* Features */

    .product-features-box {
        width: 100%;

        padding: 0 12px;

        margin: 20px auto;
    }


    .product-features-box h2 {
        font-size: 20px;
    }


    .features-list p {
        font-size: 14px;

        line-height: 1.8;
    }


    /* Similar */

    .similar-products {
        width: 100%;

        padding: 0 12px;

        margin: 30px auto;
    }


    .similar-products h2 {
        font-size: 22px;

        margin-bottom: 20px;
    }


    .similar-grid {
        grid-template-columns: repeat(2, 1fr);

        gap: 12px;
    }


    .similar-card {
        border-radius: 14px;
    }


    .similar-card img {
        width: 100% !important;

        height: 200px !important;

        object-fit: contain !important;

        object-position: center center !important;
    }


    .similar-card h3 {
        font-size: 14px;

        margin: 10px 12px 5px;
    }


    .similar-card p {
        font-size: 15px;

        margin: 0 12px 14px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   max-width: 480px
   ========================================================= */

@media (max-width: 480px) {

    .product-detail {
        padding: 0 10px;

        margin: 15px auto;
    }


    .product-info h1 {
        font-size: 18px;
    }


    .product-info h2 {
        font-size: 16px;
    }


    .product-info p {
        font-size: 13px;
    }


    .product-thumbnails .thumb {
        width: 42px !important;

        height: 52px !important;
    }


    .product-image-discount {
        width: 44px;

        height: 44px;

        font-size: 12px;
    }


    .image-zoom-btn {
        width: 34px;

        height: 34px;

        font-size: 14px;
    }


    .similar-grid {
        grid-template-columns: repeat(2, 1fr);

        gap: 8px;
    }


    .similar-card img {
        height: 130px !important;
    }


    .similar-card h3 {
        font-size: 12px;

        margin: 6px 8px 3px;
    }


    .similar-card p {
        font-size: 12px;

        margin: 0 8px 10px;
    }

}

/* دکمه زوم تصویر محصول */

.image-view-btn {
    display: none !important;
}

/* فقط موبایل */
@media (max-width: 768px) {
    .image-view-btn {
        display: flex !important;
    }
}


@media (max-width: 768px) {

    .product-image-box {
        position: relative;
    }

    .image-view-btn {
        position: absolute;
        top: auto;
        bottom: 10px;
        right: 10px;

        width: 32px;
        height: 32px;
        padding: 0;
        margin: 0;

        display: flex;
        align-items: center;
        justify-content: center;

        z-index: 10;

        border-radius: 8px;

        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);

        border: 1px solid rgba(255, 255, 255, 0.25);

        color: #000;

        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }

    .image-view-btn span {
        font-size: 18px;
        line-height: 1;
    }

}

/* =========================================
   باکس اصلی تصویر محصول
   ========================================= */

.main-image-box {
    border-radius: 24px;
    overflow: hidden;
}

.main-image-box #mainProductImage {
    border-radius: 24px;
}

/* ========================================
   LEMARA SIZE GUIDE
======================================== */

.size-guide {
    margin-top: 28px;
    max-width: 420px;
}

.size-guide h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #222;
}

.size-guide-table {
    width: 100%;
    max-width: 420px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #e5e0d8;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}

.size-guide-table th,
.size-guide-table td {
    padding: 9px 14px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.size-guide-table th {
    background: #f8f5f0;
    color: #444;
    font-weight: 600;
}

.size-guide-table td {
    color: #555;
}

.size-guide-table tr:last-child td {
    border-bottom: none;
}

.size-guide-table tbody tr:hover {
    background: #fafafa;
}


/* MOBILE */

@media (max-width: 768px) {

    .size-guide {
        margin-top: 24px;
        max-width: 100%;
    }

    .size-guide h3 {
        font-size: 16px;
    }

    .size-guide-table {
        max-width: 100%;
        font-size: 13px;
    }

    .size-guide-table th,
    .size-guide-table td {
        padding: 8px 10px;
    }

}