/*
Theme Name: Astra Child
Template: astra
Text Domain: astra-child
*/

/* رفع مشکل هدر شفاف در تمام صفحات */
.ast-theme-transparent-header .ast-page-title,
.ast-theme-transparent-header .entry-header {
    padding-top: 100px;
}

.ast-theme-transparent-header .site-content {
    padding-top: 100px;
}

/* موبایل */
@media (max-width: 768px) {
    .ast-theme-transparent-header .ast-page-title,
    .ast-theme-transparent-header .entry-header,
    .ast-theme-transparent-header .site-content {
        padding-top: 80px;
    }
}



/* Gradient Transparent Header - Astra */
.ast-theme-transparent-header .ast-primary-header-bar,
.ast-theme-transparent-header .site-header {
    background: linear-gradient(
        90deg,
        #FCEEF5 0%,
        #ffffff 50%,
        #FCEEF5 100%
    ) !important;
}

/* Mobile Header */
@media (max-width: 921px) {
    .ast-theme-transparent-header .ast-primary-header-bar,
    .ast-theme-transparent-header .site-header {
        background: linear-gradient(
            90deg,
            #FCEEF5 0%,
            #ffffff 50%,
            #FCEEF5 100%
        ) !important;
    }
}

/* Mobile Above Header Gradient - Astra */
@media (max-width: 921px) {
    .ast-theme-transparent-header .ast-above-header {
        background: linear-gradient(
            90deg,
            #FCEEF5 0%,
            #ffffff 50%,
            #FCEEF5 100%
        ) !important;
    }

/* Force Fixed Header - Astra */
.site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}

/* Offset body for fixed header */
body {
    padding-top: 90px;
}

@media (max-width: 921px) {
    body {
        padding-top: 70px;
    }
}

body.home {
  background-color: #150869; /* سرمه‌ای تیره */
}


/* ===== Luxury Mobile Floating Bar ===== */
.mobile-floating-bar {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    height: 50px;

    /* رنگ لوکس + شیشه‌ای خیلی ملایم */
    background: rgba(252, 238, 245, 1) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    border-radius: 18px;
    box-shadow:
        0 10px 25px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.08);

    display: flex;
    align-items: center;
    justify-content: space-around;

    opacity: 1 !important;
    z-index: 9999;

    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    box-sizing: border-box;
}

/* جلوگیری از override آسترا */
.mobile-floating-bar::before,
.mobile-floating-bar::after {
    content: none !important;
    display: none !important;
}

/* ===== Items ===== */
.mobile-floating-bar .bar-item {
    flex: 1;
    height: 100%;
    text-align: center;
    text-decoration: none;
    color: #000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    line-height: 1.2;
    box-sizing: border-box;
}

/* ===== Icons (Locked Size) ===== */
.mobile-floating-bar .bar-item img {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px;
    max-height: 22px;

    object-fit: contain;
    display: block;
    margin-bottom: 3px;
}

/* ===== Text ===== */
.mobile-floating-bar .bar-item span {
    font-size: 8px;
    font-weight: 500;
    opacity: 0.9;
}

/* ===== Mobile only ===== */
@media (min-width: 768px) {
    .mobile-floating-bar {
        display: none !important;
    }
}

/* جلوگیری از پوشاندن محتوا */
@media (max-width: 767px) {
    body {
        padding-bottom: 80px;
    }
}

/* مخفی کردن نوار در صفحات محصول و پرداخت */
.single-product .mobile-floating-bar,
.woocommerce-cart .mobile-floating-bar,
.woocommerce-checkout .mobile-floating-bar {
    display: none !important;
}

/* ================= DigiKala Box | Home ================= */
body.home .home-digi-box {
  background: linear-gradient(
    135deg,
    rgba(252,182,207,1),  /* صورتی روشن */
    rgba(200,150,255,1)      /* بنفش تیره */
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 1px 15px 0px 10px;
  margin:30px -24px ;
  position: relative;
}

/* Header */
body.home .home-digi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* مشاهده همه سمت چپ بالا */
  body.home .home-digi-box .view-all {
    position: absolute;
    top: 16px;
    left: 16px;
  }

  /* حذف فلش‌ها در دسکتاپ */
  /*body.home .digi-scroll-arrow { display: none; }*/
}
body.home .home-digi-head h3 {
  margin: 10 0 20px 0;
  font-size: 18px;
  font-weight: 700;
}
body.home .home-digi-head .view-all {
  font-size: 14px;
  color: #1e5eff;
  text-decoration: none;
  position: relative;
  padding-right: 12px;
}
body.home .home-digi-head .view-all::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
}

