
/* ==========================================================================
   Custom cart page
   Change the look by editing the variables below.
   Fonts are inherited from your theme.
   ========================================================================== */

.yc-cart {
  --yc-ink: #1f2933;        /* text + checkout button */
  --yc-muted: #6b7280;      /* secondary text */
  --yc-line: #e5e7eb;       /* dividers + borders */
  --yc-soft: #f4f7f9;       /* image placeholder / hover backgrounds */
  --yc-accent: #ff6b35;     /* hover + focus accent */
  --yc-danger: #d62839;     /* remove / errors */
  --yc-radius: 10px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  color: var(--yc-ink);
}

.yc-cart__main,
.yc-cart__side {
  min-width: 0;
}

.yc-cart a {
  color: inherit;
}

/* ---------- Column header ---------- */
.yc-cart__head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--yc-line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yc-muted);
}

/* ---------- Item row ---------- */
.yc-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  column-gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--yc-line);
}

.yc-item__thumb,
.yc-item__thumb a {
  display: block;
}

.yc-item__thumb img {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0;
  object-fit: cover;
  border-radius: var(--yc-radius);
  background: var(--yc-soft);
}

.yc-item__info {
  min-width: 0;
}

.yc-item__name {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.yc-item__name a {
  text-decoration: none;
}

.yc-item__name a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yc-item__price {
  font-size: 0.9rem;
  color: var(--yc-muted);
}

.yc-item__price del {
  margin-right: 6px;
  opacity: 0.7;
}

.yc-item__price ins {
  text-decoration: none;
  color: var(--yc-ink);
  font-weight: 600;
}

.yc-item__desc {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--yc-muted);
}

/* Variation data: Color / Size ... */
.yc-cart dl.variation {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 8px 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--yc-muted);
}

.yc-cart dl.variation dt,
.yc-cart dl.variation dd {
  float: none;
  margin: 0;
  padding: 0;
}

.yc-cart dl.variation dt {
  display: inline;
  font-weight: 600;
  color: var(--yc-ink);
}

.yc-cart dl.variation dd {
  display: inline;
}

.yc-cart dl.variation dd p {
  display: inline;
  margin: 0;
}

.yc-cart .backorder_notification {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--yc-danger);
}

/* ---------- Quantity stepper + remove ---------- */
.yc-item__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.yc-cart .yc-item .quantity {
  display: inline-flex;
  align-items: center;
  height: 42px;
  margin: 0;
  border: 1px solid #cfd5db;
  border-radius: var(--yc-radius);
  overflow: hidden;
  background: #fff;
}

.yc-cart .yc-item .quantity:focus-within {
  border-color: var(--yc-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18);
}

.yc-cart .yc-item .quantity .qty {
  width: 44px;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: 0.95rem;
  color: var(--yc-ink);
  -moz-appearance: textfield;
  appearance: textfield;
}

.yc-cart .yc-item .quantity .qty::-webkit-outer-spin-button,
.yc-cart .yc-item .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.yc-cart .yc-qty-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--yc-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.yc-cart .yc-qty-btn:hover {
  background: var(--yc-soft);
  color: var(--yc-ink);
}

/* Remove (trash icon) */
.woocommerce-cart .yc-cart .yc-item .product-remove {
  display: flex;
}

.woocommerce-cart .yc-cart a.remove.yc-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: var(--yc-radius);
  background: transparent !important;
  color: var(--yc-muted) !important;
  font-size: inherit;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.woocommerce-cart .yc-cart a.remove.yc-remove:hover {
  background: #fdecee !important;
  color: var(--yc-danger) !important;
}

.yc-item__total {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

/* ---------- Coupon + update row ---------- */
.yc-cart__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
}

.yc-cart .yc-coupon {
  display: flex;
  flex: 1 1 320px;
  gap: 8px;
  max-width: 420px;
}

.yc-cart .yc-coupon .input-text {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #cfd5db;
  border-radius: var(--yc-radius);
  background: #fff;
  box-shadow: none;
  font-size: 0.95rem;
}

.yc-cart .yc-coupon .input-text:focus {
  outline: none;
  border-color: var(--yc-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18);
}

/* Secondary (outline) buttons used in the form */
.woocommerce-cart .yc-cart .yc-cart__actions .button {
  height: 44px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--yc-ink);
  border-radius: var(--yc-radius);
  background: transparent;
  color: var(--yc-ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.woocommerce-cart .yc-cart .yc-cart__actions .button:hover:not(:disabled) {
  background: var(--yc-ink);
  color: #fff;
}

.woocommerce-cart .yc-cart .yc-cart__actions .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* When JS is active the cart updates automatically, so hide the Update button visually
   (it stays in the DOM for screen readers and for WooCommerce's own script). */
.yc-cart--js .yc-cart__actions .yc-update {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.yc-continue {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--yc-muted);
  text-decoration: none;
}

.yc-continue:hover {
  color: var(--yc-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Cart totals (sidebar) ---------- */
.yc-cart__side {
  position: sticky;
  top: 32px;
}

.woocommerce-cart .yc-cart .cart-collaterals .cart_totals {
  float: none !important;
  width: 100% !important;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--yc-line);
  border-radius: 14px;
  background: #fff;
}

.woocommerce-cart .yc-cart .cart_totals > h2 {
  margin: 0 0 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--yc-line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yc-muted);
}

/* Turn the totals table into simple label / value rows */
.woocommerce-cart .yc-cart .cart_totals table.shop_table,
.woocommerce-cart .yc-cart .cart_totals table.shop_table tbody {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  background: none;
}

.woocommerce-cart .yc-cart .cart_totals table.shop_table tr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border: 0;
  background: none;
}

.woocommerce-cart .yc-cart .cart_totals table.shop_table th,
.woocommerce-cart .yc-cart .cart_totals table.shop_table td {
  display: block !important;
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.9rem;
  text-align: right;
}

.woocommerce-cart .yc-cart .cart_totals table.shop_table th {
  font-weight: 400;
  text-align: left;
  color: var(--yc-muted);
}

.woocommerce-cart .yc-cart .cart_totals table.shop_table td {
  font-weight: 500;
}

/* Kill WooCommerce's mobile "Label:" pseudo-element */
.woocommerce-cart .yc-cart .cart_totals table.shop_table td::before {
  content: none !important;
  display: none !important;
}

.woocommerce-cart .yc-cart .cart_totals tr.cart-discount td {
  color: #1c7c4d;
}

.woocommerce-cart .yc-cart .cart_totals .woocommerce-remove-coupon {
  margin-left: 6px;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--yc-danger);
}

