/* Shared Enavelle Commerce responsive refinements. */

@media (max-width: 980px) {
  form.checkout.woocommerce-checkout {
    grid-template-columns: minmax(0, 1fr);
  }

  form.checkout #customer_details {
    grid-row: auto;
  }

  .woocommerce-order .woocommerce-order-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-order .woocommerce-order-overview li:nth-child(2) {
    border-right: 0;
  }

  .woocommerce-order .woocommerce-order-overview li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--enavelle-line);
  }
}

@media (max-width: 767px) {
  .enavelle-drawer .enavelle-language-switcher {
    width: 100%;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enavelle-drawer .enavelle-language-switcher a {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 12px;
  }
}

@media (max-width: 700px) {
  .enavelle-page {
    width: min(100% - 28px, 1480px);
    padding: 40px 0 76px;
  }

  .enavelle-page__header {
    margin-bottom: 30px;
  }

  .enavelle-page__title {
    font-size: clamp(2.2rem, 13vw, 4rem);
  }

  .woocommerce table.shop_table_responsive,
  .woocommerce table.shop_table_responsive tbody,
  .woocommerce table.shop_table_responsive tr,
  .woocommerce table.shop_table_responsive td {
    display: block;
    width: 100%;
  }

  .woocommerce table.shop_table_responsive thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .woocommerce table.shop_table_responsive tr.cart_item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 40px;
    padding: 16px;
    border-bottom: 1px solid var(--enavelle-line);
    gap: 10px 14px;
  }

  .woocommerce table.shop_table_responsive tr.cart_item td {
    padding: 0;
    border: 0;
    text-align: left !important;
  }

  .woocommerce table.shop_table_responsive tr.cart_item td::before {
    margin-right: 8px;
  }

  .woocommerce-cart-form .product-thumbnail {
    display: block !important;
    width: 84px;
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .woocommerce-cart table.cart .product-thumbnail img {
    width: 84px;
    height: 84px;
  }

  .woocommerce-cart-form .product-name,
  .woocommerce-cart-form .product-price,
  .woocommerce-cart-form .product-quantity,
  .woocommerce-cart-form .product-subtotal {
    grid-column: 2;
  }

  .woocommerce-cart-form .product-remove {
    grid-column: 3;
    grid-row: 1;
  }

  .woocommerce-cart-form .actions {
    display: block !important;
    padding: 18px !important;
  }

  body.woocommerce-cart .woocommerce table.cart td.actions .coupon {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: none;
    margin-bottom: 12px;
  }

  body.woocommerce-cart .woocommerce table.cart td.actions .coupon > .input-text,
  body.woocommerce-cart .woocommerce table.cart td.actions .coupon > .button,
  .woocommerce-cart-form .actions > .button {
    display: block;
    max-width: none;
    width: 100%;
    float: none !important;
    box-sizing: border-box;
  }

  .woocommerce .cart_totals {
    padding: 22px;
  }

  form.checkout #customer_details .col-1,
  form.checkout #customer_details .col-2,
  form.checkout #order_review {
    padding: 20px;
  }

  .woocommerce-order .woocommerce-order-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .woocommerce-order .woocommerce-order-overview li,
  .woocommerce-order .woocommerce-order-overview li:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--enavelle-line);
  }

  .woocommerce-order .woocommerce-order-overview li:last-child {
    border-bottom: 0;
  }

  form.track_order .form-row-first,
  form.track_order .form-row-last {
    width: 100%;
    float: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button {
    transition: none;
  }
}
