@media (min-width: 992px) {
  .cart-sidebar {
    position: sticky;
    top: 2rem;   /* adjust to match your header/nav height */
  }
}

/* Sticky on md+ (>=768px) */
@media (min-width: 768px) {
  .cart-summary-sticky {
    position: sticky;
    top: 100px;    /* adjust to match your header height */
  }
}


.cart-subtotal {display:none;}

/* Cart Checkout Button */
.wc-proceed-to-checkout {padding:0px!important;}
.checkout-button.button.alt.wc-forward {margin:0px!important;}
/* Cart Checkout Button */


.cross-sells .card { padding:0px!important;}




.woocommerce-cart-form .qty-input {
    width: 70px;
    height: 45px;
    font-size: 1rem;
    text-align: center;
    padding: 6px 10px;
    border-radius: 5px;
}

.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals {
    float: right;
    width: 100%;
}

.cart_totals h2 {
    display: none!important;
}


.alert-warning {
    background-color:var(--wp--preset--color--primary)!important;
    border-color:none!important;
    color:white!important;
}

/* Cart Table Styling (no longer used for grid layout, but kept in case) */
.shop_table.cart {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Table Headers */
.shop_table.cart thead th {
    background-color: var(--wp--preset--color--primary, #343a40);
    color: #fff;
    text-align: left;
    font-weight: 600;
    padding: 14px 18px;
    border-bottom: 2px solid #dee2e6;
}

/* Table Cells */
.shop_table.cart td {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    background-color: #fff;
}

/* Last Row Fix */
.shop_table.cart tr:last-child td {
    border-bottom: none;
}

/* Remove Button */
.shop_table.cart .btn-outline-danger {
    border: 0px solid #dc3545;
    color: #dc3545;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.2s ease-in-out;
}

.shop_table.cart .btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Product Image */
.shop_table.cart .product-thumbnail img {
    border-radius: 6px;
    width: 60px;
    height: auto;
    object-fit: cover;
}

/* Quantity Input */
.woocommerce-cart-form .qty-input {
    width: 60px;
    height: 40px;
    font-size: 1rem;
    text-align: center;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: all 0.2s ease-in-out;
    box-shadow: none;
    margin: 0 0.5rem;
}

.woocommerce-cart-form .qty-input:focus {
    border-color: var(--wp--preset--color--secondary);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Table Responsiveness */
@media (max-width: 768px) {
    .shop_table.cart thead {
        display: none;
    }

    .shop_table.cart, 
    .shop_table.cart tbody, 
    .shop_table.cart tr, 
    .shop_table.cart td {
        display: block;
        width: 100%;
    }

    .shop_table.cart tr {
        margin-bottom: 1.5rem;
        border: 1px solid #f0f0f0;
        border-radius: 8px;
        padding: 1rem;
        background: #fff;
    }

    .shop_table.cart td::before {
        content: attr(data-title);
        display: block;
        font-weight: 600;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }

    .shop_table.cart td {
        padding: 0.5rem 0;
        border: none;
    }
}


/* SIDECART */

.offcanvas-backdrop {
  background-color: transparent !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Make the body a column flex container; let .cart-wrapper scroll */
#custom-cart-sidebar .offcanvas-body {
  display: flex;
  flex-direction: column;
}

/* The item list grows to fill available space and scrolls if too tall */
#custom-cart-sidebar .cart-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
}

/* Ensure the footer stays pinned at the bottom */
#custom-cart-sidebar .cart-footer {
  flex-shrink: 0;
  background-color: #fff; /* match your offcanvas background */
}

/* Hide scrollbar in the cart-items wrapper */
#custom-cart-sidebar .cart-wrapper {
  overflow-y: auto;               /* keep scrolling */
  -ms-overflow-style: none;       /* IE and Edge */
  scrollbar-width: none;          /* Firefox */
}
#custom-cart-sidebar .cart-wrapper::-webkit-scrollbar {
  display: none;                  /* Chrome, Safari, Opera */
}

/* ==== GRID LAYOUT STYLES ==== */
.woocommerce-cart-form .cart-grid .card {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  height: 100%;
}

.woocommerce-cart-form .cart-grid .card .card-body {
  display: flex;
  flex-direction: column;
}

.woocommerce-cart-form .cart-grid .card .card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.woocommerce-cart-form .cart-grid .card .card-text {
  margin-bottom: 1rem;
}

.woocommerce-cart-form .cart-grid .card .input-group .btn {
  padding: 0.25rem 0.5rem;
}

.woocommerce-cart-form .cart-grid .remove-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #dc3545;
}

.woocommerce-cart-form .cart-grid .remove-button:hover {
  color: #a71d2a;
}

.woocommerce-cart-form .update-reminder {
  width: 100%;
  margin-bottom: 1rem;
  text-align: center;
}




/* Cart Summary Border Removal */
.shop_table {
  border:unset!important;
}






/* START: - + PRODUCT CART */
/* Stretch the qty adjuster to full width */
.qty-adjuster {
  display: flex !important;
  width: 100% !important;
}

/* Buttons stay a fixed width */
.qty-adjuster .qty-btn {
  flex: 0 0 3rem;      /* change 3rem to whatever fixed width you like */
}

/* Input grows to fill whatever’s left */
.qty-adjuster .qty-input {
  flex: 1 1 auto;
  width: auto;         /* override the old fixed width */
}

/* 1. Flex container + pill shape */
.qty-adjuster {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  overflow: hidden;
}
/* 2. Hide native number input arrows */
.qty-adjuster .qty-input::-webkit-outer-spin-button,
.qty-adjuster .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-adjuster .qty-input {
  -moz-appearance: textfield;
  width: 3.5rem;
  border: none;
  padding: 0.25rem 0;
  margin: 0;
}
/* 3. Style the +/- buttons */
.qty-adjuster .qty-btn {
  border: none;
  border-radius: 0;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s;
}
.qty-adjuster .qty-btn:hover,
.qty-adjuster .qty-btn:focus {
  background-color: #f0f0f0;
}
/* 4. Dividers between input and buttons */
.qty-adjuster .qty-btn:first-child {
  border-right: 1px solid #ddd;
}
.qty-adjuster .qty-btn:last-child {
  border-left: 1px solid #ddd;
}
/* END: - + PRODUCT CART */