/* Carrito y mini carrito: estilos finales y aislados. */
:root {
  --fort-wine: #8f2f4b;
  --fort-wine-light: #c98699;
  --fort-blue: #345d96;
  --fort-panel: #121721;
  --fort-border: rgba(77, 101, 145, .52);
  --fort-line: rgba(255, 255, 255, .10);
}

/* Mini carrito */
body .site-header #miniCartPanel {
  width: min(390px, calc(100vw - 24px)) !important;
  padding: 16px !important;
  overflow: hidden !important;
}

/* Respaldo mientras WooCommerce reemplaza un fragmento antiguo. */
body .site-header #miniCartPanel ul.woocommerce-mini-cart {
  display: grid !important;
  gap: 10px !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  list-style: none !important;
}

body .site-header #miniCartPanel li.woocommerce-mini-cart-item {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 70px minmax(0, 1fr) 28px !important;
  grid-template-rows: auto auto !important;
  gap: 5px 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
  background: #141922 !important;
  border: 1px solid rgba(143, 47, 75, .48) !important;
  border-radius: 12px !important;
  box-shadow: inset 3px 0 0 var(--fort-wine) !important;
}

body .site-header #miniCartPanel li.woocommerce-mini-cart-item::before,
body .site-header #miniCartPanel li.woocommerce-mini-cart-item::after,
body .site-header #miniCartPanel li.woocommerce-mini-cart-item > *::before,
body .site-header #miniCartPanel li.woocommerce-mini-cart-item > *::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a:not(.remove),
body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a:not(.remove):hover,
body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a:not(.remove):focus,
body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a:not(.remove):focus-visible,
body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a:not(.remove):active {
  display: grid !important;
  grid-column: 1 / 3 !important;
  grid-row: 1 !important;
  grid-template-columns: 70px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  pointer-events: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a:not(.remove)::before,
body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a:not(.remove)::after {
  content: none !important;
  display: none !important;
}

body .site-header #miniCartPanel li.woocommerce-mini-cart-item img {
  width: 70px !important;
  height: 90px !important;
  margin: 0 !important;
  float: none !important;
  object-fit: cover !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 8px !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body .site-header #miniCartPanel li.woocommerce-mini-cart-item > .quantity {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #aeb6c5 !important;
  font-size: 14px !important;
}

body .site-header #miniCartPanel li.woocommerce-mini-cart-item > a.remove {
  grid-column: 3 !important;
  grid-row: 1 !important;
  position: static !important;
  align-self: start !important;
  justify-self: end !important;
}

body .site-header #miniCartPanel .fort-mini-list {
  display: grid !important;
  gap: 10px !important;
  max-height: 55vh !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  overflow-y: auto !important;
  list-style: none !important;
}

body .site-header #miniCartPanel .fort-mini-item {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) 28px !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
  background: #141922 !important;
  border: 1px solid rgba(143, 47, 75, .48) !important;
  border-radius: 12px !important;
  box-shadow: inset 3px 0 0 var(--fort-wine) !important;
}

body .site-header #miniCartPanel .fort-mini-item::before,
body .site-header #miniCartPanel .fort-mini-item::after,
body .site-header #miniCartPanel .fort-mini-item > *::before,
body .site-header #miniCartPanel .fort-mini-item > *::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body .site-header #miniCartPanel .fort-mini-item > * {
  outline: 0 !important;
  box-shadow: none !important;
}

body .site-header #miniCartPanel .fort-mini-info,
body .site-header #miniCartPanel .fort-mini-name,
body .site-header #miniCartPanel .fort-mini-meta {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body .site-header #miniCartPanel .fort-mini-thumb {
  display: block !important;
  width: 72px !important;
  height: 92px !important;
}

body .site-header #miniCartPanel .fort-mini-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  float: none !important;
  object-fit: cover !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, .13) !important;
  border-radius: 8px !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body .site-header #miniCartPanel .fort-mini-info {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: 7px !important;
}

body .site-header #miniCartPanel .fort-mini-name {
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  overflow-wrap: break-word !important;
}

body .site-header #miniCartPanel .fort-mini-meta {
  color: #adb5c4 !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
}

body .site-header #miniCartPanel .fort-mini-meta .amount {
  color: #fff !important;
  font-weight: 800 !important;
}

body .site-header #miniCartPanel a.fort-mini-remove {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: start !important;
  width: 26px !important;
  height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #f0ccd6 !important;
  background: rgba(126, 27, 54, .18) !important;
  border: 1px solid rgba(174, 50, 82, .58) !important;
  border-radius: 8px !important;
  outline: 0 !important;
  box-shadow: none !important;
  font-size: 20px !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

body .site-header #miniCartPanel .fort-mini-total {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 15px 2px 3px !important;
  color: #fff !important;
  border-top: 1px solid var(--fort-line) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

body .site-header #miniCartPanel .fort-mini-total strong,
body .site-header #miniCartPanel .fort-mini-total .amount {
  color: #fff !important;
  font-size: 19px !important;
}

body .site-header #miniCartPanel .fort-mini-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin: 12px 0 0 !important;
}

