
/* =====================================================
   AHANJAN | UNDER PRICE
   Navy: #101D35
   Orange: #F7941D
===================================================== */

.under-price-page {
    --up-navy: #101d35;
    --up-navy-2: #192d49;
    --up-orange: #f7941d;
    --up-red: #e54848;
    --up-muted: #8390a1;

    direction: rtl;
    color: var(--up-navy);

    padding: 22px 0 80px;
}

.under-price-page *,
.under-price-page *::before,
.under-price-page *::after {
    box-sizing: border-box;
}

.up-container {
    width: min(95%, calc(100% - 36px));
    margin: 0 auto;
}

/* STATUS BAR */

.up-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 13px 19px;
    border: 1px solid #e0e5eb;
    border-radius: 12px;
    background: linear-gradient(110deg, #f8fafc, #edf1f5);
    box-shadow: 0 5px 20px rgba(16, 29, 53, .035);
}

.up-status-right {
    display: flex;
    align-items: center;
    gap: 11px;
}

.up-live-indicator {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #21a56b;
    box-shadow: 0 0 0 4px rgba(33,165,107,.12);
    animation: upLivePulse 1.8s infinite;
}

@keyframes upLivePulse {
    50% {
        box-shadow: 0 0 0 8px rgba(33,165,107,0);
    }
}

.up-status-label {
    color: var(--up-navy);
    font-size: 13px;
    font-weight: 900;
}

.up-status-separator {
    width: 1px;
    height: 17px;
    background: #ccd3dc;
}

.up-status-desc {
    color: #657286;
    font-size: 12px;
}

/* SECTION HEADING */

.up-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 28px 0 26px;
}

.up-section-heading h1 {
    margin: 11px 0 8px;
    color: var(--up-navy);
    font-size: clamp(27px, 4vw, 39px);
    font-weight: 950;
    letter-spacing: -1.4px;
}

.up-section-heading h1 span {
    color: var(--up-red);
    position: relative;
}

.up-section-heading p {
    margin: 0;
    color: #7d8999;
    font-size: 13px;
    line-height: 1.9;
}

.up-products-count {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 17px;
    border-radius: 12px;
    background: var(--up-navy);
    color: #fff;
}

.up-count-number {
    color: var(--up-orange);

    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.up-count-label {
    color: #d5deea;
    font-size: 11px;
    white-space: nowrap;
}

/* SALE TIMER */

.up-sale-open {
    position: relative;
    z-index: 1;
    color: #21a56b;
    font-size: 13px;
    font-weight: 900;
}


/* FILTER TOOLBAR */

.up-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 23px;
    padding: 15px 17px;
    border: 1px solid #e3e8ee;
    border-radius: 13px;
    background: #fff;
}

.up-filter-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.up-filter-title strong {
    color: var(--up-navy);
    font-size: 13px;
    font-weight: 900;
}

.up-filter-title small {
    color: #9aa4b2;
    font-size: 10px;
}

.up-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.up-filter-controls select {
    min-width: 145px;
    height: 39px;
    padding: 0 12px;
    border: 1px solid #e2e7ed;
    border-radius: 8px;
    outline: none;
    color: #4e5d72;
    background: #f8fafc;

    font-size: 11px;
    cursor: pointer;
    transition: .2s;
}

.up-filter-controls select:focus {
    border-color: var(--up-orange);
    box-shadow: 0 0 0 3px rgba(247,148,29,.10);
}

/* PRODUCTS GRID */

.up-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

/* PRODUCT CARD */

.up-product-card {
    position: relative;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 245px;
    overflow: hidden;
    border: 1px solid #e1e6ec;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(16,29,53,.045);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    animation: upCardAppear .55s both;
}

@keyframes upCardAppear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.up-product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(247,148,29,.55);
    box-shadow: 0 15px 35px rgba(16,29,53,.10);
}

/* VISUAL SIDE */

.up-card-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 100%;
    background:
        radial-gradient(circle at 50% 42%, rgba(247,148,29,.19), transparent 48%),
        linear-gradient(150deg, #203958, #101d35);
}

.up-card-visual::before,
.up-card-visual::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
}

.up-card-visual::after {
    width: 110px;
    height: 110px;
}

.up-visual-grid {
    position: absolute;
    inset: 0;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
    background-size: 19px 19px;
    mask-image: linear-gradient(to bottom, black, transparent);
}

.up-rebar-illustration {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 150px;
    transform: rotate(12deg);
    filter: drop-shadow(5px 8px 5px rgba(0,0,0,.3));
}

