.add_cart_button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.add_cart_button .quantity_selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    background-color: #fff;
}

.add_cart_button .quantity_selector button {
    background: none;
    border: none;
    font-size: 20px;
    padding: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.add_cart_button .quantity_selector .qty_input[name="qty"]{
    background-color: #9E1E2300;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 400;
    text-transform: none;
    font-style: normal;
    text-decoration: none;
    line-height: 20px;
    width: 50px;
    height: 40px;
    text-align: center;
    border-width: 0px 1px 0px 1px;
    border-style: solid;
    border-color: #45454542;
    color:#000000;
    padding: 0;
}

.add_cart_button .quantity_selector input::-webkit-outer-spin-button,
.add_cart_button .quantity_selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add_cart_button .add_cart {
    font-family: 'Jost', sans-serif;
    background-color: #9E1E23;
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 1px solid #9E1E23;
}

.add_cart_button .add_cart:hover {
    background-color: #FFFFFF;
    transform: skew(-10deg);
    color: #9E1E23;
}

.add_cart_button .add_cart .cart_icon svg {
    fill: white;
    width: 15px;
    height: 15px;
}

.add_cart_button .add_cart:hover .cart_icon svg{
    fill: #9E1E23;
}

/* Shopping Cart Styles */
#shopping_cart {
    width: 100%;
    margin: 20px 0;
    font-family: "Jost", sans-serif;
    background-color: #fff;
    padding: 40px;
}

#shopping_cart .cart_list {
    width: 100%;
}

#shopping_cart table.list_table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 0;
    border: 1px solid #e5e5e5;
}

#shopping_cart table.list_table thead th {
    background-color: #151515;
    color: #fff;
    padding: 15px 20px;
    text-align: left;
    font-weight: 500;
    font-size: 16px;
    text-transform: capitalize;
}

#shopping_cart table.list_table tbody tr {
    border-bottom: 1px solid #e5e5e5;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    background-color: #fff;
}

#shopping_cart table.list_table td {
    padding: 20px;
    vertical-align: middle;
    color: #333;
    font-size: 15px;
    background-color: #FFFFFF;
    border:none;
    text-align: left;
}

#shopping_cart table.list_table td.specs{
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product Column */
#shopping_cart .product .title {
    display: flex;
    align-items: center;
    gap: 15px;
}

#shopping_cart .product .img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

#shopping_cart .product .product-info {
    display: flex;
    flex-direction: column;
}

#shopping_cart .product .small-text {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

#shopping_cart .product .name {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
}

/* Quantity Column */
#shopping_cart .quantity .num {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    background: #fff;
}

#shopping_cart .quantity .btn {
    background: #fff;
    border: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#shopping_cart .quantity .num_input {
    width: 40px;
    height: 35px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    color: #333;
    padding: 0;
    outline: none;
    background: transparent;
}

/* Action Column */
#shopping_cart td.action .action-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

#shopping_cart .action .category {
    color: #333;
    white-space: nowrap;
}

#shopping_cart .action .delete {
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    display: flex;
    align-items: left;
}

#shopping_cart .action .delete:hover {
    color: #d9534f;
}

#shopping_cart .action .delete svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Footer */
#shopping_cart .cart_footer {
    background-color: #454545;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
}

#shopping_cart .cart_footer .note {
    font-size: 14px;
    opacity: 0.9;
    max-width: 60%;
}

#shopping_cart .cart_footer .total {
    font-size: 16px;
    font-weight: 600;
}

#shopping_cart .cart_footer .total .total_count {
    font-size: 18px;
    margin: 0 5px;
    font-weight: bold;
}

/* Title */
#shopping_cart .member_title_div {
    margin-bottom: 20px;
}

#shopping_cart .member_title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

/* Bottom Buttons */
#shopping_cart .btn-wrap {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

#shopping_cart .btn-wrap .btn {
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 24px;
    cursor: pointer;
    border: 1px solid #9E1E23;
    transition: all 0.3s ease;
    height: auto;
    width: auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

#shopping_cart .btn-wrap .export_excel {
    background-color: #fff;
    color: #9E1E23;
}

#shopping_cart .btn-wrap .export_excel:hover {
    background-color: #9E1E23;
    color: #fff;
    transform: skewX(-12deg);
}

#shopping_cart .btn-wrap .submit_inquiry {
    background-color: #9E1E23;
    color: #fff;
}

#shopping_cart .btn-wrap .submit_inquiry:hover {
    background-color: #fff;
    color: #9E1E23;
    transform: skewX(-12deg);  
}

