.compare-select-tabs {
    background: var(--color-lightgray);
}

.compare-select {
    background: var(--color-whit-bg);
}

.compare-select-tabs .icon {
    width: 40px;
}

.compare-cat {
    cursor: pointer;
}

.compare-cat.active {
    background: var(--color-accent3) !important;
}

.compare-select-input {
    background: var(--color-lightgray);
}

.search-product-compare {
    width: 100%;
    background: var(--color-lightgray);
    border: 0;
    padding: 12px;
}

.compare-select-input .icon-plus {
    border: 1px dashed var(--color-primary);
    padding: 4px;
    height: auto;
    display: inline-grid;
}

.card-compare-item {
    background: var(--color-whit-bg);
}

.compare-vs-icon {
    background: var(--color-accent3);
    border: 1px solid var(--color-accent2);
    border-radius: 100px;
    width: 64px;
    height: 64px;
}

.compare-product-item {
    width: 50%;
    max-width: calc(50% - 40px);
}

.compare-card-footer {
    background: var(--color-accent1);
    border: 1px solid var(--color-tertiary);
    text-align: center;
}

.card-title .cart-title-text a {
    font-size: 12px;
    font-weight: 450;
    color: var(--color-primary);
}

.compare-products::after {
    content: "";
    width: 1px;
    height: 100%;
    background: var(--color-divider);
    position: absolute;
    right: 0;
    left: 0;
    margin: 0 auto;
    top: 0;
    z-index: 0;
}

.compare-products svg {
    position: relative;
    z-index: 1;
}

.compare-product-item img {
    display: block;
    margin: 0 auto;
}

.card-title .cart-title-text {
    text-align: center;
}

.compare-suggestions {
    background: #fff;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    z-index: 1000;
    position: absolute;
    width: 100%;
    top: 100%;
    box-shadow: 0px 4px 8px 4px #0000001F;
    right: 0;
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #eee;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f9f9f9;
}

.product-thumb {
    width: 80px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.product-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-primary);
    line-height: 100%;
}

.product-price {
    font-size: 12px;
    color: var(--color-primary);
}

.compare-button button {
    max-width: 152px;
    color: var(--color-white) !important;
    margin: auto;
}

.compare-button button::after {
    max-width: 152px;
    background: var(--color-secondary) !important;
}

.afralland-table-wrapper {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
}

.afralland-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.afralland-table th,
.afralland-table td {
    padding: 15px;
    border: 1px solid #eee;
    text-align: right;
}

.afralland-table__header-cell {
    background: #f8f8f8;
    min-width: 200px;
}

.afralland-table__header-cell--empty {
    min-width: 180px;
    background: #f5f0ff;
}

.afralland-table__product-inner {
    position: relative;
    padding: 20px;
    text-align: center;
}

.remove-product-compare {
    position: absolute;
    top: 5px;
    left: 5px;
    cursor: pointer;
    font-size: 20px;
    color: #ff4444;
}

.afralland-table__img {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
}

.afralland-table__name {
    margin: 10px 0;
    font-size: 14px;
    color: #333;
}

/* گروه‌های ویژگی */
.afrafeaturespro-feature-group td {
    background: #f5f0ff;
    color: #5D2AD4;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 15px;
}

/* ردیف‌های ویژگی */
.afralland-table__feature-row:nth-child(odd) {
    background-color: #fafafa;
}

.afralland-table__feature-cell {
    font-size: 14px;
    color: #666;
}

/* عنوان ویژگی */
.afrafeaturespro-feature-name {
    font-weight: bold;
    color: #333;
    background: #f5f0ff !important;
}

/* مقادیر ویژگی */
.afrafeaturespro-feature-values .value {
    display: inline-block;
    margin: 2px 0;
}

/* نشانگر موجودی */
.mojod {
    color: #28a745;
    font-weight: bold;
}

.namojod {
    color: #dc3545;
    font-weight: bold;
}

/* توضیحات ویژگی */
.attr_desc {
    position: relative;
    display: inline-block;
    margin-right: 5px;
}

.attr_desc i {
    color: #6c757d;
    cursor: help;
}

.attr_desc p {
    display: none;
    position: absolute;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
    min-width: 200px;
    right: 0;
    top: 100%;
}

.attr_desc:hover p {
    display: block;
}

/* دکمه مشاهده تفاوت‌ها */
.afralland-table-actions {
    margin: 20px 0;
    text-align: left;
}

#afralland-highlight-btn {
    background: #5D2AD4;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* ردیف‌های هایلایت شده */
