/* ================================================
   Custom CSS for Hera Template - Quick View Button Positioning
   ================================================ */

/* Quick View button positioned after Add to Cart button */
.quickview-after-cart,
.quickview-after-details {
    margin-top: 10px;
}

/* Ensure Quick View button is visible on all devices (desktop and mobile) */
.quickview-after-cart .quick-view,
.quickview-after-details .quick-view {
    display: block !important;
}

/* Grid layout spacing */
.grid .quickview-after-cart,
.grid .quickview-after-details {
    margin-top: 10px;
}

/* List layout spacing */
.list .quickview-after-cart,
.list .quickview-after-details {
    margin-top: 10px;
    width: 100%;
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .quickview-after-cart,
    .quickview-after-details {
        margin-top: 10px;
    }
    
    .quickview-after-cart .quick-view,
    .quickview-after-details .quick-view {
        width: 100%;
    }
}

/* Additional spacing for list view on mobile */
@media screen and (max-width: 480px) {
    .list .quickview-after-cart,
    .list .quickview-after-details {
        margin-bottom: 10px;
    }
}

/* ================================================
   MOBILE LIST VIEW DEFAULT - But Allow Grid Toggle
   ================================================ */
@media screen and (max-width: 768px) {
    /* LIST VIEW on mobile - image left, info right */
    .product.list .product-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }
    
    .product.list .product-image-link {
        flex: 0 0 120px !important;
        max-width: 120px !important;
        margin-right: 15px !important;
        min-height: auto !important;
    }
    
    .product.list .product-infos {
        flex: 1 !important;
    }
    
    /* GRID VIEW on mobile - 2 columns, compact */
    .product.grid {
        width: 50% !important;
        max-width: 50% !important;
    }
    
    /* Make grid view more compact on mobile */
    .product.grid .product-container {
        padding: 5px !important;
    }
    
    .product.grid .product-name {
        font-size: 0.9rem !important;
    }
    
    .product.grid .product_s_desc {
        font-size: 0.85rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
}

/* ================================================
   Category Page - ULTRA COMPACT Product Block Spacing
   ================================================ */

/* Product name - minimal h3 margins */
.product-container .product-name {
    margin-top: 5px !important;
    margin-bottom: 3px !important;
    line-height: 1.2 !important;
}

/* SKU - minimal bottom margin */
.product-container .small.text-muted.mb-2 {
    margin-bottom: 2px !important;
}

/* Product description - minimal paragraph margins */
.product-container .product_s_desc {
    margin-top: 3px !important;
    margin-bottom: 5px !important;
    line-height: 1.3 !important;
}

/* Prices container - minimal spacing */
.product-container .product-price {
    margin-top: 3px !important;
    margin-bottom: 5px !important;
}

/* Button containers - minimal margin-top */
.product-container .btn-layout-2.margin-top,
.product-container .addtocart-bar {
    margin-top: 5px !important;
}

/* Quick View button - minimal spacing */
.product-container .quickview-after-cart,
.product-container .quickview-after-details {
    margin-top: 3px !important;
}

/* VM Separator - minimal spacing */
.product-container .vm-separator {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
}

/* Stock/Rating container - minimal top spacing */
.product-container .stock-rating {
    margin-top: 3px !important;
}

/* Overall product-infos container - minimal padding */
.product-container .product-infos {
    padding-top: 5px !important;
}

/* Reduce spacing for add to cart form elements */
.product-container .addtocart-bar .quantity {
    margin-bottom: 3px !important;
}

/* Compact spacing for buttons within addtocart-bar */
.product-container .addtocart-bar .btn {
    margin-top: 3px !important;
}

/* Tighten line heights for compact display */
.product-container h3,
.product-container p,
.product-container .small {
    line-height: 1.2 !important;
}