@media screen and (max-width: 768px) {
    #shopping_cart {
        padding: 20px 15px;
    }

    /* Header adjustments */
    #shopping_cart table.list_table thead {
        display: block;
        background: #151515;
    }
    #shopping_cart table.list_table thead tr {
        display: grid;
        grid-template-columns: 100px 1fr;
        padding: 0;
    }
    #shopping_cart table.list_table thead th {
        display: none;
        padding: 15px;
        font-size: 16px;
        color: #fff;
    }
    #shopping_cart table.list_table thead th:nth-child(1) { /* Products */
        display: block;
        text-align: center;
    }
    #shopping_cart table.list_table thead th:nth-child(2) { /* Use OE th for Details label */
        display: block;
        font-size: 0;
    }
    #shopping_cart table.list_table thead th:nth-child(2)::before {
        content: "Details";
        font-size: 16px;
        display: block;
    }

    /* Row Layout */
    #shopping_cart table.list_table tbody tr {
        display: block; /* Use block for float layout */
        border: 1px solid #e5e5e5;
        margin-bottom: 20px;
        padding: 20px;
        background: #fff;
        position: relative;
    }
    
    /* Clearfix for tr */
    #shopping_cart table.list_table tbody tr::after {
        content: "";
        display: table;
        clear: both;
    }

    /* Reset td styles */
    #shopping_cart table.list_table td {
        display: block;
        padding: 5px 0;
        border: none;
        width: auto;
    }

    /* Flatten Product Cell */
    #shopping_cart table.list_table td.product,
    #shopping_cart table.list_table td.product .title {
        display: contents;
    }

    /* Left Column Items (Float) */
    #shopping_cart .product .img {
        float: left;
        clear: left;
        width: 80px;
        height: auto;
        max-height: 80px;
        object-fit: contain;
        margin-right: 20px;
        margin-bottom: 10px;
    }

    #shopping_cart table.list_table td.quantity {
        float: left;
        clear: left;
        width: 80px;
        margin-right: 20px;
        margin-bottom: 10px;
        display: flex;
        justify-content: center;
    }
    
    #shopping_cart .quantity .num {
        transform: scale(0.9);
        transform-origin: center;
    }

    #shopping_cart table.list_table td.action {
        float: left;
        clear: left;
        width: 80px;
        margin-right: 20px;
        display: flex;
        justify-content: center;
    }

    /* Right Column Items (Block with margin) */
    #shopping_cart .product .name {
        display: block;
        margin-left: 100px; /* 80px width + 20px margin */
        margin-bottom: 10px;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.4;
    }

    #shopping_cart table.list_table td.oe,
    #shopping_cart table.list_table td.specs,
    #shopping_cart table.list_table td.category {
        margin-left: 100px;
        font-size: 14px;
        color: #333;
    }

    /* Labels */
    #shopping_cart table.list_table td.oe::before {
        content: "OE: ";
        color: #999;
        margin-right: 5px;
    }
    #shopping_cart table.list_table td.specs::before {
        content: "Specs: ";
        color: #999;
        margin-right: 5px;
    }
    #shopping_cart table.list_table td.category::before {
        content: "Category: ";
        color: #999;
        margin-right: 5px;
    }

    /* Adjust Specs truncation */
    #shopping_cart table.list_table td.specs {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Footer & Buttons */
    #shopping_cart .cart_footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    #shopping_cart .cart_footer .note {
        max-width: 100%;
    }

    #shopping_cart .btn-wrap {
        flex-direction: column;
        gap: 15px;
    }
    
    #shopping_cart .btn-wrap .btn {
        width: 100%;
    }
}

/* Header Cart View Styles */
.header_cart_view {
    position: relative;
    background-color: #333;
    color: #fff;
    font-family: "Jost", sans-serif;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
}

.header_cart_view .header_cart_content {
    padding: 30px;
}

.header_cart_view .header_cart_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.header_cart_view .header_cart_header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    font-family: "Jost", sans-serif;
}

.header_cart_view .header_cart_header .total_items {
    font-size: 16px;
    color: #ccc;
}

.header_cart_view .header_cart_header .total_items .count {
    font-weight: bold;
    color: #fff;
}

.header_cart_view .header_cart_list_items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.header_cart_view .header_cart_item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #FFFFFFE3;
    align-items: center;
}

.header_cart_view .header_cart_item:last-child {
    border-bottom: none;
}

.header_cart_view .header_cart_item .item_image {
    width: 120px;
    height: 120px;
    margin-right: 15px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header_cart_view .header_cart_item .item_image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header_cart_view .header_cart_item .item_details {
    flex-grow: 1;
    margin-right: 10px;
}

.header_cart_view .header_cart_item .item_name {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

.header_cart_view .header_cart_item .item_oe {
    margin: 0 0 10px;
    font-size: 14px;
    color: #FFFFFFE3;
}

.header_cart_view .header_cart_item .item_qty_control {
    display: flex;
    align-items: center;
}

.header_cart_view .header_cart_item .qty_btn {
    width: 30px;
    height: 30px;
    background: #444;
    border: 1px solid #FFFFFFE3;
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
}

.header_cart_view .header_cart_item .qty_btn:hover {
    background: #555;
}

.header_cart_view .header_cart_item .qty_input {
    width: 30px;
    height: 30px;
    background-color: #9E1E2300 !important;
    border-color:#FFFFFFE3 !important;
    border-left: none;
    border-right: none;
    color: #fff !important;
    text-align: center;
    padding: 0 10px !important;
    width: 50px;
    font-size: 15px;
}

.header_cart_view .header_cart_item .item_remove {
    color: #FFFFFF;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.header_cart_view .header_cart_item .item_remove:hover {
    color: #d9534f;
}

.header_cart_view .header_cart_footer {
    border-top: 1px solid #FFFFFFE3;
    padding-top: 20px;
}

.header_cart_view .header_cart_footer .view_full_cart_btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #9E1E23;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s;
}

.header_cart_view .header_cart_footer .view_full_cart_btn:hover {
    background-color: #b92b32;
}

.header_cart_view .header_cart_content .empty_cart {
    text-align: center;
    padding: 20px 0;
    color: #aaa;
}

.header_cart_view .header_cart_list_items::-webkit-scrollbar {
    width: 6px;
}

.header_cart_view .header_cart_list_items::-webkit-scrollbar-track {
    background: #333;
}

.header_cart_view .header_cart_list_items::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.header_cart_view .header_cart_list_items::-webkit-scrollbar-thumb:hover {
    background: #666;
}


@media screen and (max-width: 767px){
    .add_cart_button {
        flex-direction: column;
        align-items: start;
    }

    .header_cart_view .header_cart_item{
        padding:0;
    }
}