.up-rebar-illustration span {
    position: absolute;
    display: block;
    width: 7px;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #8996a4, #e7edf2 45%, #798696);
}

.up-rebar-illustration span:nth-child(1) {
    right: 9px;
}

.up-rebar-illustration span:nth-child(2) {
    right: 27px;
}

.up-rebar-illustration span:nth-child(3) {
    right: 45px;
}

.up-rebar-illustration span::after {
    content: "";
    position: absolute;
    inset: 8px 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0 9px,
        rgba(16,29,53,.8) 10px 12px,
        transparent 13px 19px
    );
}

.up-visual-code {
    position: absolute;
    z-index: 2;
    bottom: 12px;
    color: rgba(255,255,255,.45);

    font-size: 9px;
    letter-spacing: 2px;
}

/* CARD CONTENT */

.up-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 17px 17px 15px;
}

.up-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.up-card-tag {
    padding: 5px 9px;
    border-radius: 5px;
    color: #a85d0b;
    background: #fff2df;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.up-card-code {
    color: #aab3bf;

    font-size: 9px;
    direction: ltr;
}

.up-factory-name {
    margin: 15px 0 4px;
    color: #7b8798;
    font-size: 10px;
    font-weight: 700;
}

.up-product-name {
    margin: 0;
    color: var(--up-navy);
    font-size: 17px;
    font-weight: 950;
}

.up-product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.up-spec {
    padding: 5px 8px;
    border: 1px solid #e9edf1;
    border-radius: 5px;
    color: #667488;
    background: #f8fafc;
    font-size: 9px;
}

.up-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: 18px;
    padding-top: 13px;
    border-top: 1px dashed #e2e7ed;
}

.up-price-block {
    min-width: 0;
}

.up-old-price {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9aa4b2;
    font-size: 10px;
}

.up-old-price del {
    font-size: 12px;
}

.up-special-price {
    margin-top: 5px;
    color: var(--up-red);

    font-size: 23px;
    font-weight: 900;
    letter-spacing: -.7px;
}

.up-special-price small {
    margin-right: 3px;
    color: #8994a3;
    font-size: 9px;
    font-weight: 500;
}

.up-saving {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 5px 7px;
    border-radius: 5px;
    color: #188357;
    background: #eaf8f1;
    font-size: 9px;
    font-weight: 900;
}

.up-card-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
}

.up-stock {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #26966a;
    font-size: 9px;
    white-space: nowrap;
}

.up-stock::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #26966a;
}

.up-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 110px;
    padding: 10px 12px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: var(--up-navy);

    font-size: 10px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: .25s;
}

.up-buy-button:hover {
    color: #fff;
    background: var(--up-orange);
    box-shadow: 0 5px 14px rgba(247,148,29,.25);
}

.up-buy-button span {
    font-size: 15px;
}

/* EMPTY STATE */

.up-empty-state {
    display: none;
    grid-column: 1 / -1;
    padding: 55px 20px;
    border: 1px dashed #cbd4df;
    border-radius: 14px;
    background: #f8fafc;
    text-align: center;
}

.up-empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: var(--up-navy);
    font-size: 15px;
}

.up-empty-state span {
    color: #8a96a6;
    font-size: 12px;
}

/* FOOTNOTE */

.up-bottom-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 9px;
    color: #718096;
    background: #f1f4f7;
    font-size: 10px;
    line-height: 1.9;
}

.up-bottom-note strong {
    color: var(--up-navy);
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .up-products-grid {
        grid-template-columns: 1fr;
    }

    .up-product-card {
        min-height: 225px;
    }
}

@media (max-width: 650px) {
    .under-price-page {
        padding-top: 14px;
    }

    .up-container {
        width: calc(100% - 24px);
    }

    .up-status-bar {
        align-items: flex-start;
        padding: 12px;
    }

    .up-status-right {
        flex-wrap: wrap;
        gap: 7px;
    }

    .up-status-desc,
    .up-status-separator {
        display: none;
    }
	
    .up-section-heading {
        margin: 32px 0 20px;
        align-items: flex-end;
    }

    .up-section-heading h1 {
        font-size: 27px;
    }

    .up-section-heading p {
        max-width: 230px;
        font-size: 11px;
    }

    .up-products-count {
        gap: 7px;
        padding: 9px;
    }

    .up-count-number {
        font-size: 22px;
    }

    .up-count-label {
        max-width: 45px;
        font-size: 9px;
        white-space: normal;
    }

    .up-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .up-filter-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .up-filter-controls select {
        width: 100%;
        min-width: 0;
    }

    .up-filter-controls select:last-child {
        grid-column: 1 / -1;
    }

    .up-product-card {
        grid-template-columns: 82px minmax(0, 1fr);
        min-height: 220px;
    }

    .up-card-content {
        padding: 13px 12px;
    }

    .up-card-visual {
        min-height: 220px;
    }

    .up-rebar-illustration {
        transform: rotate(12deg) scale(.8);
    }

    .up-factory-name {
        margin-top: 12px;
    }

    .up-product-name {
        font-size: 15px;
    }

    .up-card-bottom {
        gap: 6px;
    }

    .up-special-price {
        font-size: 19px;
    }

    .up-buy-button {
        min-width: 88px;
        padding: 9px 8px;
        font-size: 9px;
    }
}

