/* Cart + Checkout
   Rules:
   - Neue Haas only
   - 18px titles / 14px body / 11px UI
   - Uppercase unless it is a sentence/paragraph
   - No rounded corners
   - No unnecessary lines
   - All borders: 1px solid #000
   - Inputs: grey fill + 1px black border
*/

.woocommerce-cart,
.woocommerce-checkout {
    background: #fff;
}

.woocommerce-cart *,
.woocommerce-checkout *,
.wc-block-cart *,
.wc-block-checkout * {
    font-family: neue-haas-grotesk-display, sans-serif !important;
    border-radius: 0 !important;
}

.woocommerce-cart .page_header,
.woocommerce-checkout .page_header {
    padding: 18px 0 16px;
    margin: 0;
    border-bottom: 1px solid #000;
}

.woocommerce-cart .page_header h1,
.woocommerce-checkout .page_header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
    color: #000;
}

.woocommerce-cart > .container,
.woocommerce-checkout > .container {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* ---- Shared inputs ---- */
.woocommerce-cart input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
.woocommerce-checkout input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
.woocommerce-cart textarea,
.woocommerce-checkout textarea,
.woocommerce-cart select,
.woocommerce-checkout select,
.wc-block-components-text-input input,
.wc-blocks-components-select__select,
.wc-block-components-textarea,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-totals-coupon__input input {
    min-width: 0 !important;
    width: 100%;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0;
    padding: 0 14px !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    background: #efefef !important;
    box-shadow: none !important;
    color: #000 !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.3 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    outline: none;
}

.wc-block-components-text-input input,
.wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input {
    padding: 18px 14px 6px !important;
}

.wc-block-components-text-input label,
.wc-blocks-components-select__label,
.wc-block-components-combobox label {
    font-size: 11px !important;
    font-weight: 500;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #000;
}

.woocommerce-cart input::placeholder,
.woocommerce-checkout input::placeholder,
.woocommerce-cart textarea::placeholder,
.woocommerce-checkout textarea::placeholder {
    color: rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 1;
}

.woocommerce-cart input[type="checkbox"],
.woocommerce-checkout input[type="checkbox"],
.woocommerce-cart input[type="radio"],
.woocommerce-checkout input[type="radio"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    margin: 0;
    padding: 0 !important;
    border: 1px solid #000 !important;
    background: #fff !important;
    box-shadow: none !important;
    accent-color: #000;
}

/* Primary CTAs use .cta-button styles from style.css; full-width on cart/checkout. */
.woocommerce-cart .wc-block-cart__submit-button,
.woocommerce-cart .checkout-button,
.woocommerce-checkout .wc-block-components-checkout-place-order-button,
.woocommerce-checkout #place_order {
    width: 100%;
}

/* ---- Layout ---- */
@media (min-width: 782px) {
    .wc-block-cart.wc-block-components-sidebar-layout,
    .wc-block-checkout.wc-block-components-sidebar-layout {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 48px;
    }

    .wc-block-cart__main,
    .wc-block-checkout__main {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        padding: 0 !important;
    }

    .wc-block-cart__sidebar,
    .wc-block-checkout__sidebar {
        flex: 0 0 360px;
        width: 360px !important;
        padding: 0 !important;
        position: sticky;
        top: 24px;
    }
}

