/* تعریف فونت اصلی */
@font-face {
    font-family: 'ایران یکان';
    src: url('path/to/iranyekan.woff2') format('woff2'),
         url('path/to/iranyekan.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* استایل‌های اصلی محصول */
.namshi-product-container {
    font-family: 'ایران یکان', Tahoma, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    direction: rtl;
}

.namshi-product-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

/* استایل‌های تصاویر محصول - سبک ووکامرس */
.namshi-product-images {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.main-image-container {
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.main-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.namshi-thumbnail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.thumbnail-item {
    width: 60px;
    height: 60px;
    border: 1px solid #eee;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.thumbnail-item:hover {
    opacity: 0.9;
}

.thumbnail-item.active {
    border-color: #CFAA56;
    opacity: 1;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* استایل‌های جزئیات محصول */
.namshi-product-details {
    flex: 1;
    min-width: 300px;
}

.namshi-product-title-p {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    color: #262C49;
    max-height: auto;
}

.namshi-product-brand {
    margin-bottom: 15px;
    color: #666;
}

.namshi-product-brand .label {
    font-weight: bold;
}

.namshi-product-price {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.current-price {
    font-weight: bold;
    font-size: 22px;
    color: #262C49;
}

.original-price {
    text-decoration: line-through;
    color: #666;
    font-size: 16px;
}

.discount {
    background-color: #CFAA56;
    color: #262C49;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* استایل‌های سایز محصول */
.namshi-product-sizes {
    margin-top: 20px;
    margin-bottom: 20px;
}

.namshi-product-sizes h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #262C49;
}

.namshi-sizes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.size-option {
    position: relative;
    cursor: pointer;
    margin-bottom: 5px;
}

.size-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.size-label {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    min-width: 20px;
    text-align: center;
}

.size-option:hover .size-label {
    border-color: #CFAA56;
}

.size-option.selected .size-label {
    background-color: #262C49;
    color: white;
    border-color: #262C49;
}

.size-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* اطلاعات خرید نمشی */
.namshi-purchase-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.purchase-detail {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.purchase-detail:last-child {
    margin-bottom: 0;
}

.purchase-detail .icon {
    font-size: 18px;
    margin-left: 8px;
}

.purchase-detail .text {
    font-size: 14px;
}

/* دکمه افزودن به سبد خرید */
.namshi-cart-section {
    margin: 20px 0;
}

.namshi-add-to-cart {
    background-color: #262C49;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.namshi-add-to-cart:hover {
    background-color: #CFAA56;
    color: #262C49;
}

.namshi-cart-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.namshi-cart-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.namshi-cart-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* باکس تخفیف خرید بعدی */
.next-purchase-discount {
    background-color: #f9f5e8;
    border: 1px solid #CFAA56;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.next-purchase-discount h4 {
    color: #262C49;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.next-purchase-discount p {
    margin: 0;
    color: #262C49;
    font-size: 14px;
}

/* بخش توضیحات و مشخصات محصول */
.namshi-product-info {
    margin-top: 30px;
}

.product-description, .product-specifications {
    margin-bottom: 30px;
}

.product-description h3, .product-specifications h3 {
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    color: #262C49;
}

.namshi-product-description {
    line-height: 1.6;
}

.attributes-table {
    width: 100%;
    border-collapse: collapse;
}

.attributes-table th, .attributes-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.attributes-table th {
    width: 30%;
    color: #666;
    background-color: #f9f9f9;
}

/* گالری تصویر به سبک ووکامرس */
.namshi-product-gallery {
    position: relative;
}

.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #262C49;
}

.woocommerce-product-gallery__trigger:before {
    content: "🔍";
}

/* استایل پنجره نماش بزرگ تصویر - مشابه ووکامرس */
.pswp {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    overflow: hidden;
    touch-action: none;
    z-index: 999999;
    -webkit-text-size-adjust: 100%;
    -webkit-backface-visibility: hidden;
    outline: none;
    background: rgba(0,0,0,0.8);
}

.pswp__bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0.8;
}

.pswp__scroll-wrap {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.pswp__container {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pswp__item {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    text-align: center;
}

.pswp__img {
    max-width: 100%;
    max-height: 90vh;
    margin: 0 auto;
    display: block;
}

.pswp__button--close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 30px;
    height: 30px;
    background-color: rgb(255 67 67 / 18%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 1;
}

/* پاسخگویی */
@media (max-width: 768px) {
    .namshi-product-content-wrapper {
        flex-direction: column;
    }
    
    .namshi-product-images, .namshi-product-details {
        width: 100%;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
    
    .namshi-product-title-p {
        font-size: 20px;
    }
    
    .attributes-table th {
        width: 40%;
    }
}

@media (max-width: 480px) {
    .namshi-product-container {
        padding: 10px;
    }
    
    .namshi-product-content-wrapper {
        gap: 20px;
    }
    
    .thumbnail-item {
        width: 40px;
        height: 40px;
    }
    
    .namshi-product-title-p {
        font-size: 18px;
    }
    
    .current-price {
        font-size: 18px;
    }
    
    .namshi-add-to-cart {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .namshi-product-content-wrapper {
        gap: 15px;
    }
    
    .thumbnail-item {
        width: 35px;
        height: 35px;
    }
    
    .namshi-product-title-p {
        font-size: 16px;
    }
    
    .namshi-add-to-cart {
        padding: 8px 16px;
        font-size: 13px;
    }
}


