/*---------------------------------------------
    فایل: styles.css
    قالب: paper-mars | فست فود
    تم: روشن (سفید/مشکی/قرمز) و تیره (مشکی/قرمز/زرد)
-----------------------------------------------*/

:root {
    /* ── تم روشن ── */
    --bg-light:              #FFFFFF;
    --bg-footer-light:       #F7F7F7;
    --text-light:            #111111;
    --text-muted-light:      #999999;
    --accent-primary-light:  #E31B23;
    --accent-secondary-light:#E31B23;
    --border-light:          #F2F2F2;
    --shadow-light:          rgba(0, 0, 0, 0.12);
    --cat-line-light:        rgba(0, 0, 0, 0.12);
    --price-new-light:       #E31B23;
    --price-old-light:       #C8C8C8;
    --header-bg-light:       #111111;
    --header-text-light:     #FFFFFF;
    --header-sub-light:      rgba(255, 255, 255, 0.50);
    --header-stripe-light:   #E31B23;
    --badge-na-bg-light:     #EBEBEB;
    --badge-na-text-light:   #777777;
    --footer-text-light:     #999999;
    --footer-accent-light:   #111111;
    --copy-light:            #666666;

    /* ── تم تیره ── */
    --bg-dark:               #1E1E1E;
    --bg-footer-dark:        #141414;
    --text-dark:             #F0F0F0;
    --text-muted-dark:       rgba(255, 255, 255, 0.38);
    --accent-primary-dark:   #F5A623;
    --accent-secondary-dark: #F5A623;
    --border-dark:           rgba(255, 255, 255, 0.06);
    --shadow-dark:           rgba(0, 0, 0, 0.45);
    --cat-line-dark:         rgba(255, 255, 255, 0.10);
    --price-new-dark:        #F5A623;
    --price-old-dark:        rgba(255, 255, 255, 0.22);
    --header-bg-dark:        #E31B23;
    --header-text-dark:      #FFFFFF;
    --header-sub-dark:       rgba(255, 255, 255, 0.70);
    --header-stripe-dark:    #F5A623;
    --badge-na-bg-dark:      #444444;
    --badge-na-text-dark:    #AAAAAA;
    --footer-text-dark:      rgba(255, 255, 255, 0.32);
    --footer-accent-dark:    #F5A623;
    --copy-dark:             rgba(255, 255, 255, 0.5);
}

body.light-mode {
    --bg:              var(--bg-light);
    --bg-footer:       var(--bg-footer-light);
    --text:            var(--text-light);
    --text-muted:      var(--text-muted-light);
    --accent-primary:  var(--accent-primary-light);
    --border:          var(--border-light);
    --shadow:          var(--shadow-light);
    --cat-line:        var(--cat-line-light);
    --price-new:       var(--price-new-light);
    --price-old:       var(--price-old-light);
    --header-bg:       var(--header-bg-light);
    --header-text:     var(--header-text-light);
    --header-sub:      var(--header-sub-light);
    --header-stripe:   var(--header-stripe-light);
    --badge-na-bg:     var(--badge-na-bg-light);
    --badge-na-text:   var(--badge-na-text-light);
    --footer-text:     var(--footer-text-light);
    --footer-accent:   var(--footer-accent-light);
    --copy:            var(--copy-light);
}

body.dark-mode {
    --bg:              var(--bg-dark);
    --bg-footer:       var(--bg-footer-dark);
    --text:            var(--text-dark);
    --text-muted:      var(--text-muted-dark);
    --accent-primary:  var(--accent-primary-dark);
    --border:          var(--border-dark);
    --shadow:          var(--shadow-dark);
    --cat-line:        var(--cat-line-dark);
    --price-new:       var(--price-new-dark);
    --price-old:       var(--price-old-dark);
    --header-bg:       var(--header-bg-dark);
    --header-text:     var(--header-text-dark);
    --header-sub:      var(--header-sub-dark);
    --header-stripe:   var(--header-stripe-dark);
    --badge-na-bg:     var(--badge-na-bg-dark);
    --badge-na-text:   var(--badge-na-text-dark);
    --footer-text:     var(--footer-text-dark);
    --footer-accent:   var(--footer-accent-dark);
    --copy:            var(--copy-dark);
}