@media (max-width: 781px) {
    .wc-block-cart.wc-block-components-sidebar-layout,
    .wc-block-checkout.wc-block-components-sidebar-layout {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .wc-block-cart__main,
    .wc-block-cart__sidebar,
    .wc-block-checkout__main,
    .wc-block-checkout__sidebar {
        width: 100% !important;
        padding: 0 !important;
    }
}

/* Strip Woo grey boxes / soft borders */
.wc-block-components-checkout-step,
.wc-block-components-checkout-step__heading-container,
.wc-block-components-checkout-step__content,
.wc-block-components-express-payment,
.wc-block-components-express-payment__content,
.wp-block-woocommerce-checkout-order-summary-block,
.wp-block-woocommerce-cart-order-summary-block,
.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-totals-wrapper {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.wc-block-components-express-payment__title::before,
.wc-block-components-checkout-step__heading-container::before,
.wc-block-components-checkout-order-summary__title::before,
.wc-block-components-totals-footer-item::before {
    content: none !important;
    display: none !important;
}

/* Homepage #contact must not style checkout contact form */
.woocommerce-checkout #contact,
.wc-block-checkout #contact.wc-block-components-address-form {
    background: transparent;
    border: 0;
    position: static;
    overflow: visible;
    padding: 0;
    height: auto;
    min-height: 0;
}

/* ---- Titles ---- */
.wc-block-cart__totals-title,
.wp-block-woocommerce-cart-order-summary-heading-block,
.wc-block-components-checkout-step__title,
.wc-block-components-title.wc-block-components-checkout-step__title,
.wc-block-components-checkout-order-summary__title-text,
.wc-block-cart .wc-block-components-title {
    margin: 0 0 16px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #000 !important;
}

.wc-block-components-checkout-order-summary__title {
    display: block;
    margin: 0 !important;
    padding: 0 0 16px !important;
    min-height: 0;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #000 !important;
    cursor: default;
}

.wc-block-components-checkout-order-summary__title-price,
.wc-block-components-checkout-order-summary__title-icon {
    display: none !important;
}

.wc-block-components-checkout-step {
    margin: 0 0 32px;
    padding: 0;
}

.wc-block-components-checkout-step__heading-container {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 0;
}

.wc-block-components-checkout-step__heading-container a,
.wc-block-checkout__login-prompt {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wc-block-components-checkout-step__content,
.wc-block-components-checkout-step__description,
.wc-block-checkout__guest-checkout-notice,
.wc-block-checkout__terms {
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #000;
}

.wc-block-components-text-input,
.wc-blocks-components-select,
.wc-block-components-combobox {
    margin-bottom: 12px;
}

/* ---- Cart table ---- */
.wc-block-cart table.wc-block-cart-items {
    width: 100%;
    border: 0 !important;
    border-top: 1px solid #000 !important;
    border-bottom: 1px solid #000 !important;
    border-collapse: collapse;
    margin: 0;
}

.wc-block-cart-items th,
.wc-block-cart-items td {
    border: 0 !important;
    border-bottom: 1px solid #000 !important;
    background: transparent !important;
    vertical-align: top;
}

.wc-block-cart-items thead th {
    padding: 12px 0 !important;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wc-block-cart-items__row td {
    padding: 20px 0 !important;
}

.wc-block-cart-items__row:last-child td {
    border-bottom: 0 !important;
}

.wc-block-cart-item__image img {
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    object-fit: cover;
}

.wc-block-cart-item__product .wc-block-components-product-name,
.wc-block-components-order-summary-item__description .wc-block-components-product-name {
    display: block;
    margin: 0 0 6px;
    font-size: 14px !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase !important;
    color: #000;
    text-decoration: none;
}

.wc-block-cart-item__prices,
.wc-block-components-product-price,
.wc-block-components-order-summary-item__total-price {
    font-size: 14px !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
}

.wc-block-components-product-metadata,
.wc-block-components-product-details,
.wc-block-components-product-metadata__description {
    font-size: 11px !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
}

.wc-block-components-quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #000 !important;
    background: #fff !important;
    margin-top: 10px;
}

.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input,
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #000 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
}

.wc-block-cart-item__remove-link {
    font-size: 11px !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000 !important;
    text-decoration: underline;
}

/* ---- Totals / coupons / shipping ---- */
.wp-block-woocommerce-checkout-order-summary-block,
.wp-block-woocommerce-cart-order-summary-block {
    border: 1px solid #000 !important;
    background: #fff !important;
    padding: 20px;
}

.wc-block-components-checkout-order-summary__content {
    padding: 16px 0 0 !important;
}

.wc-block-components-order-summary-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 0 0 16px;
    margin: 0 0 16px;
    border: 0;
    border-bottom: 1px solid #000;
}

.wc-block-components-order-summary-item:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.wc-block-components-order-summary-item__image img {
    width: 64px !important;
    height: 80px !important;
    object-fit: cover;
    border: 1px solid #000 !important;
}

.wc-block-components-totals-wrapper,
.wc-block-components-totals-coupon,
.wc-block-components-panel {
    border: 0 !important;
    border-top: 1px solid #000 !important;
    background: transparent !important;
    margin: 0;
    padding: 0;
}

.wc-block-components-totals-coupon .wc-block-components-panel__button,
.wc-block-components-panel__button {
    width: 100%;
    height: auto !important;
    min-height: 44px;
    padding: 12px 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #000 !important;
    font-size: 11px !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.wc-block-components-totals-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border: 0 !important;
    background: transparent !important;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
}

.wc-block-components-totals-footer-item {
    margin: 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid #000 !important;
    background: transparent !important;
    font-size: 11px;
    font-weight: 500;
}

.wc-block-components-totals-shipping .wc-block-components-totals-item__value {
    color: #2e7d32;
}

.wc-block-components-checkbox {
    margin: 8px 0 4px;
}

.wc-block-components-checkbox label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #000;
}

.wc-block-components-radio-control {
    margin-top: 8px;
}

.wc-block-components-radio-control__option {
    margin: 0 0 12px !important;
    padding: 14px !important;
    border: 1px solid #000 !important;
    background: #fff !important;
    box-shadow: none !important;
}

.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
    background: #efefef !important;
    border: 1px solid #000 !important;
}

.wc-block-components-radio-control__label,
.wc-block-components-radio-control__secondary-label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
}

.wc-block-components-radio-control__description,
.wc-block-components-radio-control__secondary-description {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
}

.wc-block-components-express-payment {
    margin: 0 0 24px;
    padding: 0;
}

.wc-block-components-express-payment__title,
.wc-block-components-express-payment-continue-rule {
    margin: 0 0 12px;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000;
}

.wc-block-components-express-payment__event-buttons {
    display: flex;
    gap: 12px;
}

.wc-block-components-express-payment__event-buttons > * {
    flex: 1 1 0;
    min-width: 0;
}

.wc-block-cart__submit-container {
    margin-top: 16px;
    background: transparent;
}

.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table {
    border: 1px solid #000 !important;
    border-collapse: collapse;
}

.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
    border: 1px solid #000 !important;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 16px !important;
}
