/* =====================================================
   WooCommerce — Tick Optic
   ===================================================== */
.woocommerce,
.woocommerce-page {
    direction: rtl;
    text-align: right;
}

.woocommerce-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 24px 56px;
}

.woocommerce-products-header {
    margin-bottom: 24px;
}

.woocommerce-products-header__title.page-title,
.woocommerce .page-title {
    margin: 0 0 20px;
    color: #1b1b1b;
    font-size: 30px;
    line-height: 1.5;
    text-align: right;
}

.woocommerce .woocommerce-result-count {
    margin: 10px 0 20px;
    color: #666;
}

.woocommerce .woocommerce-ordering {
    margin: 0 0 24px;
}

.woocommerce .woocommerce-ordering select {
    min-height: 44px;
    padding: 7px 12px;
    border: 1px solid #e5d7d7;
    border-radius: 12px;
    background: #fff;
    color: #333;
}

.price,
.amount,
.woocommerce-Price-amount {
    direction: rtl;
    unicode-bidi: plaintext;
    color: var(--brand-color, var(--color-primary, #9b0008)) !important;
    font-weight: 700;
}

/* Product grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 24px !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    clear: both;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
    display: none !important;
    content: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    position: relative;
    width: 100% !important;
    min-width: 0;
    float: none !important;
    margin: 0 !important;
    padding: 16px !important;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0dddd;
    border-radius: 20px;
    box-shadow: 0 5px 18px rgba(35, 20, 20, .045);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    border-color: #d8b5b5;
    box-shadow: 0 14px 30px rgba(88, 10, 18, .11);
}

.woocommerce ul.products li.product a.woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
}

.woocommerce ul.products li.product img {
    display: block;
    width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin: 0 0 14px !important;
    border-radius: 15px;
    background: #fafafa;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 54px;
    margin: 0 0 9px !important;
    padding: 0 !important;
    color: #222;
    font-size: 15px !important;
    line-height: 1.8;
    text-align: right;
}

.woocommerce ul.products li.product .price {
    display: block;
    min-height: 28px;
    margin: 0 0 12px !important;
    font-size: 16px !important;
    line-height: 1.7;
    text-align: right;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_simple {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin: 8px 0 0 !important;
    padding: 9px 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--color-primary, #9b0008) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .button:hover {
    background: #790006 !important;
}

.tick-quickview-btn,
.tick-wishlist-btn,
.tick-compare-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0 4px 8px 0;
    padding: 7px 10px;
    border: 1px solid #ececec !important;
    border-radius: 10px;
    background: #fafafa !important;
    color: #666 !important;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.tick-wishlist-btn,
.tick-compare-btn {
    width: 34px;
    padding: 0;
    font-size: 16px;
}
.tick-wishlist-btn:hover,
.tick-compare-btn:hover,
.tick-quickview-btn:hover {
    background: #f5f5f5 !important;
    color: var(--color-primary, #9b0008) !important;
    border-color: #e6d3d3 !important;
}

.tick-badge,
.woocommerce span.onsale {
    position: absolute;
    top: 12px;
    z-index: 4;
    min-width: auto;
    min-height: auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f5f5f5 !important;
    color: #555 !important;
    font-size: 10.5px;
    line-height: 1.4;
    box-shadow: none !important;
}
.tick-badge--new { right: 12px; }
.tick-badge--sale,
.woocommerce span.onsale { left: 12px; right: auto; background: var(--color-primary, #9b0008) !important; color: #fff !important; }

/* Single product */
.single-product div.product {
    padding: 24px;
    border: 1px solid #f0e5e5;
    border-radius: 24px;
    background: #fff;
}
.single-product .product_title {
    color: #222;
    font-size: 28px;
    line-height: 1.6;
}
.single-product div.product p.price,
.single-product div.product span.price {
    font-size: 22px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
    padding-right: 0;
    border-bottom: 2px solid #f2dada;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border-radius: 12px 12px 0 0;
}

/* Forms, cart and checkout */
.woocommerce table.shop_table {
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #e7dddd;
    border-radius: 12px;
    background: #fff;
}
.woocommerce .cart-collaterals,
.woocommerce-checkout-review-order {
    margin-top: 26px;
}

@media (max-width: 1180px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .woocommerce-content {
        padding: 18px 12px 40px;
    }
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 12px !important;
    }
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        padding: 11px !important;
        border-radius: 16px;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        min-height: 46px;
        font-size: 13px !important;
        line-height: 1.7;
        text-align: center;
    }
    .woocommerce ul.products li.product .price {
        font-size: 13px !important;
        text-align: center;
    }
    .woocommerce ul.products li.product .button {
        min-height: 38px;
        font-size: 12px !important;
    }
    .tick-quickview-btn { display: none; }
    .tick-wishlist-btn,
    .tick-compare-btn {
        width: 32px;
        min-height: 32px;
        margin-bottom: 6px;
    }
    .woocommerce-products-header__title.page-title,
    .woocommerce .page-title {
        font-size: 24px;
        text-align: center;
    }
    .woocommerce .woocommerce-result-count,
    .woocommerce .woocommerce-ordering {
        float: none;
        width: 100%;
        text-align: center;
    }
    .woocommerce .woocommerce-ordering select {
        width: 100%;
    }
    .single-product div.product {
        padding: 15px;
        border-radius: 18px;
    }
}

@media (max-width: 360px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------
 * Cart / Checkout visual cleanup — softer, calmer, less "shouty".
 * Scoped only to Cart & Checkout so the rest of the shop (product
 * grid, single product) keeps its normal red pricing untouched.
 * ------------------------------------------------------------- */
.woocommerce-cart .price,
.woocommerce-cart .amount,
.woocommerce-cart .woocommerce-Price-amount,
.woocommerce-checkout .price,
.woocommerce-checkout .amount,
.woocommerce-checkout .woocommerce-Price-amount {
    color: #2b2b2b !important;
    font-weight: 700;
    font-size: 15px;
}

/* Product name in cart/checkout tables: one line, not two */
.woocommerce-cart td.product-name a,
.woocommerce-checkout .cart_item .product-name,
.woocommerce-checkout td.product-name a {
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

/* Softer corners everywhere in these two flows */
.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table,
.woocommerce-checkout .woocommerce-checkout-review-order-table,
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-cart .coupon,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-NoticeGroup {
    border-radius: 16px !important;
    overflow: hidden;
}
.woocommerce-cart .quantity input,
.woocommerce-checkout .quantity input,
.woocommerce-cart .coupon .input-text,
.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row select,
.woocommerce-checkout form .form-row textarea {
    border-radius: 10px !important;
}

/* Less visual weight overall: lighter borders, smaller row text */
.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
    font-size: 14px;
    border-color: #f0f0f0;
}

/* Currency position (ریال before vs after the number): this is a
   WooCommerce setting, not something safe to force via CSS — see
   the note in the chat reply for exactly where to change it. */