.highlight-differences {
    background-color: #fff3cd !important;
}

/* دکمه انتخاب محصول */
.select-products {
    padding: 20px;
    text-align: center;
}

.select-products-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f0ff;
    color: #5D2AD4;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.select-products-button i {
    font-size: 18px;
}

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .afralland-table {
        font-size: 14px;
    }

    .afralland-table__header-cell {
        min-width: 150px;
    }

    .afralland-table__img {
        max-width: 100px;
    }

    .afralland-table__name {
        font-size: 12px;
    }
}
.compare-products-section {
    border: 1px solid var(--color-divider);
    position: relative;
}
/* استایل برای نمایش تیک */
.value.has-tick::before {
    content: "✓";
    color: #28a745;
    margin-left: 5px;
}

/* استایل برای نمایش خط تیره */
.value:empty::before {
    content: "-";
    color: #999;
}

/* بخش قیمت و ابعاد */
.price-dimensions-section {
    background: #f5f0ff;
    margin-bottom: 20px;
}

.price-dimensions-section th {
    background: #f5f0ff !important;
    color: #333;
    font-weight: bold;
}

.price-dimensions-row td {
    background: #fff;
}

.price-dimensions-label {
    color: #666;
    font-size: 14px;
}

.price-value {
    color: #5D2AD4;
    font-weight: bold;
    font-size: 16px;
}

.dimensions-value {
    color: #666;
    font-size: 14px;
}

/* جداکننده بین بخش‌ها */
.section-divider {
    height: 20px;
    background: #f5f0ff;
}

/* استایل‌های اصلی مقایسه */
.products-compare {
    background: #fff;
    overflow: hidden;

}


/* هدر محصولات */
.compare-products-header {
	display: grid;
	grid-template-columns: 200px repeat(auto-fit, minmax(200px, 1fr));
}
.compare-product-card {
	position: relative;
	padding: 20px;
	text-align: center;
	border-right: 1px solid #eee;
}
.compare-product-card .remove-product-compare {
    position: absolute;
    top: 10px;
    left: 10px;
    cursor: pointer;
    font-size: 20px;
    color: var(--color-gray);
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: var(--color-divider);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-width: 200px;
    height: auto;
    margin: 0 auto 15px;
    display: block;
}
.attribute-value .product-discount {
    display: none;
}
.attribute-value del {
    display: none;
}
.product-card-link .product-title {
	font-size: 14px;
	color: var(--color-secondary);
	margin: 0;
	line-height: 100%;
	font-weight: 450;
}
.product-compare-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    z-index: 99999;
    direction: rtl;
}

.product-compare-popup .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--color-lightgray);
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
}
.product-compare-popup .products-list-compare {
    overflow-y: auto;
    max-height: 60vh;
}
.product-compare-popup .popup-header {
    background: var(--color-whit-bg);
}

.product-compare-popup .popup-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}
.product-compare-popup .close-popup {
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    background: var(--color-divider);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-compare-popup .search-wrapper {
    margin-bottom: 10px;
    border: 1px solid var(--color-gray);
    padding: 0 15px;
    width: calc(100% - 300px);
}
.product-compare-popup #product-search-input {
    padding: 10px;
    border: 0;
    font-weight: 325;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: right;
    background: var(--color-lightgray);
    width: 100%;
}

.product-compare-popup .add-product-plus {
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    background: var(--color-lightgray);
    border: 1px dashed var(--color-tertiary);
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-compare-popup .products-count {
    color: var(--color-gray);
    width: 300px;
    font-weight: 325;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: right;
}

.product-compare-popup .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.popup-footer {
    text-align: center;
}
.add-to-compare-btn {
    background-color: var(--color-secondary);
    color: var(--color-white);
    border: none;
    padding: 18px 30px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0px -8px 28px 0px #00000040;
    font-weight: 450;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0%;
    vertical-align: middle;
}
.card-item.selected::after {
    content: "";
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_1498_82065)'%3E%3Cpath d='M16 1.39876e-06L8 0V2.66666L16 2.66667L16 5.33333L18.6667 5.33333L18.6667 8L21.3333 8L21.3333 2.66667L16 2.66667V1.39876e-06Z' fill='%2388FA05'/%3E%3Cpath d='M2.66667 2.66666L8 2.66666L8 5.33333L5.33333 5.33333V8H2.66667L2.66667 2.66666Z' fill='%2388FA05'/%3E%3Cpath d='M2.66667 8L2.66667 16H0L1.39876e-06 8L2.66667 8Z' fill='%2388FA05'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 21.3333V24L8 24L8 21.3333H16ZM16 21.3333L16 18.6667L18.6667 18.6667L18.6667 16L21.3333 16V21.3333H16Z' fill='%2388FA05'/%3E%3Cpath d='M21.3333 16V8L24 8L24 16H21.3333Z' fill='%2388FA05'/%3E%3Cpath d='M2.66667 16L2.66667 21.3333L8 21.3333L8 18.6667L5.33333 18.6667V16L2.66667 16Z' fill='%2388FA05'/%3E%3Cpath d='M9.33464 13.3334V10.6667H6.66797V13.3334H9.33464Z' fill='%235D2AD4'/%3E%3Cpath d='M12.0013 13.3334L9.33464 13.3334V16.0001H12.0013V13.3334Z' fill='%235D2AD4'/%3E%3Cpath d='M14.668 10.6667V13.3334H12.0013V10.6667H14.668Z' fill='%235D2AD4'/%3E%3Cpath d='M14.668 10.6667H17.3346V8.00006H14.668L14.668 10.6667Z' fill='%235D2AD4'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1498_82065'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
}
/* مشخصات کلی */

