body.ks-spv2.container-max-width .container,
body.ks-spv2 .container {
    max-width: 1640px;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}
.ks-v2-col-gallery {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    grid-row: 1;
}
.ks-v2-breadcrumb {
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--ksn-text-sub);
}
.ks-v2-breadcrumb a {
    color: var(--ksn-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.ks-v2-breadcrumb a:hover {
    color: var(--ksn-text-main);
}
.ks-v2-breadcrumb .bc-sep {
    margin: 0 4px;
    color: var(--ksn-border);
}
.ks-v2-gallery-inner {
    width: 100%;
}
.ks-v2-gallery-inner .woocommerce-product-gallery {
    opacity: 1 !important;
    position: relative;
    margin-bottom: 0;
    width: 100%;
}
.ks-v2-gallery-inner .woocommerce-product-gallery__image {
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}
.ks-v2-gallery-inner .woocommerce-product-gallery__image a {
    display: inline-block;
    max-width: 100%;
}
.ks-v2-gallery-inner .woocommerce-product-gallery__image img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.spv2-qty-single-note {
    font-size: 13px;
    color: var(--ksn-text-muted);
    direction: rtl;
}
.spv2-qty-wrapper {
    display: inline-flex;
    direction: rtl;
    user-select: none;
}
.spv2-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    height: 48px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.spv2-qty-btn {
    width: 42px;
    height: 100%;
    background: var(--ksn-bg-subtle);
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    color: var(--ksn-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
    margin: 0;
}
.spv2-qty-btn:hover:not(:disabled) {
    background: var(--ksn-bg-subtle);
    color: var(--ksn-text-main);
}
.spv2-qty-btn:disabled {
    background: var(--ksn-bg-subtle);
    color: var(--ksn-text-sub);
    cursor: not-allowed;
    opacity: 0.5;
}
.spv2-qty-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 2px 6px;
    height: 100%;
    border-left: 1px solid var(--ksn-border);
    border-right: 1px solid var(--ksn-border);
}
.spv2-qty-input {
    width: 100%;
    height: 24px;
    border: none;
    outline: none;
    box-shadow: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--ksn-text-main);
    background: transparent;
    padding: 0;
    margin: 0;
    line-height: 1;
    -moz-appearance: textfield;
}
.spv2-qty-input::-webkit-outer-spin-button,
.spv2-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.spv2-qty-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--ksn-text-sub);
    line-height: 1;
    margin-top: 2px;
}
.ks-v2-variations-section {
    margin-top: 10px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    background: #fff;
    line-height: 1.2;
    text-decoration: none;
}
.ks-v2-tabs-container {
    border-top: 4px solid var(--ksn-border);
    padding-top: 25px;
}
.ks-v2-tabs-nav {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
    border-bottom: 2px solid var(--ksn-border);
    margin-bottom: 30px;
}
.ks-v2-tabs-list {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}
.ks-v2-tab-item {
    margin: 0;
}
.ks-v2-tab-link {
    display: block;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ksn-text-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.ks-v2-tab-link:hover,
.ks-v2-tab-link.active {
    color: var(--ksn-primary);
    border-bottom-color: var(--ksn-primary);
}
.ks-v2-section {
    padding: 25px 0;
    border-bottom: 1px solid var(--ksn-border);
    scroll-margin-top: 60px;
}
.ks-v2-section:last-child {
    border-bottom: none;
}
.ks-v2-section-title {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    color: var(--ksn-text-main);
    border-bottom: 3px solid var(--ksn-primary);
    margin-bottom: 15px;
    padding-bottom: 6px;
    position: relative;
}
.ks-v2-section-content {
    color: var(--ksn-text-main);
    line-height: 1.8;
    font-size: 14.5px;
}
body.ks-spv2 .ks-reviews-container,
body.ks-spv2 #ks-reviews-wrap {
    direction: rtl;
    text-align: right;
    width: 100%;
}
body.ks-spv2 .ks-reviews-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--ksn-border);
}
body.ks-spv2 .ks-reviews-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
body.ks-spv2 .ks-reviews-title-box {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
}
body.ks-spv2 .ks-reviews-heading {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--ksn-text-main);
    line-height: 1.6;
}
body.ks-spv2 .ks-rating-score-box {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
body.ks-spv2 .ks-rating-score {
    font-size: 20px;
    font-weight: 800;
    color: var(--ksn-text-main);
    line-height: 1;
}
body.ks-spv2 .ks-rating-out-of {
    font-size: 13px;
    color: var(--ksn-text-muted);
    line-height: 1;
}
body.ks-spv2 .ks-rating-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
}
body.ks-spv2 .ks-star-display {
    color: #f5b301;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 2px;
    white-space: nowrap;
}
body.ks-spv2 .ks-rating-count-text {
    font-size: 13px;
    color: var(--ksn-text-muted);
    line-height: 1.6;
}
body.ks-spv2 .ks-reviews-action {
    flex: 0 0 260px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: right;
    gap: 10px;
}
body.ks-spv2 .ks-action-desc {
    margin: 0;
    font-size: 13px;
    color: var(--ksn-text-muted);
    line-height: 1.8;
}
body.ks-spv2 .ks-v2-section-content a {
    color: var(--ksn-link);
    text-decoration: underline dotted var(--ksn-link);
    text-underline-offset: 4px;
    text-decoration-thickness: 1.5px;
    font-weight: 600;
    transition: all 0.2s ease;
}
body.ks-spv2 .ks-v2-section-content a:hover {
    color: var(--ksn-link-hover);
    text-decoration-style: solid;
}
.ksn-max-stock-notice {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ksn-primary);
}
body.ks-spv2 .ks-v2-cart-wrapper p.stock {
    display: none;
}
.ksn-swatch-group {
    margin-bottom: 15px;
}
.ksn-swatch-label {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--ksn-text-main);
}
.ksn-swatch-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ksn-swatch-btn {
    padding: 6px 14px;
    border: 1px solid var(--ksn-border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--ksn-text-main);
    transition: all 0.2s;
}
.ksn-swatch-btn:hover {
    border-color: var(--ksn-text-sub);
}
.ksn-swatch-btn.is-selected {
    border-color: var(--ksn-primary);
    color: var(--ksn-primary);
    font-weight: bold;
    background: var(--ksn-primary-light);
}
.ksn-swatch-btn.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
    background: var(--ksn-bg-subtle);
    border-color: var(--ksn-border);
}
table.variations th.label,
table.variations a.reset_variations {
    display: none !important;
}
table.variations td.value {
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
}

