/********************* CART PAGE *********************/

#center.center_o {
  background: #f7fbf8;
  padding: 55px 0 !important;
}

#center h1 {
  font-size: 38px;
  font-weight: 800;
  color: #111;
}

#cart {
  background: #fff !important;
  padding: 60px 0 !important;
  overflow: visible !important;
}

#cart .container-fluid {
  max-width: 1200px;
  overflow: visible !important;
}

/* MAIN CART LAYOUT */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
  overflow: visible !important;
}

.cart-products {
  width: 100%;
}

/* STICKY ORDER SUMMARY */
.cart-summary {
  position: sticky !important;
  top: 250px !important;
  align-self: start !important;
  height: fit-content !important;
  z-index: 20 !important;
}

/* TABLE */
#cart .table-responsive {
  overflow: visible !important;
}

#cart table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

#cart table tr {
  border-bottom: 1px solid #eeeeee !important;
}

#cart table tr:first-child {
  background: #99CB4C !important;
}

#cart table tr:first-child td {
  background: #99CB4C !important;
  color: #111 !important;
  font-size: 14px;
  font-weight: 700;
  padding: 15px 18px !important;
}

#cart table tr:first-child td:first-child {
  border-radius: 10px 0 0 10px;
}

#cart table tr:first-child td:last-child {
  border-radius: 0 10px 10px 0;
}

#cart table td {
  padding: 22px 18px !important;
  vertical-align: middle !important;
  background: #fff !important;
  border: none !important;
}

/* PRODUCT IMAGE */
#cart img {
  width: 75px !important;
  height: 65px !important;
  object-fit: contain !important;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 5px;
  background: #fff;
}

/* PRODUCT TEXT */
#cart h5 {
  font-size: 15px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  color: #111 !important;
}

#cart h5 a {
  color: #111 !important;
  text-decoration: none !important;
}

#cart p {
  font-size: 13px !important;
  color: #777 !important;
  margin-bottom: 0 !important;
}

/* QUANTITY CONTROLS */
.cart-page-controls {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #eeeeee;
  border-radius: 22px;
  overflow: hidden;
  gap: 0 !important;
  background: #fff;
}

.cart-page-controls button {
  width: 34px !important;
  height: 34px !important;
  background: #fff !important;
  color: #111 !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
}

.cart-page-controls span {
  width: 38px;
  text-align: center;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #111;
}

/* REMOVE BUTTON */
.cart-page-remove {
  width: 34px !important;
  height: 34px !important;
  background: transparent !important;
  color: #111 !important;
  border: none !important;
  font-size: 15px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
}

.cart-page-remove i {
  color: #111 !important;
}

/* CART ACTIONS */
.cart-actions {
  display: flex;
  justify-content: flex-end !important;
  align-items: center;
  margin-top: 25px;
}

.clear-cart-link {
  color: #0f8f5f !important;
  text-decoration: underline !important;
  font-size: 14px;
  font-weight: 600;
}

/* REMOVE COUPON */
.coupon-box,
.cart_2l,
.cart_2l input,
.cart_2l button {
  display: none !important;
}