/* Products wrapper */
body.home .home-digi-products ul.products {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin: 0 !important;
}
body.home .home-digi-products ul.products::-webkit-scrollbar {
  display: none;
}
body.home .home-digi-products ul.products li.product {
  flex: 0 0 auto !important;
  width: 160px; /* کمی کوچکتر در موبایل */
  margin: 0 !important;
}

/* Desktop 5 products in one row */
@media (min-width: 992px) {
  body.home .home-digi-products ul.products {
    overflow-x: hidden;
  }
  body.home .home-digi-products ul.products li.product {
    width: calc(20% - 12px) !important;
  }
}

/* Scroll arrows */
body.home .digi-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Left & Right positions */
body.home .digi-scroll-arrow.left { left: 12px; }
body.home .digi-scroll-arrow.right { right: 12px; }

/* Mobile adjustments */
@media (max-width: 767px) {
  body.home .home-digi-products ul.products li.product {
    width: 140px; /* کمی کوچکتر */
  }
  body.home .digi-scroll-arrow.left { top: 42%; }
  body.home .digi-scroll-arrow.right { top: 42%; }
}

/* View all – desktop only */
@media (min-width: 768px) {
  body.home .home-digi-box .view-all {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
  }
}

/* دسکتاپ | صفحه خانه */
@media (min-width: 992px) {
  body.home .home-digi-box {
    background: linear-gradient(135deg, rgba(252,182,207,0.5), rgba(200,150,255,0.3)) !important; /* پس‌زمینه گرادیان شیشه‌ای */
    padding: 12px !important;
    border-radius: 16px !important;
    position: relative !important;
  }

  /* مشاهده همه سمت چپ بالا */
  body.home .home-digi-box .view-all {
    position: absolute !important;
    top: 18px !important;
    left: 16px !important;
    z-index: 2 !important;
  }

  /* حذف فلش‌ها */
  body.home .digi-scroll-arrow { display: none !important; }
}

/* ===== FIX View All Position & Button | Mobile Only ===== */
@media (max-width: 767px) {

  body.home .home-digi-box {
    padding-top: 15px; /* فضا برای دکمه مشاهده همه */
  }

  body.home .home-digi-box .view-all {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;

    /* حالت دکمه */
    background: rgba(255, 255, 255, 0.85);
    color: #5e008b !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);

    z-index: 10;
  }

  /* حذف هر افکت اضافه */
  body.home .home-digi-head .view-all::after {
    content: none !important;
  }
}

/* ===== View All Button | Desktop ===== */
@media (min-width: 768px) {

  body.home .home-digi-box .view-all {
    background: rgba(255, 255, 255, 0.85);
    color: #5e008b !important;
    padding: 2px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);

    transition: all 0.25s ease;
  }
  
  body.home .home-digi-box .view-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  }

  /* حذف کامل فلش کنار متن */
  body.home .home-digi-head .view-all::after {
    content: none !important;
  }
}
/* خط جداکننده بین محصولات – فقط صفحه خانه */
body.home .home-digi-products ul.products li.product {
  position: relative;
}

/* خط بین کارت‌ها */
body.home .home-digi-products ul.products li.product:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -3.9px;              /* وسط فاصله 6px */
  top: 0%;
  width: 4px;
  height: 108%;
  background-color: #0b1c3d; /* سورمه‌ای */
  opacity: 0.3;
}

/* Mobile | Center product title + smaller font */
@media (max-width: 767px) {
  body.home .home-digi-products ul.products li.product h2.woocommerce-loop-product__title {
    text-align: center;
    font-size: 12px;      /* کوچکتر از قبل */
    line-height: 1.4;
    margin-top: 8px;
  }
}
/* Mobile | Center product price */
@media (max-width: 767px) {
  body.home .home-digi-products ul.products li.product .price {
    text-align: center;
    font-size: 13px;
    margin-top: 4px;
  }
}

.home-digi-products ul.products {
  overflow-x: auto;
  overflow-y: hidden !important;
  scroll-behavior: smooth;
}

.home-digi-products {
  overflow: hidden;
}



