/*** WooCommerce Cart Page Override ***/
/* =========================================================
   International Implant Institute - WooCommerce Cart Styling

   Theme:
   Primary: #e14c2b
   Hover: #c7482c
   Pale primary: #fdf1ee
   Border: #eeeeee
   Radius: 10px

   Notes:
   - Does NOT hide breadcrumbs
   - Does NOT style page titles
========================================================= */


/* =========================================================
   Cart Page Layout
========================================================= */

body.woocommerce-cart {
    background: #ffffff !important;
}

body.woocommerce-cart .site-content,
body.woocommerce-cart .content-area,
body.woocommerce-cart .site-main,
body.woocommerce-cart .entry-content,
body.woocommerce-cart .entry-content > .woocommerce {
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.woocommerce-cart .entry-content {
    padding: 2rem 1rem 4rem;
}


/* =========================================================
   Notices / Messages
========================================================= */

body.woocommerce-cart .entry-content .woocommerce-message,
body.woocommerce-cart .entry-content .woocommerce-error,
body.woocommerce-cart .entry-content .woocommerce-info {
    max-width: 1240px !important;
    width: 100% !important;
    border: 0 !important;
    border-top: 4px solid #e14c2b !important;
    box-shadow: none !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #1f1720 !important;
    padding: 0.95rem 1rem !important;
    font-size: 1rem !important;
    line-height: 1.45 !important;
}

body.woocommerce-cart .entry-content .woocommerce-message::before,
body.woocommerce-cart .entry-content .woocommerce-error::before,
body.woocommerce-cart .entry-content .woocommerce-info::before {
    color: #e14c2b !important;
}


/* =========================================================
   Main Cart Layout
========================================================= */

body.woocommerce-cart .woocommerce-cart-form {
    float: left !important;
    width: calc(68% - 1rem) !important;
    margin-right: 2rem !important;
}

body.woocommerce-cart .cart-collaterals {
    float: right !important;
    width: calc(32% - 1rem) !important;
}

body.woocommerce-cart .cart-collaterals::after,
body.woocommerce-cart .woocommerce::after {
    content: "";
    display: block;
    clear: both;
}


/* =========================================================
   Cart Table Card
   Clean table, soft header, no thick borders
========================================================= */

body.woocommerce-cart .woocommerce-cart-form table.shop_table {
    width: 100%;
    background: #ffffff;
    border: 1px solid #eeeeee !important;
    border-radius: 10px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(31, 23, 32, 0.06);
}

/* Header: pale primary background */
body.woocommerce-cart .woocommerce-cart-form table.shop_table thead th {
    background: #fdf1ee !important;
    color: #1f1720;
    border: 0 !important;
    border-bottom: 1px solid #f3d6cf !important;
    padding: 0.95rem 1rem !important;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

/* Body cells: no thick grid */
body.woocommerce-cart .woocommerce-cart-form table.shop_table tbody th,
body.woocommerce-cart .woocommerce-cart-form table.shop_table tbody td {
    background: #ffffff;
    border: 0 !important;
    border-bottom: 1px solid #eeeeee !important;
    padding: 1rem !important;
    color: #1f1720;
    font-size: 1rem;
    line-height: 1.45;
    vertical-align: middle;
}

/* Remove final product/action border where appropriate */
body.woocommerce-cart .woocommerce-cart-form table.shop_table tbody tr:last-child td {
    border-bottom: 0 !important;
}

/* Remove theme/WooCommerce vertical borders */
body.woocommerce-cart .woocommerce-cart-form table.shop_table th,
body.woocommerce-cart .woocommerce-cart-form table.shop_table td {
    border-left: 0 !important;
    border-right: 0 !important;
}

/* Subtle row hover */
body.woocommerce-cart .woocommerce-cart-form table.shop_table tbody tr.cart_item:hover td {
    background: #fffaf8;
}


/* =========================================================
   Product Thumbnail / Product Name
========================================================= */

body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-thumbnail img {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover;
    border-radius: 10px;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-name a,
body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-name a:visited {
    color: #1f1720 !important;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-name a:hover {
    color: #e14c2b !important;
}


/* =========================================================
   Remove Product Button
========================================================= */

body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-remove a.remove,
body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-remove a.remove:visited {
    width: 30px;
    height: 30px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: #e14c2b !important;
    border: 1px solid #eeeeee;
    border-radius: 999px;
    font-size: 1.35rem !important;
    font-weight: 800;
    line-height: 1 !important;
    text-decoration: none !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-remove a.remove:hover {
    background: #e14c2b !important;
    color: #ffffff !important;
    border-color: #e14c2b;
}


/* =========================================================
   Quantity Field
========================================================= */

body.woocommerce-cart .woocommerce-cart-form table.shop_table .quantity input.qty {
    width: 76px !important;
    min-height: 44px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    color: #1f1720;
    font-size: 1rem !important;
    line-height: 1.35;
    padding: 0.55rem 0.65rem;
    text-align: center;
    box-shadow: none;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table .quantity input.qty:focus {
    border-color: #e14c2b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 76, 43, 0.13);
}


/* =========================================================
   Cart Actions / Coupon Area
========================================================= */

body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions {
    background: #ffffff !important;
    border: 0 !important;
    border-top: 1px solid #eeeeee !important;
    padding: 1rem !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions .coupon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    float: left;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions .coupon label {
    display: none !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions .coupon .input-text {
    width: 260px !important;
    min-height: 44px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    color: #1f1720;
    font-size: 1rem !important;
    line-height: 1.35;
    padding: 0.65rem 0.8rem;
    box-shadow: none;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions .coupon .input-text:focus {
    border-color: #e14c2b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 76, 43, 0.13);
}


/* =========================================================
   Cart Totals Card
========================================================= */

body.woocommerce-cart .cart-collaterals .cart_totals {
    float: none !important;
    width: 100% !important;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(31, 23, 32, 0.06);
}

body.woocommerce-cart .cart-collaterals .cart_totals h2 {
    color: #1f1720;
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 800;
    position: relative;
    padding-bottom: 0.85rem;
    margin: 0 0 1.35rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

body.woocommerce-cart .cart-collaterals .cart_totals h2::after {
    content: "";
    width: 44px;
    height: 3px;
    background: #e14c2b;
    border-radius: 999px;
    position: absolute;
    left: 0;
    bottom: 0;
}


/* =========================================================
   Cart Totals Table
   Clean table, no thick borders
========================================================= */

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table {
    width: 100%;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 0 1.25rem;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table th,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table td {
    border: 0 !important;
    border-bottom: 1px solid #eeeeee !important;
    color: #1f1720;
    font-size: 1rem;
    padding: 0.95rem 0 !important;
    vertical-align: top;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr:last-child th,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr:last-child td {
    border-bottom: 0 !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals .order-total th,
body.woocommerce-cart .cart-collaterals .cart_totals .order-total td {
    font-size: 1.15rem;
    font-weight: 900;
}

body.woocommerce-cart .cart-collaterals .cart_totals .order-total .amount {
    color: #e14c2b;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .cart-subtotal td,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total td {
    text-align: right !important;
}


/* =========================================================
   Buttons
========================================================= */

body.woocommerce-cart .entry-content .woocommerce a.button,
body.woocommerce-cart .entry-content .woocommerce a.button:visited,
body.woocommerce-cart .entry-content .woocommerce button.button,
body.woocommerce-cart .entry-content .woocommerce input.button,
body.woocommerce-cart .entry-content .woocommerce .checkout-button,
body.woocommerce-cart .entry-content .woocommerce .checkout-button:visited,
body.woocommerce-cart .return-to-shop a.button,
body.woocommerce-cart .return-to-shop a.button:visited {
    background: #e14c2b !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 10px !important;
    padding: 0.9rem 1.4rem !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none !important;
    box-shadow: 0 10px 22px rgba(225, 76, 43, 0.22);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

body.woocommerce-cart .entry-content .woocommerce a.button:hover,
body.woocommerce-cart .entry-content .woocommerce button.button:hover,
body.woocommerce-cart .entry-content .woocommerce input.button:hover,
body.woocommerce-cart .entry-content .woocommerce .checkout-button:hover,
body.woocommerce-cart .return-to-shop a.button:hover {
    background: #c7482c !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(199, 72, 44, 0.22);
}

body.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout {
    padding: 0;
}

body.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout a.checkout-button {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Secondary buttons: Apply Coupon / Update Cart */
body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions button.button,
body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions input.button {
    background: #ffffff !important;
    color: #e14c2b !important;
    border: 1px solid #e14c2b !important;
    box-shadow: none !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions button.button:hover,
body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions input.button:hover {
    background: #e14c2b !important;
    color: #ffffff !important;
}


/* Disabled Update Cart */
body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions button.button:disabled,
body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions button.button:disabled[disabled],
body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions input.button:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed;
}


/* =========================================================
   Empty Cart / Zero Items Template
========================================================= */

body.woocommerce-cart .wc-empty-cart-message {
    max-width: 1240px !important;
    width: 100% !important;
    margin: 0 auto 1rem;
}

body.woocommerce-cart .cart-empty.woocommerce-info {
    max-width: 1240px !important;
    width: 100% !important;
    margin: 0 auto 1.25rem !important;
    text-align: center;
    /* background: transparent !important; */
    /* border: 1px solid #eeeeee !important; */
    border-top: 4px solid #e14c2b !important;
    /* border-radius: 10px !important; */
    padding: 2.25rem 1.5rem !important;
    color: #1f1720 !important;
    font-size: 1.15rem !important;
    font-weight: 800;
    flex-direction: row !important;
    justify-content: space-between !important;
    /* box-shadow: 0 12px 32px rgba(31, 23, 32, 0.06) !important; */
}

body.woocommerce-cart .cart-empty.woocommerce-info::before {
    position: static !important;
    display: block !important;
    margin: 0 auto 1rem !important;
    color: #e14c2b !important;
    font-size: 2rem !important;
    line-height: 1 !important;
}

body.woocommerce-cart .return-to-shop {
    max-width: 1240px !important;
    margin: 0 auto;
    text-align: center;
}

body.woocommerce-cart .return-to-shop a.button,
body.woocommerce-cart .return-to-shop a.button:visited {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   Cart Links
========================================================= */

body.woocommerce-cart .entry-content .woocommerce a,
body.woocommerce-cart .entry-content .woocommerce a:visited {
    color: #e14c2b;
}

body.woocommerce-cart .entry-content .woocommerce a:hover {
    color: #c7482c;
}

/* Keep button links white after general link rule */
body.woocommerce-cart .entry-content .woocommerce a.button,
body.woocommerce-cart .entry-content .woocommerce a.button:visited,
body.woocommerce-cart .entry-content .woocommerce .checkout-button,
body.woocommerce-cart .entry-content .woocommerce .checkout-button:visited,
body.woocommerce-cart .return-to-shop a.button,
body.woocommerce-cart .return-to-shop a.button:visited {
    color: #ffffff !important;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 960px) {
    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
    }

    body.woocommerce-cart .woocommerce-cart-form {
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tr,
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tbody tr {
        border-bottom: 1px solid #eeeeee !important;
        padding: 0.75rem 0;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tr td,
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tbody tr td {
        display: block !important;
        text-align: right !important;
        border-top: 0 !important;
        border-bottom: 0 !important;
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tr td::before {
        color: #1f1720;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 0.8rem;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive .product-thumbnail {
        display: block !important;
        text-align: center !important;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive .product-thumbnail::before {
        display: none !important;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive .product-thumbnail img {
        margin: 0 auto;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive .product-name {
        text-align: left !important;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive .product-name::before {
        display: none !important;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions {
        display: block !important;
        text-align: left !important;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions::before {
        display: none !important;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions .coupon {
        float: none !important;
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions .coupon .input-text,
    body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions .coupon button.button,
    body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions > button.button,
    body.woocommerce-cart .woocommerce-cart-form table.shop_table td.actions > input.button {
        width: 100% !important;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 640px) {
    body.woocommerce-cart .entry-content {
        padding: 1rem 0.75rem 3rem;
    }

    body.woocommerce-cart .cart-collaterals .cart_totals {
        padding: 1.25rem;
    }

    body.woocommerce-cart .cart-collaterals .cart_totals h2 {
        font-size: 1.15rem;
    }

    body.woocommerce-cart .cart-empty.woocommerce-info {
        padding: 2rem 1rem !important;
        font-size: 1rem !important;
    }

    body.woocommerce-cart .entry-content .woocommerce a.button,
    body.woocommerce-cart .entry-content .woocommerce button.button,
    body.woocommerce-cart .entry-content .woocommerce input.button,
    body.woocommerce-cart .entry-content .woocommerce .checkout-button,
    body.woocommerce-cart .return-to-shop a.button {
        width: 100%;
        text-align: center;
    }
}