/* Shipping row stacks label above the options */
.woocommerce-cart .yc-cart .cart_totals tr.woocommerce-shipping-totals {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.woocommerce-cart .yc-cart .cart_totals tr.woocommerce-shipping-totals td {
  text-align: left;
  font-weight: 400;
}

.woocommerce-cart .yc-cart .cart_totals #shipping_method {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.woocommerce-cart .yc-cart .cart_totals #shipping_method li {
  margin: 0 0 6px;
  padding: 0;
}

.woocommerce-cart .yc-cart .cart_totals .woocommerce-shipping-destination,
.woocommerce-cart .yc-cart .cart_totals .shipping-calculator-button {
  font-size: 0.82rem;
  color: var(--yc-muted);
}

/* Estimated total */
.woocommerce-cart .yc-cart .cart_totals tr.order-total {
  align-items: center;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--yc-line);
}

.woocommerce-cart .yc-cart .cart_totals tr.order-total th {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--yc-ink);
}

.woocommerce-cart .yc-cart .cart_totals tr.order-total td {
  font-size: 1.5rem;
  font-weight: 600;
}

.woocommerce-cart .yc-cart .cart_totals tr.order-total small.includes_tax {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--yc-muted);
}

/* Checkout button */
.woocommerce-cart .yc-cart .wc-proceed-to-checkout {
  padding: 8px 0 0;
}

.woocommerce-cart .yc-cart .wc-proceed-to-checkout a.checkout-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  border-radius: var(--yc-radius);
  background: var(--yc-ink);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.woocommerce-cart .yc-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: var(--yc-accent);
  color: #fff;
}

/* ---------- Cross-sells ("You may be interested in...") ---------- */
.woocommerce-cart .yc-cart .cross-sells {
  float: none;
  width: 100%;
  margin-top: 48px;
}

.woocommerce-cart .yc-cart .cross-sells > h2 {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.woocommerce-cart .yc-cart .cross-sells ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* WooCommerce clearfix pseudo-elements would otherwise become empty grid cells */
.woocommerce-cart .yc-cart .cross-sells ul.products::before,
.woocommerce-cart .yc-cart .cross-sells ul.products::after {
  content: none !important;
  display: none !important;
}

.woocommerce-cart .yc-cart .cross-sells ul.products li.product {
  position: relative;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0;
  text-align: left;
}

.woocommerce-cart .yc-cart .cross-sells li.product a {
  text-decoration: none;
}

.woocommerce-cart .yc-cart .cross-sells li.product img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 0 12px;
  object-fit: cover;
  border-radius: var(--yc-radius);
}

.woocommerce-cart .yc-cart .cross-sells li.product .woocommerce-loop-product__title {
  margin: 0 0 4px;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.woocommerce-cart .yc-cart .cross-sells li.product .price {
  display: block;
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--yc-muted);
}

.woocommerce-cart .yc-cart .cross-sells li.product .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--yc-ink);
  border-radius: var(--yc-radius);
  background: transparent;
  color: var(--yc-ink);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.woocommerce-cart .yc-cart .cross-sells li.product .button:hover {
  background: var(--yc-ink);
  color: #fff;
}

/* ---------- Empty cart ---------- */
.woocommerce-cart .cart-empty {
  padding: 64px 16px 12px;
  border: 0;
  background: none;
  text-align: center;
  font-size: 1.15rem;
  color: var(--yc-ink, #1f2933);
}

.woocommerce-cart .cart-empty::before {
  display: none;
}

.woocommerce-cart .return-to-shop {
  padding-bottom: 64px;
  text-align: center;
}

.woocommerce-cart .return-to-shop .button {
  padding: 14px 28px;
  border-radius: 10px;
  background: #1f2933;
  color: #fff;
  font-weight: 600;
}

.woocommerce-cart .return-to-shop .button:hover {
  background: #ff6b35;
  color: #fff;
}

/* ---------- Accessibility ---------- */
.yc-cart a:focus-visible,
.yc-cart button:focus-visible,
.yc-cart input:focus-visible {
  outline: 3px solid var(--yc-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .yc-cart * {
    transition: none !important;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .yc-cart {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .yc-cart__side {
    position: static;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .yc-cart {
    padding: 16px 16px 48px;
  }

  .yc-cart__head {
    display: none;
  }

  .yc-item {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 16px;
    padding: 20px 0;
  }

  .yc-item__thumb img {
    width: 72px;
    height: 72px;
  }

  /* Line total drops to its own labelled row */
  .yc-item__total {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--yc-line);
    text-align: left;
  }

  .yc-item__total::before {
    content: attr(data-title);
    font-weight: 400;
    color: var(--yc-muted);
  }

  .yc-cart .yc-coupon {
    flex-basis: 100%;
    max-width: none;
  }

  .woocommerce-cart .yc-cart .cross-sells ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .woocommerce-cart .yc-cart .cart-collaterals .cart_totals {
    padding: 20px;
  }
}