/* نوار شناور پایین صفحه محصول – RTL و جمع‌وجور */
.single-product-bottom-bar {
    position: fixed;
    bottom: 24px; /* کمی پایین‌تر */
    left: 50%;
    transform: translateX(-50%);
    max-width: 460px;
    width: calc(100% - 24px);
    background: rgba(252, 238, 245, 1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 12px 14px;

    display: flex;
    justify-content: space-between;
    align-items: center; /* وسط عمودی */
    gap: 10px;
    z-index: 9999;
    flex-wrap: nowrap; /* همه در یک خط */
    direction: rtl; /* راست‌چین */
}

/* قیمت قرمز و وسط نوار سمت چپ */
.single-product-bottom-bar .price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    flex-shrink: 0;
    min-width: 80px;
}

/* دکمه‌ها سمت راست زیر هم */
.single-product-bottom-bar .buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start; /* دکمه‌ها از سمت چپ ستون قیمت شروع شوند */
}

/* دکمه‌ها یک اندازه ثابت */
.single-product-bottom-bar .add-to-cart-btn,
.single-product-bottom-bar .custom-order-btn {
    width: 170px;       /* طول ثابت */
    padding: 8px 0;     /* فقط ارتفاع، padding افقی حذف شد */
    font-size: 13px;    /* فونت متوسط برای هر دو */
    border-radius: 12px;
    border: 1px solid #4a006f;
    font-weight: 600;
    text-decoration: none;
    color: #fff !important;
    background: #150869 !important;
    text-align: center;      /* متن وسط دکمه */
    white-space: nowrap;
    display: inline-block;   /* لازم برای عرض ثابت */
    transition: 0.3s;
    box-shadow: none;
}
/* فقط فونت دکمه شخصی‌سازی (واتساپ) کوچکتر */
.single-product-bottom-bar .custom-order-btn {
    font-size: 6px; /* کمی کوچکتر از 13px دکمه افزودن به سبد خرید */
}
/* هاور هر دو دکمه */
.single-product-bottom-bar .add-to-cart-btn:hover,
.single-product-bottom-bar .custom-order-btn:hover {
    background: #7a00c4 !important;
}

/* جلوگیری از پوشاندن محتوا */
.single-product {
    padding-bottom: 130px;
}

/* فقط موبایل */
@media (min-width: 992px) {
    .single-product-bottom-bar {
        display: none;
    }
}

/* ================== WooCommerce Select – Gradient to White ================== */

.woocommerce select,
.woocommerce-ordering select,
.widget_product_categories select,
.widget_layered_nav select,
.woocommerce-page select {

    /* حذف فلش پیش‌فرض */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* گرادینت از سمت نوشته به سمت فلش (RTL) */
    background: linear-gradient(
        to left,
        #ffffff 0%,
        #ffffff 25%,
        rgba(255,230,240,0.9) 60%,
        rgba(252,182,207,0.8) 100%
    );

    border: 1px solid rgba(255,192,203,0.8);
    border-radius: 10px;

    padding: 8px 12px;
    padding-left: 42px; /* فضا برای فلش */

    color: #333;
    font-weight: 500;

    background-clip: padding-box;
}






/* فلش آبی پررنگ */
.woocommerce select,
.woocommerce-ordering select {
    background-image: url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230033cc'>\
    <path d='M7 10l5 5 5-5z'/>\
    </svg>");

    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 16px;
}

/* فاصله بین باکس‌ها */
.woocommerce select,
.woocommerce-ordering select,
.widget_product_categories select {
    margin-bottom: 12px;
}

/* موبایل */
@media (max-width: 768px){
    .woocommerce select,
    .woocommerce-ordering select,
    .widget_product_categories select {
        width: 100%;
        font-size: 14px;
        padding: 8px 10px;
        padding-left: 40px;
    }
}















/* ===============================ACCOUNT PAGE CLEAN STYLE - ROZA================================= */
.woocommerce-account h1.page-title { display: none !important; }
.woocommerce-account .woocommerce-MyAccount-content > p:first-child { display: none; }
.woocommerce-account .woocommerce { margin-top: 10px; }

/* ===============================TOP USER BOX================================= */
.roza-account-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg,#fff0f5,#ffe4ec);
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 22px;
}
.roza-user-phone {
    font-weight: 700;
    color: #5e008b;
    direction: ltr;
    font-size: 15px;
}
.roza-complete-profile {
    background: #fcb6cf;
    color: #5e008b;
    padding: 7px 18px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.25s ease;
}
.roza-complete-profile:hover {
    background: #ff9fc2;
    transform: translateY(-1px);
}