.ksn-price-label {
    font-size: 14px;
    font-weight: normal;
    color: var(--ksn-text-muted);
    margin-bottom: 5px;
}
.ks-v2-product .woocommerce-Price-amount {
    font-weight: bold;
    font-size: 18px;
    color: var(--ksn-text-main);
}
.ks-v2-product del .woocommerce-Price-amount {
    font-size: 14px;
    font-weight: normal;
    color: var(--ksn-text-muted);
    margin-left: 10px;
}
.tiered-pricing-wrapper {
    margin-top: 15px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    padding: 12px 14px;
}
.tiered-pricing-wrapper h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ksn-text-main);
}
.tiered-pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
}
.tiered-pricing-table th {
    background: var(--ksn-bg-subtle);
    color: var(--ksn-text-muted);
    font-weight: 600;
    padding: 8px;
    text-align: center;
    border: 1px solid var(--ksn-border);
}
.tiered-pricing-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid var(--ksn-border);
    color: var(--ksn-text-main);
}
.tiered-pricing-wrapper,
.tiered-pricing-table,
.tiered-pricing-table td,
.tiered-pricing-table th,
.tiered-pricing-table .amount {
    font-feature-settings: "ss01" on !important;
    -webkit-font-feature-settings: "ss01" on !important;
}
.tiered-pricing-table .tiered-pricing--active td {
    background-color: #fef2f2;
    font-weight: bold;
    color: #e11d48 !important;
}
.tiered-pricing-dynamic-price-wrapper .amount,
.tiered-pricing-dynamic-price-wrapper {
    font-variant-numeric: lining-nums proportional-nums;
    font-feature-settings: "ss01" 1;
    -webkit-font-feature-settings: "ss01" 1;
}
.woocommerce-Price-amount.amount {
    color: var(--ksn-text-main) !important;
    opacity: 1;
}
form.cart button.single_add_to_cart_button.button.alt,
form.cart button.single_add_to_cart_button {
    width: 100% !important;
    max-width: 320px !important;
    min-height: 50px !important;
    padding: 10px 20px !important;
    margin-top: 10px;
    border: none !important;
    border-radius: 12px !important;
    background-color: var(--ksn-primary);
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 16px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transition: background 0.3s ease !important;
}
form.cart button.single_add_to_cart_button:hover {
    background-color: var(--ksn-primary-hover);
}
.single-product .price ins,
.single-product .price ins .amount {
    text-decoration: none;
}
.single-product .price del,
.single-product .price del .amount {
    text-decoration: line-through;
}
.ks-rel-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.ks-rel-actions.single .ks-btn-rel {
    flex: 1 1 100%;
}
.ks-btn-rel {
    flex: 1;
    padding: 9px 12px;
    background: #fef2f2;
    border: 1px solid var(--ksn-primary);
    border-radius: 8px;
    color: var(--ksn-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.ks-btn-rel:hover {
    background: var(--ksn-primary-light);
    border-style: solid;
}
.ks-btn-rel .ks-count {
    font-size: 11px;
    opacity: 0.8;
}
.ks-card {
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ks-card img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.ks-card .ks-link,
.ks-cat-title {
    font-size: 12px;
    color: var(--ksn-text-main);
    text-decoration: none;
    margin: 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ks-card-btn-wrap .ks-btn-link {
    display: block;
    background: var(--ksn-bg-subtle);
    border: 1px solid var(--ksn-border);
    border-radius: 6px;
    font-size: 11px;
    color: var(--ksn-text-main);
    padding: 5px;
    text-decoration: none;
}
.ks-card-btn-wrap .ks-btn-link:hover {
    background: #fff;
}
.ks-muted-status {
    font-size: 11px;
    color: var(--ksn-text-sub);
    padding: 5px;
}
.ks-count {
    font-feature-settings: "ss01" on, "ss02" on;
}
.ks-rel-card {
    width: 100%;
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ks-stock {
    font-size: 12px;
    margin-top: 6px;
    margin-bottom: 6px;
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.ks-stock--in {
    color: #047857;
}
.ks-stock--out {
    color: #b91c1c;
}

.ks-card .ks-price,
.ks-card .ks-price .woocommerce-Price-amount,
.ks-card .ks-price .amount {
    font-size: 13px;
    font-weight: bold;
    color: var(--ksn-text-main);
    margin-bottom: 6px;
    -moz-font-feature-settings: "ss01";
    -webkit-font-feature-settings: "ss01";
    font-feature-settings: "ss01";
}
.ks-top-dispatch-wrap p.stock {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}
.ks-top-dispatch-wrap p.stock::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}
.ks-top-dispatch-wrap p.stock.in-stock {
    color: #15803d;
}
.ks-top-dispatch-wrap p.stock.in-stock::before {
    content: "✓";
    background-color: #16a34a;
}
.ks-top-dispatch-wrap p.stock.available-on-backorder {
    color: #b45309;
}
.ks-top-dispatch-wrap p.stock.available-on-backorder::before {
    content: "⏳";
    background-color: transparent;
    width: auto;
    height: auto;
    border-radius: 0;
    font-size: 14px;
}
.ks-top-dispatch-wrap p.stock.out-of-stock {
    color: var(--ksn-primary, #dc2626);
}
.ks-top-dispatch-wrap p.stock.out-of-stock::before {
    content: "✕";
    background-color: var(--ksn-primary, #dc2626);
}
.ks-shipping-schedule-row {
    margin: 6px 0;
}
.ksn-dispatch-status-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.ksn-dispatch-status-wrap .ksn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ksn-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.ksn-info-trigger:hover {
    color: var(--ksn-link-hover);
    transform: scale(1.1);
}
.ksn-shipping-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--ksn-link-hover);
}
.ksn-shipping-trigger .ksn-chevron {
    font-size: 16px;
    color: var(--ksn-link-hover);
}
.ksn-stock-info-item,
.ksn-info-item {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--ksn-border);
}
.ksn-stock-info-item:last-child,
.ksn-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.ksn-info-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ksn-text-main);
    margin-bottom: 4px;
}
.ksn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.ksn-dot.green {
    background: #16a34a;
}
.ksn-dot.orange {
    background: #ea580c;
}
.ksn-notice-box {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--ksn-bg-subtle);
    border-radius: 6px;
    font-size: 12px;
    color: var(--ksn-text-muted);
    line-height: 1.6;
}

.ks-v2-sub-title-meta a {
    color: #00a693;
    text-decoration: none;
    transition: color 0.2s ease;
}
.ks-v2-sub-title-meta a:hover {
    color: #007d6e;
    text-decoration: underline;
}
.ks-v2-middle-block {
    margin-top: 14px;
}
.ks-v2-rating-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ksn-text-main);
    text-decoration: none;
    line-height: 1.5;
}
.ks-v2-star {
    color: #f59e0b;
    font-size: 15px;
}
.ks-v2-rating-val {
    font-weight: 700;
}
.ks-v2-rating-sub {
    color: var(--ksn-text-muted);
}
.ks-v2-rating-dot {
    color: var(--ksn-text-sub);
    margin: 0 2px;
}
.ks-v2-reviews-text {
    color: var(--ksn-text-muted);
    direction: rtl;
}
.ks-v2-brand-logo img {
    max-width: 110px;
    height: auto;
    object-fit: contain;
    display: block;
}

