/* ================================================================
   Udrive-child — WooCommerce overrides
   Default WC CSS is dequeued. Parent theme wraps WC content in:
     .sidebar-page-container > .auto-container > .row > .content-side
       > .blog-list-content > .thm-unit-test
   Body carries .woocommerce / .woocommerce-page classes.
   ================================================================ */

:root {
    --uc-primary: #163c7a;
    --uc-primary-dark: #0e2b59;
    --uc-accent: #f6b21a;
    --uc-accent-dark: #d7960e;
    --uc-text: #1f2937;
    --uc-muted: #6b7280;
    --uc-border: #e5e7eb;
    --uc-bg: #f8fafc;
    --uc-white: #ffffff;
    --uc-radius: 18px;
    --uc-radius-sm: 12px;
    --uc-shadow: 0 8px 30px rgba(9,30,66,.07);
    --uc-shadow-hover: 0 16px 44px rgba(9,30,66,.12);
    --uc-font: "Lexend","Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}

/* ——— Page wrapper ——— */
body.woocommerce .sidebar-page-container,
body.woocommerce-page .sidebar-page-container {
    background: var(--uc-bg);
    font-family: var(--uc-font);
    color: var(--uc-text);
    -webkit-font-smoothing: antialiased;
}

body.woocommerce .thm-unit-test,
body.woocommerce-page .thm-unit-test {
    max-width: 100%;
}

/* ===== SHOP / ARCHIVE ===== */

/* -- Toolbar: result count + sort -- */
body.woocommerce .thm-unit-test .woocommerce-notices-wrapper {
    margin-bottom: 16px;
}

body.woocommerce .thm-unit-test p.woocommerce-result-count {
    float: left;
    margin: 0 0 24px;
    line-height: 48px;
    color: var(--uc-muted);
    font-size: .95rem;
    font-weight: 600;
}

body.woocommerce .thm-unit-test form.woocommerce-ordering {
    float: right;
    margin: 0 0 24px;
}

body.woocommerce .thm-unit-test form.woocommerce-ordering select.orderby {
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid var(--uc-border);
    padding: 10px 42px 10px 20px;
    background: var(--uc-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    color: var(--uc-text);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* clearfix after toolbar */
body.woocommerce .thm-unit-test::after {
    content: "";
    display: table;
    clear: both;
}

/* -- Product grid -- */
body.woocommerce ul.products,
body.woocommerce-page ul.products,
.thm-unit-test ul.products,
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    margin: 0 0 40px !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

body.woocommerce ul.products::before,
body.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

body.woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product,
.thm-unit-test ul.products li.product {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
    list-style: none !important;
    position: relative;
    display: flex !important;
    flex-direction: column;
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    overflow: hidden;
    box-shadow: var(--uc-shadow);
    padding: 0 !important;
    transition: box-shadow .25s, transform .2s;
}

body.woocommerce ul.products li.product:hover {
    box-shadow: var(--uc-shadow-hover);
    transform: translateY(-3px);
}

/* card link wrapper */
body.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link,
body.woocommerce ul.products li.product > .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    padding: 20px 20px 0;
    text-decoration: none !important;
    color: inherit;
    flex: 1 1 auto;
}

/* thumbnail */
body.woocommerce ul.products li.product a img,
body.woocommerce ul.products li.product img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 14px;
    margin: 0 0 16px !important;
    display: block;
}

/* product title in loop */
body.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.woocommerce ul.products li.product h2 {
    font-family: var(--uc-font);
    font-size: 1.1rem !important;
    font-weight: 700;
    line-height: 1.35;
    color: var(--uc-primary);
    margin: 0 0 8px !important;
    padding: 0 !important;
}

/* star rating in loop */
body.woocommerce ul.products li.product .star-rating {
    float: none;
    margin: 0 0 8px;
    font-size: .85rem;
    color: var(--uc-accent);
}

/* price in loop */
body.woocommerce ul.products li.product .price {
    color: var(--uc-primary) !important;
    font-weight: 800;
    font-size: 1.15rem !important;
    margin: 0 0 8px !important;
    font-variant-numeric: tabular-nums;
}

/* add-to-cart / read-more in loop */
body.woocommerce ul.products li.product > .button,
body.woocommerce ul.products li.product > a.button,
body.woocommerce ul.products li.product > a.add_to_cart_button {
    display: block !important;
    margin: auto 20px 20px !important;
    text-align: center;
    width: calc(100% - 40px) !important;
    box-sizing: border-box;
}

/* badge */
.udrive-woo-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.udrive-woo-badge.featured { background: var(--uc-accent); color: #111827; }
.udrive-woo-badge.sale { background: #ef4444; color: #fff; }

/* ===== BUTTONS (global) ===== */
body.woocommerce a.button,
body.woocommerce button.button,
body.woocommerce input.button,
body.woocommerce #respond input#submit,
body.woocommerce a.button.alt,
body.woocommerce button.button.alt,
body.woocommerce input.button.alt,
body.woocommerce .cart .single_add_to_cart_button {
    background: var(--uc-accent) !important;
    color: #111827 !important;
    border-radius: 999px !important;
    border: 0 !important;
    padding: 14px 26px !important;
    font-weight: 800 !important;
    font-family: var(--uc-font);
    font-size: .95rem;
    line-height: 1.4;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(246,178,26,.30);
    text-decoration: none !important;
}

body.woocommerce a.button:hover,
body.woocommerce button.button:hover,
body.woocommerce input.button:hover,
body.woocommerce #respond input#submit:hover,
body.woocommerce a.button.alt:hover,
body.woocommerce button.button.alt:hover,
body.woocommerce input.button.alt:hover,
body.woocommerce .cart .single_add_to_cart_button:hover {
    background: var(--uc-accent-dark) !important;
    color: #111827 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(246,178,26,.40);
}

body.woocommerce a.button:disabled,
body.woocommerce button.button:disabled,
body.woocommerce button.button.alt.disabled {
    opacity: .55;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* ===== FORM INPUTS ===== */
body.woocommerce .quantity .qty,
body.woocommerce form .form-row input.input-text,
body.woocommerce form .form-row textarea,
body.woocommerce form .form-row select,
body.woocommerce-cart table.cart td.actions .coupon .input-text {
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius-sm);
    min-height: 48px;
    padding: 10px 14px;
    font: inherit;
}

body.woocommerce .quantity {
    display: inline-flex !important;
    align-items: center;
    border-radius: var(--uc-radius-sm);
    overflow: hidden;
    border: 1px solid var(--uc-border);
    background: var(--uc-white);
    margin-right: 12px;
    vertical-align: middle;
}

body.woocommerce .quantity .qty {
    border: 0;
    min-height: 48px;
    width: 60px;
    text-align: center;
    -moz-appearance: textfield;
}

body.woocommerce .quantity .qty::-webkit-inner-spin-button,
body.woocommerce .quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== SINGLE PRODUCT ===== */

/* two-column layout */
.udrive-single-course__top {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) !important;
    gap: 32px !important;
    margin-bottom: 36px !important;
    align-items: start;
}

/* gallery card */
.udrive-single-course__gallery {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 20px;
    overflow: hidden;
}

/* Force gallery visible (WC inline sets opacity:0 until JS init) */
.udrive-single-course__gallery .woocommerce-product-gallery,
body.woocommerce div.product .woocommerce-product-gallery {
    opacity: 1 !important;
    position: relative;
    margin: 0 !important;
    float: none !important;
    width: 100% !important;
}

.udrive-single-course__gallery .woocommerce-product-gallery__wrapper,
.udrive-single-course__gallery .flex-viewport {
    border-radius: 14px;
    overflow: hidden;
    background: var(--uc-bg);
    width: 100% !important;
}

.udrive-single-course__gallery .woocommerce-product-gallery__image,
.udrive-single-course__gallery .woocommerce-product-gallery__image a {
    display: block;
    width: 100%;
}

.udrive-single-course__gallery .woocommerce-product-gallery__image img,
.udrive-single-course__gallery .woocommerce-product-gallery__wrapper img,
.udrive-single-course__gallery .flex-viewport img,
body.woocommerce div.product .woocommerce-product-gallery .wp-post-image {
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    border-radius: 14px;
}

/* Zoom trigger icon — modern circle button */
body.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger,
.udrive-single-course__gallery .woocommerce-product-gallery__trigger {
    position: absolute !important;
    top: 16px;
    right: 16px;
    z-index: 9;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--uc-white);
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-indent: -9999px;
    overflow: hidden;
    border: 0;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
}

body.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger::before,
.udrive-single-course__gallery .woocommerce-product-gallery__trigger::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23163c7a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") no-repeat center / contain;
    text-indent: 0;
}