body .site-header #miniCartPanel .fort-mini-actions .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  color: #fff !important;
  border-radius: 11px !important;
  text-align: center !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

body .site-header #miniCartPanel .fort-mini-view {
  background: #111720 !important;
  border: 1px solid rgba(82, 108, 154, .68) !important;
}

body .site-header #miniCartPanel .fort-mini-checkout {
  background: linear-gradient(108deg, #76203a, #55243e 42%, #293953 69%, #31558b) !important;
  border: 1px solid rgba(93, 120, 169, .68) !important;
}

/* Pagina del carrito */
body.woocommerce-cart .entry-title,
body.woocommerce-cart h1.entry-title {
  width: min(1180px, calc(100% - 40px)) !important;
  max-width: 1180px !important;
  margin: 40px auto 22px !important;
  color: #fff !important;
  font-size: clamp(32px, 4vw, 48px) !important;
  line-height: 1.08 !important;
}

body.woocommerce-cart .site-content > .ast-container,
body.woocommerce-cart .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-cart .entry-content > .woocommerce,
body.woocommerce-cart main .woocommerce {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 390px !important;
  grid-template-areas: "products summary" !important;
  gap: 28px !important;
  align-items: start !important;
  width: min(1180px, calc(100% - 40px)) !important;
  max-width: 1180px !important;
  margin: 0 auto 70px !important;
  padding: 0 !important;
}

body.woocommerce-cart .woocommerce-cart-form {
  grid-area: products !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
}

body.woocommerce-cart .cart-collaterals {
  grid-area: summary !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
}