.ks-v2-features-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ksn-text-main);
    margin-bottom: 8px;
}
.ks-v2-features-content {
    background: #fff;
    border: 1px solid var(--ksn-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--ksn-text-muted);
}
.ks-v2-features-content p:last-child {
    margin-bottom: 0;
}

.ks-v2-tf-card {
    background: #ffffff;
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 62px;
    box-sizing: border-box;
}
.ks-v2-tf-card-label {
    font-size: 11.5px;
    color: var(--ksn-text-muted);
    margin-bottom: 4px;
    line-height: 1.3;
}
.ks-v2-tf-card-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--ksn-text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.ks-v2-features-divider-wrap {
    position: relative;
    margin-top: 22px;
    margin-bottom: 10px;
    text-align: center;
}
.ks-v2-features-divider-wrap::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--ksn-border);
    z-index: 1;
}
.ks-v2-pill-view-all {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ksn-bg-subtle);
    color: var(--ksn-text-main);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.ks-v2-pill-view-all:hover {
    background: var(--ksn-border);
    color: var(--ksn-text-main);
}
@media (prefers-reduced-motion: no-preference) {
    body.single-product:has(:target) {
        scroll-behavior: smooth;
    }
}

.ksn-top-features-wrapper {
    margin-top: 18px;
}
.ksn-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.ksn-feature-card {
    background: var(--ksn-bg-subtle);
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
}
.ksn-feature-label {
    font-size: 11px;
    color: var(--ksn-text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ksn-feature-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ksn-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ksn-features-more-row {
    position: relative;
    text-align: center;
    margin: 20px 0 16px 0;
}
.ksn-features-more-row::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--ksn-border);
    z-index: 1;
}
.ksn-btn-view-all-features {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--ksn-border);
    color: var(--ksn-text-muted);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.ksn-btn-view-all-features:hover {
    background: var(--ksn-bg-subtle);
    color: var(--ksn-text-main);
    border-color: var(--ksn-border);
}
.ksn-return-policy-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
}
.ksn-return-policy-notice .ksn-return-icon {
    flex-shrink: 0;
    color: var(--ksn-text-muted);
    margin-top: 2px;
}
.ksn-return-policy-notice .ksn-return-text {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--ksn-text-muted);
}
.ksn-return-policy-notice .ksn-return-text strong {
    color: var(--ksn-text-main);
    font-weight: 600;
}
.ks-collapsible-wrapper {
    position: relative;
    max-height: 320px;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.ks-collapsible-wrapper:not(.is-expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
    pointer-events: none;
}
.ks-collapsible-wrapper.is-expanded {
    max-height: 5000px;
}
.ks-toggle-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 0 0 2px 0;
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--ksn-link-hover);
    border-radius: 0;
    color: var(--ksn-link-hover);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.ks-toggle-expand-btn:hover {
    color: var(--ksn-link-hover);
    border-bottom-color: var(--ksn-link-hover);
}
.ks-toggle-expand-btn svg {
    width: 13px;
    height: 13px;
    transition: transform 0.25s ease;
}
.ks-collapsible-wrapper.is-expanded + .ks-toggle-expand-btn svg {
    transform: rotate(180deg);
}
.woocommerce table.shop_attributes td {
    font-style: normal;
    padding: 0 10px 0 0;
}
@media (min-width: 1024px) {
    .ks-v2-section-content.ks-collapsible-wrapper {
        padding-right: 100px;
        padding-left: 100px;
    }
}
#ks-sec-additional_information .woocommerce table.shop_attributes th {
    width: 230px;
    min-width: 190px;
    text-align: right;
    white-space: nowrap;
}
#ks-sec-additional_information .woocommerce table.shop_attributes td {
    text-align: right;
}
th.woocommerce-product-attributes-item__label {
    text-align: right;
}
.spv2-file-badge {
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 35px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    background: var(--ksn-text-muted);
    font: 700 14px / 1 sans-serif;
    letter-spacing: .2px;
    direction: ltr;
    margin-left: 15px;
}
.spv2-file-badge--pdf {
    background: #c83b3b;
}
.spv2-file-badge--draw,
.spv2-file-badge--dxf,
.spv2-file-badge--dwg,
.spv2-file-badge--cad,
.spv2-file-badge--stp {
    background: #2878a8;
}
.spv2-file-badge--eplan {
    background: #5550a5;
}
.spv2-product-files-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.spv2-product-files-list > .spv2-pf-item {
    list-style: none;
}
body.ks-spv2 .ks-review-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 12px 10px;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    margin: 0;
    border-bottom: 1px solid var(--ksn-border);
    box-sizing: border-box;
    text-align: right;
    direction: rtl;
}
body.ks-spv2 .ks-review-badge {
    position: static;
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    padding: 0 8px;
    background: #10b981;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 5px;
    line-height: 1;
    box-sizing: border-box;
}
body.ks-spv2 .ks-review-meta {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
body.ks-spv2 .ks-review-author {
    font-weight: 700;
    font-size: 15px;
    color: var(--ksn-text-main);
    display: inline-block;
    margin: 0;
    line-height: 1.8;
}
body.ks-spv2 .ks-review-date {
    font-size: 13px;
    display: inline-block;
    margin: 0;
    color: var(--ksn-text-sub);
    line-height: 1.8;
}
body.ks-spv2 .ks-review-body {
    grid-column: 1 / -1;
    grid-row: 2;
    display: block;
    margin: 0;
    padding: 0;
    font-size: 15px;
    color: var(--ksn-text-main);
    line-height: 1.9;
    text-align: right;
    direction: rtl;
}
body.ks-spv2 .ks-review-body p {
    margin: 0;
}
.ks-v2-brand-catalog-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.spv2-catalog-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--ksn-text-main);
}
.ks-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.ks-modal.is-open {
    display: flex;
}