/* ===============================ACCOUNT MENU================================= */
.woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: 25px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { padding: 0; margin: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li { border-bottom: 1px solid #ffd6e7; }
.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 14px 12px;
    color: #5e008b;
    font-weight: 600;
    background: transparent;
    transition: 0.2s;
}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover { background: #fff6fa; }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    background: #fff0f6;
    border-right: 4px solid #fcb6cf;
}

/* ===============================PROFILE FORM================================= */
.roza-profile-form {
    background: #ffffff;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}
.roza-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 768px){
    .roza-grid { grid-template-columns: 1fr; }
}
.roza-profile-form input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #ffc0cb;
    background: transparent;
    padding: 12px 6px;
    font-size: 14px;
    border-radius: 0;
    transition: 0.2s;
}
.roza-profile-form input:focus {
    outline: none;
    border-bottom: 2px solid #fcb6cf;
}
.roza-save-btn {
    margin-top: 22px;
    width: 100%;
    background: linear-gradient(135deg,#fcb6cf,#e89bbd);
    border: none;
    color: #5e008b;
    font-weight: 700;
    padding: 12px;
    border-radius: 14px;
    font-size: 15px;
    transition: 0.3s;
}
.roza-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* ===============================ORDERS TABLE CLEAN================================= */
.woocommerce-account table.shop_table {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.woocommerce-account table.shop_table th {
    background: #fff0f6;
    font-weight: 600;
}
.woocommerce-account table.shop_table td { padding: 12px; }

/* ===============================REMOVE EXTRA SPACING================================= */
.woocommerce-account .woocommerce-MyAccount-content { margin-top: 10px; }


/* موبایل */
@media (max-width: 767px) {
    #ast-scroll-top {
        bottom: 82px !important;
    }
}

/* جابه‌جایی دکمه WPSMS Chat فقط روی موبایل */
@media (max-width: 767px) {
    body > div.wpsms-chatbox.wpsms-chatbox--ltr.wpsms-chatbox--orange-theme.wpsms-chatbox--right-side {
        bottom: 75px !important; /* فاصله از پایین صفحه، عدد را طبق نوار خودتان تنظیم کنید */
    }
}

/* تغییر رنگ دکمه WPSMS Chat روی همه دستگاه‌ها */
body > div.wpsms-chatbox.wpsms-chatbox--ltr.wpsms-chatbox--orange-theme.wpsms-chatbox--right-side > button {
    background-color: #150869 !important; /* رنگ پس‌زمینه */
    color: #fad8e9 !important; /* رنگ متن */
}

/* تغییر رنگ آیکون داخل SVG */
body > div.wpsms-chatbox.wpsms-chatbox--ltr.wpsms-chatbox--orange-theme.wpsms-chatbox--right-side svg path {
    fill: #fad8e9 !important; /* رنگ آیکون */
}


/* مخفی کردن WPSMS Chat در صفحه تسویه حساب */
body.woocommerce-checkout .wpsms-chatbox {
    display: none !important;
}



/* همه فیلدهای ورودی Checkout */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    border: 2px solid #150869; /* رنگ کادر دلخواه */
    border-radius: 5px;
    padding: 8px;
    background-color: #FCEEF5; /* رنگ زمینه */
    width: 100%;
}



/* جدول کامل تسویه حساب */
.woocommerce-checkout-review-order-table {
    border-collapse: collapse !important;
    width: 100%;
}

/* همه سلول‌ها */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    border: 2px solid #150869 !important;
    padding: 12px !important;
    background: #FCEEF5 !important;
}

/* هدر جدول */
.woocommerce-checkout-review-order-table thead th {
    background: #150869 !important;
    color: #ffffff !important;
}




#billing_address_1 {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    font-size: 14px;
    line-height: 1.5;
    direction: rtl;
    border: 2px solid #150869;
    border-radius: 5px;
    resize: vertical;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}


/* مرتب کردن متن حریم خصوصی و قوانین بالای دکمه ثبت سفارش */
.woocommerce-checkout .custom-terms-text {
    text-align: justify;       /* متن به صورت تراز شده در کل عرض */
    line-height: 1.6;          /* فاصله بین خطوط */
    margin: 0 0 10px 0;        /* فاصله پایین هر پاراگراف */
    font-size: 14px;           /* اندازه فونت */
    color: #333;               /* رنگ متن */
    word-wrap: break-word;     /* جلوگیری از خارج شدن متن از باکس */
}