body.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger:hover {
    background: var(--uc-bg);
    box-shadow: 0 4px 18px rgba(0,0,0,.16);
}

/* Thumbnails strip */
.udrive-single-course__gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.udrive-single-course__gallery .flex-control-thumbs li {
    width: 68px;
    list-style: none !important;
    margin: 0 !important;
}

.udrive-single-course__gallery .flex-control-thumbs li img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .65;
    transition: opacity .2s, border-color .2s;
}

.udrive-single-course__gallery .flex-control-thumbs li img:hover,
.udrive-single-course__gallery .flex-control-thumbs li img.flex-active {
    opacity: 1;
    border-color: var(--uc-primary);
}

/* On-sale badge */
body.woocommerce span.onsale {
    z-index: 2;
    min-height: 36px;
    min-width: 36px;
    line-height: 1;
    top: 16px;
    left: 16px;
    right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-weight: 800;
    font-size: .72rem;
    padding: 0 10px;
}

/* — Summary card — */
.udrive-single-course__summary {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 28px 30px;
}

body.woocommerce .udrive-single-course__summary h1.product_title,
.udrive-single-course__summary .product_title {
    color: var(--uc-primary) !important;
    font-size: clamp(1.4rem, 2.4vw, 2rem) !important;
    font-weight: 800 !important;
    line-height: 1.2;
    letter-spacing: -.02em;
    margin: 0 0 12px !important;
    font-family: var(--uc-font);
}

body.woocommerce .udrive-single-course__summary p.price,
body.woocommerce .udrive-single-course__summary .price,
.udrive-single-course__summary .price {
    color: var(--uc-primary) !important;
    font-weight: 800;
    font-size: 1.6rem !important;
    margin: 0 0 16px !important;
    font-variant-numeric: tabular-nums;
}

.udrive-single-course__summary .woocommerce-product-rating {
    margin-bottom: 10px;
}

.udrive-single-course__summary .star-rating {
    color: var(--uc-accent);
    float: none;
}

.udrive-single-course__summary .woocommerce-product-details__short-description {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--uc-text);
    margin: 0 0 18px;
}

.udrive-woo-support-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    padding: 14px 16px;
    border-radius: 14px;
    margin: 0 0 18px;
    font-size: .93rem;
    line-height: 1.55;
}

.udrive-single-course__summary p.stock {
    font-size: .9rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.udrive-single-course__summary p.stock.in-stock {
    color: #16a34a;
}

.udrive-single-course__summary p.stock.out-of-stock {
    color: #ef4444;
}

/* add-to-cart form */
.udrive-single-course__summary form.cart,
body.woocommerce div.product form.cart {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    margin: 0 0 20px !important;
    padding: 0 !important;
}

.udrive-single-course__summary .single_add_to_cart_button {
    min-height: 52px;
    padding: 0 32px !important;
    flex: 1 1 auto;
}

/* product meta */
.udrive-single-course__summary .product_meta {
    font-size: .9rem;
    color: var(--uc-muted);
    line-height: 1.6;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--uc-border);
}

.udrive-single-course__summary .product_meta a {
    color: var(--uc-primary);
    font-weight: 600;
    text-decoration: none;
}

.udrive-single-course__summary .product_meta a:hover {
    text-decoration: underline;
}

/* ===== TABS ===== */
body.woocommerce div.product .woocommerce-tabs,
.udrive-product-tabs.wc-tabs-wrapper {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 24px 28px;
    margin: 0 0 32px;
}

body.woocommerce div.product .woocommerce-tabs ul.tabs,
.udrive-product-tabs ul.tabs.wc-tabs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px !important;
    padding: 0 !important;
    list-style: none !important;
    border: 0 !important;
    background: none !important;
    overflow: visible !important;
}

body.woocommerce div.product .woocommerce-tabs ul.tabs::before,
body.woocommerce div.product .woocommerce-tabs ul.tabs::after {
    content: none !important;
    display: none !important;
}

body.woocommerce div.product .woocommerce-tabs ul.tabs li,
.udrive-product-tabs ul.tabs li {
    list-style: none !important;
    background: none !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 999px;
    overflow: hidden;
    float: none !important;
}

body.woocommerce div.product .woocommerce-tabs ul.tabs li a,
.udrive-product-tabs ul.tabs li a {
    display: inline-flex !important;
    padding: 12px 20px !important;
    border-radius: 999px;
    background: var(--uc-bg);
    color: var(--uc-primary) !important;
    font-weight: 700;
    text-decoration: none !important;
    font-size: .95rem;
    border: 1px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
}

body.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.udrive-product-tabs ul.tabs li.active a {
    background: var(--uc-primary) !important;
    color: var(--uc-white) !important;
    border-color: var(--uc-primary);
}

body.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    background: var(--uc-primary);
    color: var(--uc-white) !important;
}

/* panels */
body.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel,
body.woocommerce div.product .woocommerce-tabs .panel {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--uc-text);
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

body.woocommerce div.product .woocommerce-tabs .panel h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--uc-primary);
    margin: 0 0 16px;
    font-family: var(--uc-font);
}

body.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel--description > h2:first-child {
    display: none;
}

/* Review form — layout (stars / star font in section at EOF) */
body.woocommerce #review_form,
body.woocommerce-page #review_form {
    max-width: 100%;
    padding: 0;
}

body.woocommerce #review_form #respond,
body.woocommerce-page #review_form #respond {
    position: static;
    margin: 0;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

body.woocommerce #review_form .comment-form,
body.woocommerce-page #review_form .comment-form {
    display: block;
}

body.woocommerce #review_form .comment-form::after,
body.woocommerce-page #review_form .comment-form::after {
    content: "";
    display: table;
    clear: both;
}

