/* Page styles for shop-cart
   Moved out of the inline <style> in resources/views/front/cart/shop-cart.blade.php
 */

/* vk-cart- prefixed throughout: style.css styles generic names (.table, .quantity,
   .qty, .product-name) globally, so this page carries no theme table classes.
   The class names view-cart.js binds to -- qty_product, item_qty, qty_input,
   product-subtotal, remove-item-cart, cart_sub_total_view, cart_row_<id> and the
   #cart_update_url table id -- are kept exactly as they were. */
.toast-center-center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    position: fixed !important;
}

.toast-error {
    font-size: 18px !important;
    font-weight: bold !important;
    padding-right: 40px !important;
}

.vk-cart-page {
    background: #F4F5F6;
    padding: 34px 0 54px;
}

.vk-cart-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
}

.vk-cart-head__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #152B39;
}

.vk-cart-head__count {
    font-size: 13.5px;
    color: #8A949C;
}

.vk-cart-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(21, 43, 57, .06);
    padding: 8px 24px 14px;
}

/* ---- items table ---- */
.vk-cart-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.vk-cart-table th {
    padding: 14px 10px;
    border-bottom: 1px solid #E6E8EA;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8A949C;
    white-space: nowrap;
}

.vk-cart-table td {
    padding: 16px 10px;
    border-top: 1px solid #F0F2F4;
    vertical-align: middle;
    font-size: 14px;
    color: #31404B;
}

.vk-cart-table tbody tr:first-child td {
    border-top: 0;
}

.vk-cart-col--thumb {
    width: 92px;
    padding-left: 0 !important;
}

.vk-cart-col--price,
.vk-cart-col--total {
    text-align: right;
    white-space: nowrap;
}

.vk-cart-col--qty {
    width: 130px;
}

.vk-cart-col--remove {
    width: 42px;
    text-align: right;
    padding-right: 0 !important;
}

.vk-cart-thumb {
    display: block;
    width: 72px;
    height: 72px;
    border: 1px solid #EDEFF1;
    border-radius: 8px;
    overflow: hidden;
    background: #FAFBFC;
}

.vk-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vk-cart-name {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: #152B39;
    line-height: 1.45;
}

.vk-cart-name:hover {
    color: #B58A46;
    text-decoration: none;
}

.vk-cart-meta {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    color: #8A949C;
    line-height: 1.6;
}

.vk-cart-meta__i {
    display: block;
}

/* Phones fold the price onto the meta line and hide the price column, so
   this copy of it only shows up under 768px. */
.vk-cart-meta__price {
    display: none;
}

.vk-cart-amount {
    font-weight: 600;
    color: #152B39;
}

.vk-cart-unit {
    font-weight: 400;
    color: #8A949C;
}

.vk-cart-oos {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    background: #FDECEC;
    color: #B32424;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* ---- quantity stepper ---- */
.vk-cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #E1E4E7;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.vk-cart-qty__btn {
    width: 32px;
    height: 34px;
    padding: 0;
    border: 0;
    background: #FAFBFC;
    color: #152B39;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.vk-cart-qty__btn:hover {
    background: #F1F3F5;
    color: #B58A46;
}

.vk-cart-qty__btn:focus {
    outline: none;
}

.vk-cart-qty__input {
    width: 46px;
    height: 34px;
    border: 0;
    border-left: 1px solid #EDEFF1;
    border-right: 1px solid #EDEFF1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #152B39;
    background: #fff;
}

.vk-cart-qty__input:focus {
    outline: none;
    background: #FBF7F1;
}

/* ---- remove ---- */
.vk-cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #A9B2B9;
    font-size: 13px;
    cursor: pointer;
}

.vk-cart-remove:hover {
    background: #FDF4F4;
    color: #B3413F;
    text-decoration: none;
}

/* ---- summary ---- */
.vk-cart-summary {
    padding: 22px 24px 24px;
    position: sticky;
    top: 90px;
}

.vk-cart-summary__title {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: #152B39;
}

.vk-cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 15px;
    border-top: 1px solid #E6E8EA;
    margin-bottom: 20px;
}

.vk-cart-summary__k {
    font-size: 14.5px;
    font-weight: 600;
    color: #152B39;
}

.vk-cart-summary__v {
    font-size: 20px;
    font-weight: 700;
    color: #152B39;
}