@media (max-width: 380px) {
    .up-product-card {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .up-card-content {
        padding: 11px 9px;
    }

    .up-special-price {
        font-size: 17px;
    }

    .up-card-action {
        gap: 6px;
    }

    .up-buy-button {
        min-width: 78px;
    }

    .up-card-code {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .under-price-page *,
    .under-price-page *::before,
    .under-price-page *::after {
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================
   UNDER PRICE | PRODUCT CARDS UPDATE
========================================= */

/* سه ستون در دسکتاپ */
.up-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* افزایش عرض بخش تصویر */
.up-product-card {
    grid-template-columns: 155px minmax(0, 1fr);
    min-height: 245px;
}

/* بخش تصویر */
.up-card-visual {
    min-width: 0;
    min-height: 100%;
}

/* حذف فاصله اضافی کدها */
.up-card-top {
    justify-content: flex-start;
}

/* نمایش فقط سایز */
.up-product-specs {
    display: flex;
    gap: 8px;
}

/* قیمت و دکمه */
.up-card-bottom {
    gap: 12px;
}

/* تبلت */
@media (max-width: 1100px) {
    .up-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .up-product-card {
        grid-template-columns: 135px minmax(0, 1fr);
    }
}

/* موبایل */
@media (max-width: 650px) {
    .up-products-grid {
        grid-template-columns: 1fr;
    }

    .up-product-card {
        grid-template-columns: 105px minmax(0, 1fr);
    }
}

.aj-countdown-open {
    display: none;
}

.aj-countdown-open.is-active {
    display: flex;
}


/* =========================================
   UNDER PRICE | SALE TIMER & STATUS
========================================= */

/* وضعیت فروش */

.up-sale-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 900;
    transition: .3s ease;
}

.up-sale-open.is-active {
    color: #188357;
    background: #eaf8f1;
}

.up-sale-open.is-closed {
    color: #d13e3e;
    background: #fff0f0;
}

.up-sale-open span {
    font-size: 11px;
}

/* پنل شمارش معکوس */

.up-sale-countdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
    padding: 19px 23px;
    border: 1px solid #f1d8d5;
    border-radius: 13px;
    background:
        radial-gradient(circle at 10% 50%, rgba(229,72,72,.09), transparent 35%),
        linear-gradient(110deg, #fff, #fff8f7);
    box-shadow: 0 6px 22px rgba(16,29,53,.035);
}

.up-countdown-message {
    color: #c83d3d;
    font-size: 14px;
    font-weight: 950;
}

.up-countdown-caption {
    margin-top: 6px;
    color: #8791a0;
    font-size: 11px;
}

/* اعداد تایمر */

.up-countdown-timer {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.up-time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    border: 1px solid #f0d9d7;
    border-radius: 9px;
    background: #fff;
}

.up-time-unit strong {
    color: #c83d3d;
    font-size: 24px;
    font-weight: 950;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.up-time-unit span {
    margin-top: 4px;
    color: #929baa;
    font-size: 9px;
}

.up-time-separator {
    color: #d65a55;
    font-size: 23px;
    font-weight: 900;
}

/* دکمه غیرفعال */

.up-buy-button.is-disabled {
    color: #8c95a2 !important;
    background: #e9edf1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none;
    opacity: .85;
}

/* موبایل */

@media (max-width: 650px) {
    .up-sale-countdown {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 16px;
    }

    .up-countdown-message {
        font-size: 12px;
    }

    .up-countdown-caption {
        font-size: 10px;
    }

    .up-countdown-timer {
        justify-content: center;
    }

    .up-time-unit {
        width: 58px;
        height: 60px;
    }

    .up-time-unit strong {
        font-size: 22px;
    }
}