body.woocommerce #review_form .comment-form p,
body.woocommerce-page #review_form .comment-form p {
    margin-bottom: 1rem !important;
    clear: both;
    float: none !important;
    width: 100%;
    position: relative;
}

body.woocommerce #review_form .comment-form label,
body.woocommerce-page #review_form .comment-form label {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 0 8px !important;
    font-weight: 600;
    color: var(--uc-text);
}

body.woocommerce #reviews .comment-form-rating,
body.woocommerce-page #reviews .comment-form-rating {
    margin-bottom: 1.25rem !important;
    padding-top: 4px;
}

body.woocommerce #reviews .comment-form-rating label,
body.woocommerce-page #reviews .comment-form-rating label {
    display: block !important;
    margin-bottom: 8px !important;
}

body.woocommerce #reviews select#rating,
body.woocommerce-page #reviews select#rating {
    display: block !important;
    width: 100%;
    max-width: 320px;
    min-height: 46px;
    margin: 0 !important;
    float: none !important;
    clear: both;
    padding: 10px 14px;
    border-radius: var(--uc-radius-sm);
    border: 1px solid var(--uc-border);
    font: inherit;
    background: var(--uc-white);
    color: var(--uc-text);
}

body.woocommerce #review_form input[type="text"],
body.woocommerce #review_form input[type="email"],
body.woocommerce-page #review_form input[type="text"],
body.woocommerce-page #review_form input[type="email"],
body.woocommerce #review_form textarea,
body.woocommerce-page #review_form textarea {
    border-radius: var(--uc-radius-sm);
    border: 1px solid var(--uc-border);
    padding: 12px 14px;
    width: 100%;
    max-width: 100%;
    font: inherit;
    box-sizing: border-box;
}

body.woocommerce #review_form .comment-form-comment,
body.woocommerce-page #review_form .comment-form-comment {
    margin-top: 1rem !important;
}

body.woocommerce #review_form .form-submit input,
body.woocommerce-page #review_form .form-submit input {
    min-height: 48px;
}

body.woocommerce #reviews .woocommerce-Reviews-title,
body.woocommerce-page #reviews .woocommerce-Reviews-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--uc-primary);
    margin: 0 0 12px;
}

body.woocommerce #reviews .woocommerce-noreviews,
body.woocommerce-page #reviews .woocommerce-noreviews {
    color: var(--uc-muted);
    font-size: .95rem;
}

/* ===== RELATED & UPSELLS ===== */
body.woocommerce section.related.products,
body.woocommerce .up-sells.upsells.products,
body.woocommerce .thm-unit-test section.related.products {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 24px 28px;
    clear: both;
    margin-top: 12px;
}

body.woocommerce section.related.products > h2,
body.woocommerce .up-sells.upsells.products > h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--uc-primary);
    margin: 0 0 20px;
    font-family: var(--uc-font);
}

/* Related products inherit the shop grid */
body.woocommerce section.related.products ul.products,
body.woocommerce .up-sells.upsells.products ul.products {
    margin-bottom: 0 !important;
}

/* ===== WooCommerce utility pages: full-width main, drop theme blog sidebar =====
   Udrive uses col-lg-8 + col-lg-5; that steals width and can shrink cart totals to
   ~33% (or match stray .col-md-4), breaking prices into vertical glyphs. */

body.woocommerce-cart .sidebar-page-container .row > .content-side,
body.woocommerce-checkout .sidebar-page-container .row > .content-side,
body.woocommerce-account .sidebar-page-container .row > .content-side,
body.woocommerce-order-received .sidebar-page-container .row > .content-side,
body.woocommerce-lost-password .sidebar-page-container .row > .content-side {
    -ms-flex: 0 0 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}
body.woocommerce-checkout .nice-select{
    display:none;
}
body.woocommerce-cart .sidebar-page-container .row > .sidebar-side,
body.woocommerce-checkout .sidebar-page-container .row > .sidebar-side,
body.woocommerce-account .sidebar-page-container .row > .sidebar-side,
body.woocommerce-order-received .sidebar-page-container .row > .sidebar-side,
body.woocommerce-lost-password .sidebar-page-container .row > .sidebar-side {
    display: none !important;
}

/* ===== CART PAGE (dequeued default WC: restore table layout) =====
   Parent Bootstrap / broken responsive rules can set tr,td to display:block,
   which collapses columns. We force a real <table> layout on the cart. */

body.woocommerce-cart .thm-unit-test,
body.woocommerce-cart .thm-unit-test .woocommerce,
body.woocommerce-cart .content-side,
body.woocommerce-cart .blog-list-content {
    max-width: 100%;
    box-sizing: border-box;
}