/* قیمت */
.variation-price {
    margin-bottom: 5px;
}
.card-item {
    cursor: pointer;
}
.variation-name {
    font-weight: bold;
    color: #666;
}

.out-of-stock {
    color: #ff4444;
}

.in-stock {
    color: #28a745;
}

/* ابعاد و وزن */
.dimension,
.weight-value {
    margin-bottom: 5px;
}

.no-value {
    color: #999;
}
.attribute-value:not(:last-child) , .attribute-label{
    border-left: 1px solid var(--color-divider);
}
/* گروه‌های ویژگی */

.group-title {
	background: var(--color-accent3);
	color: var(--color-text);
	padding: 16px 15px;
	margin: 0;
	line-height: 100%;
	font-size: 16px;
	font-weight: 450;
}

.attribute-row {
    display: grid;
    grid-template-columns: 200px repeat(auto-fit, minmax(200px, 1fr));
    border-bottom: 1px solid var(--color-divider);
    background: #fff;
}


.attribute-label {
	position: relative;
	color: var(--color-text);
	font-size: 14px;
	font-weight: 325;
	line-height: 100%;
	display: flex;
	align-items: center;
	padding: 15px;
	background: var(--color-lightgray2);
}

.attribute-hint {
    display: inline-block;
    margin-right: 5px;
    position: relative;
}

.attribute-hint i {
    color: #6c757d;
    cursor: help;
}

.hint-text {
    display: none;
    position: absolute;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
    min-width: 200px;
    right: 0;
    top: 100%;
}

.attribute-hint:hover .hint-text {
    display: block;
}
.attribute-value {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 15px;
	gap: 12px;
}
.attribute-value .value {
	color: var(--color-primary);
	font-size: 14px;
	font-weight: 325;
	line-height: 100%;
}

.value.has-tick::before {
    content: "✓";
    color: #28a745;
    margin-left: 5px;
}

.value.empty-value {
    color: #999;
}

/* دکمه‌ها */
.add-product-section {
    text-align: center;
}

.add-product-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f0ff;
    color: #5D2AD4;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-product-button:hover {
    background: #5D2AD4;
    color: #fff;
}


.highlight-differences-button {
    background: #5D2AD4;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.highlight-differences-button:hover {
    background: #4c22ac;
}
.compare-actions {
    padding: 15px;
}

.switch-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    user-select: none;
}

.switch-toggle input {
    display: none;
}

.slider {
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 30px;
    position: relative;
    transition: background-color 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

input:checked+.slider {
    background-color: var(--color-accent2);
}
#select-products-compare-button::after {
    background: var(--color-accent1);
}
#select-products-compare-button {
    border: 1px solid var(--color-tertiary);
    background: var(--color-tertiary);
}
input:checked+.slider::before {
    transform: translateX(24px);
}

.switch-label {
    font-size: 14px;
    color: var(--color-text, #333);
}
/* واکنش‌گرایی */
@media (max-width: 768px) {

    .compare-products-header,
    .specs-row,
    .attribute-row {
        grid-template-columns: 150px repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-image {
        max-width: 150px;
    }

    .product-title {
        font-size: 12px;
    }

    .section-title,
    .group-title {
        font-size: 16px;
    }

    .specs-label,
    .attribute-label {
        font-size: 13px;
    }

    .specs-value,
    .attribute-value {
        font-size: 12px;
    }
}