body.woocommerce-cart table.shop_table.cart,
body.woocommerce-cart table.shop_table.cart tbody {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.woocommerce-cart table.shop_table.cart thead {
  display: none !important;
}

body.woocommerce-cart table.shop_table.cart tr.cart_item {
  display: grid !important;
  grid-template-columns: 34px 84px minmax(0, 1fr) 120px !important;
  grid-template-areas:
    "remove image name price"
    "remove image quantity subtotal" !important;
  gap: 10px 16px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 14px !important;
  padding: 16px !important;
  background: linear-gradient(125deg, rgba(116, 29, 52, .13), var(--fort-panel) 45%, rgba(41, 77, 130, .14)) !important;
  border: 1px solid var(--fort-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25) !important;
}

body.woocommerce-cart table.shop_table.cart td {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  background: transparent !important;
  border: 0 !important;
  text-align: left !important;
}

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

body.woocommerce-cart td.product-remove { grid-area: remove !important; }
body.woocommerce-cart td.product-thumbnail { grid-area: image !important; }
body.woocommerce-cart td.product-name { grid-area: name !important; }
body.woocommerce-cart td.product-price { grid-area: price !important; text-align: right !important; }
body.woocommerce-cart td.product-quantity { grid-area: quantity !important; }
body.woocommerce-cart td.product-subtotal { grid-area: subtotal !important; text-align: right !important; }

body.woocommerce-cart td.product-remove a.remove {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  color: var(--fort-wine-light) !important;
  background: rgba(126, 27, 54, .18) !important;
  border: 1px solid rgba(174, 50, 82, .56) !important;
  border-radius: 8px !important;
  line-height: 1 !important;
}

body.woocommerce-cart td.product-thumbnail img {
  display: block !important;
  width: 78px !important;
  height: 104px !important;
  margin: 0 !important;
  object-fit: cover !important;
  border: 1px solid rgba(255, 255, 255, .13) !important;
  border-radius: 9px !important;
}

body.woocommerce-cart td.product-name a {
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
}

body.woocommerce-cart td.product-price,
body.woocommerce-cart td.product-subtotal,
body.woocommerce-cart td.product-price .amount,
body.woocommerce-cart td.product-subtotal .amount {
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body.woocommerce-cart td.product-quantity .quantity {
  display: grid !important;
  grid-template-columns: 42px 56px 42px !important;
  gap: 6px !important;
  align-items: center !important;
  justify-content: start !important;
  width: max-content !important;
  min-width: 0 !important;
  padding: 5px !important;
  background: rgba(255, 255, 255, .03) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 12px !important;
}

body.woocommerce-cart td.product-quantity button.qty-btn,
body.woocommerce-cart td.product-quantity input.qty {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
  font-family: Arial, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 40px !important;
  text-align: center !important;
  text-indent: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

body.woocommerce-cart td.product-quantity button.qty-btn {
  color: var(--fort-wine-light) !important;
  background: #151b26 !important;
  border: 1px solid rgba(63, 104, 163, .65) !important;
}

body.woocommerce-cart td.product-quantity input.qty {
  color: #111 !important;
  background: #fff !important;
  border: 0 !important;
  opacity: 1 !important;
}

body.woocommerce-cart table.shop_table.cart tr:not(.cart_item),
body.woocommerce-cart table.shop_table.cart td.actions {
  display: block !important;
  width: 100% !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

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

body.woocommerce-cart button[name="update_cart"] {
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  color: #aeb6c5 !important;
}

body.woocommerce-cart .cart_totals {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 22px !important;
  float: none !important;
  background: linear-gradient(135deg, rgba(116, 29, 52, .11), var(--fort-panel) 46%, rgba(41, 77, 130, .13)) !important;
  border: 1px solid var(--fort-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25) !important;
}

body.woocommerce-cart .cart_totals h2 {
  margin: 0 0 12px !important;
  padding: 0 0 14px !important;
  color: #fff !important;
  background: transparent !important;
  border-bottom: 1px solid var(--fort-line) !important;
  font-size: 25px !important;
  line-height: 1.2 !important;
  box-shadow: inset 3px 0 0 var(--fort-wine) !important;
  padding-left: 12px !important;
}

body.woocommerce-cart .cart_totals table,
body.woocommerce-cart .cart_totals tbody {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.woocommerce-cart .cart_totals tr {
  display: grid !important;
  grid-template-columns: 110px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100% !important;
  padding: 14px 0 !important;
  background: transparent !important;
  border-bottom: 1px solid var(--fort-line) !important;
}

body.woocommerce-cart .cart_totals th,
body.woocommerce-cart .cart_totals td {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  word-break: normal !important;
}

body.woocommerce-cart .cart_totals th::before,
body.woocommerce-cart .cart_totals th::after,
body.woocommerce-cart .cart_totals td::before,
body.woocommerce-cart .cart_totals td::after {
  content: none !important;
  display: none !important;
}

body.woocommerce-cart .cart_totals th {
  color: #d5a5b2 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body.woocommerce-cart .cart_totals tr.cart-subtotal th,
body.woocommerce-cart .cart_totals tr.order-total th,
body.woocommerce-cart .cart_totals tr.cart-subtotal td,
body.woocommerce-cart .cart_totals tr.order-total td,
body.woocommerce-cart .cart_totals tr.cart-subtotal .amount,
body.woocommerce-cart .cart_totals tr.order-total .amount {
  color: #fff !important;
}

body.woocommerce-cart .cart_totals td,
body.woocommerce-cart .cart_totals td .amount {
  color: #fff !important;
}

body.woocommerce-cart .cart_totals ul#shipping_method {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.woocommerce-cart .cart_totals ul#shipping_method li {
  margin: 0 0 8px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
  margin: 10px 0 !important;
  padding: 10px 12px !important;
  background: rgba(41, 77, 130, .10) !important;
  border: 0 !important;
  border-radius: 9px !important;
}

body.woocommerce-cart .cart_totals .shipping-calculator-button {
  color: var(--fort-wine-light) !important;
}

body.woocommerce-cart .wc-proceed-to-checkout {
  padding: 18px 0 0 !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 50px !important;
  margin: 0 !important;
  color: #fff !important;
  background: linear-gradient(108deg, #76203a, #55243e 42%, #293953 69%, #31558b) !important;
  border-color: rgba(93, 120, 169, .68) !important;
}

@media (max-width: 900px) {
  body.woocommerce-cart .entry-content > .woocommerce,
  body.woocommerce-cart main .woocommerce {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "products" "summary" !important;
    gap: 18px !important;
  }
}

@media (max-width: 600px) {
  body .site-header #miniCartPanel {
    position: fixed !important;
    top: 154px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-height: calc(100dvh - 170px) !important;
    overflow-y: auto !important;
  }

  body .site-header #miniCartPanel .fort-mini-item {
    grid-template-columns: 62px minmax(0, 1fr) 26px !important;
    padding: 10px !important;
  }

  body .site-header #miniCartPanel .fort-mini-thumb {
    width: 62px !important;
    height: 82px !important;
  }

  body.woocommerce-cart .entry-title,
  body.woocommerce-cart h1.entry-title,
  body.woocommerce-cart .entry-content > .woocommerce,
  body.woocommerce-cart main .woocommerce {
    width: calc(100% - 24px) !important;
  }

  body.woocommerce-cart .entry-title,
  body.woocommerce-cart h1.entry-title {
    margin-top: 24px !important;
    font-size: 36px !important;
  }

  body.woocommerce-cart table.shop_table.cart tr.cart_item {
    grid-template-columns: 28px 82px minmax(0, 1fr) !important;
    grid-template-areas:
      "remove image name"
      "remove image price"
      "quantity quantity quantity"
      "subtotal subtotal subtotal" !important;
    gap: 10px 12px !important;
    padding: 14px !important;
  }

  body.woocommerce-cart td.product-price,
  body.woocommerce-cart td.product-subtotal {
    text-align: left !important;
  }

  body.woocommerce-cart td.product-quantity,
  body.woocommerce-cart td.product-subtotal {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--fort-line) !important;
  }

  body.woocommerce-cart td.product-quantity::before,
  body.woocommerce-cart td.product-subtotal::before {
    display: block !important;
    color: #fff !important;
    font-weight: 800 !important;
  }

  body.woocommerce-cart td.product-quantity::before { content: "Cantidad" !important; }
  body.woocommerce-cart td.product-subtotal::before { content: "Subtotal" !important; }

  body.woocommerce-cart .cart_totals {
    padding: 18px !important;
  }

  body.woocommerce-cart .cart_totals tr {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 12px !important;
  }
}
