.products-section {
    padding: 5px 20px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--light-green);
    border-radius: var(--radius);
}

.filter-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--primary-green);
    border-radius: 30px;
    color: var(--primary-green);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.filter-btn.active {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.product-card {
    display: flex;              /* ← новое */
    flex-direction: column;     /* ← новое */


    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid rgb(230, 227, 227);
    position: relative;
}

.product-card:hover {
    border-color: rgb(104, 160, 87);
}

.product-badge {
    position: absolute;
    top: 5px;
    left: 15px;
    background: var(--accent-red);
    color: white;
    padding: 2px 15px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
    opacity: 0.8;
}

.product-badge.pro {
    background: linear-gradient(135deg, var(--sky-blue), #1976d2);
}

.product-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image.vertical img {
    object-fit: contain;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.default-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.default-image i {
    font-size: 60px;
    color: var(--primary-green);
    opacity: 0.5;
}

.image-navigation {
    position: absolute;
    bottom: -0px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 4px;
    background: rgba(219, 219, 219, 0.7);
}

.image-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-color: rgba(176, 207, 173, 0.8);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.image-dot:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    transform: scale(1.3);
}

.image-dot.active {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    transform: scale(1.3);
}

.product-info {
    padding: 5px 20px 20px 20px  ;
     position: relative;

    flex: 1;                    /* ← новое: занимает всё доступное пространство */
    display: flex;              /* ← новое */
    flex-direction: column;     /* ← новое */
}

.product-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.product-title-wrapper {
    margin-bottom: 0px;
}

.product-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-title-link:hover .product-title {
    color: var(--primary-green);
    text-decoration: underline;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-gray);
    line-height: 1.4;
    min-height: 40px;
}

.product-category {
    display: inline-block;
    background: var(--light-green);
    color: var(--primary-green);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 5px;
}

.product-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.product-stock i {
    color: var(--secondary-green);
}

.stock-high {
    color: var(--secondary-green);
    font-weight: 600;
}

.product-price {
    color: var(--primary-green);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0px;
}

.product-price span {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary-green), var(--primary-green));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-top: auto;          /* ← новое: прижимает кнопку к низу */
    position: relative;
    overflow: hidden;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, var(--primary-green), #1b5e20);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.3);
}

.add-to-cart:not(:disabled):active {
    transform: scale(0.98);
}

.add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.add-to-cart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.add-to-cart:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

.product-colors {
    display: flex;
    gap: 8px;
    margin: 15px 0;
}

.color-option {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.color-green { background: #2e7d32; }
.color-brown { background: #795548; }
.color-gray { background: #9e9e9e; }
.color-terracotta { background: #d84315; }
.color-sand { background: #d7ccc8; }

.product-features {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.product-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.product-feature i {
    color: var(--primary-green);
    font-size: 12px;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.no-products i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-products h3 {
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.no-products p {
    color: #666;
}

@media (max-width: 768px) {
    .image-navigation {
        padding: 7px;
        gap: 20px;
    }
    
    .image-dot {
        width: 12px;
        height: 12px;
    }
    
    .product-image {
        height: 220px;
    }
    
    .product-meta-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .product-price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 180px;
    }
}