/**
 * Olsiva — WooCommerce Pages Stylesheet
 * Covers: Cart, Checkout, My Account
 * Color: primary #1a4731 | accent #f0fdf4 | slate text palette
 */

/* ─── Shared ──────────────────────────────────────────────────────────────── */
.woocommerce-page h1,
.woocommerce-cart h1,
.woocommerce-checkout h1,
.woocommerce-account h1,
.woocommerce h2,
.woocommerce-page h2 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #0f172a;
}

/* Page heading banner */
.woocommerce-cart .page-title,
.woocommerce-checkout .page-title,
.woocommerce-account .page-title {
    display: none; /* hide if theme renders its own breadcrumb */
}

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page input.button {
    background-color: #1a4731 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    padding: 0.85rem 1.75rem !important;
    transition: background-color 0.2s, transform 0.15s !important;
    box-shadow: 0 4px 14px rgba(26,71,49,0.25) !important;
    cursor: pointer !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce-page a.button:hover,
.woocommerce-page button.button:hover {
    background-color: #0f2e1f !important;
    transform: translateY(-1px) !important;
}
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce-page a.button.alt,
.woocommerce-page button.button.alt {
    background-color: #1a4731 !important;
}

/* ─── Cart ────────────────────────────────────────────────────────────────── */
.woocommerce-cart-form,
.cart-collaterals { max-width: 100%; }

/* Cart table */
.woocommerce table.shop_table {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}
.woocommerce table.shop_table thead tr th {
    background-color: #f8fafc;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}
.woocommerce table.shop_table tbody tr td {
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.woocommerce table.shop_table tbody tr:last-child td { border-bottom: none; }
.woocommerce table.shop_table tfoot tr th,
.woocommerce table.shop_table tfoot tr td {
    background-color: #f8fafc;
    font-size: 0.7rem;
    font-weight: 700;
    border-top: 1px solid #e2e8f0;
    padding: 0.85rem 1.25rem;
}

/* Cart totals box */
.cart_totals {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2rem;
}
.cart_totals h2 {
    font-size: 1rem !important;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #1a4731;
    width: fit-content;
}
.cart_totals .order-total .woocommerce-Price-amount {
    color: #1a4731;
    font-size: 1.25rem;
    font-weight: 900;
}

/* Proceed to checkout */
.wc-proceed-to-checkout .checkout-button {
    width: 100%;
    text-align: center;
    font-size: 0.7rem !important;
    padding: 1rem 2rem !important;
}

/* ─── Checkout ────────────────────────────────────────────────────────────── */
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    font-size: 0.85rem;
}

/* Section headings */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout h3#order_review_heading {
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: #0f172a !important;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #1a4731;
    width: fit-content;
    margin-bottom: 1.5rem;
}

/* Inputs */
.woocommerce-checkout .woocommerce-input-wrapper input,
.woocommerce-checkout .woocommerce-input-wrapper select,
.woocommerce-checkout .woocommerce-input-wrapper textarea,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.8rem !important;
    color: #334155 !important;
    background-color: #f8fafc !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    width: 100% !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus {
    outline: none !important;
    border-color: #1a4731 !important;
    box-shadow: 0 0 0 3px rgba(26,71,49,0.1) !important;
    background-color: #fff !important;
}

/* Labels */
.woocommerce form .form-row label {
    font-size: 0.625rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #64748b !important;
    margin-bottom: 0.35rem !important;
    display: block !important;
}

/* Order review table */
.woocommerce-checkout-review-order table.shop_table {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: hidden;
}

/* Payment section */
#payment {
    background: #f8fafc;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
}
#payment ul.payment_methods li label {
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}
#payment div.form-row.place-order { padding: 1rem 0 0; }
#place_order {
    width: 100% !important;
    font-size: 0.7rem !important;
    padding: 1.1rem !important;
}

/* ─── My Account ─────────────────────────────────────────────────────────── */
.woocommerce-account .woocommerce { display: flex; gap: 2.5rem; align-items: flex-start; }

