/* =============================================================
   PALMWOOD RENTALS – WOOCOMMERCE OVERRIDES
   ============================================================= */

/* ---- NOTICES ---- */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    border-radius: var(--radius-sm) !important;
    border-top: none !important;
    border-left: 4px solid var(--brand) !important;
    background: var(--brand-light) !important;
    color: var(--text) !important;
    padding: 1rem 1.2rem !important;
    margin-bottom: 1.5rem !important;
}
.woocommerce-error { border-left-color: #c0392b !important; background: #fdf0ef !important; }

/* ---- CART PAGE ---- */
.woocommerce-cart .woocommerce {
    max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem;
}
.woocommerce table.shop_table { border-collapse: collapse; width: 100%; }
.woocommerce table.shop_table th { background: var(--dark); color: var(--white); padding: 1rem; text-align: left; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px; }
.woocommerce table.shop_table td { padding: 1rem; border-bottom: 1px solid #eee; vertical-align: middle; }
.woocommerce table.shop_table .product-thumbnail img { width: 80px; border-radius: var(--radius-sm); }
.woocommerce table.shop_table .product-name a { font-weight: 600; color: var(--text); text-decoration: none; }
.woocommerce table.shop_table .product-name a:hover { color: var(--brand); }
.woocommerce .cart-collaterals { margin-top: 2rem; }
.woocommerce .cart_totals { background: var(--light); padding: 1.5rem; border-radius: var(--radius); max-width: 380px; margin-left: auto; }
.woocommerce .cart_totals h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 1rem; }
.woocommerce .cart_totals table { width: 100%; }
.woocommerce .cart_totals td, .woocommerce .cart_totals th { padding: 0.6rem 0; border-bottom: 1px solid #ddd; font-size: 0.9rem; }
.woocommerce .cart_totals .order-total td, .woocommerce .cart_totals .order-total th { font-size: 1.1rem; font-weight: 700; border-bottom: none; }
.woocommerce a.checkout-button { display: block; text-align: center; margin-top: 1rem; }

/* ---- CHECKOUT PAGE ---- */
.woocommerce-checkout .woocommerce {
    max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem;
}
.woocommerce-checkout #customer_details { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.woocommerce-checkout h3 { font-family: var(--font-head); font-size: 1.6rem; margin: 1.5rem 0 1rem; }
.woocommerce-checkout .form-row { margin-bottom: 1rem; }
.woocommerce-checkout .form-row label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
#order_review_heading { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: 1rem; }
#order_review { background: var(--light); padding: 1.5rem; border-radius: var(--radius); }
#order_review table { width: 100%; }
#order_review td, #order_review th { padding: 0.7rem 0; border-bottom: 1px solid #ddd; font-size: 0.9rem; }
.woocommerce-checkout #place_order { width: 100%; font-size: 1.1rem; padding: 1.1rem; margin-top: 1rem; }
.palmwood-checkout-extra { background: var(--light); padding: 1.5rem; border-radius: var(--radius-sm); margin: 1.5rem 0; }
.palmwood-checkout-extra h3 { font-size: 1.3rem; margin-bottom: 1rem; }

/* ---- ACCOUNT PAGE ---- */
.woocommerce-account .woocommerce {
    max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 220px 1fr; gap: 2rem;
}
.woocommerce-MyAccount-navigation ul { list-style: none; }
.woocommerce-MyAccount-navigation li { margin-bottom: 0.3rem; }
.woocommerce-MyAccount-navigation a { display: block; padding: 0.6rem 1rem; background: var(--light); border-radius: var(--radius-sm); text-decoration: none; color: var(--text-muted); font-size: 0.9rem; transition: all 0.2s; }
.woocommerce-MyAccount-navigation li.is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--brand); color: var(--white); }

/* ---- PRODUCT RATING ---- */
.star-rating { color: var(--brand); }
.woocommerce-product-rating .woocommerce-review-link { font-size: 0.85rem; color: var(--text-muted); margin-left: 0.5rem; }

/* ---- SALE BADGE ---- */
.woocommerce span.onsale { background: var(--brand) !important; border-radius: var(--radius-sm) !important; font-size: 0.75rem !important; min-width: 0 !important; padding: 0.3rem 0.7rem !important; }

/* ---- PAGINATION ---- */
.woocommerce-pagination .page-numbers { display: flex; gap: 0.5rem; list-style: none; justify-content: center; margin-top: 2.5rem; }
.woocommerce-pagination .page-numbers li a, .woocommerce-pagination .page-numbers li span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid #ddd; border-radius: var(--radius-sm); font-size: 0.9rem; text-decoration: none; color: var(--text-muted); transition: all 0.2s; }
.woocommerce-pagination .page-numbers li span.current, .woocommerce-pagination .page-numbers li a:hover { background: var(--brand); color: var(--white); border-color: var(--brand); }