/* Cart wrapper direction — don't depend on :has(), target any .woocommerce ancestor */
body.woocommerce-cart .thm-unit-test .woocommerce {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Undo Bootstrap col-* if a builder/plugin added them to collaterals */
body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart .cart-collaterals[class*="col-"],
body.woocommerce-cart .cart-collaterals.col-md-4,
body.woocommerce-cart .cart-collaterals.col-lg-4 {
    -ms-flex: 1 1 auto !important;
    flex: 1 1 auto !important;
    flex-basis: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.woocommerce-cart .cart-collaterals {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* Two-column cart layout: form left, totals right
   The .woocommerce wrapper is the grid container.
   Extra children (notices, block wrappers) span full width. */
@media (min-width: 992px) {
    body.woocommerce-cart .thm-unit-test .woocommerce {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
        gap: 32px 28px;
        align-items: start;
    }

    /* All direct children default to spanning both columns (notices, wrappers, etc.) */
    body.woocommerce-cart .thm-unit-test .woocommerce > * {
        grid-column: 1 / -1;
    }

    /* Cart form goes left */
    body.woocommerce-cart .woocommerce-cart-form {
        grid-column: 1 !important;
        min-width: 0;
        max-width: 100%;
    }

    /* Collaterals go right, sticky */
    body.woocommerce-cart .cart-collaterals {
        grid-column: 2 !important;
        grid-row: 2 / span 5;
        position: sticky;
        top: 100px;
        min-width: min(400px, 100%);
        max-width: 100%;
    }
}

/* Cart form card: clip wide tables inside the first grid track */
body.woocommerce-cart .woocommerce-cart-form {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 20px 16px 24px;
    margin-bottom: 0;
    box-sizing: border-box;
}

/* --- Force table display (overrides any display:block on rows/cells) --- */
body.woocommerce-cart table.shop_table,
body.woocommerce-cart table.woocommerce-cart-form__contents,
body.woocommerce table.shop_table.cart {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    table-layout: auto;
    margin: 0 0 8px !important;
    background: var(--uc-white) !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none;
}

body.woocommerce-cart table.shop_table thead,
body.woocommerce-cart table.woocommerce-cart-form__contents thead {
    display: table-header-group !important;
}

body.woocommerce-cart table.shop_table tbody,
body.woocommerce-cart table.woocommerce-cart-form__contents tbody {
    display: table-row-group !important;
}

body.woocommerce-cart table.shop_table tfoot,
body.woocommerce-cart table.woocommerce-cart-form__contents tfoot {
    display: table-footer-group !important;
}

body.woocommerce-cart table.shop_table tr,
body.woocommerce-cart table.woocommerce-cart-form__contents tr {
    display: table-row !important;
}

body.woocommerce-cart table.shop_table th,
body.woocommerce-cart table.shop_table td,
body.woocommerce-cart table.woocommerce-cart-form__contents th,
body.woocommerce-cart table.woocommerce-cart-form__contents td {
    display: table-cell !important;
    vertical-align: middle !important;
    text-align: left;
    box-sizing: border-box;
    border-bottom: 1px solid var(--uc-border) !important;
    padding: 14px 10px 14px 12px !important;
}

body.woocommerce-cart table.shop_table thead th,
body.woocommerce-cart table.woocommerce-cart-form__contents thead th {
    background: var(--uc-bg);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--uc-muted);
    border-bottom: 2px solid var(--uc-border) !important;
    white-space: nowrap;
}

/* Column widths / alignment */
body.woocommerce-cart table.shop_table .product-remove,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-remove {
    width: 48px;
    text-align: center;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

body.woocommerce-cart table.shop_table .product-thumbnail,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-thumbnail {
    width: 88px;
    max-width: 88px;
}

body.woocommerce-cart table.shop_table .product-thumbnail a,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-thumbnail a {
    display: block;
    line-height: 0;
}

/* Thumbnail: keep small, never full-width */
body.woocommerce-cart table.shop_table .product-thumbnail img,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-thumbnail img {
    width: 80px !important;
    max-width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    border-radius: var(--uc-radius-sm);
    display: block;
    margin: 0;
}

body.woocommerce-cart table.shop_table .product-name,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-name {
    min-width: 0;
    max-width: 220px;
    font-weight: 700;
    color: var(--uc-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

body.woocommerce-cart table.shop_table .product-name a,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-name a {
    color: var(--uc-primary) !important;
    text-decoration: none;
    font-size: 1.05rem;
}

body.woocommerce-cart table.shop_table .product-name a:hover,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-name a:hover {
    text-decoration: underline;
}

body.woocommerce-cart table.shop_table .product-price,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-price,
body.woocommerce-cart table.shop_table .product-subtotal,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-subtotal {
    min-width: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--uc-text);
}

body.woocommerce-cart table.shop_table .product-quantity,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-quantity {
    min-width: 0;
    max-width: 150px;
    white-space: nowrap;
}

body.woocommerce-cart table.shop_table .product-quantity .quantity,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-quantity .quantity {
    margin: 0;
}

/* Remove (×) link */
body.woocommerce-cart table.shop_table .product-remove a.remove,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    line-height: 1;
    font-size: 1.4rem;
    color: #b91c1c !important;
    background: #fef2f2;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    transition: background 0.2s, color 0.2s;
}

body.woocommerce-cart table.shop_table .product-remove a.remove:hover,
body.woocommerce-cart table.woocommerce-cart-form__contents .product-remove a.remove:hover {
    background: #fee2e2;
    color: #991b1b !important;
}

/* Actions row: coupon + update */
body.woocommerce-cart table.shop_table td.actions,
body.woocommerce-cart table.woocommerce-cart-form__contents td.actions {
    padding: 20px 16px !important;
    background: var(--uc-bg) !important;
    border-bottom: 0 !important;
    vertical-align: middle !important;
}

body.woocommerce-cart table.shop_table td.actions .coupon,
body.woocommerce-cart table.woocommerce-cart-form__contents td.actions .coupon {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    float: left;
}

body.woocommerce-cart table.shop_table td.actions .coupon .input-text,
body.woocommerce-cart table.woocommerce-cart-form__contents td.actions .coupon .input-text {
    min-width: 200px;
    min-height: 48px;
}

body.woocommerce-cart table.shop_table td.actions .button,
body.woocommerce-cart table.woocommerce-cart-form__contents td.actions .button,
body.woocommerce-cart table.shop_table td.actions button[name="update_cart"],
body.woocommerce-cart table.woocommerce-cart-form__contents td.actions button[name="update_cart"] {
    min-height: 48px;
    margin: 0;
}

body.woocommerce-cart table.shop_table td.actions::after,
body.woocommerce-cart table.woocommerce-cart-form__contents td.actions::after {
    content: "";
    display: table;
    clear: both;
}

/* Float update button right on wide screens */
@media (min-width: 600px) {
    body.woocommerce-cart table.shop_table td.actions,
    body.woocommerce-cart table.woocommerce-cart-form__contents td.actions {
        text-align: right;
    }

    body.woocommerce-cart table.shop_table td.actions .coupon,
    body.woocommerce-cart table.woocommerce-cart-form__contents td.actions .coupon {
        float: left;
    }

    body.woocommerce-cart table.shop_table td.actions > button[name="update_cart"],
    body.woocommerce-cart table.woocommerce-cart-form__contents td.actions > button[name="update_cart"] {
        float: right;
    }
}

/* Cart collaterals + totals */
body.woocommerce-cart .cart_totals,
body.woocommerce-cart div.cart_totals {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: var(--uc-white) !important;
    border: 1px solid var(--uc-border) !important;
    border-radius: var(--uc-radius) !important;
    box-shadow: var(--uc-shadow) !important;
    padding: 28px 28px 32px;
    box-sizing: border-box;
}

body.woocommerce-cart .cart_totals h2,
body.woocommerce-cart div.cart_totals > h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--uc-primary);
    margin: 0;
    font-family: var(--uc-font);
    text-transform: none;
    padding: 0;
    background: none;
    border: 0;
    order: 0;
}

/* Totals inner table: same table fix */
body.woocommerce-cart .cart_totals table.shop_table,
body.woocommerce-cart .cart_totals .shop_table,
body.woocommerce-cart div.cart_totals table {
    display: table !important;
    width: 100% !important;
    border: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0;
    flex-shrink: 0;
}

body.woocommerce-cart .cart_totals table.shop_table tbody tr,
body.woocommerce-cart .cart_totals table.shop_table tr {
    display: table-row !important;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td,
body.woocommerce-cart .cart_totals table th,
body.woocommerce-cart .cart_totals table td {
    display: table-cell !important;
    border: 0 !important;
    border-bottom: 1px solid var(--uc-border) !important;
    padding: 12px 0 !important;
    background: transparent !important;
    vertical-align: middle !important;
    font-size: 0.95rem;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table th {
    font-weight: 600;
    color: var(--uc-muted);
    text-align: left;
    width: 40%;
    padding-right: 12px !important;
    line-height: 1.5;
    vertical-align: top !important;
}

body.woocommerce-cart .cart_totals table.shop_table td,
body.woocommerce-cart .cart_totals table td {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--uc-text);
    padding-left: 12px !important;
    line-height: 1.5;
    vertical-align: middle !important;
    word-break: normal !important;
    overflow-wrap: normal;
    hyphens: manual;
}

/* Keep currency amounts on one line (prevents vertical $ / 1 / 2 / 0 layout) */
body.woocommerce-cart .cart_totals table td .woocommerce-Price-amount,
body.woocommerce-cart .cart_totals table td .amount,
body.woocommerce-cart .cart_totals table td bdi {
    white-space: nowrap;
    word-break: normal !important;
    display: inline-block;
}

body.woocommerce-cart .cart_totals table.shop_table tr.order-total th,
body.woocommerce-cart .cart_totals table.shop_table tr.order-total td,
body.woocommerce-cart .cart_totals tr.order-total th,
body.woocommerce-cart .cart_totals tr.order-total td {
    border-bottom: 0 !important;
    font-size: 1.1rem;
    color: var(--uc-primary) !important;
    padding-top: 16px !important;
}

body.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
    font-size: 0.9rem;
    color: var(--uc-muted);
    margin-bottom: 8px;
}

/* Proceed to checkout: primary CTA (often an <a>) */
body.woocommerce-cart a.checkout-button,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-cart .wc-proceed-to-checkout a,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    display: block !important;
    width: 100% !important;
    text-align: center;
    background: var(--uc-primary) !important;
    color: var(--uc-white) !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    padding: 16px 24px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(22, 60, 122, 0.25);
    margin-top: 0;
    line-height: 1.4;
    box-sizing: border-box;
    border: 0 !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

body.woocommerce-cart a.checkout-button:hover,
body.woocommerce-cart .wc-proceed-to-checkout a:hover,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
    background: var(--uc-primary-dark) !important;
    color: var(--uc-white) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 60, 122, 0.35);
}

