/* Mobile Responsive Styles for Home Page */

@media only screen and (max-width: 768px) {

    /* Base wrapper adjustment */
    .container,
    .container-240 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body,
    html {
        overflow-x: hidden;
    }

    /* Cart box */
    .cart-box-container-ver2 {
        padding: 0 !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .col-md-7,
    .col-lg-7,
    .col-xl-7,
    .col-xs-12,
    .col-md-5,
    .col-lg-5,
    .col-xl-5 {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    /* Main Product Image Adjustment */
    .slider {
        width: 100%;
    }

    .slider .main-image {
        min-height: auto !important;
    }

    .slider .main-image.has-video,
    .slider .main-image:has(#ytPlayer iframe),
    .slider .main-image:has(.overlay:not(.d-none)) {
        min-height: 220px !important;
        aspect-ratio: 16 / 9;
        height: auto !important;
        width: 100%;
    }

    .slider .main-image img#main {
        width: 100%;
        height: auto;
        min-height: auto !important;
        object-fit: cover;
    }

    /* Video and Thumbnails */
    .thumbnails {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 5px;
        padding-bottom: 5px;
    }

    .thumbnails img,
    .video-thumb {
        width: 60px !important;
        height: 60px !important;
        flex: 0 0 auto;
    }

    /* Variants / Product Selection */
    .product_items {
        display: flex !important;
        align-items: center;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .product_items .cate-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
    }

    .product-img img {
        width: 70px !important;
        height: auto;
    }

    .product-info {
        padding-left: 10px;
        text-align: left;
    }

    .product-info h3 {
        font-size: 15px !important;
        margin-bottom: 5px;
        line-height: 1.3;
    }

    .product-price {
        font-size: 14px !important;
    }

    /* Sidebar / Cart details */
    .sidebar.sticky {
        position: static !important;
        margin-top: 20px;
        width: 100%;
    }

    .cart-total {
        padding: 15px !important;
    }

    .order_items li {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 15px;
    }

    .co-name {
        width: 100% !important;
    }

    .co-price {
        width: 100% !important;
        text-align: left !important;
        margin-top: 10px;
    }

    /* Order Info Form */
    .form-customer .form-group {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 15px;
    }

    .form-control {
        font-size: 15px !important;
    }

    /* Fonts & Texts Adjustments */
    #header1,
    .heading1 {
        font-size: 18px !important;
        word-break: break-word;
    }

    .page-title {
        font-size: 16px !important;
    }

    /* Footer / Sticky Checkout btn */
    .btn-checkout {
        width: 100%;
        padding: 12px;
        font-size: 18px;
    }

    /* Specific extreme small mobile target up to 360px width (e.g. 300px) */
    @media (max-width: 360px) {
        .product_items .cate-item {
            flex-direction: column;
            text-align: center;
            padding: 10px 0;
        }

        .product-info {
            padding-left: 0;
            text-align: center;
        }

        .product-img img {
            width: 90px !important;
            margin-bottom: 10px;
        }

        .quantity-block {
            justify-content: flex-start;
            margin-top: 10px;
        }

        .order-total {
            flex-direction: column;
            padding: 0 !important;
            text-align: center;
        }

        .order-total .h3 {
            font-size: 18px !important;
            margin-bottom: 5px;
        }

        #total_price {
            display: inline-block;
            margin-top: 5px;
        }

        /* Adjust checkbox on small screen */
        .product_items .form-check-input {
            margin-bottom: 10px;
        }
    }
}