/* Index Page Components - Part 2 */

/* Hero Features - Force 4th element to center */
.hero-features .feature:nth-child(4) {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    max-width: 300px !important;
    width: 300px !important;
}

/* На мобильных устройствах четвертый блок такой же как остальные */
@media (max-width: 640px) {
    .hero-features .feature:nth-child(4) {
        grid-column: unset !important;
        justify-self: unset !important;
        width: unset !important;
        max-width: unset !important;
        min-width: unset !important;
    }
    
    /* Максимальная специфичность для переопределения любых стилей */
    .hero-features .feature:nth-child(4)[style] {
        grid-column: unset !important;
        justify-self: unset !important;
        width: unset !important;
        max-width: unset !important;
        min-width: unset !important;
    }
    
    /* Еще более специфичное правило */
    div.hero-features div.feature:nth-child(4) {
        grid-column: unset !important;
        justify-self: unset !important;
        width: unset !important;
        max-width: unset !important;
        min-width: unset !important;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    justify-content: center;
}

/* Ограничиваем максимальную ширину для одного товара */
.products-grid:has(.product-card:only-child) {
    grid-template-columns: minmax(350px, 400px);
    justify-content: center;
}

/* Ограничиваем максимальную ширину для двух товаров */
.products-grid:has(.product-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(350px, 400px));
    justify-content: center;
}

/* Fallback для браузеров без поддержки :has() */
.products-grid.single-product {
    grid-template-columns: minmax(350px, 400px);
    justify-content: center;
}

.products-grid.two-products {
    grid-template-columns: repeat(2, minmax(350px, 400px));
    justify-content: center;
}

.product-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(37, 99, 235, 0.2);
}

.product-card:hover::after {
    opacity: 1;
}

/* Product Image Styles */
.product-image {
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, var(--bg-light), #e5e7eb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-light);
    position: relative;
    /* overflow: hidden; - убираем, чтобы бейджи выступали */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

/* Product Badge inside Image */
.product-image .product-badge {
    position: absolute;
    top: -18px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Product Brand inside Image */
.product-image .product-brand {
    position: absolute;
    top: -18px;
    left: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Badge Colors */
.product-image .product-badge.hit {
    background: #ef4444;
}

/* Hit Products - Force text colors */
.products-grid .product-specs .spec-label {
    color: #6b7280 !important;
}

.products-grid .product-specs .spec-value {
    color: #1f2937 !important;
}


.product-image .product-badge.econom {
    background: #f59e0b;
}

.product-image .product-badge.premium {
    background: #8b5cf6;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .product-image {
        height: 300px;
        font-size: 40px;
    }

    .product-image .product-badge {
        top: -15px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .product-image .product-brand {
        top: -15px;
        left: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }
}

.product-card > * {
    position: relative;
    z-index: 1;
}

.product-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-brand {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
    line-height: 1.4;
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: var(--primary-color);
}

/* Variants Selector */
.variants-selector {
    padding: 8px 0;
    margin-bottom: 8px;
    min-height: 44px;
}

.variants-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.variants-list::-webkit-scrollbar {
    height: 4px;
}

.variants-list::-webkit-scrollbar-track {
    background: transparent;
}

.variants-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.variants-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.variant-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    color: #64748b;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 48px;
    flex-shrink: 0;
    cursor: pointer;
}

.variant-btn:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

.variant-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-color: #0284c7;
    color: white;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
}

.variant-area {
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}

.variant-unit {
    font-weight: 500;
    font-size: 10px;
    opacity: 0.8;
}

.variant-btn.active .variant-area,
.variant-btn.active .variant-unit {
    color: white;
}

.product-specs {
    list-style: none;
    margin-top: auto;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
}

.product-specs li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
}

.product-specs li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-specs li:first-child {
    padding-top: 0;
}

.spec-label {
    color: #64748b;
    font-weight: 500;
}

.spec-value {
    font-weight: 600;
    color: var(--text-dark);
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 12px;
    margin-top: auto;
}

.price-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.old-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 500;
}

.discount {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    width: fit-content;
}

.buy-btn {
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.buy-btn:hover {
    background: #059669;
}

.buy-btn:active {
    background: #047857;
}

/* Brands Section */
.brands {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f4f8 100%);
    padding: 80px 0;
}

.brands-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.brand-item {
    background: var(--bg-white);
    padding: 24px 20px;
    border-radius: 16px;
    text-align: center;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    width: 160px;
    flex-shrink: 0;
}

.brand-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light, #60a5fa));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.brand-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.brand-item:hover::before {
    transform: scaleX(1);
}

.brand-logo-wrapper {
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
    padding: 10px;
    transition: all 0.3s ease;
}

.brand-item:hover .brand-logo-wrapper {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.1);
}

.brand-logo-img {
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
    filter: grayscale(20%);
    transition: all 0.3s ease;
}

.brand-item:hover .brand-logo-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.brand-logo-placeholder {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.brand-item:hover .brand-name {
    color: var(--primary-color);
}

.brand-products-count {
    font-size: 12px;
    color: var(--text-light);
}

.brands-guarantee-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted, #6b7280);
    font-size: 14px;
    padding-top: 24px;
}

.brands-guarantee-centered svg {
    color: var(--success-color, #10b981);
    flex-shrink: 0;
}

/* Legacy support */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.brand-card {
    background: var(--bg-white);
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    font-weight: 700;
    color: var(--text-dark);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 100px;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.brands-note {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

/* Categories Section */
.categories {
    background: var(--bg-white);
    padding: 80px 0;
}

/* Categories Showcase - new style */
.categories-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-white);
    padding: 20px 28px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 280px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-item .category-image {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light);
}

.category-item .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item .category-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: var(--bg-light);
    border-radius: 12px;
    flex-shrink: 0;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item .category-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    transition: color 0.3s ease;
}

