.advanced-products-grid {
    display: grid;
    grid-gap: 20px;
}

.advanced-products-grid.columns-1 {
    grid-template-columns: repeat(1, 1fr);
}

.advanced-products-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.advanced-products-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.advanced-products-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-product-item {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    transition: all 0.3s;
    width: 100%;
}

.quick-view-button {
    background-color: rgba(255, 255, 255, 0.5);
    color: #3d271f;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-family: Questrial;
}

.quick-view-button:hover {
    background-color: rgba(255, 255, 255, 0.9);

}

.product-info {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    flex-direction: column;
}

.product-title {
    margin: 10px 5px 0 0;
    font-size: 0.9em;
    text-transform: uppercase;
    font-family: Questrial;
}

.product-price {
    font-weight: bold;
    font-family: Questrial;
    color: #3d271f;
}
 
.add-to-cart-button {
    background-color: white;
    color: #3d271f;
    border: 1px solid #3d271f;
    padding: 15px 15px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-family: Questrial;
}

.add-to-cart-button:hover {
    background-color: #3d271f;
    color: white;
}

/* Quick View Modal */
.quick-view-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0; /* Will be set dynamically via JavaScript */
    width: 100%;
    height: 100%; /* Will be adjusted dynamically via JavaScript */
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 0 auto; /* Top margin will be set dynamically via JavaScript */
    padding: 20px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.quick-view-content {
    display: flex;
    flex-wrap: wrap;
}

.quick-view-image {
    flex: 1;
    min-width: 300px;
}

.quick-view-details {
    flex: 1;
    padding: 0 20px;
    min-width: 300px;
    font-family: Questrial;
}

.short-description {
    margin-bottom: 20px;
}

.full-description {
    margin-top: 20px;
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    line-height: 1.2em;
}

.full-description h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

/* Quantity input styles */
.quantity-wrapper {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.quantity {
    margin-right: 10px;
}

.quantity .qty-input {
    width: 60px;
    height: 35px;
    padding: 0 5px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
}

/* Modify add to cart button in quick view */
.quick-view-details .add-to-cart-button {
    width: auto;
    flex: 1;
}

@media (max-width: 768px) {
    .advanced-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .product-image {
        height: 220px;
    }
}