/* ORDER SUMMARY */
.cart_2r {
  background: #fff !important;
  border: 1px solid #eeeeee !important;
  border-radius: 6px !important;
  padding: 28px !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.cart_2r h5 {
  font-size: 20px;
  font-weight: 800;
  color: #111;
  margin-bottom: 18px;
}

.cart_2r hr {
  border-color: #eeeeee;
  opacity: 1;
  margin: 16px 0;
}

.cart_2r h6,
.cart_2r h4 {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  margin-bottom: 16px !important;
  color: #666 !important;
  font-weight: 400 !important;
}

.cart_2r h6 {
  font-size: 15px !important;
}

.cart_2r h4 {
  font-size: 18px !important;
  color: #111 !important;
  margin-top: 15px !important;
}

.cart_2r span {
  color: #111 !important;
  font-weight: 800 !important;
}

/* CHECKOUT BUTTON */
.checkout-btn,
.cart_2rir .button {
  width: 100% !important;
  height: 46px !important;
  min-width: 100% !important;
  padding: 0 24px !important;
  background: #0f8f5f !important;
  color: #fff !important;
  border-radius: 24px !important;
  border: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-decoration: none !important;
  margin-top: 22px !important;
}

.checkout-btn:hover,
.cart_2rir .button:hover {
  background: #0b754e !important;
  color: #fff !important;
}

/* CART COUNT */
#header #cart-count {
  position: absolute !important;
  top: -14px !important;
  right: -12px !important;
  background: #149253 !important;
  color: #fff !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}


@media (max-width: 767px) {

  .cart-products {
    background: #fff;
    border-radius: 24px;
    padding: 12px !important;
    overflow: hidden !important;
  }

  #cart table,
  #cart tbody {
    display: block !important;
    width: 100% !important;
  }

  #cart tr:first-child {
    display: none !important;
  }

  #cart tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 58px 70px 22px;
    align-items: center;
    gap: 2px;
    padding: 13px 0 !important;
    border-bottom: 1px solid #eee !important;
  }

  #cart td {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    min-width: 0 !important;
  }

  #cart td:first-child {
    display: grid !important;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
  }

  #cart td:first-child img {
    float: none !important;
    width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    object-fit: cover !important;
    border-radius: 12px;
    padding: 4px;
    background: #f6f6f6;
  }

  #cart td:first-child h5 {
    font-size: 14px !important;
    font-weight: 700;
    margin: 0 !important;
    white-space: nowrap;
  }

  #cart td:first-child p {
    font-size: 11px;
    margin: 2px 0 0 !important;
    line-height: 1.15;
  }

  #cart td:nth-child(3) {
    display: none !important;
  }

  .cart-page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  .cart-page-controls button {
    width: auto !important;
    height: auto !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    font-size: 18px;
    font-weight: 600;
    padding: 0 3px !important;
  }

  .cart-page-controls span {
    font-size: 14px;
    font-weight: 800;
  }

  #cart td:nth-child(4) h6 {
    font-size: 16px;
    font-weight: 900;
    margin: 0 !important;
    white-space: nowrap;
  }

  .cart-page-remove {
    border: none !important;
    background: transparent !important;
    font-size: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .cart-layout {
    display: block !important;
  }

  .cart-summary {
    position: static !important;
    width: 100% !important;
    margin-top: 22px !important;
  }

    #cart td:first-child p {
    display: none !important;
  }

  #cart td:first-child {
    grid-template-columns: 58px 1fr !important;
  }

  #cart td:first-child h5 {
    align-self: center;
  }

    .cart-products {
    padding: 10px !important;
    width: 100% !important;
  }

  #cart tr {
    grid-template-columns: minmax(0, 1fr) 48px 62px 16px !important;
    gap: 4px !important;
  }

  #cart td:first-child {
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  #cart td:first-child img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    padding: 3px !important;
  }

  #cart td:first-child h5 {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .cart-page-controls {
    gap: 4px !important;
  }

  .cart-page-controls button {
    font-size: 15px !important;
    padding: 0 2px !important;
  }

  .cart-page-controls span {
    font-size: 13px !important;
  }

  #cart td:nth-child(4) h6 {
    font-size: 14px !important;
  }

  .cart-page-remove {
    font-size: 13px !important;
  }
}

@media (max-width: 767px) {

  #cart .container-fluid {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .cart-products {
    overflow: visible !important;
  }

  #cart table,
  #cart tbody,
  #cart tr {
    width: 100% !important;
    max-width: 100% !important;
  }

  #cart tr {
    grid-template-columns: 46% 24% 22% 8% !important;
    overflow: visible !important;
  }

  #cart td {
    overflow: visible !important;
  }

  #cart td:first-child {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }

  #cart td:first-child img {
    width: 38px !important;
    height: 38px !important;
  }

  #cart td:first-child h5 {
    font-size: 12px !important;
  }

  .cart-page-controls {
    width: 100% !important;
    justify-content: center !important;
    gap: 2px !important;
  }

  .cart-page-controls button,
  .cart-page-controls span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 12px !important;
    font-size: 13px !important;
    padding: 0 1px !important;
  }

  #cart td:nth-child(4) h6 {
    font-size: 13px !important;
  }

  #cart td:nth-child(5) {
    text-align: right !important;
  }

  .cart-page-remove {
    display: inline-flex !important;
    font-size: 12px !important;
  }
}

@media (max-width: 767px) {

  .cart-products {
    padding: 4px 6px !important;
  }

  #cart tr {
    grid-template-columns: 45% 18% 23% 6% !important;
    padding: 9px 0 !important;
  }

  #cart td:first-child {
    grid-template-columns: 36px 1fr !important;
    gap: 4px !important;
  }

  #cart td:first-child img {
    width: 32px !important;
    height: 32px !important;
  }

  #cart td:first-child h5 {
    font-size: 12px !important;
  }

  .cart-page-controls {
    gap: 1px !important;
   
  }

  .cart-page-controls button {
    font-size: 12px !important;
    padding: 2px 1px !important;
    
  }

  .cart-page-controls span {
    font-size: 12px !important;
  }

  #cart td:nth-child(4) h6 {
    font-size: 12px !important;
  }

  .cart-page-remove {
    font-size: 11px !important;
  }
  

    #cart tr {
    grid-template-columns: 44% 18% 24% 8% !important;
    padding: 12px 0 !important;
  }

  #cart td:first-child {
    grid-template-columns: 38px 1fr !important;
    gap: 7px !important;
  }

  #cart td:first-child img {
    width: 34px !important;
    height: 34px !important;
  }

  #cart td:first-child h5 {
    font-size: 12.5px !important;
  }

  .cart-page-controls {
    gap: 3px !important;
  }

  .cart-page-controls button,
  .cart-page-controls span {
    font-size: 12px !important;
  }

  #cart td:nth-child(4) h6 {
    font-size: 13px !important;
  }

  .cart-page-remove {
    font-size: 12px !important;
  }
}

