/* ==========================================================
   Creemly Cart Page
   Premium Div-Based WooCommerce Cart
   ========================================================== */

/* ----------------------------------------------------------
   Breadcrumb
   Keep available in DOM for SEO, but hide visually.
   ---------------------------------------------------------- */

.creemly-breadcrumbs {
  display: none !important;
}


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

.creemly-cart-page {
  width: 100%;
  max-width: var(--creemly-container, 1240px);
  margin: 0 auto;
  padding: 20px 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  color: var(--creemly-text, #374151);
}


/* ==========================================================
   CART MAIN
   ========================================================== */

.creemly-cart-main {
  min-width: 0;
}

.creemly-cart-title {
  margin: 0 0 30px;
  color: var(--creemly-secondary, #1f2937);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
}


/* ==========================================================
   CART FORM
   ========================================================== */

.creemly-cart-form {
  width: 100%;
  margin: 0;
}

.creemly-cart-box {
  width: 100%;
  border: 1px solid var(--creemly-border, #e5e7eb);
  border-radius: var(--creemly-radius, 18px);
  background: var(--creemly-white, #ffffff);
  overflow: hidden;
  box-sizing: border-box;
}


/* ==========================================================
   CART HEADER
   ========================================================== */

.creemly-cart-header {
  display: grid;
  grid-template-columns:
    56px minmax(250px, 1fr) 110px 110px 125px;

  align-items: center;

  min-height: 54px;
  padding: 0 22px;

  border-bottom: 1px solid var(--creemly-border, #e5e7eb);

  color: var(--creemly-muted, #6b7280);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  box-sizing: border-box;
}

.creemly-cart-header-product {
  grid-column: 2;
}

.creemly-cart-header-price {
  text-align: right;
}

.creemly-cart-header-quantity {
  text-align: center;
}

.creemly-cart-header-subtotal {
  text-align: right;
}


/* ==========================================================
   CART ITEMS
   ========================================================== */

.creemly-cart-items {
  width: 100%;
}

.creemly-cart-item {
  display: grid;

  grid-template-columns:
    56px minmax(250px, 1fr) 110px 110px 125px;

  align-items: center;

  min-height: 145px;
  padding: 22px;

  border-bottom: 1px solid var(--creemly-border, #e5e7eb);

  box-sizing: border-box;
}

.creemly-cart-item:last-child {
  border-bottom: 0;
}


/* ==========================================================
   REMOVE BUTTON
   ========================================================== */

.creemly-cart-remove {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.creemly-cart-remove .remove {
  display: flex !important;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;

  margin: 0 !important;
  padding: 0 !important;

  border: 1px solid var(--creemly-border, #e5e7eb) !important;
  border-radius: 50% !important;

  background: var(--creemly-white, #ffffff) !important;

  color: #c62828 !important;

  font-size: 20px !important;
  font-weight: 400;
  line-height: 1 !important;

  text-decoration: none !important;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.creemly-cart-remove .remove:hover {
  border-color: #c62828 !important;
  background: #fff5f5 !important;
  color: #c62828 !important;
  transform: scale(1.05);
}


/* ==========================================================
   PRODUCT
   ========================================================== */

.creemly-cart-product {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.creemly-cart-thumbnail {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;

  border-radius: 12px;
  overflow: hidden;

  background: var(--creemly-light, #f8fafc);
}

.creemly-cart-thumbnail img {
  display: block;

  width: 100%;
  height: 100%;

  margin: 0 !important;
  padding: 0 !important;

  object-fit: cover;
  border-radius: 12px;
}

.creemly-cart-product-info {
  min-width: 0;
}

.creemly-cart-product-name {
  margin: 0;

  color: var(--creemly-secondary, #1f2937);

  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.creemly-cart-product-name a {
  color: inherit;
  text-decoration: none;
}

.creemly-cart-product-name a:hover {
  color: var(--creemly-primary, #ff6b35);
}

.creemly-cart-product-info .variation,
.creemly-cart-product-info dl {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--creemly-muted, #6b7280);
}

.creemly-cart-product-info .backorder_notification {
  margin: 5px 0 0;
  color: var(--creemly-primary, #ff6b35);
  font-size: 12px;
}


/* ==========================================================
   PRICE
   ========================================================== */

.creemly-cart-price {
  text-align: right;

  color: var(--creemly-secondary, #1f2937);

  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.creemly-cart-price .creemly-cart-label {
  display: none;
}


/* ==========================================================
   QUANTITY
   ========================================================== */

.creemly-cart-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
}

.creemly-cart-quantity .creemly-cart-label {
  display: none;
}

.creemly-cart-quantity .quantity {
  margin: 0 !important;
}

.creemly-cart-quantity input.qty {
  width: 72px !important;
  height: 44px !important;

  margin: 0 !important;
  padding: 0 8px !important;

  border: 1px solid var(--creemly-border, #e5e7eb) !important;
  border-radius: 10px !important;

  background: var(--creemly-white, #ffffff) !important;

  color: var(--creemly-secondary, #1f2937) !important;

  font-size: 14px !important;
  font-weight: 600 !important;
  text-align: center;

  box-shadow: none !important;
  outline: none !important;
}

.creemly-cart-quantity input.qty:focus {
  border-color: var(--creemly-primary, #ff6b35) !important;
}


/* ==========================================================
   SUBTOTAL
   ========================================================== */

.creemly-cart-subtotal {
  text-align: right;

  color: var(--creemly-secondary, #1f2937);

  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.creemly-cart-subtotal .creemly-cart-label {
  display: none;
}


/* ==========================================================
   CART ACTIONS
   ========================================================== */

.creemly-cart-actions {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 20px 22px;

  border-top: 1px solid var(--creemly-border, #e5e7eb);
  background: var(--creemly-light, #f8fafc);

  box-sizing: border-box;
}


/* ==========================================================
   COUPON
   ========================================================== */

.creemly-coupon {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin: 0;
}

.creemly-coupon .input-text {
  width: 190px !important;
  height: 46px !important;

  margin: 0 !important;
  padding: 0 14px !important;

  border: 1px solid #d8d2df !important;
  border-radius: 10px !important;

  background: var(--creemly-white, #ffffff) !important;

  color: var(--creemly-text, #374151) !important;

  font-size: 13px !important;
  font-weight: 400 !important;

  box-sizing: border-box;
  box-shadow: none !important;
}

.creemly-coupon .input-text::placeholder {
  color: var(--creemly-muted, #6b7280);
  opacity: 1;
}

.creemly-coupon .input-text:focus {
  border-color: var(--creemly-primary, #ff6b35) !important;
  outline: none !important;
}


/* ==========================================================
   BUTTON BASE
   ========================================================== */

.creemly-cart-actions button {
  min-height: 46px;

  margin: 0 !important;
  padding: 0 20px !important;

  border-radius: 10px !important;

  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  cursor: pointer;

  box-sizing: border-box;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


/* ==========================================================
   APPLY COUPON
   ========================================================== */

.creemly-coupon button[name="apply_coupon"] {
  border: 1px solid var(--creemly-primary, #ff6b35) !important;

  background: var(--creemly-primary, #ff6b35) !important;

  color: var(--creemly-white, #ffffff) !important;
}

.creemly-coupon button[name="apply_coupon"]:hover {
  border-color: var(--creemly-primary-dark, #e85a27) !important;

  background: var(--creemly-primary-dark, #e85a27) !important;

  color: var(--creemly-white, #ffffff) !important;

  transform: translateY(-1px);
}


/* ==========================================================
   UPDATE CART
   ========================================================== */

.creemly-update-cart {
  flex: 0 0 auto;
  margin: 0;
}

.creemly-update-cart button[name="update_cart"] {
  border: 1px solid var(--creemly-border, #e5e7eb) !important;

  background: var(--creemly-white, #ffffff) !important;

  color: var(--creemly-secondary, #1f2937) !important;
}

.creemly-update-cart button[name="update_cart"]:hover:not(:disabled) {
  border-color: var(--creemly-primary, #ff6b35) !important;

  color: var(--creemly-primary, #ff6b35) !important;
}

.creemly-update-cart button[name="update_cart"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* ==========================================================
   CART TOTALS
   ========================================================== */

.creemly-cart-totals {
  min-width: 0;
}

.creemly-cart-totals .cart_totals {
  width: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 1px solid var(--creemly-border, #e5e7eb);
  border-radius: var(--creemly-radius, 18px);

  background: var(--creemly-white, #ffffff);

  overflow: hidden;

  box-shadow: var(--creemly-shadow,
      0 12px 35px rgba(15, 23, 42, 0.08));
}

.creemly-cart-totals .cart_totals h2 {
  margin: 0 !important;
  padding: 24px 24px 20px !important;

  border-bottom: 1px solid var(--creemly-border, #e5e7eb);

  color: var(--creemly-secondary, #1f2937) !important;

  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.creemly-cart-totals .cart_totals table {
  width: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-collapse: collapse !important;
}

.creemly-cart-totals .cart_totals table tr {
  border-bottom: 1px solid var(--creemly-border, #e5e7eb);
}

.creemly-cart-totals .cart_totals table tr:last-child {
  border-bottom: 0;
}

.creemly-cart-totals .cart_totals table th,
.creemly-cart-totals .cart_totals table td {
  padding: 17px 24px !important;

  border: 0 !important;

  color: var(--creemly-secondary, #1f2937);

  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;

  vertical-align: middle;
}

.creemly-cart-totals .cart_totals table th {
  text-align: left;
}

.creemly-cart-totals .cart_totals table td {
  text-align: right;
}

.creemly-cart-totals .cart_totals .order-total th,
.creemly-cart-totals .cart_totals .order-total td {
  padding-top: 20px !important;
  padding-bottom: 20px !important;

  font-size: 18px;
  font-weight: 800;
}


/* ==========================================================
   CHECKOUT BUTTON
   ========================================================== */

.creemly-cart-totals .wc-proceed-to-checkout {
  margin: 0 !important;
  padding: 24px !important;
}

.creemly-cart-totals .wc-proceed-to-checkout a.checkout-button {
  display: flex !important;
  align-items: center;
  justify-content: center;

  width: 100% !important;
  min-height: 52px;

  margin: 0 !important;
  padding: 0 20px !important;

  border: 1px solid var(--creemly-primary, #ff6b35) !important;
  border-radius: 11px !important;

  background: var(--creemly-primary, #ff6b35) !important;

  color: var(--creemly-white, #ffffff) !important;

  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  text-align: center;
  text-decoration: none !important;

  box-sizing: border-box;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.creemly-cart-totals .wc-proceed-to-checkout a.checkout-button:hover {
  border-color: var(--creemly-primary-dark, #e85a27) !important;

  background: var(--creemly-primary-dark, #e85a27) !important;

  color: var(--creemly-white, #ffffff) !important;

  transform: translateY(-1px);

  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.18);
}


/* ==========================================================
   EMPTY CART
   ========================================================== */

.creemly-cart-page .cart-empty {
  margin: 0;
  padding: 60px 20px;

  border: 1px solid var(--creemly-border, #e5e7eb);
  border-radius: var(--creemly-radius, 18px);

  background: var(--creemly-white, #ffffff);

  color: var(--creemly-secondary, #1f2937);

  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.creemly-cart-page .return-to-shop {
  margin-top: 20px;
  text-align: center;
}

.creemly-cart-page .return-to-shop a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 0 22px;

  border-radius: 10px;

  background: var(--creemly-primary, #ff6b35);
  color: var(--creemly-white, #ffffff);

  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1050px) {

  .creemly-cart-page {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
  }

  .creemly-cart-header,
  .creemly-cart-item {
    grid-template-columns:
      45px minmax(210px, 1fr) 90px 95px 105px;
  }

  .creemly-cart-item {
    padding: 18px;
  }

  .creemly-cart-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  .creemly-cart-product {
    gap: 12px;
  }

  .creemly-cart-thumbnail {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .creemly-cart-title {
    font-size: 38px;
  }

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {

  .creemly-cart-page {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .creemly-cart-main {
    width: 100%;
  }

  .creemly-cart-title {
    margin-bottom: 20px;

    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.6px;
  }

  .creemly-cart-box {
    border-radius: 14px;
  }

  /* Hide desktop column headings on mobile */
  .creemly-cart-header {
    display: none;
  }


  /* ------------------------------------------------------
	   Mobile Cart Item
	   ------------------------------------------------------ */

  .creemly-cart-item {
    position: relative;

    display: grid;

    grid-template-columns:
      72px minmax(0, 1fr) auto;

    grid-template-rows:
      auto auto auto;

    column-gap: 14px;
    row-gap: 8px;

    min-height: 0;

    padding: 18px;

    border-bottom: 1px solid var(--creemly-border, #e5e7eb);
  }


  /* Remove button */
  .creemly-cart-remove {
    position: absolute;

    top: 16px;
    right: 16px;

    z-index: 3;
  }

  .creemly-cart-remove .remove {
    width: 30px;
    height: 30px;

    font-size: 18px !important;
  }


  /* Product image */
  .creemly-cart-product {
    grid-column: 1;
    grid-row: 1 / span 2;

    display: block;

    min-width: 0;
  }

  .creemly-cart-thumbnail {
    width: 72px;
    height: 72px;

    flex: none;

    border-radius: 10px;
  }

  .creemly-cart-thumbnail img {
    width: 72px;
    height: 72px;
  }


  /* Product information */
  .creemly-cart-product-info {
    position: absolute;

    top: 18px;
    left: 104px;
    right: 54px;

    min-width: 0;
  }

  .creemly-cart-product-name {
    padding-right: 0;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
  }

  .creemly-cart-product-info .variation,
  .creemly-cart-product-info dl,
  .creemly-cart-product-info .backorder_notification {
    font-size: 11px;
  }


  /* Price */
  .creemly-cart-price {
    grid-column: 2 / 4;
    grid-row: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-top: 2px;

    text-align: left;

    font-size: 12px;
    font-weight: 600;
  }

  .creemly-cart-price .creemly-cart-label {
    display: inline-block;

    margin-right: 8px;

    color: var(--creemly-muted, #6b7280);

    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }


  /* Quantity */
  .creemly-cart-quantity {
    grid-column: 2;
    grid-row: 3;

    justify-content: flex-start;

    margin-top: 4px;
  }

  .creemly-cart-quantity .creemly-cart-label {
    display: inline-block;

    margin-right: 8px;

    color: var(--creemly-muted, #6b7280);

    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .creemly-cart-quantity input.qty {
    width: 58px !important;
    height: 36px !important;

    font-size: 12px !important;
  }


  /* Subtotal */
  .creemly-cart-subtotal {
    grid-column: 3;
    grid-row: 3;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    margin-top: 4px;

    text-align: right;

    font-size: 12px;
  }

  .creemly-cart-subtotal .creemly-cart-label {
    display: none;
  }


  /* ------------------------------------------------------
	   Mobile Cart Actions
	   Coupon input + button in one row
	   Update cart below
	   ------------------------------------------------------ */

  .creemly-cart-actions {
    display: grid;

    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;

    gap: 10px;

    padding: 16px;

    background: var(--creemly-light, #f8fafc);
  }


  .creemly-coupon {
    display: grid;

    grid-template-columns: minmax(0, 1fr) auto;

    grid-column: 1 / -1;
    grid-row: 1;

    gap: 8px;

    width: 100%;
  }

  .creemly-coupon .input-text {
    width: 100% !important;
    height: 44px !important;

    font-size: 12px !important;
  }

  .creemly-cart-actions button {
    min-height: 44px;

    padding: 0 16px !important;

    font-size: 12px !important;
  }


  .creemly-coupon button[name="apply_coupon"] {
    white-space: nowrap;
  }


  .creemly-update-cart {
    grid-column: 1 / -1;
    grid-row: 2;

    width: 100%;
  }

  .creemly-update-cart button[name="update_cart"] {
    width: 100% !important;
  }


  /* ------------------------------------------------------
	   Mobile Totals
	   ------------------------------------------------------ */

  .creemly-cart-totals {
    width: 100%;
    margin-top: 20px;
  }

  .creemly-cart-totals .cart_totals {
    border-radius: 14px;
  }

  .creemly-cart-totals .cart_totals h2 {
    padding: 18px !important;

    font-size: 16px !important;
  }

  .creemly-cart-totals .cart_totals table th,
  .creemly-cart-totals .cart_totals table td {
    padding: 13px 18px !important;

    font-size: 12px;
  }

  .creemly-cart-totals .cart_totals .order-total th,
  .creemly-cart-totals .cart_totals .order-total td {
    padding-top: 16px !important;
    padding-bottom: 16px !important;

    font-size: 15px;
  }

  .creemly-cart-totals .wc-proceed-to-checkout {
    padding: 18px !important;
  }

  .creemly-cart-totals .wc-proceed-to-checkout a.checkout-button {
    min-height: 48px;

    font-size: 13px !important;
  }

}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 420px) {

  .creemly-cart-title {
    font-size: 27px;
  }

  .creemly-cart-item {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    column-gap: 11px;

    padding: 15px;
  }

  .creemly-cart-thumbnail,
  .creemly-cart-thumbnail img {
    width: 62px;
    height: 62px;
  }

  .creemly-cart-product-info {
    top: 15px;
    left: 88px;
    right: 48px;
  }

  .creemly-cart-product-name {
    font-size: 12px;
  }

  .creemly-cart-remove {
    top: 13px;
    right: 13px;
  }

  .creemly-cart-remove .remove {
    width: 28px;
    height: 28px;
  }

  .creemly-coupon {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .creemly-coupon button[name="apply_coupon"] {
    padding-left: 13px !important;
    padding-right: 13px !important;
  }

}