/* ---- PAYMENT METHODS ---- */
.wc_payment_methods li { background: var(--white); border: 1px solid #eee; border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 0.5rem; }
.wc_payment_methods li.payment_method_active, .wc_payment_methods li:has(input:checked) { border-color: var(--brand); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .woocommerce-checkout #customer_details { grid-template-columns: 1fr; }
    .woocommerce-account .woocommerce { grid-template-columns: 1fr; }
}

/* ---- PRODUCT LOOP CARDS – hide Add to Cart button and Price ---- */
ul.products li.product .button,
ul.products li.product .add_to_cart_button,
ul.products li.product .product_type_simple,
ul.products li.product .price,
ul.products li.product .woocommerce-Price-amount {
    display: none !important;
}

/* ---- PRODUCT GRID – larger cards ---- */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    margin: 2rem 0 !important;
}

/* 2 columns on tablet */
@media (max-width: 900px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 1 column on mobile */
@media (max-width: 560px) {
    ul.products {
        grid-template-columns: 1fr !important;
    }
}

ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* Taller product image */
ul.products li.product a img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* Bigger product title */
ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-head) !important;
    font-size: 1.4rem !important;
    padding: 1rem 1.2rem 0.4rem !important;
    line-height: 1.2 !important;
    color: var(--text) !important;
}

/* Card body padding */
ul.products li.product {
    padding-bottom: 1.4rem !important;
}

/* ---- FIX: kill WooCommerce float layout completely ---- */
ul.products::before,
ul.products::after,
ul.products li.product::before,
ul.products li.product::after {
    display: none !important;
    content: none !important;
}

ul.products li.product,
ul.products li.product.first,
ul.products li.product.last {
    float: none !important;
    clear: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}

/* ---- SINGLE PRODUCT – hide tabs nav (Description bullet link) ---- */
.woocommerce-tabs .tabs,
.woocommerce-tabs ul.tabs {
    display: none !important;
}

/* ---- SINGLE PRODUCT – hide quantity box, default add to cart button, rental date fields ---- */
.single-product .quantity,
.single-product .woocommerce-variation-add-to-cart,
.single-product button.single_add_to_cart_button,
.single-product .rental-date-field {
    display: none !important;
}

/* ---- REQUEST A RENTAL BUTTON ---- */
.rental-request-wrap {
    margin: 1.5rem 0;
}
.rental-request-btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    padding: 1rem !important;
    border-radius: var(--radius-sm) !important;
    letter-spacing: 0.5px;
}
.rental-request-note {
    margin: 0.8rem 0 0 !important;
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    text-align: center !important;
    line-height: 1.6 !important;
}
.rental-request-note a {
    color: var(--brand) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* ---- PRODUCT LOOP CARDS – show short description ---- */
ul.products li.product .woocommerce-product-details__short-description {
    display: block !important;
    padding: 0 1.2rem 1rem !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    line-height: 1.6 !important;
}

/* ---- PRODUCT LOOP CARDS – hide short description on shop page ---- */
ul.products li.product .woocommerce-product-details__short-description {
    display: none !important;
}

/* ---- CHECKOUT – Single column, order summary BELOW (Blocks + Classic) ---- */

/* BLOCK CHECKOUT: force single column layout */
.wp-block-woocommerce-checkout.wc-block-checkout {
    display: flex !important;
    flex-direction: column !important;
    max-width: 700px !important;
    margin: 2rem auto !important;
    padding: 0 1.5rem !important;
}
.wc-block-checkout__main,
.wp-block-woocommerce-checkout-fields-block {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    order: 1 !important;
}
.wc-block-checkout__sidebar,
.wp-block-woocommerce-checkout-order-summary-block {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    order: 99 !important;
    position: static !important;
    top: auto !important;
    margin-top: 2rem !important;
}
/* Override the grid/flex that puts summary on the side */
.wc-block-checkout__content,
.wc-block-components-sidebar-layout,
.wc-block-components-sidebar-layout__content,
.e-con, .e-flex {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}
/* Hide the sticky sidebar wrapper */
.wc-block-components-sidebar-layout__sidebar {
    position: static !important;
    width: 100% !important;
    float: none !important;
    order: 99 !important;
    margin-top: 2rem !important;
}

/* CLASSIC CHECKOUT fallback */
.woocommerce-checkout form.woocommerce-checkout {
    display: flex !important;
    flex-direction: column !important;
}
.woocommerce-checkout .col2-set,
.woocommerce-checkout #customer_details {
    width: 100% !important;
    float: none !important;
    order: 1 !important;
}
.woocommerce-checkout #order_review_heading { order: 9 !important; }
.woocommerce-checkout #order_review {
    width: 100% !important;
    float: none !important;
    order: 10 !important;
    margin-top: 2rem !important;
    background: var(--light) !important;
    border-radius: var(--radius) !important;
    padding: 1.5rem !important;
}