body.ks-modal-open {
    overflow: hidden;
}
.ks-modal-box {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 440px; 
    max-height: 88vh;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 20px 30px var(--ksn-text-sub);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    outline: none;
}

.ks-modal-box.is-grid {
    max-width: 980px;
}

.ks-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ksn-border);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.ks-modal-header .ks-modal-title,
.ks-modal-header strong,
.ks-modal-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ksn-text-main);
    margin: 0;
}

.ks-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--ksn-text-sub);
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.ks-modal-close:hover {
    color: var(--ksn-text-main);
}
.ks-modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.ks-modal-body p {
    font-size: 13px;
    color: var(--ksn-text-muted);
    line-height: 1.7;
    margin: 0 0 8px;
}

.ks-modal-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.ks-top-dispatch-wrap .ks-shipping-modal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ksn-link-hover);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ks-top-dispatch-wrap .ks-shipping-modal-trigger:hover {
    color: var(--ksn-link-hover);
    text-decoration: underline;
}
body.ks-spv2 .ks-btn-open-review-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    height: 42px;
    padding: 0 20px;
    border: 1px solid var(--ksn-primary);
    border-radius: 8px;
    background: #fff;
    color: var(--ksn-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.ks-spv2 .ks-btn-open-review-modal:hover {
    background: var(--ksn-primary);
    color: #fff;
}
.ks-v2-col-details {
    background: #fff;
    padding: 0 20px 20px 20px;
    grid-row: 1;
    min-width: 0 !important;
}

.ks-v2-details-header {
    border-bottom: 1px solid var(--ksn-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ks-v2-product-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ksn-text-main);
}
.ks-v2-col-buybox {
    background: #fafafa;
    padding: 16px 12px;
    box-sizing: border-box;
    border: 1px solid var(--ksn-border);
    border-radius: 10px;
    margin-top: 88px;
    grid-column: 3;
    grid-row: 1 / span 2;
}

.ks-v2-buybox-header {
    margin-bottom: 15px;
}

.ks-v2-last-update {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--ksn-text-muted);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ksn-border);
}

