/* Sharif SMS Suite — Woo archive UI. Scope is only body.sbs-shop-display. */
body.sbs-shop-display {
    --sbs-shop-accent: var(--sharif-accent, #64a39a);
    --sbs-shop-accent-dark: var(--sharif-accent-dark, #4f8b84);
    --sbs-shop-accent-soft: var(--sharif-accent-soft, #eef7f5);
    --sbs-shop-text: var(--sharif-text, #172033);
    --sbs-shop-muted: var(--sharif-text-soft, #6b7788);
    --sbs-shop-border: rgba(23,32,51,.10);
    --sbs-shop-card-radius: 14px;
    --sbs-shop-button-radius: 9px;
}

body.sbs-shop-display .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(var(--sbs-shop-cols-desktop,4), minmax(0,1fr)) !important;
    gap: 28px 20px !important; align-items: stretch !important; margin: 0 !important; padding: 0 4px !important;
}
body.sbs-shop-display .woocommerce ul.products::before,
body.sbs-shop-display .woocommerce ul.products::after { display: none !important; content: none !important; }

body.sbs-shop-display .woocommerce ul.products li.product {
    position: relative !important; display: flex !important; flex-direction: column !important; float: none !important; clear: none !important;
    width: auto !important; min-width: 0 !important; height: 100% !important; margin: 0 !important; padding: 11px 11px 13px !important;
    overflow: visible !important; border: 1px solid rgba(71,85,105,.16) !important; border-radius: var(--sbs-shop-card-radius) !important;
    background: #fff !important; box-shadow: 0 4px 14px rgba(23,32,51,.038) !important; text-align: center !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}
body.sbs-shop-display .woocommerce ul.products li.product:hover {
    border-color: rgba(100,163,154,.28) !important; box-shadow: 0 10px 26px rgba(23,32,51,.085) !important; transform: translateY(-2px) !important;
}

/* Stable media slot: first and hover image have identical geometry. */
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    position: relative !important; display: block !important; width: min(100%,var(--sbs-shop-img-w,240px)) !important; max-width: 100% !important;
    height: var(--sbs-shop-img-h,230px) !important; min-height: var(--sbs-shop-img-h,230px) !important; max-height: var(--sbs-shop-img-h,230px) !important;
    margin: 0 auto 11px !important; overflow: hidden !important; border: 1px solid rgba(100,163,154,.12) !important; border-radius: 11px !important;
    background: linear-gradient(180deg,#fbfdfc 0%,#f5f8f7 100%) !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link,
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-loop-product__link {
    position: relative !important; display: block !important; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img.show-on-hover {
    position: absolute !important; inset: 6px !important; display: block !important;
    width: calc(100% - 12px) !important; height: calc(100% - 12px) !important; max-width: none !important; max-height: none !important;
    margin: 0 !important; padding: 0 !important; object-fit: contain !important; object-position: center center !important;
    transform: none !important; transition: opacity .24s ease, visibility .24s ease, transform .24s ease !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img:not(.show-on-hover) { z-index: 1 !important; opacity: 1 !important; visibility: visible !important; }
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img.show-on-hover { z-index: 2 !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap:has(img.show-on-hover):hover img:not(.show-on-hover) { opacity: 0 !important; }
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap:has(img.show-on-hover):hover img.show-on-hover { opacity: 1 !important; visibility: visible !important; }
body.sbs-shop-display.sbs-shop-hover-slide .astra-shop-thumbnail-wrap img.show-on-hover { transform: translateX(12%) !important; }
body.sbs-shop-display.sbs-shop-hover-slide .astra-shop-thumbnail-wrap:has(img.show-on-hover):hover img:not(.show-on-hover) { transform: translateX(-12%) !important; }
body.sbs-shop-display.sbs-shop-hover-slide .astra-shop-thumbnail-wrap:has(img.show-on-hover):hover img.show-on-hover { transform: translateX(0) !important; }
body.sbs-shop-display.sbs-shop-hover-zoom .astra-shop-thumbnail-wrap img.show-on-hover { transform: scale(1.06) !important; }
body.sbs-shop-display.sbs-shop-hover-zoom .astra-shop-thumbnail-wrap:has(img.show-on-hover):hover img:not(.show-on-hover) { transform: scale(.96) !important; }
body.sbs-shop-display.sbs-shop-hover-zoom .astra-shop-thumbnail-wrap:has(img.show-on-hover):hover img.show-on-hover { transform: scale(1) !important; }

/* Fixed semantic rows keep CTAs aligned even when a price/category is absent. */
body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: grid !important; grid-template-rows: 23px 80px 42px 24px 44px !important; row-gap: 5px !important;
    flex: 1 1 auto !important; min-width: 0 !important; padding: 0 2px !important; align-items: stretch !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .ast-woo-product-category {
    grid-row: 1 !important; min-height: 23px !important; margin: 0 !important; overflow: hidden !important;
    color: var(--sbs-shop-muted) !important; font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important; font-size: 12px !important; font-weight: 300 !important;
    line-height: 23px !important; text-overflow: ellipsis !important; white-space: nowrap !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .woocommerce-loop-product__title {
    grid-row: 2 !important; display: -webkit-box !important; min-height: 80px !important; max-height: 80px !important; margin: 0 !important; overflow: hidden !important;
    color: var(--sbs-shop-text) !important; font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important; font-size: 14px !important; font-weight: 600 !important;
    line-height: 1.9 !important; text-align: center !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 3 !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .price {
    grid-row: 3 !important; display: flex !important; align-items: center !important; justify-content: center !important; flex-wrap: wrap !important;
    min-height: 42px !important; margin: 0 !important; color: #26364a !important; font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important;
    font-size: 14px !important; font-weight: 700 !important; line-height: 1.65 !important; text-align: center !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .price del,
body.sbs-shop-display .woocommerce ul.products li.product .price ins { margin-inline: 3px !important; }
body.sbs-shop-display .woocommerce ul.products li.product .button,
body.sbs-shop-display .woocommerce ul.products li.product a.button {
    grid-row: 5 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 100% !important; min-height: 44px !important;
    margin: 0 !important; padding: 9px 10px !important; border: 1px solid var(--sbs-shop-accent) !important; border-radius: var(--sbs-shop-button-radius) !important;
    background: linear-gradient(135deg,#69aaa1 0%,var(--sbs-shop-accent) 55%,#59988f 100%) !important; color: #fff !important;
    font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important; font-size: 12.5px !important; font-weight: 700 !important; line-height: 1.55 !important;
    text-align: center !important; text-decoration: none !important; white-space: normal !important; box-shadow: 0 5px 12px rgba(79,139,132,.16) !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease !important;
}
body.sbs-shop-display .woocommerce ul.products li.product .button:hover,
body.sbs-shop-display .woocommerce ul.products li.product a.button:hover {
    border-color: var(--sbs-shop-accent-dark) !important; background: var(--sbs-shop-accent-dark) !important; box-shadow: 0 7px 16px rgba(79,139,132,.22) !important; transform: translateY(-1px) !important;
}
body.sbs-shop-display .woocommerce ul.products li.product a.added_to_cart.wc-forward { display: none !important; }
body.sbs-shop-display .woocommerce ul.products li.product .shfss-loop-cart-link { grid-row: 4 !important; }

/* Badges */
body.sbs-shop-display .sbs-shop-badges {
    position: absolute !important; top: 18px !important; z-index: 8 !important; display: flex !important; flex-direction: column !important; align-items: flex-start !important;
    gap: 6px !important; max-width: calc(100% - 36px) !important; pointer-events: none !important;
}
body.sbs-shop-display .sbs-shop-badges--right { right: 18px !important; left: auto !important; }
body.sbs-shop-display .sbs-shop-badges--left { left: 18px !important; right: auto !important; }
body.sbs-shop-display .sbs-shop-badge {
    display: inline-flex !important; align-items: center !important; justify-content: center !important; min-height: 25px !important; padding: 4px 10px !important;
    font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important; font-size: 11.5px !important; font-weight: 700 !important; line-height: 1.25 !important;
    box-shadow: 0 5px 13px rgba(15,35,58,.12) !important; white-space: nowrap !important;
}
body.sbs-shop-display.sbs-shop-badge-pill .sbs-shop-badge { border-radius: 999px !important; }
body.sbs-shop-display.sbs-shop-badge-square .sbs-shop-badge { border-radius: 4px !important; }
body.sbs-shop-display.sbs-shop-badge-soft .sbs-shop-badge { border-radius: 9px !important; box-shadow: none !important; }
body.sbs-shop-display.sbs-shop-badge-ribbon .sbs-shop-badge { border-radius: 5px !important; padding-inline: 12px !important; }
body.sbs-shop-display .sbs-shop-badge--sale { background: var(--sbs-badge-sale-bg,#d63638) !important; color: var(--sbs-badge-sale-text,#fff) !important; }
body.sbs-shop-display .sbs-shop-badge--new { background: var(--sbs-badge-new-bg,#1f9d67) !important; color: var(--sbs-badge-new-text,#fff) !important; }
body.sbs-shop-display .sbs-shop-badge--outofstock { background: var(--sbs-badge-out-bg,#6b7280) !important; color: var(--sbs-badge-out-text,#fff) !important; }
body.sbs-shop-display .sbs-shop-badge--featured { background: var(--sbs-badge-featured-bg,#0f766e) !important; color: var(--sbs-badge-featured-text,#fff) !important; }

/* Toolbar */
body.sbs-shop-display .woocommerce .woocommerce-result-count,
body.sbs-shop-display .woocommerce .woocommerce-ordering {
    margin-bottom: 26px !important; color: var(--sbs-shop-muted) !important; font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important; font-size: 13px !important; line-height: 1.8 !important;
}
body.sbs-shop-display .woocommerce .woocommerce-ordering select {
    min-height: 42px !important; padding-block: 6px !important; border: 1px solid var(--sbs-shop-border) !important; border-radius: 9px !important; background: #fff !important;
    color: #4f5d70 !important; font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important;
}

/* Full-width RTL pagination inspired by the supplied reference. */
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination {
    clear: both !important; display: grid !important; grid-template-columns: minmax(150px,1fr) auto minmax(170px,1fr) !important; align-items: center !important; gap: 16px !important; width: calc(100% - (var(--sbs-shop-page-edge,32px) * 2)) !important;
    margin: 42px auto 22px !important; padding: 10px 14px !important; border: 1px solid rgba(23,32,51,.10) !important; border-radius: 14px !important; background: rgba(255,255,255,.90) !important; box-shadow: 0 5px 18px rgba(23,32,51,.045) !important; box-sizing: border-box !important; direction: rtl !important;
}
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination ul.page-numbers {
    display: flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
    width: auto !important; max-width: 100% !important; margin: 0 auto !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; background: transparent !important;
    box-shadow: none !important; list-style: none !important; direction: rtl !important;
}
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination ul.page-numbers > li { float: none !important; border: 0 !important; margin: 0 !important; padding: 0 !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination a.page-numbers,
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination span.page-numbers {
    display: inline-flex !important; align-items: center !important; justify-content: center !important; min-width: 38px !important; height: 38px !important; padding: 0 10px !important;
    border: 1px solid transparent !important; border-radius: 9px !important; background: #fff !important; color: #344054 !important;
    font-family: var(--sharif-font,'Vazir',Tahoma,sans-serif) !important; font-size: 12.5px !important; font-weight: 600 !important; line-height: 1 !important;
    text-decoration: none !important; box-shadow: none !important; transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease !important;
}
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination a.page-numbers:hover { color: var(--sbs-shop-accent-dark) !important; border-color: rgba(100,163,154,.28) !important; background: var(--sbs-shop-accent-soft) !important; transform: translateY(-1px) !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination span.page-numbers.current { background: var(--sbs-shop-accent) !important; color: #fff !important; border-color: var(--sbs-shop-accent) !important; box-shadow: 0 4px 10px rgba(79,139,132,.18) !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.prev,
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.next,
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.first,
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.last { width: 38px !important; min-width: 38px !important; padding: 0 !important; font-size: 17px !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-label { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-arrow { display: block !important; font-size: 18px !important; line-height: 1 !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-arrow--double { font-family: Arial,sans-serif !important; font-size: 19px !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .dots { background: transparent !important; min-width: 24px !important; padding: 0 !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-status { min-width: 106px !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-summary { justify-self: start !important; color: #5e6877 !important; font-size: 11.8px !important; line-height: 1.8 !important; white-space: nowrap !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-summary strong { color: #27364a !important; font-weight: 750 !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-size { justify-self: end !important; margin: 0 !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-size label { display: flex !important; align-items: center !important; gap: 8px !important; margin: 0 !important; color: #5e6877 !important; font-size: 11.8px !important; white-space: nowrap !important; }
body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-size select { width: 72px !important; min-width: 72px !important; min-height: 38px !important; margin: 0 !important; padding: 5px 9px 5px 25px !important; border: 1px solid rgba(23,32,51,.13) !important; border-radius: 9px !important; background-color: #fff !important; background-position: 10% 50% !important; color: #27364a !important; font-size: 11.8px !important; box-shadow: none !important; }

@media (max-width:1399px) { body.sbs-shop-display .woocommerce ul.products { grid-template-columns: repeat(var(--sbs-shop-cols-laptop,4),minmax(0,1fr)) !important; } }
@media (max-width:1199px) { body.sbs-shop-display .woocommerce ul.products { grid-template-columns: repeat(var(--sbs-shop-cols-tablet,3),minmax(0,1fr)) !important; } }
@media (max-width:767px) {
    body.sbs-shop-display .woocommerce ul.products { grid-template-columns: repeat(var(--sbs-shop-cols-mobile,2),minmax(0,1fr)) !important; gap: 18px 10px !important; padding-inline: 0 !important; }
    body.sbs-shop-display .woocommerce ul.products li.product { padding: 7px 7px 10px !important; border-radius: 11px !important; }
    body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-thumbnail-wrap { height: min(43vw,var(--sbs-shop-img-h,230px)) !important; min-height: min(43vw,var(--sbs-shop-img-h,230px)) !important; max-height: min(43vw,var(--sbs-shop-img-h,230px)) !important; }
    body.sbs-shop-display .woocommerce ul.products li.product .astra-shop-summary-wrap { grid-template-rows: 22px 72px 40px 22px 42px !important; row-gap: 4px !important; }
    body.sbs-shop-display .woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 72px !important; max-height: 72px !important; font-size: 12.5px !important; line-height: 1.9 !important; }
    body.sbs-shop-display .woocommerce ul.products li.product .price { min-height: 40px !important; font-size: 13px !important; }
    body.sbs-shop-display .woocommerce ul.products li.product .button,
    body.sbs-shop-display .woocommerce ul.products li.product a.button { min-height: 42px !important; padding-inline: 7px !important; font-size: 11.5px !important; }
    body.sbs-shop-display .sbs-shop-badges { top: 13px !important; gap: 4px !important; }
    body.sbs-shop-display .sbs-shop-badges--right { right: 13px !important; }
    body.sbs-shop-display .sbs-shop-badges--left { left: 13px !important; }
    body.sbs-shop-display .sbs-shop-badge { min-height: 23px !important; padding: 4px 8px !important; font-size: 10.5px !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination { grid-template-columns: 1fr auto !important; gap: 10px 7px !important; width: calc(100% - 8px) !important; margin-top: 30px !important; padding: 9px !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination ul.page-numbers { grid-column: 1 / -1 !important; grid-row: 1 !important; gap: 4px !important; padding: 0 !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-summary { grid-column: 1 !important; grid-row: 2 !important; justify-self: start !important; font-size: 10.7px !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-size { grid-column: 2 !important; grid-row: 2 !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-size label > span { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .sbs-page-size select { width: 64px !important; min-width: 64px !important; min-height: 34px !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination a.page-numbers,
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination span.page-numbers { min-width: 34px !important; height: 34px !important; padding: 0 8px !important; font-size: 11.8px !important; }
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.prev,
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.next,
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.first,
    body.sbs-shop-display .woocommerce nav.sbs-shop-pagination .page-numbers.last { width: 34px !important; min-width: 34px !important; }
}
@media (hover:none) {
    body.sbs-shop-display .astra-shop-thumbnail-wrap img.show-on-hover { display: none !important; }
    body.sbs-shop-display .astra-shop-thumbnail-wrap:hover img:not(.show-on-hover) { opacity: 1 !important; }
    body.sbs-shop-display .woocommerce ul.products li.product:hover { transform: none !important; }
}
@media (prefers-reduced-motion:reduce) {
    body.sbs-shop-display .woocommerce ul.products li.product,
    body.sbs-shop-display .woocommerce ul.products li.product .button,
    body.sbs-shop-display .astra-shop-thumbnail-wrap img { transition: none !important; }
    body.sbs-shop-display .astra-shop-thumbnail-wrap img { transform: none !important; }
}
