/*
 Theme Name:   Base Divi Child Theme
 Theme URI:    https://brandstein.fi/
 Description:  Base Child Theme for Divi
 Author:       Brandstein
 Author URI:   https://brandstein.fi/
 Template:     Divi
 Version:      1.0.10
*/

/**To get started add your custom CSS below**/

/* Checkout two-column layout on desktop: customer details left, order review right */
@media (min-width: 981px) {
	.woocommerce form.checkout.woocommerce-checkout {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		grid-column-gap: 40px;
		align-items: start;
	}
	.woocommerce form.checkout.woocommerce-checkout #customer_details {
		grid-column: 1 !important;
		grid-row: 2 !important;
		width: 100% !important;
		float: none !important;
	}
	.woocommerce form.checkout.woocommerce-checkout #customer_details .col-1,
	.woocommerce form.checkout.woocommerce-checkout #customer_details .col-2 {
		width: 100% !important;
		float: none !important;
	}
	.woocommerce form.checkout.woocommerce-checkout .woocommerce-form-coupon-toggle,
	.woocommerce form.checkout.woocommerce-checkout form.checkout_coupon {
		grid-column: 1 !important;
		grid-row: 1 !important;
	}
	.woocommerce form.checkout.woocommerce-checkout h3
	.woocommerce form.checkout.woocommerce-checkout #order_review {
		grid-column: 2 !important;
		grid-row: 2 / span 10 !important;
		width: 100% !important;
		float: none !important;
	}
}

/* Paytrail payment icons — compact on all screens */
.paytrail-woocommerce-payment-fields--list-item--img {
  padding: 4px 3px !important;
  min-height: 0 !important;
  max-height: 5em !important;
}

.paytrail-woocommerce-payment-fields--list-item {
  width: 100px !important;
  margin: 0 3px 5px !important;
}

.paytrail-for-woocommerce-tokenized-payment-method-links.add-card-button {
  padding: 8px 16px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

/* === Mobile checkout submit button === */
@media (max-width: 767px) {
  #place_order {
    width: 100% !important;
    display: block !important;
    padding: 18px 24px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }

  .form-row.place-order {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
}

/* === Mobile checkout order summary toggle === */
#ihana-order-toggle {
  display: none;
}

