.shop-container {
display: grid;
grid-template-columns: repeat(4, 300px);
gap: 30px 75px;
align-items: start;
box-sizing: border-box;
justify-content: center;
padding-bottom: 139px;
}
/* Бокс товара */
.product-box {
border: 1px solid #ff9900;
box-shadow: 0 4px 16px rgba(255, 153, 0, 0.6);
background-color: #fff;
border-radius: 10px;
display: flex;
transition: transform 0.3s ease, box-shadow 0.3s ease;
cursor: pointer;
max-width: 350px;
min-width: 350px;
max-height: 170px;
min-height: 170px;
position: relative;
}
.product-box:hover {
box-shadow: 0 13px 30px rgba(0, 0, 0, 0.2);
transform: translateY(-5px); /* Поднятие карточки вместо уменьшения */
}
/* Изображение товара */
.product-image-container {
display: flex;
align-items: center;
justify-content: center;
}
.product-image {
height: 168px;
width: 130px;
object-fit: cover;
border-radius: 9px;
}
.product-info {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 10px;
box-sizing: border-box;
}
.product-name {
font-weight: bold;
font-size: 17px;
color: #333;
}
.product-description {
font-size: 14px;
color: #666;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.product-price {
font-size: 16px;
font-weight: bold;
color: #ff9900;
}
.product-stock {
font-size: 16px;
font-weight: bold;
color: red;
}
/* Скрытый чекбокс для открытия модалки */
.product-modal-toggle {
display: none;
}
.product-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
z-index: 10000;
}
.product-modal-toggle:checked + .product-modal-overlay {
opacity: 1;
visibility: visible;
}
.product-modal-toggle:checked + .product-modal-overlay + .product-modal {
opacity: 1;
visibility: visible;
}
.product-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 800px;
background-color: #fff;
border-radius: 10px;
padding: 20px;
z-index: 10001;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-close {
position: absolute;
top: 10px;
right: 13px;
font-size: 30px;
color: #666;
cursor: pointer;
transition: color 0.3s ease;
}
.modal-close:hover {
color: #ff9900;
}
.modal-content {
display: flex;
align-items: start;
height: 500px;
}
.modal-product-image {
width: 400px;
height: 100%;
object-fit: cover;
border-radius: 10px;
margin-right: 20px;
}
.modal-info {
flex-grow: 1;
}
.modal-product-name {
font-size: 28px;
margin-bottom: 20px;
color: #333;
}
.modal-product-description {
font-size: 20px;
color: #666;
margin-bottom: 20px;
}
.modal-product-price {
font-size: 24px;
font-weight: bold;
color: #ff9900;
margin-bottom: 10px;
}
.modal-product-stock {
font-size: 18px;
font-weight: bold;
color: red;
margin-bottom: 20px;
}
.modal-buy-button {
background-color: #ff9900;
color: #fff;
border: none;
padding: 10px 25px;
font-size: 17px;
font-weight: 600;
cursor: pointer;
border-radius: 5px;
transition: transform 0.5s ease, box-shadow 0.3s ease;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
}
.modal-buy-button:hover {
background-color: #e68a00;
transform: scale(1.03);
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}
.modal-buy-button.disabled {
background-color: gray;
cursor: not-allowed;
}