

.eshop-content {
    padding: 0 20px 20px 20px;
    flex: 1;
    flex-grow: 1;
    margin-left: 20px;
    transition: margin-left 0.3s ease;
}

.eshop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.eshop-product-card {
    text-align: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.eshop-product-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.eshop-product-card h3 {
    margin: 15px auto 0 auto; /* top → right → bottom → left */
    font-size: 1.2rem;
    color: #333;
}

.eshop-product-card p {
    margin: 12px;
    font-size: 1em;
    color: #666;
}



.add-cart-form {
    display: flex;
    align-items: center; /* vertical alignment */
    justify-content: center; /* horizontal centering */
    gap: 8px;
}

.details-button,
.add-cart-form button {
    display: inline-block;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    padding: 5px 10px;
    color: #0056B3;
    background: #E7F1FF;
    border: 2px solid #0056B3;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.details-button:hover,
.add-cart-form button:hover { /* apply to the button inside add-cart-button */
    background: #007BFF;
    color: #ffffff;
}

.add-cart-form input[type="number"] {
    width: 60px;
    margin-left: 5px;
    padding: 8px 8px;
    border-radius: 5px;
}




.cart-icon-container {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    position: sticky; /* sticky must be used with top */
    top: 10px;
    padding-right: 10px;
    z-index: 1000000;
}

.cart-icon-container p {
    margin: 0;
}

.cart-icon {
    position: relative;
    align-items: center;
    text-decoration: underline;
    color: #000;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -3px;
    background: red;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.cart-count.update {
    transform: scale(1.5);
}










@media (max-width: 768px) {
    .eshop-content {
        margin-left: 0;
    }
    
    .eshop-product-buttons a {
        display: block;
        margin: 5px 0;
        width: fit-content;
    }

    .cart-count {
        font-size: 1em;
    }
}