.ks-v2-last-update strong {
    color: var(--ksn-text-main);
}

.ks-v2-price-value {
    font-weight: 700;
    font-size: 20px;
    color: var(--ksn-text-main);
}

#ks-v2-variable-price-wrap {
    display: none;
    flex-direction: column;
    gap: 4px;
    margin: 15px 0;
}

.ks-v2-var-price-val {
    font-weight: 700;
    font-size: 20px;
    color: var(--ksn-text-main);
}
.ks-v2-features-section {
    grid-column: 1 / 3;
    grid-row: 2;
    margin-top: 15px;
    border-top: 1px solid var(--ksn-border);
    padding-top: 15px;
    align-self: end;
}

.spv2-fullwidth-tabs-wrapper {
    margin-top: 30px;
}
.ks-v2-product {
    max-width: 95%;
    width: 100%;
    margin: 20px auto;
    padding: 0;
    box-sizing: border-box;
}

.ks-v2-grid {
    display: grid;
    /* ستون تصویر حداکثر 540px و در صفحات فشرده‌تر تا 320px انعطاف دارد */
    grid-template-columns: minmax(320px, 480px) minmax(280px, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

/* مدیریت مانیتورهای کوچک و لپ‌تاپ‌ها (زیر 1280px) */
@media (max-width: 1280px) {
    .ks-v2-grid {
        grid-template-columns: minmax(280px, 400px) minmax(240px, 1fr) 300px;
        gap: 14px;
    }
}

/* در صفحات زیر 1024px ستون‌ها 2 ستونه شوند (باکس خرید یا گالری متناسب شکسته شوند) */
@media (max-width: 1024px) {
    .ks-v2-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ks-v2-col-gallery {
        grid-column: 1;
    }
    .ks-v2-col-details {
        grid-column: 2;
    }
    .ks-v2-col-buybox {
        grid-column: 1 / -1;
        margin-top: 20px;
    }
}

.ks-v2-simple-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 15px;
}

.ks-v2-product .woocommerce-variation-price .price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.ksn-stock-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ksn-stock-text-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ksn-info-trigger {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--ksn-text-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}
.ksn-shipping-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ksn-shipping-row .ksn-chevron {
    color: var(--ksn-text-sub);
    font-size: 18px;
    font-weight: 700;
}
.ksn-stock-modal-desc {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ksn-text-main);
    margin: 0;
}
.ksn-shipping-list li.disabled-method strong {
    text-decoration: line-through;
    opacity: 0.6;
}
.ksn-shipping-list {
    list-style: none;
    padding: 0;
    padding-right: 18px;
    margin: 0;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--ksn-text-main);
}
.ksn-shipping-list .disabled-method {
    color: #ef4444;
}
.ksn-shipping-note {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--ksn-bg-subtle);
    border-radius: 6px;
    font-size: 12px;
    color: var(--ksn-text-muted);
}
.ks-review-form .ks-form-subheading {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--ksn-text-main);
}
.ks-review-form .ks-rating-select-group,
.ks-review-form .ks-form-group {
    margin-bottom: 16px;
}
.ks-review-form .ks-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
}
.ks-review-form .ks-required {
    color: #ef4444;
}