.vk-cart-btn {
    display: block;
    width: 100%;
    padding: 12px 18px;
    border-radius: 6px;
    text-align: center;
    font-size: 14.5px;
    font-weight: 600;
    border: 1px solid transparent;
}

.vk-cart-btn--primary {
    background: #152B39;
    color: #fff;
}

.vk-cart-btn--primary:hover {
    background: #B58A46;
    color: #fff;
    text-decoration: none;
}

.vk-cart-btn--ghost {
    background: #fff;
    border-color: #E1E4E7;
    color: #152B39;
    margin-top: 10px;
}

.vk-cart-btn--ghost:hover {
    border-color: #D8C29B;
    background: #FBF7F1;
    color: #152B39;
    text-decoration: none;
}

.vk-cart-warn {
    margin: 0;
    padding: 11px 13px;
    background: #FDF4F4;
    border-left: 3px solid #D95C5C;
    border-radius: 0 6px 6px 0;
    font-size: 13.5px;
    color: #8A3535;
}

/* ---- empty state ---- */
.vk-cart-empty {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(21, 43, 57, .06);
    text-align: center;
    padding: 56px 20px 50px;
}

.vk-cart-empty i {
    font-size: 44px;
    color: #D3D9DE;
}

.vk-cart-empty__title {
    margin: 16px 0 6px;
    font-size: 16.5px;
    font-weight: 600;
    color: #152B39;
}

.vk-cart-empty__text {
    margin: 0 0 20px;
    font-size: 14px;
    color: #8A949C;
}

.vk-cart-empty__btn {
    display: inline-block;
    padding: 12px 26px;
    background: #152B39;
    color: #fff;
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 600;
}

.vk-cart-empty__btn:hover {
    background: #B58A46;
    color: #fff;
    text-decoration: none;
}

.vk-cart-label {
    display: none;
}

/* ---- mobile ----
   The <tr> is kept (view-cart.js walks up with closest('tr')) but laid out as
   a grid: the thumbnail spans the row, MOQ and price share the meta line, and
   the stepper sits opposite the row total.

       [img]  Name                        x
       [img]  MOQ : 1   Rs 14 / Pcs
       [img]  [- 4 +]                Rs 56
*/
@media (max-width: 767px) {
    .vk-cart-page {
        padding: 18px 0 34px;
    }

    .vk-cart-card {
        padding: 4px 14px 8px;
    }

    .vk-cart-table thead {
        display: none;
    }

    .vk-cart-table,
    .vk-cart-table tbody {
        display: block;
        width: 100%;
    }

    .vk-cart-table tr {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb name remove"
            "thumb qty  total";
        column-gap: 12px;
        row-gap: 6px;
        align-content: start;
        padding: 10px 0;
        border-top: 1px solid #F0F2F4;
    }

    .vk-cart-table tbody tr:first-child {
        border-top: 0;
    }

    .vk-cart-table td {
        display: block;
        width: auto;
        padding: 0 !important;
        border-top: 0;
    }

    .vk-cart-col--thumb {
        grid-area: thumb;
        width: 64px;
        align-self: center;
    }

    .vk-cart-thumb {
        width: 64px;
        height: 64px;
    }

    .vk-cart-col--name {
        grid-area: name;
        align-self: start;
    }

    /* folded into the meta line above */
    .vk-cart-col--price {
        display: none;
    }

    .vk-cart-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0 10px;
        margin-top: 1px;
        font-size: 12px;
    }

    .vk-cart-meta__i,
    .vk-cart-meta__price {
        display: inline;
    }

    .vk-cart-col--qty {
        grid-area: qty;
        align-self: center;
    }

    .vk-cart-col--total {
        grid-area: total;
        text-align: right;
        align-self: center;
    }

    .vk-cart-col--remove {
        grid-area: remove;
        text-align: right;
        align-self: start;
    }

    .vk-cart-name {
        font-size: 13.5px;
    }

    /* The stepper and the amount opposite it need no captions. */
    .vk-cart-amount {
        font-size: 14.5px;
    }

    .vk-cart-qty__btn {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    .vk-cart-qty__input {
        width: 38px;
        height: 28px;
        font-size: 13.5px;
    }

    .vk-cart-summary {
        position: static;
        margin-top: 16px;
    }
}
