/* ============================
   OYA‑X GlassMode Slim (FIXED)
   ============================ */

body {
    background: #001A36;
    margin: 0;
    padding: 0;
    font-family: IRANSans, sans-serif;
    direction: rtl;
    color: white;
}
/* ============================
   THEME TOKENS (Top Bar)
============================ */

/* Ultra */
body.theme-ultra {
    --topbar-icon-hover-opacity: 0.75;
}

/* Glass */
body.theme-glass {
    --topbar-icon-hover-opacity: 0.7;
}

/* Classic */
body.theme-classic {
    --topbar-icon-hover-opacity: 0.65;
}

/* Dark */
body.theme-dark {
    --topbar-icon-hover-opacity: 0.6;
}
/* =====================================================
   PRODUCT CARD TOKENS
===================================================== */

/* Ultra */
body.theme-ultra {
    --product-card-bg: red;
    --product-card-border: red;
    --product-card-shadow-hover:0 0 40px red;

    --product-title-color: gold;
    --product-price-color: #ffffff;
    --product-text-muted: rgba(255, 255, 255, 0.8);
}

/* Glass */
body.theme-glass {
    --product-card-bg: red;
    --product-card-border: rgba(255, 255, 255, 0.35);
    --product-card-shadow-hover: 0 0 15px rgba(255, 255, 255, 0.25);

    --product-title-color: #ffffff;
    --product-price-color: #ffffff;
    --product-text-muted: rgba(255, 255, 255, 0.85);
}

/* Classic */
body.theme-classic {
    --product-card-bg: #ffffff;
    --product-card-border: #dddddd;
    --product-card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);

    --product-title-color: #333333;
    --product-price-color: #000000;
    --product-text-muted: #666666;
}