/* Navigation */
.woocommerce-account .woocommerce-MyAccount-navigation {
    flex-shrink: 0;
    width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 1.5rem;
    position: sticky;
    top: 120px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid #f1f5f9;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child { border-bottom: none; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li span {
    display: block;
    padding: 0.7rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover { color: #1a4731; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active span {
    color: #1a4731;
}

/* Content area */
.woocommerce-account .woocommerce-MyAccount-content { flex: 1; min-width: 0; }

/* Orders table */
.woocommerce-account .woocommerce-orders-table {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: hidden;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.woocommerce-account .woocommerce-orders-table th {
    background: #f8fafc;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.woocommerce-account .woocommerce-orders-table td {
    font-size: 0.8rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.woocommerce-account .woocommerce-orders-table tr:last-child td { border-bottom: none; }

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-top: 4px solid #1a4731;
    background-color: #f0fdf4;
    color: #1a4731;
}
.woocommerce-error { border-color: #dc2626; background-color: #fef2f2; color: #991b1b; }
.woocommerce-info  { border-color: #0ea5e9; background-color: #f0f9ff; color: #0369a1; }

/* ─── WooCommerce Blocks (Cart / Checkout) ────────────────────────────────── */

/* Primary block buttons */
.wp-element-button,
.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-checkout__place-order-button,
.wc-block-components-checkout-place-order-button {
    background-color: #1a4731 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    padding: 0.85rem 1.75rem !important;
    transition: background-color 0.2s, transform 0.15s !important;
    box-shadow: 0 4px 14px rgba(26,71,49,0.25) !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-decoration: none !important;
    text-align: center !important;
}
.wp-element-button:hover,
.wc-block-components-button:hover,
.wc-block-cart__submit-button:hover {
    background-color: #0f2e1f !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Block cart totals sidebar */
.wp-block-woocommerce-cart-order-summary-block,
.wc-block-cart__totals {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
}

/* Block totals rows */
.wc-block-components-totals-wrapper {
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8rem;
}
.wc-block-components-totals-item__label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #334155;
}
.wc-block-components-totals-item__value {
    font-weight: 700;
    color: #0f172a;
}
.wc-block-components-order-meta .wc-block-components-totals-item--total .wc-block-components-totals-item__value {
    color: #1a4731;
    font-size: 1.1rem;
    font-weight: 900;
}

/* Block cart items */
.wc-block-cart-items {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: hidden;
}
.wc-block-cart-items__row {
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}
.wc-block-cart-items__row:last-child { border-bottom: none; }

/* Quantity controls */
.wc-block-components-quantity-selector {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    overflow: hidden;
}
.wc-block-components-quantity-selector__button {
    background: #f8fafc !important;
    color: #1a4731 !important;
    border: none !important;
}

/* Block checkout form inputs */
.wc-block-components-text-input input,
.wc-block-components-select select,
.wc-block-components-textarea textarea {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.8rem !important;
    color: #334155 !important;
    background-color: #f8fafc !important;
}
.wc-block-components-text-input input:focus,
.wc-block-components-select select:focus {
    outline: none !important;
    border-color: #1a4731 !important;
    box-shadow: 0 0 0 3px rgba(26,71,49,0.1) !important;
    background-color: #fff !important;
}
.wc-block-components-form .wc-block-components-text-input label,
.wc-block-components-form .wc-block-components-select label {
    font-size: 0.625rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #64748b !important;
}

/* Block section headings */
.wc-block-components-title,
.wp-block-woocommerce-checkout-shipping-address-block h2,
.wp-block-woocommerce-checkout-billing-address-block h2,
.wp-block-woocommerce-checkout-contact-information-block h2 {
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: #0f172a !important;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #1a4731;
    width: fit-content;
    margin-bottom: 1.5rem;
}

/* Block radio/checkbox payment options */
.wc-block-components-radio-control__option-layout {
    font-size: 0.8rem;
}
.wc-block-components-radio-control input[type="radio"]:checked + span {
    color: #1a4731;
}

/* Coupon section */
.wc-block-components-totals-coupon__button {
    color: #1a4731 !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
}