@media (max-width: 767px) {

  .cart-page-controls {
    gap: 6px !important;
  }

  .cart-page-controls button {
    color: #000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  .cart-page-controls span {
    color: #000 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  #cart tr {
    grid-template-columns: 40% 24% 23% 10% !important;
  }
}

/* =========================
   MOBILE CART FIX
========================= */
@media (max-width: 767px) {

  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  #cart {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }

  #cart .container,
  #cart .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  .cart-layout {
    display: block !important;
    width: 100% !important;
  }

  .cart-products {
    width: 100% !important;
    background: #fff;
    border-radius: 22px;
    padding: 14px 12px !important;
    overflow: hidden !important;
    box-sizing: border-box;
  }

  #cart table,
  #cart tbody {
    display: block !important;
    width: 100% !important;
  }

  #cart tr:first-child {
    display: none !important;
  }

  #cart tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 64px 70px 24px !important;
    align-items: center;
    gap: 6px !important;
    width: 100% !important;
    padding: 14px 0 !important;
    border-bottom: 1px solid #eee !important;
  }

  #cart td {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    min-width: 0 !important;
    overflow: hidden;
  }

  #cart td:first-child {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    align-items: center;
    gap: 8px !important;
  }

  #cart td:first-child img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 10px;
    padding: 3px;
    background: #f6f6f6;
    margin: 0 !important;
  }

  #cart td:first-child h5 {
    font-size: 13px !important;
    font-weight: 700;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #cart td:first-child p,
  #cart td:nth-child(3) {
    display: none !important;
  }

  .cart-page-controls {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px !important;
    width: 100%;
  }

  .cart-page-controls button {
    border: none !important;
    background: transparent !important;
    color: #000 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    padding: 0 2px !important;
    line-height: 1 !important;
  }

  .cart-page-controls span {
    color: #000 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  #cart td:nth-child(4) h6 {
    font-size: 13px !important;
    font-weight: 900;
    margin: 0 !important;
    white-space: nowrap;
  }

  #cart td:nth-child(5) {
    text-align: right !important;
  }

  .cart-page-remove {
    border: none !important;
    background: transparent !important;
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #000 !important;
  }

  .cart-summary {
    position: static !important;
    width: 100% !important;
    margin-top: 22px !important;
  }
}

/* =========================
   FINAL MOBILE CART FIX
========================= */
@media (max-width: 767px) {

  html,
  body {
    overflow-x: hidden !important;
  }

  #cart {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }

  #cart .container,
  #cart .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  .cart-layout {
    display: block !important;
    width: 100% !important;
  }

  .cart-products {
    width: 100% !important;
    padding: 14px 10px !important;
    border-radius: 22px !important;
    background: #fff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #cart table,
  #cart tbody {
    display: block !important;
    width: 100% !important;
  }

  #cart tr:first-child {
    display: none !important;
  }

  #cart tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 56px 66px 26px !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 18px 8px !important;
    border-bottom: 1px solid #eee !important;
    box-sizing: border-box !important;
  }

  #cart td {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  /* Product image + name */
  #cart td:first-child {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    order: 1 !important;
  }

  #cart td:first-child img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    padding: 3px !important;
    background: #f6f6f6 !important;
    margin: 0 !important;
  }

  #cart td:first-child h5 {
    font-size: 13px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #cart td:first-child p {
    display: none !important;
  }

  /* Hide unit price column */
  #cart td:nth-child(3) {
    display: none !important;
  }

  /* Quantity */
  #cart td:nth-child(2) {
    order: 2 !important;
    overflow: visible !important;
  }

  .cart-page-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .cart-page-controls button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    color: #000 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    padding: 0 2px !important;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .cart-page-controls span {
    color: #000 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    min-width: 10px !important;
    text-align: center !important;
  }

  /* Price */
  #cart td:nth-child(4) {
    order: 3 !important;
  }

  #cart td:nth-child(4) h6 {
    font-size: 13px !important;
    font-weight: 900 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    text-align: right !important;
  }

  /* Delete */
  #cart td:nth-child(5) {
    order: 4 !important;
    text-align: right !important;
    overflow: visible !important;
  }

  .cart-page-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    color: #000 !important;
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .cart-summary {
    position: static !important;
    width: 100% !important;
    margin-top: 22px !important;
  }
}

