/* Cart page (WooCommerce block cart) — Maiwand Pizza. */

/* Page title ("Panier", "Commande") hidden on screen, still read by screen readers (body class from inc/cart.php). */
.mw-title-hidden .hero-section { 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; clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important; }
@media (max-width: 689.98px) {
  .mw-title-hidden .ct-container-full[data-vertical-spacing*="top"] { padding-top: 24px; }
}

/* Same width as the theme's content (the block is "wide" by default). */
.woocommerce-cart .entry-content > .wp-block-woocommerce-cart.alignwide,
.woocommerce-checkout .entry-content > .wp-block-woocommerce-checkout.alignwide { max-width: var(--theme-block-max-width, 1290px); margin-right: auto; margin-left: auto; }

/* Box above the cart */
.mw-cart-top { --mwc-ink: #19232e; --mwc-muted: #5b6670; --mwc-line: #f0e4da; --mwc-brand: var(--maiwand-brand, var(--theme-palette-color-1, #d62828)); margin-bottom: 20px; color: var(--mwc-ink); }
.mw-cart-top *, .mw-cart-top *::before, .mw-cart-top *::after { box-sizing: border-box; }
.mw-cart-top [hidden] { display: none !important; }
.mw-cart-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--mwc-brand) !important; font-size: 14px; font-weight: 700; text-decoration: none; }
.mw-cart-back:hover { text-decoration: underline; }
.mw-cart-mode { padding: 16px 18px; border: 1px solid var(--mwc-line); border-radius: 14px; background: #fffaf5; transition: opacity .2s ease; }
.mw-cart-mode.is-busy { opacity: .65; pointer-events: none; }
.mw-cart-mode__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.mw-cart-top .mw-cart-mode__title { margin: 0; color: var(--mwc-ink); font-size: 17px; font-weight: 800; line-height: 1.25; }
.mw-cart-mode__switch { display: inline-flex; padding: 3px; border-radius: 999px; background: #f1e6dc; }
.mw-cart-top .mw-cart-mode__switch button { min-height: 38px; margin: 0; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; box-shadow: none; color: var(--mwc-ink); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; }
.mw-cart-top .mw-cart-mode__switch button[aria-pressed="true"] { background: #fff; color: var(--mwc-brand); box-shadow: 0 1px 4px rgb(25 35 46 / 14%); }
.mw-cart-top .mw-cart-mode__switch button:disabled { cursor: not-allowed; opacity: .45; }
.mw-cart-mode__panel { margin-top: 12px; }
.mw-cart-top .mw-cart-mode__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; color: var(--mwc-ink); font-size: 14px; line-height: 1.45; }
.mw-cart-mode__line .maiwand-icon { width: 17px; height: 17px; color: var(--mwc-brand); }
.mw-cart-mode__line strong { font-weight: 700; }
.mw-cart-mode__line .mw-cart-mode__meta { color: var(--mwc-muted); font-size: 13px; }
.mw-cart-top .mw-cart-mode__edit { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--mwc-brand); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mw-cart-top .mw-cart-mode__warn { margin: 8px 0 0; padding: 8px 11px; border-radius: 10px; background: #fff3e3; color: var(--mwc-ink); font-size: 13px; line-height: 1.4; }
.mw-cart-mode__form .mw-check { margin: 4px 0 0; box-shadow: none; }
.mw-cart-progress { margin-top: 12px; }
.mw-cart-progress__track { height: 8px; overflow: hidden; border-radius: 999px; background: #eadfd5; }
.mw-cart-progress__bar { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--mwc-brand); transition: width .35s ease; }
.mw-cart-progress.is-ok .mw-cart-progress__bar { background: #1f8a4c; }
.mw-cart-top .mw-cart-progress__text { margin: 6px 0 0; color: var(--mwc-ink); font-size: 13px; font-weight: 700; }
.mw-cart-progress.is-ok .mw-cart-progress__text { color: #17703d; }
.mw-cart-progress.is-ok .mw-cart-progress__text::before { content: '✓ '; }
.mw-cart-top .mw-cart-mode__note { margin: 10px 0 0; color: var(--mwc-muted); font-size: 12px; }

/* Cart lines: product names in the text colour, not as blue links */
.wp-block-woocommerce-cart .wc-block-components-product-name { color: #19232e; font-weight: 700; text-decoration: none; }

/* Compact "Ajoutez une boisson ou un dessert ?" box */
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection { margin-top: 24px; padding: 14px 16px 6px; border: 1px solid #f0e4da; border-radius: 14px; background: #fff; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection > h2 { margin: 0 0 4px !important; color: #19232e; font-size: 17px !important; font-weight: 800; line-height: 1.25; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-product-template { display: block !important; margin: 0 !important; padding: 0 !important; list-style: none; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-product { display: grid !important; grid-template-areas: "img title btn" "img price btn"; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: auto !important; max-width: none !important; margin: 0 !important; padding: 10px 0 !important; border-bottom: 1px dashed #e6d8cc; text-align: left; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-product:last-child { border-bottom: 0; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-components-product-image { grid-area: img; width: 56px !important; max-width: 56px; margin: 0 !important; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-components-product-image img { width: 56px !important; height: 56px !important; border-radius: 10px; object-fit: cover; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title { grid-area: title; align-self: end; margin: 0 !important; font-size: 15px !important; font-weight: 700; line-height: 1.3; text-align: left !important; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-post-title a { color: #19232e; text-decoration: none; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-price { grid-area: price; align-self: start; margin: 0 !important; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-components-product-price { margin: 0 !important; color: #19232e; font-size: 14px !important; font-weight: 700; text-align: left !important; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-button { grid-area: btn; justify-content: flex-end; margin: 0 !important; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-components-product-button__button { min-height: 38px; margin: 0; padding: 0 14px !important; border: 1px solid #e9d8cc !important; border-radius: 10px !important; background: #fff !important; color: var(--maiwand-brand, var(--theme-palette-color-1)) !important; font-size: 13px !important; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
/* WooCommerce adds a "Voir le panier" link after adding; in the cart it points to the product page and is not needed (the cart updates by itself). */
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .added_to_cart,
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-forward { display: none !important; }
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-components-product-button__button:hover { border-color: var(--maiwand-brand, var(--theme-palette-color-1)) !important; }

@media (max-width: 480px) {
  .mw-cart-mode { padding: 14px; }
  .mw-cart-mode__head { align-items: flex-start; flex-direction: column; }
  .mw-cart-mode__switch { width: 100%; }
  .mw-cart-top .mw-cart-mode__switch button { flex: 1; padding: 0 8px; white-space: nowrap; }
  .wp-block-woocommerce-cart .wp-block-woocommerce-product-collection .wc-block-components-product-button__button { padding: 0 10px !important; font-size: 12px !important; }
}

/* "Commander" on the cart's button, with "Paiement au comptoir / à la livraison" under it (cart.js). */
.wp-block-woocommerce-cart .wc-block-cart__submit-button[data-mw-sub] { flex-direction: column; gap: 2px; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
.wp-block-woocommerce-cart .wc-block-cart__submit-button[data-mw-sub]::after { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.2; opacity: .92; content: attr(data-mw-sub); }

/* Empty cart (v0.17.2, inc/empty-cart.php): one card + « Voir la carte », then dish cards like the homepage's. */
.mw-empty-cart { margin: 4px 0 8px; color: #19232e; }
.mw-empty-cart a { text-decoration: none !important; }
.mw-empty { display: grid; justify-items: center; gap: 10px; box-sizing: border-box; max-width: 560px; margin: 0 auto 40px; padding: 34px 24px 30px; border: 1px solid #f0e4da; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 6px 18px rgb(25 35 46 / 5%); }
.mw-empty__icon { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 4px; border-radius: 50%; background: #fdeceb; color: var(--maiwand-brand, var(--theme-palette-color-1, #d62828)); }
.mw-empty .mw-empty__title { margin: 0 !important; color: #19232e; font-size: 26px !important; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; }
.mw-empty__text { max-width: 34ch; margin: 0 0 8px !important; color: #5b6670; font-size: 15.5px; line-height: 1.45; }
.mw-empty__cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; min-width: 230px; max-width: 100%; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--maiwand-brand, var(--theme-palette-color-1, #d62828)); box-shadow: 0 8px 18px rgb(214 40 40 / 25%); color: #fff !important; font-size: 16px; font-weight: 800; }
.mw-empty__cta:hover { filter: brightness(.94); }
.mw-empty__small { margin-top: 2px; color: #5b6670; font-size: 13px; }
.mw-empty-more__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.mw-empty-more__eyebrow { margin: 0 0 6px !important; color: var(--maiwand-brand, var(--theme-palette-color-1, #d62828)); font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.mw-empty-more__head h2 { margin: 0 !important; color: #19232e; font-size: 22px !important; font-weight: 800; line-height: 1.2; }
.mw-empty-more__head > a { color: var(--maiwand-brand, var(--theme-palette-color-1, #d62828)) !important; font-size: 15px; font-weight: 800; white-space: nowrap; }
.mw-empty-cart .maiwand-dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mw-empty-cart .maiwand-dish { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #f0e4da; border-radius: 14px; background: #fff; color: #19232e !important; box-shadow: 0 3px 9px rgb(25 35 46 / 4%); transition: transform .18s ease, box-shadow .18s ease; }
.mw-empty-cart .maiwand-dish:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgb(25 35 46 / 10%); }
.mw-empty-cart .maiwand-dish__image { position: relative; display: block; aspect-ratio: 1 / 1; background: #f3e9dd; }
.mw-empty-cart .maiwand-dish__image img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.mw-empty-cart .maiwand-deal-pill { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 4px 8px; border-radius: 999px; background: #1f8a4c; color: #fff; font-size: 11px; font-weight: 800; }
.mw-empty-cart .maiwand-dish__body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px; text-align: left; }
.mw-empty-cart .maiwand-dish__name { font-size: 15px; font-weight: 800; line-height: 1.25; }
.mw-empty-cart .maiwand-dish__price { font-size: 14px; font-weight: 800; }
.mw-empty-cart .maiwand-dish__price .mw-from { color: #5b6670; font-size: 12px; font-weight: 600; }
.mw-empty-cart .maiwand-dish__cta { margin-top: auto; padding-top: 8px; color: var(--maiwand-brand, var(--theme-palette-color-1, #d62828)); font-size: 13px; font-weight: 800; }
@media (min-width: 900px) {
  .mw-empty-cart .maiwand-dish-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .mw-empty-cart .maiwand-dish__body { padding: 14px 16px 16px; }
  .mw-empty-cart .maiwand-dish__name { font-size: 16px; }
}
@media (max-width: 600px) {
  .mw-empty { margin-bottom: 30px; padding: 26px 18px 22px; border-radius: 18px; }
  .mw-empty .mw-empty__title { font-size: 22px !important; }
  .mw-empty__cta { width: 100%; }
  .mw-empty-more__head > a { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mw-empty-cart .maiwand-dish { transition: none; } .mw-empty-cart .maiwand-dish:hover { transform: none; } }