.ks-review-form input[type="range"] {
    width: 100%;
}
.ks-review-form .ks-rating-hint {
    font-size: 12px;
    color: var(--ksn-text-muted);
    margin-top: 4px;
}
.ks-review-form textarea,
.ks-review-form input[type="text"],
.ks-review-form input[type="email"] {
    width: 100%;
    border: 1px solid var(--ksn-border);
    border-radius: 6px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
}
.ks-review-form input[type="text"],
.ks-review-form input[type="email"] {
    height: 38px;
    padding: 0 10px;
}
.ks-review-form .ks-modal-footer {
    padding-top: 12px;
    border-top: 1px solid var(--ksn-border);
    display: flex;
    justify-content: flex-end;
}
.ks-review-form .ks-btn-submit-review {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.ks-v2-sub-title-meta {
    font-size: 13px;
    line-height: 1.8;
    margin-top: 8px;
}
.ks-v2-sub-title-meta .ksn-meta-sep {
    color: #00a693;
    margin: 0 6px;
}
.ks-v2-meta-action-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    direction: ltr;
}
.ks-v2-meta-action-row .ks-v2-star {
    color: #f59e0b;
}
.spv2-quick-catalog {
    direction: ltr;
    margin: 16px 0px 60px 0;
    display: flex;
    justify-content: flex-end;
}
.spv2-go-to-catalog svg {
    display: block;
    flex-shrink: 0;
}
.ks-v2-features-box {
    margin-bottom: 15px;
}
.ks-modal-notice {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--ksn-text-muted);
}
.ks-modal-divider {
    margin: 16px 0;
    border: none;
    border-top: 1px dashed var(--ksn-border);
}

.ksn-master-pack-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ksn-text-muted);
    flex-shrink: 0;
}
#ksn-master-pack-val {
    color: var(--ksn-text-main);
    font-size: 13px;
    font-weight: 500;
}
.ks-warranty-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 10px;
}

.ks-warranty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ksn-text-muted);
    flex-shrink: 0;
}