/* Dark */
body.theme-dark {
    --product-card-bg: rgba(20, 20, 20, 0.85);
    --product-card-border: rgba(255, 255, 255, 0.15);
    --product-card-shadow-hover: 0 0 12px rgba(0, 0, 0, 0.6);

    --product-title-color: #f5f5f5;
    --product-price-color: #ffffff;
    --product-text-muted: rgba(255, 255, 255, 0.7);
}
/* ---------------------
   فیلترها
---------------------- */
.filter-box {
    width: 90%;
    margin: 15px auto 10px auto;
    padding: 12px;

    background: rgba(0, 46, 93, 0.22);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;

    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.filter-box form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.filter-input {
    padding: 7px 10px;
    border-radius: 6px;
    background: rgba(0, 26, 54, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: white;
    font-size: 13px;
    min-width: 110px;
}

.filter-btn {
    padding: 7px 16px;
    background: rgba(212, 175, 55, 0.85);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.filter-btn:hover {
    background: #D4AF37;
}

/* ---------------------
   گرید محصولات
---------------------- */
.products-container {
    width: 90%;
    margin: 15px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

/* ---------------------
   کارت محصول
---------------------- */
.product-card {
    background: rgba(0, 46, 93, 0.22);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;

    padding: 10px;
    text-align: center;

    transition: 0.25s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: cover;

    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.4);

    margin-bottom: 8px;
}

.product-name {
    font-size: 14px;
    color: #D4AF37;
    margin: 5px 0;
}

.product-category {
    font-size: 12px;
    opacity: 0.8;
}

.product-price {
    font-size: 14px;
    margin-top: 5px;
}

.buy-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 7px 16px;

    background: rgba(212, 175, 55, 0.9);
    color: black;

    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;

    transition: 0.25s;
}

.buy-btn:hover {
    background: #D4AF37;
}

/* ---------------------
   صفحه جزئیات
---------------------- */
.detail-container {
    width: 88%;
    margin: 20px auto;
    padding: 18px;

    background: rgba(0, 46, 93, 0.22);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;

    backdrop-filter: blur(10px);
}

.detail-image {
    width: 100%;
    height: 250px;
    object-fit: cover;

    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.detail-title {
    font-size: 20px;
    margin: 12px 0;
    color: #D4AF37;
}

.detail-description {
    margin-top: 10px;
    line-height: 1.7;
}

.detail-buy-btn {
    margin-top: 15px;
    display: inline-block;
    padding: 9px 22px;

    background: rgba(212, 175, 55, 0.9);
    border-radius: 8px;

    text-decoration: none;
    color: black;
    font-size: 14px;
}

.detail-buy-btn:hover {
    background: #D4AF37;
}

/* ============================
     کارت‌های سبد خرید
   ============================ */

.cart-container {
    max-width: 700px;
    margin: 0 auto;
}

.cart-item-card {
    display: flex;
    gap: 15px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.cart-item-card img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-info {
    color: #fff;
}

/* دکمه‌های افزایش/کاهش تعداد */
.cart-quantity-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(212, 175, 55, 0.9);
    color: black;
    text-decoration: none;

    border-radius: 6px;
    font-size: 22px;
    font-weight: bold;

    transition: 0.2s;
}

.qty-btn:hover {
    background: #D4AF37;
    transform: translateY(-1px);
}

.qty-number {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

.cart-summary {
    background: rgba(255,255,255,0.12);
    color: #000000;
    padding: 20px;
    margin-top: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}
/* === Text Color Per Page === */
.page-home {
    color: var(--text-home);
}

.page-product {
    color: var(--text-product);
}

.page-cart {
    color: var(--text-cart);
}

.page-checkout {
    color: var(--text-checkout);
}
/* ================= BASE LAYOUT (Admin Controlled) ================= */

.top-bar {
    background-color: var(--primary);
}

.site-title {
    color: var(--heading-color);
}
/* =====================================================
   PRODUCT CARD — TOKEN CONSUMPTION (FINAL FIX)
===================================================== */

.product-box {
    background: var(--product-card-bg);
    border: 1px solid var(--product-card-border);
}

.product-box:hover {
    box-shadow: var(--product-card-shadow-hover);
}

/* ✅ لینک عنوان محصول (علت اصلی مشکل) */
.product-box a {
    color: var(--product-title-color);
    text-decoration: none;
}

/* ✅ امنیت: اگر Bootstrap زور زد */
.product-box a:hover {
    color: var(--product-title-color);
}

/* ================= BOOTSTRAP COLOR LOCK ================= */

/* Backgrounds */
.bg-dark,
.bg-secondary,
.bg-warning {
    background-color: var(--primary) ;
}

/* Text colors */
.text-dark,
.text-secondary,
.text-warning {
    color: var(--text-color) ;
}

/* Buttons */
.btn-warning,
.btn-outline-warning {
    background-color: var(--primary) ;
    border-color: var(--primary) ;
    color: var(--on-primary, #fff) ;
}
/* ================= HEADER BORDER ================= */

.site-header {
    background-color: red ;
    border-bottom: 4px solid red ;
}
body {
    outline: 10px solid red ;
}
nav.site-header {
    background-color: red ;
    border-bottom: 1px solid red ;
}


.top-bar .site-topbar-phone {
    color: var(--brand-accent) ;
    opacity: 1 ;
}

.top-bar .site-topbar-phone i {
    color: inherit ;
}
.top-bar a:hover i,
.top-bar a:hover svg {
    opacity: var(--topbar-icon-hover-opacity);
}

.top-bar i,
.top-bar svg {
    transition: opacity 0.15s ease-in-out;
}
.cms-content {
    color: #222;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    line-height: 1.9;
}

.cms-content p,
.cms-content li {
    color: #222;
}

.cms-content h1,
.cms-content h2,
.cms-content h3 {
    color: #111;
}
.product-image-wrapper {
    position: relative;
}

.product-image-wrapper {
    position: relative;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
}

/* 🔴 Discount badge (Hero) */
.badge-discount-float {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef394e; /* Digikala red */
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 9px;
    border-radius: 6px;
    z-index: 3;
}

/* Right badges (secondary) */
.product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.product-badges .badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    line-height: 1;
}

/* Colors */
.badge-new {
    background: #2ecc71;
    color: #fff;
}

.badge-featured {
    background: #f1c40f;
    color: #111;
}

.badge-best-seller {
    background: #ff9800;
    color: #fff;
}
.product-card-wide {
    transition: transform .2s ease, box-shadow .2s ease;
}

.product-card-wide:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}
.badge-discount-float {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(239,57,78,.4);
}
.row {
    row-gap: 30px;
}
.products-grid {
    gap: 30px;
}
/* === Cart page desktop tweaks === */
.cart-container {
    max-width: 1100px;
}

.cart-summary,
.checkout-btn {
    max-width: 500px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 768px) {
    .cart-item-actions {
        min-width: 160px;
    }
}
/* حل مشکل دیده نشدن متن input در سبد خرید */
.page-cart input,
.page-cart input::placeholder {
    color: #333 !important;
}

.page-cart input {
    background-color: #fff !important;
}
/* Fix unreadable cart total text */
.page-cart .cart-summary {
    background: #f8f9fa;   /* یا هر رنگ روشن دیگه */
    color: #000000 !important;
    border: 1px solid #e0e0e0;
}
.page-cart input,
.page-cart input::placeholder {
    color: #222 !important; /* قابل خواندن */
}

.page-cart input {
    background-color: #fff !important; /* زمینه سفید */
}
/* FIX: cart total text color overriding dark theme */
.page-cart .cart-summary,
.page-cart .cart-summary * {
    color: #000000 !important;
}
/* === FORCE FIX: Cart total text color === */
body.page-cart div.cart-summary,
body.page-cart div.cart-summary strong,
body.page-cart div.cart-summary span {
    color: #111 !important;
}
body.page-cart .cart-summary * {
    color: #111 !important;
}
/* === FORCE FIX: Cart total color on MOBILE === */
@media (max-width: 768px) {
    body.page-cart .cart-summary strong {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
}

@media (max-width: 768px) {
    body.page-cart .cart-summary strong {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        text-shadow: none !important;
    }
}
@media (max-width: 768px) {
    body.page-cart .alert-success,
    body.page-cart .alert-success * {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
}
@media (max-width: 768px) {
    body.page-cart .cart-summary,
    body.page-cart .cart-summary * {
        color: #000 !important;
        opacity: 1 !important;
        background-color: transparent !important;
    }

    body.page-cart .cart-summary input,
    body.page-cart .cart-summary input:disabled {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        opacity: 1 !important;
        background-color: #fff !important;
    }
}
@media (max-width: 768px) {

    body.page-cart .alert-success.cart-summary {
        opacity: 1 !important;
        filter: none !important;
        background-color: #f8f9fa !important; /* یا هر بک‌گراند روشن */
    }

    body.page-cart .alert-success.cart-summary,
    body.page-cart .alert-success.cart-summary * {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }

}
body.page-cart .cart-summary-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    color: #000 !important;
}

body.page-cart .cart-summary-box,
body.page-cart .cart-summary-box * {
    color: #000 !important;
}

/* ============================================== */
/* Fix: Product List - Mobile UX/UI (White Theme & Price Fix) */
/* ============================================== */

/* 1. تضمین درست نشستن کاما/ویگول در قیمت‌ها (هم دسکتاپ و هم موبایل) */
.price,
.product-card .price,
.product-price {
  /* کلاس‌های price را با کلاس واقعی قیمت در کارت محصولتان جایگزین کنید */
  direction: ltr;
  unicode-bidi: plaintext;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 2. تغییر تم به سفید و روشن کردن کارت‌ها (فقط در موبایل) */
@media (max-width: 900px) {
    /* override کردن پس‌زمینه اصلی صفحه به سفید */
    body,
    html,
    .page-wrapper, /* اگر والد اصلی صفحه نام دیگری دارد، اینجا اضافه کنید */
    .store-page {
        background: #fff !important;
        background-color: #fff !important;
    }

    /* روشن کردن کارت‌های محصول و حذف استایل شیشه‌ای/تاریک */
    .product-card {
        background: #ffffff !important; /* پس‌زمینه کارت سفید می‌شود */
        border: 1px solid #ececec !important; /* حاشیه کمرنگ */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important; /* سایه ملایم */
        border-radius: 12px; /* گردی مناسب */
        padding: 15px; /* پدینگ برای فضای داخلی */
    }

    /* تغییر رنگ متون داخل کارت‌ها برای خوانایی بهتر روی پس‌زمینه سفید */
    .product-card .title,
    .product-card .meta,
    .product-card .description {
        color: #1a1a1a !important; /* رنگ متن تیره */
    }

    /* رنگ قیمت‌ها هم تیره شود اگر به صورت پیشفرض سفید هستند */
    .product-card .price {
        color: #000 !important;
    }

    /* اگر روی عکس overlay تاریکی هست، آن را حذف کنید */
    .product-card .image-overlay {
        background: none !important;
    }

    /* مطمئن شویم دکمه‌های طلایی رنگ متن سیاه داشته باشند */
    .btn-gold, .btn-add-to-cart {
      color: #000 !important;
    }
}
/* ============================================== */
/* Fix: Product List - Mobile UX/UI (High Specificity) */
/* ============================================== */

/* 1. Fix: Price Comma/Virgule Direction (High Priority) */
/* این اصلاح روی کلاس 'price' در هر جایی اعمال می‌شود */
.price {
  direction: ltr !important;
  unicode-bidi: plaintext !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  display: inline-block !important; /* برای اطمینان از اعمال ltr */
}

@media (max-width: 900px) {

    /* فقط بخش محتوا سفید شود — نه کل صفحه */
    main,
    .content-wrapper,
    .store-products-section,
    .page-content {
        background: #ffffff !important;
        color: #000 !important;
    }

    /* کارت‌ها */
    .card {
        background-color: #ffffff !important;
        border: 1px solid #e9ecef !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    }

    /* متن‌ها */
    .card-body h5.card-title, 
    .card-body p, 
    .card-body .text-muted,
    .card-body .price {
        color: #1a1a1a !important;
    }

    /* دکمه‌ها */
    .btn-primary, 
    .btn-warning {
        color: #000 !important;
    }
}
.price {
    direction: ltr !important;
    unicode-bidi: plaintext !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
}
.site-header {
    background-color: transparent;
    border-bottom: none;
}