/* ===== ریست ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    padding: 1rem;
}

/* ===== کانتینر اصلی ===== */
.paper-container {
    max-width: 860px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 0;
    box-shadow: 0 4px 24px var(--shadow);
    overflow: hidden;
}

/* ===== هدر ===== */
.paper-header {
    background: var(--header-bg);
    padding: 0.75rem 1.25rem 0;
    text-align: center;
}

.paper-logo {
    width: 72px;
    height: auto;
    margin: 0 auto 0.75rem;
    display: block;
    /*border-radius: 50%;*/
    /*border: 3px solid #E31B23;*/
}

.paper-header h1 {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--header-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}

.paper-description {
    font-size: 1rem;
    color: var(--header-sub);
    margin-top: 0.3rem;
}

/* نوار رنگی زیر هدر */
.paper-header::after {
    content: '';
    display: block;
    height: 4px;
    margin-top: 1rem;
    background: var(--header-stripe);
}

/* ===== محتوای اصلی ===== */
.paper-main {
    padding: 0.25rem 1.25rem 1.25rem;
}

/* ===== دسته‌بندی‌ها ===== */
.paper-category {
    margin-top: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.paper-category:last-child {
    border-bottom: none;
    margin-bottom: 0.25rem;
}

.paper-category h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.7rem;
    font-weight: 900;
    /*letter-spacing: 0.12em;*/
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.paper-category h2::before,
.paper-category h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cat-line);
}

/* ===== محصولات ===== */
.paper-products {
    display: flex;
    flex-direction: column;
}

.paper-product {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    transition: transform 0.2s ease;
}

.paper-product:last-child {
    border-bottom: none;
}

.paper-product:hover {
    transform: translateX(-3px);
}

/* محصول ناموجود */
/*.paper-product.unavailable {*/
/*    opacity: 0.70;*/
/*    pointer-events: none;*/
/*}*/

/* ===== اطلاعات محصول ===== */
.product-info {
    flex: 1;
}

.product-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

/* نام محصول تخفیف‌دار */
.paper-product:has(.new-price) .product-info h3 {
    color: var(--accent-primary);
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

/* ===== قیمت‌ها ===== */
.product-price {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 52px;
}

.new-price {
    font-size: clamp(1.2rem, 3.2vw, 1.6rem);
    color: var(--price-new);
}

.old-price {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--price-old);
    text-decoration: line-through;
}

/* قیمت بدون تخفیف */
.product-price > span:only-child {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

/* ===== بج ناموجود ===== */
.out-of-stock {
    display: inline-block;
    background: #E31B23;      /* قرمز پررنگ اصلی */
    color: #FFFFFF;           /* متن سفید */
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.paper-product.unavailable .out-of-stock {

    border: 1px solid rgba(227, 27, 35, 0.5);
}


/* ===== فوتر ===== */
.paper-footer {
    background: var(--bg-footer);
    border-top: 3px solid #E31B23;
    padding: 1.5rem 1rem;
    text-align: center;
}

/* حذف گرید و استفاده از فلکس ستونی */
.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.qr-code {
    text-align: center;
    margin-bottom: 0.5rem;
}

.qr-code svg {
    display: block;
    width: 90px;
    height: 90px;
    margin: 0 auto;
}

.qr-code p {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.contact-info {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    font-size: 0.8rem;
    color: var(--footer-text);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-info i {
    color: #E31B23;
    width: 18px;
    font-size: 0.85rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.6rem;
}

.social-icons a {
    color: var(--footer-text);
    font-size: 1.4rem;
    transition: color 0.2s;
    text-decoration: none;
}

.social-icons a:hover {
    color: #E31B23;
}

.copyright a{
    text-decoration: none;
    color: #E31B23;
}

.copyright {
    font-size: 0.75rem;
    color: var(--copy);
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ===== دکمه بازگشت به بالا ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #E31B23;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    font-size: 1.1rem;
    border: none;
}

/* ===== موبایل ===== */
@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .paper-container {
        box-shadow: none;
    }

    .paper-header h1 {
        font-size: 1.5rem;
    }

    .paper-main {
        padding: 0.25rem 1rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .qr-code {
        display: none;
    }

    .paper-product:hover {
        transform: none;
    }
}
/* ===== بج تخفیف ===== */
.discount-badge {
    display: inline-block;
    background: #F5A623;      /* زرد نارنجی */
    color: #111111;           /* متن تیره برای خوانایی */
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