.ks-warranty-text {
    color: var(--ksn-text-main);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.ks-warranty-label {
    color: var(--ksn-text-muted);
    font-weight: 400;
}
.spv2-go-to-catalog {
    display: inline-flex;
    align-items: center;
    direction: rtl;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--ksn-border);
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: var(--ksn-text-main);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.spv2-go-to-catalog:hover {
    background: var(--ksn-bg-subtle);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}


.woocommerce-variation-price ins,
#ks-v2-variable-price-wrap ins {
    text-decoration: none !important;
    font-weight: 700;
}

.woocommerce-variation-price del,
#ks-v2-variable-price-wrap del {
    text-decoration: line-through;
    opacity: 0.6;
    margin-inline-end: 6px;
}

a.added_to_cart.wc-forward {
    display: none !important;
}
.ks-is-not-purchasable .ks-v2-price-block,
.ks-is-not-purchasable .tiered-pricing-wrapper,
.ks-is-not-purchasable form.cart .quantity,
.ks-is-not-purchasable form.cart .single_add_to_cart_button,
.ks-is-not-purchasable form.cart button[type="submit"] {
    display: none !important;
}

/* مخفی بودن نوار موبایل و دکمه‌ها در دسکتاپ */
.ksn-mobile-sticky-bar,
.ksn-buybox-backdrop,
.ksn-buybox-close-btn {
    display: none;
}