/* Proceed block (siblings in .cart_totals are spaced by parent flex gap) */
body.woocommerce-cart .wc-proceed-to-checkout {
    display: block;
    width: 100%;
    padding: 0 !important;
    margin: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.woocommerce-cart .cart_totals .wc-proceed-to-checkout + .ppc-button-wrapper,
body.woocommerce-cart .cart_totals .ppc-button-wrapper,
body.woocommerce-cart #ppc-button-ppcp-gateway,
body.woocommerce-cart .cart_totals .wcpay-payment-request-wrapper {
    margin-top: 0;
}

body.woocommerce-cart .cart_totals .ppc-button-wrapper,
body.woocommerce-cart .cart_totals div[id^="ppc-button"] {
    margin: 0;
}

body.woocommerce-cart .cart_totals .ppc-button-wrapper + .ppc-button-wrapper,
body.woocommerce-cart .cart_totals #ppc-button-ppcp-gateway + div {
    margin-top: 4px;
}

/* Cross-sells on cart: use product grid */
body.woocommerce-cart .cross-sells h2,
body.woocommerce-cart .cart-collaterals .cross-sells h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--uc-primary);
    margin: 32px 0 16px;
    grid-column: 1 / -1;
}

body.woocommerce-cart .cross-sells {
    clear: both;
    margin-top: 8px;
}

/* Generic shop tables (checkout, my account) */
body.woocommerce table.shop_table {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--uc-border);
    background: var(--uc-white);
}

body.woocommerce table.shop_table th,
body.woocommerce table.shop_table td {
    padding: 16px 18px;
    border-color: var(--uc-border);
}

.udrive-cart-product {
    display: flex;
    gap: 16px;
    align-items: center;
}

.udrive-cart-product__thumb img {
    width: 84px;
    height: auto;
    border-radius: var(--uc-radius-sm);
}

/* Stack cart on small screens: keep table as horizontal scroll instead of blocks */
@media (max-width: 991px) {
    body.woocommerce-cart .thm-unit-test .woocommerce {
        display: block !important;
    }

    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart_totals,
    body.woocommerce-cart .cart-collaterals .cart_totals {
        max-width: 100%;
    }

    body.woocommerce-cart .cart-collaterals {
        margin-top: 8px;
    }

    /* Allow horizontal scroll for wide table instead of smashing layout */
    body.woocommerce-cart .woocommerce-cart-form {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.woocommerce-cart table.shop_table,
    body.woocommerce-cart table.woocommerce-cart-form__contents {
        min-width: 640px;
    }
}

/* =============================================================================
   BOOTSTRAP 4.4 RESET — WooCommerce pages
   Bootstrap's .col-1 { flex:0 0 8.333% } and .col-2 { flex:0 0 16.666% }
   crush WooCommerce's #customer_details > .col-1 / .col-2.
   Bootstrap's .form-row { display:flex } collides with WC's .form-row (field wrapper).
   We reset them scoped to WooCommerce forms so Bootstrap grid still works elsewhere.
   ============================================================================= */

/* --- Reset .col-1 / .col-2 inside checkout customer details --- */
body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
    -ms-flex: 0 0 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    /* width: 100% !important; */
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* float: none !important; */
}

/* #customer_details uses col2-set which Bootstrap might flex — reset to block */
body.woocommerce-checkout #customer_details {
    display: block !important;
}

/* --- Reset Bootstrap .form-row inside all WooCommerce forms ---
   Bootstrap: .form-row { display:flex; flex-wrap:wrap; margin:0 -5px }
   WooCommerce: .form-row is a <p> wrapping label + input-wrapper   */
body.woocommerce form .form-row,
body.woocommerce-page form .form-row,
body.woocommerce-checkout form .form-row,
body.woocommerce-account form .form-row,
.woocommerce-form .form-row {
    display: block !important;
    -ms-flex-wrap: initial !important;
    flex-wrap: initial !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
    width: 100%;
    box-sizing: border-box;
}

/* --- .woocommerce-input-wrapper is a <span> — MUST be block for inputs to stretch --- */
body.woocommerce .woocommerce-input-wrapper,
body.woocommerce-page .woocommerce-input-wrapper {
    display: block !important;
    width: 100% !important;
}

/* --- Field wrapper: CSS grid to place first/last side-by-side --- */
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-additional-fields__field-wrapper,
body.woocommerce-account .woocommerce-address-fields__field-wrapper,
body.woocommerce-account .woocommerce-EditAccountForm > fieldset,
body.woocommerce-account .woocommerce-EditAccountForm {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

/* Wide fields span both columns */
body.woocommerce form .form-row-wide,
body.woocommerce form .form-row:not(.form-row-first):not(.form-row-last) {
    grid-column: 1 / -1 !important;
}

/* First/last fields each take one column */
body.woocommerce form .form-row-first {
    grid-column: 1 !important;
}

body.woocommerce form .form-row-last {
    grid-column: 2 !important;
}

/* --- Labels --- */
body.woocommerce form .form-row label,
body.woocommerce-page form .form-row label,
body.woocommerce-checkout form .form-row label,
body.woocommerce-account form .form-row label,
body.woocommerce-account form label,
.woocommerce-form label {
    display: block !important;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--uc-text) !important;
    margin-bottom: 6px;
    font-family: var(--uc-font);
    width: auto !important;
    float: none !important;
}

body.woocommerce form .form-row label .required,
body.woocommerce form .form-row .required,
body.woocommerce-page form .form-row .required,
body.woocommerce-account form .form-row .required,
.woocommerce-form .required {
    color: #ef4444;
    font-weight: 700;
    text-decoration: none;
}

body.woocommerce form .form-row label .optional,
body.woocommerce-page form .form-row label .optional,
.woocommerce-form .optional {
    font-weight: 400;
    color: var(--uc-muted);
    font-size: 0.85em;
}

/* --- Inputs / selects / textareas (all WooCommerce forms) ---
   IMPORTANT: The my-account login/register pages only have
   body.woocommerce-account + body.woocommerce-page, NOT body.woocommerce,
   so we must target all three body classes.                                */