.category-item:hover .category-name {
    color: var(--primary-color);
}

.category-item .category-count {
    font-size: 14px;
    color: var(--text-light);
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.category-card {
    background: var(--bg-white);
    padding: 32px 28px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 240px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-image {
    width: 100px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon {
    font-size: 48px;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    transition: color 0.3s ease;
}

.category-card:hover .category-name {
    color: var(--primary-color);
}

.category-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.category-count {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.empty-categories {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.empty-categories .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Categories Responsive */
@media (max-width: 768px) {
    .categories {
        padding: 60px 0;
    }

    .categories-grid {
        gap: 16px;
    }

    .category-card {
        width: calc(50% - 8px);
        padding: 24px 20px;
    }

    .category-image {
        width: 80px;
        height: 64px;
    }

    .category-icon {
        font-size: 40px;
    }

    .category-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .categories {
        padding: 40px 0;
    }

    .categories-grid {
        gap: 12px;
    }

    .category-card {
        width: 100%;
        padding: 20px;
    }

    .category-image {
        width: 70px;
        height: 56px;
    }

    .category-icon {
        font-size: 36px;
    }

    .category-name {
        font-size: 0.95rem;
    }

    .category-count {
        margin-top: 4px;
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* Services Section */
.services {
    background: var(--bg-white);
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.service-card {
    background: var(--bg-light);
    padding: 40px 32px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    background: var(--bg-white);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.service-description {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
    flex-grow: 1;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--accent-color);
}

.service-price.free {
    color: var(--warning-color);
}

.service-price.paid {
    color: var(--accent-color);
}

.service-btn {
    background: #10b981 !important;
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.service-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.service-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* About Section Styles */
.about {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.about-grid {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-top: 50px;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 20px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design for About Section */
@media (max-width: 768px) {
    .about {
        padding: 60px 0;
    }
    
    .about-grid {
        gap: 40px;
        margin-top: 40px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .feature-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }
    
    .feature-card h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .feature-card p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .about {
        padding: 40px 0;
    }
    
    .about-grid {
        gap: 30px;
        margin-top: 30px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
}

/* ===== Calculator Section ===== */
.calculator-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.calculator-compact {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
    background: white;
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calculator-left h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.calculator-left p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.calculator-center {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.calculator-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 16px;
}

.calculator-input-row input[type="number"] {
    width: 80px;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    border: none;
    background: transparent;
    outline: none;
    text-align: center;
}

.calculator-input-row input[type="number"]::-webkit-outer-spin-button,
.calculator-input-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calculator-input-row .input-suffix {
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
}

.calculator-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.calculator-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.calculator-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    cursor: pointer;
    border: none;
}

.calculator-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.calculator-result-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-label {
    font-size: 14px;
    color: #6b7280;
}

.result-btu {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
}

.calculator-btn {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.calculator-btn:hover {
    background: #059669;
}

/* Calculator Products */
.calculator-products {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.calculator-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calculator-products-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.calculator-products-header h3 span {
    color: #10b981;
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

.calculator-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Calculator Product Card */
.calculator-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.calculator-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #10b981;
}

.calc-product-image {
    display: block;
    width: 100%;
    height: 200px;
    background: #f9fafb;
    overflow: hidden;
    position: relative;
}

.calc-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.calculator-product-card:hover .calc-product-image img {
    transform: scale(1.05);
}

.calc-product-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #d1d5db;
}

/* Brand badge */
.calc-brand {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Product badges */
.calc-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.calc-badge.hit {
    background: #ef4444;
}

.calc-badge.new {
    background: #8b5cf6;
}

.calc-badge.sale {
    background: #f59e0b;
}

.calc-product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-product-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.calc-product-title:hover {
    color: #10b981;
}

/* Specs grid */
.calc-product-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.calc-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.calc-spec-label {
    color: #6b7280;
}

.calc-spec-value {
    font-weight: 600;
    color: #1f2937;
}

/* Price section */
.calc-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.calc-current-price {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
}

.calc-old-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.calc-discount {
    background: #fef2f2;
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Actions */
.calc-product-actions {
    display: flex;
    border-top: 1px solid #e5e7eb;
}

.calc-buy-btn {
    flex: 1;
    padding: 14px;
    background: #10b981;
    color: white;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calc-buy-btn:hover {
    background: #059669;
}

.calc-details-btn {
    flex: 1;
    padding: 14px;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    border-left: 1px solid #e5e7eb;
}

.calc-details-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Load more button */
.calculator-load-more {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 32px auto 0;
    padding: 14px 32px;
    background: white;
    color: #10b981;
    border: 2px solid #10b981;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calculator-load-more:hover {
    background: #10b981;
    color: white;
}

/* Calculator Mobile */
@media (max-width: 900px) {
    .calculator-compact {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
        text-align: center;
    }

    .calculator-left h2 {
        font-size: 20px;
    }

    .calculator-center {
        min-width: unset;
    }

    .calculator-right {
        align-items: center;
    }

    .calculator-btn {
        width: 100%;
        text-align: center;
    }

    .calculator-products-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .calculator-products-grid {
        grid-template-columns: 1fr;
    }

    .calc-product-image {
        height: 180px;
    }

    .calc-product-info {
        padding: 14px;
    }

    .calc-product-title {
        font-size: 14px;
        min-height: auto;
    }

    .calc-current-price {
        font-size: 18px;
    }

    .calc-spec {
        font-size: 12px;
    }

    .calc-buy-btn,
    .calc-details-btn {
        padding: 12px;
        font-size: 13px;
    }

    .calculator-load-more {
        margin-top: 24px;
        padding: 12px 24px;
        font-size: 14px;
    }
}