/* ==================== حالت موبایل (زیر 768px) ==================== */
@media (max-width: 768px) {
    /* 1. مرتب‌سازی عمودی ستون‌ها */
    .ks-v2-grid {
        display: flex;
        flex-direction: column;
    }
    .ks-v2-col-gallery {
        order: 1;
        width: 100%;
    }
    .ks-v2-col-details {
        order: 2;
        width: 100%;
        margin-top: 15px;
    }
    .ks-v2-features-section {
        order: 3;
        width: 100%;
        margin-top: 20px;
    }
    .spv2-fullwidth-tabs-wrapper {
        order: 4;
        width: 100%;
        margin-bottom: 70px; /* جلوگیری از افتادن زیر نوار شناور */
    }

    /* 2. تبدیل ستون ۳ به باتم شیت مودال */
    .ks-v2-col-buybox {
        position: fixed;
        left: 0;
        right: 0;
        bottom: -100%;
        width: 100%;
        max-height: 80vh;
        background: #ffffff;
        z-index: 99999;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
        padding: 20px 16px 30px;
        overflow-y: auto;
        transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        display: block !important;
        box-sizing: border-box;
    }

    /* دکمه بستن بالای مودال */
    .ksn-buybox-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        left: 12px;
        background: #f1f5f9;
        border: none;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        font-size: 14px;
        cursor: pointer;
        color: #475569;
    }

    /* بک‌دراپ تیره */
    .ksn-buybox-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99998;
        backdrop-filter: blur(2px);
    }
    .ksn-buybox-backdrop.is-active {
        display: block;
    }

    .ksn-sticky-price-area {
        display: flex;
        flex-direction: column;
    }
    .ksn-sticky-price-label {
        font-size: 0.75rem;
        color: #64748b;
    }
    .ksn-sticky-price-value {
        font-size: 0.95rem;
        font-weight: 700;
        color: #0f172a;
    }

    .ksn-sticky-buy-btn {
        background: #0284c7;
        color: #ffffff;
        border: none;
        border-radius: 8px;
        padding: 10px 18px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
    }

    .ks-v2-product {
        padding-left: 14px !important;
        padding-right: 14px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    .ks-v2-grid,
    .ks-v2-col-gallery,
    .ks-v2-col-details {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .spv2-fullwidth-tabs-wrapper {
        padding: 0 10px;
        box-sizing: border-box;
    }

    /* حذف اسکرول ناخواسته و چیدمان یکنواخت در عرض */
    .ks-v2-tabs-nav,
    .spv2-tabs-nav,
    .wc-tabs {
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        width: 100% !important;
        overflow-x: visible !important;
        padding: 0 !important;
        margin: 0 0 15px 0 !important;
        border-bottom: 2px solid #e2e8f0 !important;
    }

    .ks-v2-tab-link,
    .wc-tabs li {
        flex: 1 1 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
        font-size: 0.85rem !important;
        padding: 10px 4px !important;
        box-sizing: border-box;
    }

    /* نوار خرید: قرارگیری دقیقاً بالای نوار اپلیکیشن پایین */
    .ksn-mobile-sticky-bar {
        bottom: 56px !important; /* ارتفاع نوار اپلیکیشن شما */
        z-index: 1000 !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 10px 14px;
        border-top: 1px solid #e2e8f0;
    }

    /* مودال کشویی: وقتی باز می‌شود روی نوار اپلیکیشن و کل صفحه را کامل می‌پوشاند */
    .ks-v2-col-buybox {
        bottom: -100% !important;
    }

    .ks-v2-col-buybox.is-open {
        bottom: 0 !important;
    }
}
/* حذف خط زیرین از قیمت تخفیف‌خورده (ins) */
.ks-v2-price-value ins,
.ks-v2-price-block ins {
    text-decoration: none !important;
}

/* اطمینان از خط‌خوردگی صحیح و تمیز قیمت قبل (del) */
.ks-v2-price-value del,
.ks-v2-price-block del {
    text-decoration: line-through !important;
    opacity: 0.6;
    margin-left: 6px;
}

/* ================= ۱. مهار کامل عکس و جلوگیری از نفوذ به ستون وسط ================= */
/* مهار ستون گالری بدون دستکاری اینلاین اسکریپت ووکامرس */
.ks-v2-col-gallery {
    min-width: 0 !important;
    box-sizing: border-box;
}
.ks-v2-col-gallery .woocommerce-product-gallery img {
    max-width: 100%;
    height: auto;
}


/* ================= ۲. رفع بیرون‌زدگی جدول تخفیف پلکانی و ستون خرید ================= */
.ks-v2-col-buybox {
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* بهینه کردن پدینگ باکس جدول و فونت در صفحات فشرده */
.tiered-pricing-wrapper {
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 10px 8px !important; /* کاهش پدینگ داخلی باکس */
    overflow-x: auto; /* سوپاپ اطمینان برای جلوگیری از زدن به بیرون کادر */
}

.tiered-pricing-table {
    width: 100% !important;
    table-layout: auto !important;
    font-size: 11.5px !important; /* فشرده‌سازی ملایم متن جدول برای جا شدن اعداد */
}

.tiered-pricing-table th,
.tiered-pricing-table td {
    padding: 6px 3px !important; /* کاهش پدینگ سلول‌ها تا در ستون باریک جا شوند */
    white-space: nowrap;
}


/* ================= ۳. تنظیم تعادل گرید برای مانیتورهای کوچک‌تر ================= */
@media (max-width: 1280px) {
    .ks-v2-grid {
        /* اختصاص دادن ۳۴۰ پیکسل امن به باکس خرید تا جدول اصلاً تحت فشار قرار نگیرد */
        grid-template-columns: minmax(260px, 1fr) minmax(260px, 1.2fr) 340px !important;
        gap: 14px !important;
    }

    .ks-v2-col-buybox {
        padding: 14px 12px !important; /* کاهش پدینگ ستون خرید */
    }
}



/* ==========================================================================
   Kooshanic Product Page Gallery (Move to Single Product CSS)
   ========================================================================== */

/* مخفی‌سازی دکمه ذره‌بین پیش‌فرض ووکامرس */
.woocommerce-product-gallery__trigger {
    display: none !important;
}

/* فقط داخل صفحه محصول نسخه 2 خودت */
.ks-v2-gallery-inner .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.ks-v2-gallery-inner .woocommerce-product-gallery .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}

.ks-v2-gallery-inner .woocommerce-product-gallery .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 480px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* ردیف تامبنیل‌های کوچک زیر عکس */
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    margin: 0 4px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--ksn-border, #e2e8f0);
    cursor: pointer;
    position: relative;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* تامبنیل مات سه‌نقطه (آیتم آخر) */
.woocommerce-product-gallery__image.ksn-more-thumb,
.woocommerce-product-gallery__image.ksn-first-thumb {
    position: relative;
    cursor: pointer;
}

.woocommerce-product-gallery__image.ksn-more-thumb img,
.woocommerce-product-gallery__image.ksn-first-thumb img {
    filter: blur(2px);
    transform: scale(1.08);
}

.woocommerce-product-gallery__image.ksn-more-thumb .ksn-more-badge,
.woocommerce-product-gallery__image.ksn-first-thumb .ksn-more-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
    pointer-events: none;
    transition: background 0.2s ease;
}

.woocommerce-product-gallery__image.ksn-more-thumb:hover .ksn-more-badge,
.woocommerce-product-gallery__image.ksn-first-thumb:hover .ksn-more-badge {
    background: rgba(15, 23, 42, 0.6);
}