body.woocommerce form .input-text,
body.woocommerce form input[type="text"],
body.woocommerce form input[type="email"],
body.woocommerce form input[type="tel"],
body.woocommerce form input[type="password"],
body.woocommerce form input[type="number"],
body.woocommerce form input[type="url"],
body.woocommerce form select,
body.woocommerce form textarea,
body.woocommerce-page form .input-text,
body.woocommerce-page form input[type="text"],
body.woocommerce-page form input[type="email"],
body.woocommerce-page form input[type="tel"],
body.woocommerce-page form input[type="password"],
body.woocommerce-page form input[type="number"],
body.woocommerce-page form select,
body.woocommerce-page form textarea,
body.woocommerce-account form .input-text,
body.woocommerce-account form input[type="text"],
body.woocommerce-account form input[type="email"],
body.woocommerce-account form input[type="tel"],
body.woocommerce-account form input[type="password"],
body.woocommerce-account form input[type="number"],
body.woocommerce-account form select,
body.woocommerce-account form textarea,
.woocommerce-Input,
.woocommerce-form .input-text {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: 46px;
    padding: 10px 14px !important;
    font-size: 0.95rem;
    font-family: var(--uc-font);
    color: var(--uc-text) !important;
    background-color: var(--uc-white) !important;
    border: 1px solid var(--uc-border) !important;
    border-radius: var(--uc-radius-sm) !important;
    box-sizing: border-box !important;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

body.woocommerce form .input-text:focus,
body.woocommerce form input:focus,
body.woocommerce form select:focus,
body.woocommerce form textarea:focus,
body.woocommerce-page form input:focus,
body.woocommerce-page form select:focus,
body.woocommerce-page form textarea:focus,
body.woocommerce-account form input:focus,
body.woocommerce-account form select:focus,
body.woocommerce-account form textarea:focus,
.woocommerce-Input:focus,
.woocommerce-form .input-text:focus {
    border-color: var(--uc-primary) !important;
    box-shadow: 0 0 0 3px rgba(22, 60, 122, 0.1) !important;
}

body.woocommerce form textarea,
body.woocommerce-page form textarea,
body.woocommerce-account form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Select2 dropdown (country/state) fix */
body.woocommerce .select2-container,
body.woocommerce-checkout .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

body.woocommerce .select2-container .select2-selection--single {
    height: 46px !important;
    border: 1px solid var(--uc-border) !important;
    border-radius: var(--uc-radius-sm) !important;
    padding: 8px 14px !important;
    background: var(--uc-white) !important;
    box-sizing: border-box;
}

body.woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    padding-left: 0;
    color: var(--uc-text);
    font-size: 0.95rem;
}

body.woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 8px;
}

body.woocommerce .select2-container--focus .select2-selection--single,
body.woocommerce .select2-container--open .select2-selection--single {
    border-color: var(--uc-primary) !important;
    box-shadow: 0 0 0 3px rgba(22, 60, 122, 0.1);
}

/* --- Checkout headings --- */
body.woocommerce-checkout .woocommerce-billing-fields h3,
body.woocommerce-checkout .woocommerce-shipping-fields h3,
body.woocommerce-checkout .woocommerce-additional-fields h3,
body.woocommerce-checkout h3#ship-to-different-address {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--uc-primary);
    font-family: var(--uc-font);
    margin: 0 0 20px;
    padding: 0;
}

/* ===== CHECKOUT LAYOUT ===== */

body.woocommerce-checkout .thm-unit-test .woocommerce {
    max-width: 100%;
    box-sizing: border-box;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Two-column: billing/shipping + additional left, order review right (sticky) */
@media (min-width: 992px) {
    body.woocommerce-checkout form.checkout.woocommerce-checkout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
        gap: 24px 32px;
        align-items: start;
    }

    /* Left column: everything by default */
    body.woocommerce-checkout form.checkout.woocommerce-checkout > * {
        grid-column: 1;
    }

    /*
       Right column: heading + order box must stack with NO gap.

       Bug we fixed: putting #order_review on grid-row: 2 aligned it with the *second*
       row of the left column (Additional information). Row 1's height was driven by
       the tall Billing card, so "Your order" sat at the top of row 1 while the table
       started at row 2 — a huge empty band (not flex-row; it was grid row alignment).

       Fix: both occupy the same grid column and span all rows (1 / -1); #order_review
       gets margin-top equal to the heading block height so it sits flush under the h3.
    */
    body.woocommerce-checkout form.checkout #order_review_heading {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: start;
        z-index: 1;
    }

    body.woocommerce-checkout form.checkout #order_review {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: start;
        /* Match heading: padding-top 28px + one line of 1.2rem heading + small breathing room */
        margin-top: calc(28px + 1.35rem + 6px);
        position: sticky;
        top: 100px;
        z-index: 0;
    }
}

/* Card containers */
body.woocommerce-checkout #customer_details {
    background: var(--uc-white);
    /* border: 1px solid var(--uc-border); */
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 28px;
    box-sizing: border-box;
    overflow: hidden;
}

/* "Additional information" sits outside #customer_details — give it its own card */
body.woocommerce-checkout .woocommerce-additional-fields {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 28px;
    box-sizing: border-box;
}

body.woocommerce-checkout #order_review_heading {
    padding: 28px 28px 0;
    margin: 0;
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius) var(--uc-radius) 0 0;
    border-bottom: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--uc-primary);
    font-family: var(--uc-font);
    box-sizing: border-box;
}

body.woocommerce-checkout #order_review {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: 0 0 var(--uc-radius) var(--uc-radius);
    border-top: 0;
    box-shadow: var(--uc-shadow);
    padding: 12px 28px 28px;
    box-sizing: border-box;
}

/* --- Order review & receipt tables: forced real table layout --- */
body.woocommerce-checkout table.shop_table,
body.woocommerce-order-received table.shop_table,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
    display: table !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    margin: 0 0 1rem !important;
    background: transparent !important;
}

body.woocommerce-checkout table.shop_table thead,
body.woocommerce-order-received table.shop_table thead,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table thead {
    display: table-header-group !important;
}

body.woocommerce-checkout table.shop_table tbody,
body.woocommerce-order-received table.shop_table tbody,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tbody {
    display: table-row-group !important;
}

body.woocommerce-checkout table.shop_table tfoot,
body.woocommerce-order-received table.shop_table tfoot,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tfoot {
    display: table-footer-group !important;
}

body.woocommerce-checkout table.shop_table tr,
body.woocommerce-order-received table.shop_table tr,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tr {
    display: table-row !important;
}

body.woocommerce-checkout table.shop_table th,
body.woocommerce-checkout table.shop_table td,
body.woocommerce-order-received table.shop_table th,
body.woocommerce-order-received table.shop_table td,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
    display: table-cell !important;
    vertical-align: middle !important;
    padding: 12px 10px !important;
    border-bottom: 1px solid var(--uc-border) !important;
    word-break: normal !important;
    white-space: normal;
}

body.woocommerce-checkout table.shop_table .product-name {
    word-break: normal !important;
    text-align: left;
}

