/********************** اسلایدر ***************/

/* sliders */

.slider-container {
    position: relative;
    overflow: hidden;
}

.slides {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    width: 50%;
    height: 100%;
    flex-shrink: 0;
    background: #000;
    position: relative;
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: cover !important;
    object-position: center top;
    display: block;
}

/* متن و دکمه روی اسلاید */
.slide-content {
    position: absolute;
    top: 69%;
    left: 22%;
    transform: translateY(-50%);
    z-index: 5;
    text-align: right;
    max-width:550px;
    color: #ffffff;
}


.slide-btn {
    display: inline-block;
    padding: 12px 34px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #4c312d;
    box-shadow: 0 8px 25px rgba(255, 143, 199, 0.30);
    transition: all 0.3s ease;
}

.slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(169, 216, 255, 0.35);
}

/* فلش‌ها */
.nav-arrow {
    position: absolute;
    top: 50%;
    background: rgba(0,0,0,0.35);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    transform: translateY(-50%);
}

.prev { left: 15px; }
.next { right: 15px; }

.nav-arrow:hover {
    background: rgba(0,0,0,0.9);
}

/* حفظ اسلایدر */
@media (max-width: 768px) {
    .slider,
    .slick-slider,
    .owl-carousel {
        overflow: visible !important;
    }

    .slick-track,
    .owl-stage {
        overflow: visible !important;
    }

    .slider-container {
        margin: 25px auto 15px;
    }

    .slide-content {
           position: absolute;
    top: 92%;
    left: 34%;
    }

   
    .slide-btn {
        padding: 10px 17px;
        font-size: 13px;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}


.promo-categories{
    display:flex;
    gap:30px;
    margin:50px 20px;
}

.promo-box{
    flex:1;
    min-height:210px;
    background:#f7f7f7;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:30px;
    text-decoration:none;
    overflow:hidden;
    position:relative;
    border-radius:10px;
}

.promo-content{
    width:50%;
    z-index:2;
}

.promo-subtitle{
    display:block;
    color:#888;
    font-size:14px;
    margin-bottom:15px;
}

.promo-title,
.promo-content h2{
    margin:0;
    font-size:36px;
    color:#222;
}

.promo-btn{
    display:inline-block;
    margin-top:20px;
    opacity:0;
    transform:translateY(15px);
    transition:.4s;
    color:#222;
    font-weight:600;
    border-bottom:2px solid #4c312d;
    padding-bottom:4px;
}

.promo-image{
    width:45%;
    text-align:center;
}

.promo-image img{
    max-width:100%;
    transition:transform .5s ease;
}

.promo-box:hover .promo-image img{
    transform:scale(1.15);
}

.promo-box:hover .promo-btn{
    opacity:1;
    transform:translateY(0);
}

.promo-box:hover{
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

/* موبایل */
@media (max-width:768px){

    .promo-categories{
        flex-direction:column;
    }

    .promo-box{
        min-height:150px;
    }

    .promo-content h2{
        font-size:28px;
    }
}



/* پیشنهاد ویژه */
.backgroundoffer {
  background: linear-gradient(358deg, #d80000 0%, #000000 150%);
  padding: 60px 20px;
    margin-top:30px;
}
.offer-home-product {
   max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 3fr;
  align-items: center;
}
p.title-offer {
    color: #fff;
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.button-offer-all {
  display: inline-block;
 background: linear-gradient(356deg, #ae0000, #231a1a);
  color: #fff;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(255,107,53,0.4);
}
.button-offer-all:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255,107,53,0.6);
}
.product-offer ul.products {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.product-offer ul.products li.product {
  
    scroll-snap-align: start;
    background: #fff;
    border-radius: 14px;
    padding: 13px;
    min-width: 260px; 
    max-width: 270px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    margin: 0 6px!important;
    display: flex;
    flex-direction: column; 
    justify-content: space-between; 
    height: auto; 
}


.product-offer ul.products li.product img {
    width: 100% !important;
  
    object-fit: cover;
    margin: 0 auto 1em !important;
    flex-shrink: 0;
}

.product-offer .woocommerce-loop-product__title {
    font-size: 14px;
    line-height: 1.4;
    color: #111;
    margin: 0 0 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 32px;
    max-height: 32px;
    padding: 0 8px;
    overflow: hidden;
}

.product-offer .price {
    color: #ab0000 !important;
    font-weight: 600 !important;
    margin: 0 0 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
   text-align:center;

}

.product-offer .add_to_cart_button,
.product-offer .button.product_type_simple,
.product-offer .button.product_type_variable {
    display: flex !important;
    justify-content: center;
    align-items: center;
    height: 20px !important;
    width: 80%;
    background: linear-gradient(45deg, #ae0000, #ae0000)!important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;
    padding: 0;
    margin: 0 auto !important;
    flex-shrink: 0;
}
.product-offer .woocommerce ul.products {
  display: flex !important; 
  list-style: none;
  padding: 0;
  margin: 0;
  width: fit-content; 
}

/***********  شگفت انگیز اسکرول ها ************/
.product-offer ul.products::-webkit-scrollbar {
    height: 6px;
}

.product-offer ul.products::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 10px;
}

.product-offer ul.products {
    scrollbar-width: none;
}

.product-offer ul.products::-webkit-scrollbar {
    display: none;
}

.product-offer ul.products {
    scroll-snap-type: x mandatory;
}

.product-offer ul.products li.product {
    scroll-snap-align: start;
}
.product-offer li.product {
    position: relative;
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffcc00;
    color: #000;
    font-size: 13px;
    font-weight: bold;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.offer-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
    opacity: 0.4;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block; /* مهم */
}

.offer-dots span.active {
    background: #fff;
    opacity: 1;
}

.product-offer {
    overflow-y: hidden;
}
.product-offer ul.products {
    -webkit-overflow-scrolling: touch;
}
/* ----------------------  ریسپانسیو موبایل  ---------------------- */

@media (max-width: 768px) {

  .backgroundoffer {
    padding: 30px 15px;
    border-radius: 30px;
  }

  .offer-home-product {
    grid-template-columns: 1fr; /* ستون‌ها زیر هم */
    text-align: center;
    gap: 30px;
  }

  p.title-offer {
    font-size: 1.8em;
    line-height: 1.3;
  }

  .button-offer-all {
    padding: 12px 25px;
    font-size: 14px;
  }

  /* محصولات */
  .product-offer ul.products {
    gap: 10px;
    padding-bottom: 10px;
  }

  .product-offer ul.products li.product {
    min-width: 200px;
    max-width: 220px;
    height: auto;
    padding: 10px;
  }


  .product-offer .woocommerce-loop-product__title {
    font-size: 13px;
    min-height: 30px;
    max-height: 30px;
  }

  .product-offer .price {
    font-size: 14px;
    min-height: 22px;
  }

  .product-offer .add_to_cart_button,
  .product-offer .button.product_type_simple,
  .product-offer .button.product_type_variable {
    height: 28px !important;
    font-size: 13px;
    width: 80%;
  }

  /* دکمه درصد تخفیف */
  .discount-badge {
    width: 40px;
    height: 40px;
    font-size: 11px;
  }

  /* دایره‌های اسلایدر */
  .offer-dots {
    margin-top: 10px;
    gap: 7px;
  }

  .offer-dots span {
    width: 8px;
    height: 8px;
  }

}

/***************** دسته بندیها */
.custom-category-row-section {
    max-width: 1200px;
    margin: 40px auto 60px auto;
    direction: rtl;
    padding: 0 15px;
}

.category-row-header {
    display: flex;
    flex-direction: row; /* تنظیم ردیف راست به چپ */
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 12px;
    margin-bottom: 25px;
    width: 100%;
}

.row-section-title {
    font-size: 20px;
    color: #2b2d42;
    font-weight: bold;
    margin: 0;
    text-align: right;
    order: 1; /* عنوان ابتدا و در سمت راست قرار گیرد */
}

.header-left-side {
    order: 2; /* لینک مشاهده همه در سمت چپ قرار گیرد */
}

.row-view-all-link {
    font-size: 13.5px;
    color: #3f51b5;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}
.row-view-all-link {
    font-size: 13.5px;
    color: #3f51b5;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.row-view-all-link:hover {
    color: #2c3b8c;
}

/* ساختار ریل کاروسل */
.row-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.row-carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
    padding: 10px 0;
}

/* کارت محصول یکسان */
.custom-category-row-section .product-card-item, .row-product-card-item {
    min-width: calc(20% - 12px);
    box-sizing: border-box;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.custom-category-row-section .product-card-item:hover,.row-product-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.custom-category-row-section .prod-img-box {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow: hidden;
    background: #fff;
}

.custom-category-row-section .prod-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* باکس اقدامات هاور ۴ گانه */
.custom-category-row-section .product-hover-actions {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    gap: 12px;
    z-index: 10;
    opacity: 0;
    transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.custom-category-row-section .product-card-item:hover .product-hover-actions .row-product-card-item:hover {
    bottom: 15px;
    opacity: 1;
}

.custom-category-row-section .hover-action-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-category-row-section .hover-action-btn .action-icon {
    width: 20px;
    height: 20px;
    stroke: #555e6b;
    transition: stroke 0.2s, transform 0.2s;
}

.custom-category-row-section .hover-action-btn:hover .action-icon {
    stroke: #3f51b5;
    transform: scale(1.1);
}

.custom-category-row-section .my-wishlist-btn.active .action-icon {
    stroke: #f35252;
    fill: #f35252;
}

.custom-category-row-section .my-compare-btn.active .action-icon {
    stroke: #2ecc71;
}

/* جزییات قیمت */
.custom-category-row-section .prod-details-box {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #f9f9f9;
}

.custom-category-row-section .product-item-title {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    height: 42px;
    overflow: hidden;
    margin: 0 0 15px 0;
    font-weight: normal;
}

.custom-category-row-section .new-price-val {
    color: #3f51b5;
    font-size: 15px;
    font-weight: bold;
}

.discount-badge-round {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #3f51b5;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 20px;
    z-index: 2;
}

.old-price-val {
    text-decoration: line-through;
    color: #b5b5b5;
    font-size: 11px;
    margin-left: 5px;
}

/* دکمه‌های ناوبری اسلایدر */
.row-carousel-nav {
    position: absolute;
    bottom: -45px;
    background: #3f51b5;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 5;
}

.prev-item { right: 0; }
.next-item { right: 38px; }
/* باکس اصلی دکمه‌های هاور */
.product-hover-actions {
    position: absolute;
    bottom: -60px; 
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    gap: 12px;
    z-index: 10;
    width: auto;
    white-space: nowrap;
    opacity: 0;
    transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

/* بالا آمدن دکمه‌ها هنگام هاور روی کارت محصول */
.product-card-item:hover, .row-product-card-item:hover .product-hover-actions {
    bottom: 15px; /* به موقعیت استاندارد روی عکس می‌رسد */
    opacity: 1;
}
.product-card-item:hover .product-hover-actions {
    bottom: 15px; /* به موقعیت استاندارد روی عکس می‌رسد */
    opacity: 1;
}

/* استایل تکی دکمه‌ها */
.hover-action-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #555e6b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

/* استایل آیکون‌های داخلی */
.hover-action-btn .action-icon {
    width: 20px;
    height: 20px;
    stroke: #555e6b;
    transition: stroke 0.2s ease, fill 0.2s ease;
}

/* افکت هاور روی هر دکمه */
.hover-action-btn:hover .action-icon {
    stroke: #3f51b5; /* تغییر رنگ آیکون به سرمه‌ای در هاور */
    transform: scale(1.1);
}

/* استایل دکمه علاقه‌مندی زمانی که فعال (Active) است */
.hover-action-btn.my-wishlist-btn.active .action-icon {
    stroke: #f35252;
    fill: #f35252; /* قرمز پر شده برای محصولاتی که در لایست لایک هستند */
}

/* استایل دکمه مقایسه زمانی که فعال است */
.hover-action-btn.my-compare-btn.active .action-icon {
    stroke: #2ecc71;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .custom-category-row-section .product-card-item, .row-product-card-item { min-width: calc(33.33% - 10px); }
}
@media (max-width: 576px) {
    .custom-category-row-section .product-card-item, .row-product-card-item { min-width: calc(50% - 8px); }
}