@media (max-width: 767px) {

  #ihana-order-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #3b2a1a;
    color: #fff;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  #ihana-order-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  #ihana-order-toggle .toggle-arrow {
    font-size: 10px;
    transition: transform 0.25s ease;
    display: inline-block;
  }

  #ihana-order-toggle.open .toggle-arrow {
    transform: rotate(180deg);
  }

  #ihana-order-toggle.open {
    margin-bottom: 32px;
  }

  #ihana-order-toggle:not(.open) {
    border-radius: 8px;
    margin-bottom: 16px;
  }

  #ihana-order-toggle .toggle-total {
    font-size: 16px;
    font-weight: 700;
  }

  #ihana-order-summary-box {
    display: none;
    background: #faf8f5;
    border: 1px solid #e0d8cd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
  }

  #ihana-order-summary-box.open {
    display: block;
  }

  .ihana-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #ece6dc;
    font-size: 14px;
  }

  .ihana-summary-item:last-of-type {
    border-bottom: none;
  }

  .ihana-summary-item-name {
    color: #3b2a1a;
    flex: 1;
  }

  .ihana-summary-item-price {
    font-weight: 600;
    color: #3b2a1a;
    white-space: nowrap;
    margin-left: 12px;
  }

  .ihana-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #3b2a1a;
    background: #f0ebe3;
    border-top: 1px solid #d6cfc4;
  }

  /* Paytrail payment method icons — 3 per row on mobile */
  .paytrail-woocommerce-payment-fields--list-item {
    width: calc(33.33% - 6px) !important;
    margin: 0 3px 5px !important;
  }

  .paytrail-woocommerce-payment-fields--list-item--img {
    width: 100% !important;
    height: auto !important;
    padding: 4px 3px !important;
    min-height: 0 !important;
  }

  /* Add card button — compact single line */
  .paytrail-for-woocommerce-tokenized-payment-method-links.add-card-button {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  /* Terms checkbox text — smaller on mobile */
  .woocommerce-terms-and-conditions-checkbox-text {
    font-size: 12px !important;
  }

  /* === Order review table — mobile compact === */

  /* Heading */
  

  /* Table base font */
  

  /* Table header row */
  

  /* Product name column wider, price column narrower */
  

  

  /* Variation meta (color, size) — inline and smaller */
  

  

  

  

  

  /* Quantity "x 1" smaller */
  

  /* Subtotal, shipping, total rows */
  

  /* Shipping label */
  

  /* Shipping radio labels */
  

  /* VAT text smaller */
  

  /* ===== ORDER REVIEW CARD (matches summary toggle design) ===== */

  

  .woocommerce-checkout-review-order {
    background: #faf8f5 !important;
    border: 1px solid #e0d8cd !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
    overflow: hidden !important;
  }

  

  .woocommerce-checkout-review-order-table thead {
    display: none !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item td {
    padding: 10px 16px !important;
    border: none !important;
    border-bottom: 1px solid #ece6dc !important;
    vertical-align: middle !important;
    color: #3b2a1a !important;
    background: transparent !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item:last-child td {
    border-bottom: none !important;
  }

  

  

  

  

  

  

  

  

  .woocommerce-checkout-review-order-table tfoot tr th,
  .woocommerce-checkout-review-order-table tfoot tr td {
    padding: 10px 16px !important;
    border: none !important;
    font-size: 14px !important;
    background: transparent !important;
    color: #3b2a1a !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal td {
    text-align: right !important;
    font-weight: 600 !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr

  .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals td {
    padding-top: 4px !important;
    padding-bottom: 10px !important;
  }

  .woocommerce-shipping-methods {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .woocommerce-shipping-methods li {
    margin-bottom: 2px !important;
    font-size: 13px !important;
  }

  .woocommerce-shipping-methods li label {
    font-size: 13px !important;
  }

  .woocommerce-shipping-methods li input[type="radio"] {
    margin-right: 4px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.order-total th,
  .woocommerce-checkout-review-order-table tfoot tr.order-total td {
    font-weight: 700 !important;
    font-size: 15px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.order-total td {
    text-align: right !important;
  }

  

  .woocommerce-checkout #order_review h3 {
    font-size: 15px !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    color: #3b2a1a !important;
  }

  .woocommerce-checkout-review-order + h3,
  .woocommerce-checkout #order_review > h3:first-of-type {
    margin-top: 16px !important;
  }

  /* ===== ORDER REVIEW CARD (matches summary toggle design) ===== */

  

  .woocommerce-checkout-review-order {
    background: #faf8f5 !important;
    border: 1px solid #e0d8cd !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
    overflow: hidden !important;
  }

  

  .woocommerce-checkout-review-order-table thead {
    display: none !important;
  }

  /* --- PRODUCT ROWS: flex so name gets room, price stays right --- */
  .woocommerce-checkout-review-order-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #ece6dc !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item:last-child {
    border-bottom: none !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #3b2a1a !important;
    width: auto !important;
  }

  

  

  /* --- VARIATION META: inline on one line --- */
  

  

  

  

  

  

  /* --- TFOOT: flex rows so each row controls its own layout --- */
  .woocommerce-checkout-review-order-table tfoot {
    display: block !important;
    width: 100% !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    padding: 10px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr th,
  .woocommerce-checkout-review-order-table tfoot tr td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #3b2a1a !important;
    font-size: 14px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr td {
    text-align: right !important;
    flex-shrink: 0 !important;
    font-weight: 600 !important;
  }

  /* Subtotal divider */
  .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal {
    border-top: 1px solid #d6cfc4 !important;
  }

  /* Shipping: label on top, radios below with full width */
  .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-bottom: 6px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr

  .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals td {
    width: 100% !important;
    text-align: left !important;
  }

  .woocommerce-shipping-methods {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .woocommerce-shipping-methods li {
    margin-bottom: 4px !important;
    font-size: 13px !important;
  }

  .woocommerce-shipping-methods li label {
    font-size: 13px !important;
  }

  /* Order total: bold and prominent */
  .woocommerce-checkout-review-order-table tfoot tr.order-total {
    border-top: 1px solid #d6cfc4 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.order-total th {
    font-weight: 700 !important;
    font-size: 15px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.order-total td {
    font-weight: 700 !important;
    font-size: 15px !important;
  }

  


  /* ===== ORDER REVIEW CARD (matches summary toggle design) ===== */

  #order_review_heading {
    background: #3b2a1a !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    border-radius: 8px 8px 0 0 !important;
  }

  .woocommerce-checkout-review-order {
    background: #faf8f5 !important;
    border: 1px solid #e0d8cd !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
    overflow: hidden !important;
  }

  .woocommerce-checkout-review-order-table {
    font-size: 14px !important;
    margin: 0 !important;
    border: none !important;
    width: 100% !important;
  }

  .woocommerce-checkout-review-order-table thead {
    display: none !important;
  }

  /* --- PRODUCT ROWS: flex layout --- */
  .woocommerce-checkout-review-order-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #ece6dc !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item:last-child {
    border-bottom: none !important;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #3b2a1a !important;
    width: auto !important;
  }

  .woocommerce-checkout-review-order-table .product-name {
    flex: 1 1 0% !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  .woocommerce-checkout-review-order-table .product-total {
    flex-shrink: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    margin-left: 12px !important;
    text-align: right !important;
  }

  /* --- VARIATION META: inline on one line --- */
  .woocommerce-checkout-review-order-table .product-name dl.variation {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    white-space: nowrap !important;
  }

  .woocommerce-checkout-review-order-table .product-name dl.variation dt {
    display: none !important;
  }

  .woocommerce-checkout-review-order-table .product-name dl.variation dd {
    display: inline !important;
    font-size: 12px !important;
    color: #99857a !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
  }

  .woocommerce-checkout-review-order-table .product-name dl.variation dd::after {
    content: " / " !important;
  }

  .woocommerce-checkout-review-order-table .product-name dl.variation dd:last-child::after {
    content: "" !important;
  }

  .woocommerce-checkout-review-order-table .product-name .product-quantity {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #99857a !important;
  }

  /* --- TFOOT: flex rows, each row controls its own layout --- */
  .woocommerce-checkout-review-order-table tfoot {
    display: block !important;
    width: 100% !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    padding: 10px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr th,
  .woocommerce-checkout-review-order-table tfoot tr td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #3b2a1a !important;
    font-size: 14px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr td {
    text-align: right !important;
    flex-shrink: 0 !important;
    font-weight: 600 !important;
  }

  /* Subtotal divider */
  .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal {
    border-top: 1px solid #d6cfc4 !important;
  }

  /* Shipping: label on top, radios below full width */
  .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-bottom: 6px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals th {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals td {
    width: 100% !important;
    text-align: left !important;
  }

  .woocommerce-shipping-methods {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .woocommerce-shipping-methods li {
    margin-bottom: 4px !important;
    font-size: 13px !important;
  }

  .woocommerce-shipping-methods li label {
    font-size: 13px !important;
  }

  /* Order total: bold and prominent */
  .woocommerce-checkout-review-order-table tfoot tr.order-total {
    border-top: 1px solid #d6cfc4 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.order-total th,
  .woocommerce-checkout-review-order-table tfoot tr.order-total td {
    font-weight: 700 !important;
    font-size: 15px !important;
  }

  .woocommerce-checkout-review-order-table .order-total .includes_tax {
    font-size: 11px !important;
    font-weight: 400 !important;
    display: block !important;
    color: #99857a !important;
    margin-top: 2px !important;
  }

}

#carrier-agent-heading {
  margin: 20px 0 0 !important;
}

#woo-carrier-agents-search-button.button {
  padding: 10px 15px 4px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}
