/* Product block */
.product-block {
    padding: 30px 0;
}

.special-block {
    background: var(--bg-alt-main);
    padding: 30px;
    max-width: 1590px;
    width: 100vw;
    transform: translateX(-30px);
}

.product-block__title {
    text-align: center;
    margin-bottom: 20px;
    font-family: var(--second-family);
    font-weight: 700;
    color: var(--text-primary-head);
}

.product-block__tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}


.product-block__tab {
    background: none;
    border: none;
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    color: var(--text-primary-head);
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.product-block__tab--active {
    color: var(--bg-alt-stroke);
}

.product-block__tab:hover {
    color: var(--bg-alt-stroke);
}

.product-block__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Product card */
.product-card {
    background: var(--bg-primary-main);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: var(--hover-main);
}

.product-card:hover .product-card__img {
    transform: scale(1.1);
}

.product-card__image {
    position: relative;
    height: 240px;
    overflow: hidden;
    border: 1px solid var(--bg-primary-stroke);
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
}

.product-card__gallery {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.product-card__gallery:hover {
    cursor: pointer;
}

.product-card__gallery:active {
    cursor: pointer;
}

.product-card__gallery.dragging {
    transition: none;
}

.product-card__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.product-card__slide.active {
    opacity: 1;
    position: relative;
    z-index: 2;
}

/* Невидимые зоны для переключения слайдов */
.product-card__hover-zone {
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    background: transparent;
}

/* Qty контролы */
.product-card__qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e9ecef;
}

.product-card__qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #E51A4B;
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.product-card__qty-btn:hover {
    background: #c4183a;
}

.product-card__qty-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.product-card__qty-input {
    width: 50px;
    height: 32px;
    border: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    background: white;
    border: 1px solid #e9ecef;
}

.product-card__qty-input:focus {
    outline: none;
    border-color: #E51A4B;
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease-out;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.product-card__placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.product-card__pagination {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.product-card__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0);
    border: 1px solid #E51A4B;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card__dot.active {
    background: #E51A4B;
}

.product-card__content {
    border: 1px solid var(--bg-primary-stroke);
    border-radius: 0 0 10px 10px;
    padding: 20px;
    background: var(--bg-primary-main);
    height: 100%;
}

.product-card__title {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 120%;
    color: var(--text-primary-head);
    margin-bottom: 10px;
}

.product-card__attributes {
    margin-bottom: 15px;
}

.product-card__attr {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
    font-size: 14px;
    width: 100%;
    gap: 5px;
}

.product-card__attr-label {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    color: var(--text-primary-second);
    position: relative;
    flex-shrink: 0;
}

.razdelitel {
    width: 100%;
    border-bottom: 1px dashed var(--bg-primary-stroke);
}

.product-card__attr-value {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    color: var(--text-primary-main);
    flex-shrink: 0;
}

.product-card__price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card__price-info {
    display: flex;
	flex-direction: column;
    align-items: start;
    gap: 10px;
}

.product-card__current-price {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 24px;
    line-height: 120%;
    color: var(--text-primary-head);
}

.product-card__old-price {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 135%;
    text-decoration: line-through;
    color: var(--text-primary-second);
}

.product-card__add-to-cart {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    cursor: pointer;
}

.product-card__add-to-cart * {
    transition: 0.3s ease;
}

.product-card__add-to-cart:hover svg path:first-child {
    fill: var(--hover-main);
}

.product-card__add-to-cart.adding {
    opacity: 0.7;
    pointer-events: none;
}



.product-block__load-more {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn--outline {
    background: transparent;
    border: 1px solid #E51A4B;
    color: #E51A4B;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn--outline:hover {
    background: #E51A4B;
    color: white;
}

/* Loading state */
.product-block__grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-block__grid.loading::after {
    content: 'Загрузка...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: var(--text-primary-main);
}

/* Notifications */
.product-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 16px 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.product-notification--show {
    transform: translateX(0);
}

.product-notification--success {
    border-left: 4px solid #4CAF50;
}

.product-notification--error {
    border-left: 4px solid #f44336;
}

.product-notification__content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-notification__icon {
    font-size: 18px;
    font-weight: bold;
}

.product-notification--success .product-notification__icon {
    color: #4CAF50;
}

.product-notification--error .product-notification__icon {
    color: #f44336;
}

.product-notification__message {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

@media (max-width: 768px) {
    .product-block__tabs {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .product-block__grid {
        /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    .product-card__attr {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-card__content {
        padding: 15px;
    }
    
    .product-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width:550px) {
    .product-card__attr{
        flex-wrap: wrap;
    }
}

@media (max-width: 1590px) {
    .special-block {
        padding: 15px 0;
        width: 100%;
        transform: unset;
    }
}