/* FRITTENEDGE 2.0.13 — mobile order receipt, cart price beneath title and hero ordering.
   Scoped to narrow devices; desktop appearance remains untouched. */
@media (max-width: 767px) {
  /* Order-received: remove the narrow/overflowing parent columns. */
  body.woocommerce-order-received .woocommerce-order,
  body.woocommerce-order-received .woocommerce .woocommerce-order {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 15px !important;
    margin: 12px auto 36px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  body.woocommerce-order-received .woocommerce-order > *,
  body.woocommerce-order-received .woocommerce-order-details,
  body.woocommerce-order-received .woocommerce-customer-details {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-order-received .woocommerce-order > .woocommerce-thankyou-order-received {
    padding: 18px 14px !important;
    margin: 0 !important;
    font-size: clamp(20px, 5.5vw, 27px) !important;
    line-height: 1.4 !important;
    overflow-wrap: normal !important;
    text-align: center !important;
  }
  body.woocommerce-order-received .woocommerce-order > ul.woocommerce-order-overview {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 9px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.woocommerce-order-received .woocommerce-order > ul.woocommerce-order-overview > li {
    min-width: 0 !important;
    min-height: 78px !important;
    width: auto !important;
    padding: 12px 11px !important;
    margin: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.4 !important;
    border-radius: 3px !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-order-received .woocommerce-order > ul.woocommerce-order-overview > li strong {
    display: block !important;
    overflow-wrap: anywhere !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  body.woocommerce-order-received .woocommerce-order > .woocommerce-order-details,
  body.woocommerce-order-received .woocommerce-order > .woocommerce-customer-details {
    grid-column: 1 / -1 !important;
    margin: 6px 0 0 !important;
  }
  body.woocommerce-order-received .woocommerce-order-details table.shop_table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    margin: 0 !important;
  }
  body.woocommerce-order-received .woocommerce-order-details table.shop_table th,
  body.woocommerce-order-received .woocommerce-order-details table.shop_table td {
    display: table-cell !important;
    float: none !important;
    padding: 11px 9px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    vertical-align: middle !important;
    text-align: left !important;
  }
  body.woocommerce-order-received .woocommerce-order-details table.shop_table th:last-child,
  body.woocommerce-order-received .woocommerce-order-details table.shop_table td:last-child {
    width: 34%;
    text-align: right !important;
  }
  body.woocommerce-order-received .woocommerce-order-details table.shop_table td::before {
    display: none !important;
    content: none !important;
  }
  body.woocommerce-order-received .woocommerce-order-details h2,
  body.woocommerce-order-received .woocommerce-customer-details h2 {
    font-size: 24px !important;
    line-height: 1.35 !important;
    overflow-wrap: break-word;
  }
  body.woocommerce-order-received .woocommerce-customer-details address {
    padding: 16px !important;
    min-height: 0 !important;
  }

  /* Classic cart: the remove control comes AFTER the total, on the right edge. */
  body.woocommerce-cart .woocommerce-cart-form table.shop_table,
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tbody {
    width: 100% !important;
    max-width: 100% !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item {
    display: grid !important;
    grid-template-columns: 58px minmax(0,1fr) 32px !important;
    grid-template-rows: auto auto !important;
    gap: 5px 10px !important;
    align-items: center !important;
    width: 100% !important;
    padding: 12px 6px !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    border: 0 !important;
    vertical-align: middle !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item > td::before {
    display: none !important;
    content: none !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-thumbnail {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-thumbnail img {
    display: block !important;
    width: 58px !important;
    height: 72px !important;
    object-fit: contain !important;
    margin: 0 !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-name {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    text-align: left !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    overflow: hidden !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-name a {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden !important;
    text-overflow: ellipsis;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-subtotal {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    text-align: left !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-remove {
    grid-column: 3 !important;
    grid-row: 1 / 3 !important;
    justify-self: end !important;
    align-self: center !important;
    position: static !important;
    order: 4 !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-remove a.remove {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 32px !important;
    margin: 0 !important;
    position: static !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-price,
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-quantity {
    display: none !important;
  }

  /* Homepage banner: image ABOVE editorial copy on phones. */
  body.home .fhe-season-slider .fe-home-slide.is-active {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    min-height: 0 !important;
  }
  body.home .fhe-season-slider .fe-home-slide .fhe-hero-media {
    grid-row: 1 !important;
    grid-column: 1 !important;
    order: -1 !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3 !important;
    width: 100% !important;
    position: relative !important;
  }
  body.home .fhe-season-slider .fe-home-slide .fhe-hero-copy {
    grid-row: 2 !important;
    grid-column: 1 !important;
    order: 1 !important;
    min-height: 0 !important;
    padding: 28px 22px 30px !important;
  }
  body.home .fhe-season-slider .fe-home-slide .fhe-hero-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  body.home .fhe-season-slider .fe-home-slide .fhe-hero h1,
  body.home .fhe-season-slider .fe-home-slide h1 {
    font-size: clamp(32px, 8.8vw, 46px) !important;
    line-height: 1.15 !important;
    margin-top: 16px !important;
  }
  body.home .fhe-season-slider .fe-home-slide .fhe-hero-buttons { margin-bottom: 24px !important; }
  body.home .fhe-season-slider .fe-home-slider-controls {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: max-content !important;
    max-width: calc(100% - 24px) !important;
    margin: 8px auto 12px !important;
  }
}
@media (max-width: 390px) {
  body.woocommerce-order-received .woocommerce-order > ul.woocommerce-order-overview {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  body.woocommerce-order-received .woocommerce-order > ul.woocommerce-order-overview > li {
    padding: 11px 9px !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item {
    grid-template-columns: 49px minmax(0,1fr) 28px !important;
    gap: 6px !important;
  }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tr.cart_item td.product-thumbnail img {
    width: 49px !important;
    height: 65px !important;
  }
}