body.woocommerce-checkout table.shop_table .product-total,
body.woocommerce-checkout table.shop_table .cart-subtotal td,
body.woocommerce-checkout table.shop_table .order-total td,
body.woocommerce-order-received table.shop_table td,
body.woocommerce-order-received table.shop_table tfoot td,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.woocommerce-checkout table.shop_table .woocommerce-Price-amount,
body.woocommerce-order-received table.shop_table .woocommerce-Price-amount,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-Price-amount {
    white-space: nowrap;
    display: inline-block;
}

/* --- Payment section --- */
body.woocommerce-checkout #payment {
    background: var(--uc-bg) !important;
    border-radius: var(--uc-radius-sm);
    padding: 20px !important;
    border: 1px solid var(--uc-border) !important;
    margin-top: 16px;
}

body.woocommerce-checkout #payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--uc-border);
}

body.woocommerce-checkout #payment ul.payment_methods li {
    padding: 12px 0;
    border-top: 1px solid var(--uc-border);
}

body.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 600;
    cursor: pointer;
    display: inline;
}

body.woocommerce-checkout #payment .payment_box {
    padding: 12px 16px;
    margin-top: 8px;
    background: var(--uc-white) !important;
    border-radius: var(--uc-radius-sm);
    border: 1px solid var(--uc-border);
    font-size: 0.9rem;
    color: var(--uc-muted);
}

body.woocommerce-checkout #payment .payment_box::before {
    display: none;
}

body.woocommerce-checkout #place_order {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 14px 24px;
    font-size: 1rem !important;
    font-weight: 700;
    font-family: var(--uc-font);
    color: var(--uc-white);
    background: var(--uc-primary);
    border: 0;
    border-radius: var(--uc-radius-sm);
    cursor: pointer;
    margin-top: 12px;
    transition: background .2s, box-shadow .2s;
}

body.woocommerce-checkout #place_order:hover {
    background: var(--uc-primary-dark);
    box-shadow: var(--uc-shadow-hover);
}

/* --- Checkout responsive: stack on mobile --- */
@media (max-width: 991px) {
    body.woocommerce-checkout form.checkout.woocommerce-checkout {
        display: block !important;
    }

    body.woocommerce-checkout #customer_details {
        margin-bottom: 20px;
    }

    body.woocommerce-checkout .woocommerce-additional-fields {
        margin-bottom: 20px;
    }

    body.woocommerce-checkout #order_review_heading {
        border-radius: var(--uc-radius) var(--uc-radius) 0 0;
    }

    body.woocommerce form .form-row-first,
    body.woocommerce form .form-row-last {
        grid-column: 1 / -1 !important;
    }

    body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
    body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper,
    body.woocommerce-checkout .woocommerce-additional-fields__field-wrapper,
    body.woocommerce-account .woocommerce-address-fields__field-wrapper {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 575px) {
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout .woocommerce-additional-fields,
    body.woocommerce-checkout #order_review {
        padding: 20px 16px;
    }

    body.woocommerce-checkout #order_review_heading {
        padding: 20px 16px 0;
    }
}

/* ===== THANK YOU / ORDER RECEIVED ===== */

body.woocommerce-order-received .thm-unit-test .woocommerce {
    max-width: 100%;
    box-sizing: border-box;
}

body.woocommerce-order-received .woocommerce-order {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 28px;
    max-width: 100%;
    box-sizing: border-box;
}

body.woocommerce-order-received .woocommerce-thankyou-order-received {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--uc-primary);
    margin-bottom: 20px;
}

body.woocommerce-order-received ul.order_details,
body.woocommerce-order-received .woocommerce-order-overview {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    font-size: 0.95rem;
}

body.woocommerce-order-received ul.order_details li,
body.woocommerce-order-received .woocommerce-order-overview li {
    margin: 0;
    padding: 10px 16px;
    background: var(--uc-bg);
    border-radius: var(--uc-radius-sm);
    border: 1px solid var(--uc-border);
}

body.woocommerce-order-received .woocommerce-order-details h2,
body.woocommerce-order-received .woocommerce-customer-details h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--uc-primary);
    font-family: var(--uc-font);
    margin: 24px 0 12px;
}

/* ===== MY ACCOUNT (navigation, dashboard, forms) ===== */

body.woocommerce-account .thm-unit-test .woocommerce {
    max-width: 100%;
    box-sizing: border-box;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content,
body.woocommerce-account form.woocommerce-form-login,
body.woocommerce-account form.woocommerce-form-register {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 24px 28px;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 992px) {
    body.woocommerce-account.logged-in .thm-unit-test .woocommerce:has(.woocommerce-MyAccount-navigation) {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 28px;
        align-items: start;
    }

    body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation {
        position: sticky;
        top: 100px;
        align-self: start;
    }

    body.woocommerce-account.logged-in .woocommerce-MyAccount-content {
        min-width: 0;
    }
}

/* Account navigation */
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li + li {
    margin-top: 4px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--uc-radius-sm);
    color: var(--uc-primary);
    background: var(--uc-bg);
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}

body.woocommerce-account .woocommerce-MyAccount-navigation .is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--dashboard.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
    background: var(--uc-primary);
    color: var(--uc-white);
}

/* Account content headings */
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--uc-primary);
    font-family: var(--uc-font);
    margin: 0 0 16px;
}

/* Edit account form fields */
body.woocommerce-account .woocommerce-EditAccountForm fieldset {
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius-sm);
    padding: 20px;
    margin: 20px 0;
}

body.woocommerce-account .woocommerce-EditAccountForm fieldset legend {
    font-weight: 700;
    padding: 0 8px;
    font-size: 0.95rem;
}

/* Login / register — center + max-width */
body.woocommerce-account .woocommerce-form-login,
body.woocommerce-account .woocommerce-form-register {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Login/register form headings */
body.woocommerce-account .woocommerce-form-login h2,
body.woocommerce-account .woocommerce-form-register h2,
body.woocommerce-account .u-column-1 h2,
body.woocommerce-account .u-column-2 h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--uc-primary);
    font-family: var(--uc-font);
    margin: 0 0 20px;
}

/* Remember me checkbox + label inline */
body.woocommerce-account .woocommerce-form-login .woocommerce-form-login__rememberme,
body.woocommerce form.login .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

body.woocommerce-account .woocommerce-form-login .woocommerce-form-login__rememberme input[type="checkbox"],
body.woocommerce form.login .woocommerce-form-login__rememberme input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0;
    accent-color: var(--uc-primary);
    -webkit-appearance: auto;
    appearance: auto;
}

body.woocommerce-account .woocommerce-form-login .woocommerce-form-login__rememberme span,
body.woocommerce form.login .woocommerce-form-login__rememberme span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--uc-muted);
}

/* Login/register submit buttons */
body.woocommerce-account .woocommerce-form-login .woocommerce-form-login__submit,
body.woocommerce-account .woocommerce-form-register .woocommerce-form-register__submit {
    display: block;
    width: 100%;
    min-height: 48px;
    font-size: 1rem !important;
    margin-top: 8px;
}

/* Lost password link */
body.woocommerce-account .woocommerce-LostPassword,
body.woocommerce .woocommerce-LostPassword {
    margin-top: 16px;
    text-align: center;
}

body.woocommerce-account .woocommerce-LostPassword a,
body.woocommerce .woocommerce-LostPassword a {
    color: var(--uc-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

body.woocommerce-account .woocommerce-LostPassword a:hover,
body.woocommerce .woocommerce-LostPassword a:hover {
    text-decoration: underline;
}

/* Side-by-side login + register on desktop */
body.woocommerce-account .u-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

body.woocommerce-account .u-columns .u-column-1,
body.woocommerce-account .u-columns .u-column-2,
body.woocommerce-account .u-columns .col-1,
body.woocommerce-account .u-columns .col-2 {
    -ms-flex: 0 0 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

@media (min-width: 768px) {
    body.woocommerce-account .u-columns .u-column-1,
    body.woocommerce-account .u-columns .u-column-2,
    body.woocommerce-account .u-columns .col-1,
    body.woocommerce-account .u-columns .col-2 {
        -ms-flex: 0 0 calc(50% - 14px) !important;
        flex: 0 0 calc(50% - 14px) !important;
        max-width: calc(50% - 14px) !important;
    }

    body.woocommerce-account .woocommerce-form-login,
    body.woocommerce-account .woocommerce-form-register {
        max-width: 100%;
    }
}

/* Lost password form */
body.woocommerce-lost-password .woocommerce form.lost_reset_password,
body.woocommerce-account .woocommerce form.lost_reset_password {
    background: var(--uc-white);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 28px;
    max-width: 520px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* --- WooCommerce buttons (global for checkout, account, etc.) --- */
body.woocommerce .button,
body.woocommerce-page .button,
body.woocommerce button.button,
body.woocommerce input.button,
body.woocommerce a.button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--uc-font);
    color: var(--uc-white);
    background: var(--uc-primary);
    border: 0;
    border-radius: var(--uc-radius-sm);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background .2s, box-shadow .2s;
    line-height: 1.5;
}

body.woocommerce .button:hover,
body.woocommerce-page .button:hover,
body.woocommerce button.button:hover,
body.woocommerce input.button:hover,
body.woocommerce a.button:hover {
    background: var(--uc-primary-dark);
    color: var(--uc-white);
    box-shadow: var(--uc-shadow-hover);
}

body.woocommerce .button.alt,
body.woocommerce button.button.alt,
body.woocommerce a.button.alt {
    background: var(--uc-accent);
    color: var(--uc-primary-dark);
}

body.woocommerce .button.alt:hover,
body.woocommerce button.button.alt:hover,
body.woocommerce a.button.alt:hover {
    background: var(--uc-accent-dark);
    color: var(--uc-white);
}

/* ===== NOTICES ===== */
body.woocommerce .woocommerce-info,
body.woocommerce .woocommerce-message,
body.woocommerce .woocommerce-error {
    border-radius: 14px;
    border: 0;
    border-left: 4px solid var(--uc-primary);
    padding: 14px 18px 14px 46px;
    background: var(--uc-white);
    box-shadow: var(--uc-shadow);
    font-size: .95rem;
    color: var(--uc-text);
}

body.woocommerce .woocommerce-message {
    border-left-color: #16a34a;
}

body.woocommerce .woocommerce-error {
    border-left-color: #ef4444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1199px) {
    body.woocommerce ul.products,
    body.woocommerce-page ul.products,
    .thm-unit-test ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .udrive-single-course__top {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 767px) {
    body.woocommerce ul.products,
    body.woocommerce-page ul.products,
    .thm-unit-test ul.products {
        grid-template-columns: 1fr !important;
    }

    body.woocommerce .thm-unit-test p.woocommerce-result-count {
        float: none;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    body.woocommerce .thm-unit-test form.woocommerce-ordering {
        float: none;
        display: block;
        margin-bottom: 20px;
    }

    body.woocommerce .thm-unit-test form.woocommerce-ordering select.orderby {
        width: 100%;
    }

    .udrive-single-course__summary h1.product_title,
    body.woocommerce .udrive-single-course__summary h1.product_title {
        font-size: 1.35rem !important;
    }
}

/* =============================================================================
   PRODUCT REVIEWS — Star ratings & interactive stars
   Default WooCommerce CSS is dequeued; star glyphs live in WooCommerce.woff (+ .woff2).
   @font-face is injected on single product pages (see woocommerce.php).
   ============================================================================= */

body.woocommerce .star-rating,
body.woocommerce-page .star-rating {
    float: right;
    overflow: hidden;
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 1em;
    width: 5.4em;
    font-family: WooCommerce, sans-serif;
}

body.woocommerce .star-rating::before,
body.woocommerce-page .star-rating::before {
    content: "\73\73\73\73\73";
    color: #d3ced2;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
}

body.woocommerce .star-rating span,
body.woocommerce-page .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

body.woocommerce .star-rating span::before,
body.woocommerce-page .star-rating span::before {
    content: "\53\53\53\53\53";
    top: 0;
    position: absolute;
    left: 0;
    color: var(--uc-accent);
}

body.woocommerce #reviews .star-rating,
body.woocommerce-page #reviews .star-rating {
    float: none;
    display: inline-block;
    vertical-align: middle;
    margin: 0 0 8px;
}

body.woocommerce .woocommerce-product-rating .star-rating,
body.woocommerce-page .woocommerce-product-rating .star-rating {
    margin: 0.35em 8px 0 0;
    float: left;
}

/* Interactive rating picker (star links — hide bare text, draw glyphs from WooCommerce font) */
body.woocommerce #review_form #respond p.stars,
body.woocommerce-page #review_form #respond p.stars {
    display: block;
    margin: 0 0 16px !important;
    line-height: 1;
    clear: both;
}

body.woocommerce #review_form #respond p.stars span,
body.woocommerce-page #review_form #respond p.stars span {
    display: inline-block;
    vertical-align: top;
}

body.woocommerce #review_form #respond p.stars a,
body.woocommerce-page #review_form #respond p.stars a {
    position: relative;
    height: 1em;
    width: 1em;
    text-indent: -999em !important;
    display: inline-block !important;
    text-decoration: none !important;
    font-size: 26px;
    overflow: hidden;
    margin: 0 3px 0 0;
    vertical-align: top;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

body.woocommerce #review_form #respond p.stars a::before,
body.woocommerce-page #review_form #respond p.stars a::before {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 1em;
    height: 1em;
    line-height: 1;
    font-family: WooCommerce, sans-serif !important;
    content: "\e021";
    text-indent: 0 !important;
    color: var(--uc-accent);
}

body.woocommerce #review_form #respond p.stars:hover a::before,
body.woocommerce-page #review_form #respond p.stars:hover a::before {
    content: "\e020";
    color: var(--uc-accent);
}

body.woocommerce #review_form #respond p.stars:hover a:hover ~ a::before,
body.woocommerce-page #review_form #respond p.stars:hover a:hover ~ a::before {
    content: "\e021";
}

body.woocommerce #review_form #respond p.stars.selected a.active::before,
body.woocommerce-page #review_form #respond p.stars.selected a.active::before {
    content: "\e020";
}

body.woocommerce #review_form #respond p.stars.selected a.active ~ a::before,
body.woocommerce-page #review_form #respond p.stars.selected a.active ~ a::before {
    content: "\e021";
}

body.woocommerce #review_form #respond p.stars.selected a:not(.active)::before,
body.woocommerce-page #review_form #respond p.stars.selected a:not(.active)::before {
    content: "\e020";
}
