/**
 * MyGenetix WooCommerce Custom Styles
 * 
 * Theme-consistent styling for all WooCommerce pages
 */

/* ========================================
   GENERAL WOOCOMMERCE STYLES
   ======================================== */

/* Override default WooCommerce page background */
.woocommerce-cart .site-content,
.woocommerce-checkout .site-content,
.woocommerce-account .site-content,
.post-type-archive-product .site-content,
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account,
body.post-type-archive-product {
    background: #FFFAF5 !important;
}

/* Ensure main content area has proper background */
.woocommerce-cart #primary,
.woocommerce-checkout #primary,
.woocommerce-account #primary,
.post-type-archive-product #primary,
.woocommerce-cart .hentry,
.woocommerce-checkout .hentry,
.woocommerce-account .hentry,
.post-type-archive-product .hentry {
    background: transparent !important;
}

/* ========================================
   LAYOUT FIX - Prevent footer from expanding
   ======================================== */

/* Fix page layout - content grows, footer stays fixed height */
.woocommerce-cart #page,
.woocommerce-checkout #page,
.woocommerce-account #page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh;
}

.woocommerce-cart #content,
.woocommerce-checkout #content,
.woocommerce-account #content,
.woocommerce-cart .site-content,
.woocommerce-checkout .site-content,
.woocommerce-account .site-content {
    flex: 1 0 auto !important;
}

/* Footer should NOT grow - only be its content height */
.woocommerce-cart .site-footer,
.woocommerce-checkout .site-footer,
.woocommerce-account .site-footer,
.woocommerce-cart footer,
.woocommerce-checkout footer,
.woocommerce-account footer {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    height: auto !important;
    min-height: auto !important;
}

.u-columns.woocommerce-Addresses.col2-set.addresses {
    margin-top: 20px;
}

/* Global form styling */
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="password"],
.woocommerce input[type="number"],
.woocommerce textarea,
.woocommerce select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.woocommerce input:focus,
.woocommerce textarea:focus,
.woocommerce select:focus {
    outline: none;
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

.hentry .entry-content a {
    text-decoration: none !important;
}


/* Only hide notices on cart page, keep checkout notices visible for errors */
.woocommerce-cart .woocommerce-notices-wrapper {
    display: none !important;
}

/* Keep checkout notices visible */
.woocommerce-checkout .woocommerce-notices-wrapper {
    display: block !important;
    margin-bottom: 1.5rem;
}

/* Ensure checkout error notices render above surrounding content */
.woocommerce-NoticeGroup-checkout,
.woocommerce-NoticeGroup-updateOrderReview {
    position: relative;
    z-index: 40;
}

/* Labels */
/* Labels */
.woocommerce label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #172B54;
    margin-bottom: 6px;
}

/* Allow flex/grid labels to override the block display */
.woocommerce label.flex {
    display: flex;
}

.woocommerce label.grid {
    display: grid;
}

.woocommerce .addon-card {
    display: flex;
    margin-bottom: 0;
}

/* Required indicator */
.woocommerce .required {
    color: #00A3F2;
}

/* ========================================
   CHECKBOX STYLES
   ======================================== */

/* Custom checkbox styling for WooCommerce */
/* Exclude .custom-checkbox which handles its own styling (e.g. in Product Hero) */
.woocommerce input[type="checkbox"]:not(.custom-checkbox),
.woocommerce-page input[type="checkbox"]:not(.custom-checkbox) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-right: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Checkbox hover state */
.woocommerce input[type="checkbox"]:not(.custom-checkbox):hover,
.woocommerce-page input[type="checkbox"]:not(.custom-checkbox):hover {
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

/* Checkbox focus state */
.woocommerce input[type="checkbox"]:not(.custom-checkbox):focus,
.woocommerce-page input[type="checkbox"]:not(.custom-checkbox):focus {
    outline: none;
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.2);
}

/* Checkbox checked state */
.woocommerce input[type="checkbox"]:not(.custom-checkbox):checked,
.woocommerce-page input[type="checkbox"]:not(.custom-checkbox):checked {
    background-color: #00A3F2 !important;
    border-color: #00A3F2 !important;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e") !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ========================================
   RADIO BUTTON STYLES
   ======================================== */

/* Custom radio styling for WooCommerce — unified across shipping & payment */
.woocommerce input[type="radio"],
.woocommerce-page input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.woocommerce input[type="radio"]:hover,
.woocommerce-page input[type="radio"]:hover {
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

.woocommerce input[type="radio"]:focus,
.woocommerce-page input[type="radio"]:focus {
    outline: none;
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.2);
}

.woocommerce input[type="radio"]:checked,
.woocommerce-page input[type="radio"]:checked {
    border-color: #00A3F2;
    background: white;
    box-shadow: inset 0 0 0 4px #00A3F2;
}

/* ========================================
   SHIPPING METHOD RADIOS
   ======================================== */

/* Hide the custom dot spans — we use the native input styled above */
.mygenetix-shipping-radio-dot {
    display: none !important;
}

/* Shipping option card layout — the <li> is the card */
.mygenetix-shipping-option {
    display: flex !important;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 10px !important;
    transition: all 0.2s;
    cursor: pointer;
    gap: 12px;
    list-style: none;
}

.mygenetix-shipping-option:hover {
    border-color: #00A3F2;
}

.mygenetix-shipping-option.is-selected {
    border-color: #00A3F2;
    background: #FFF5F5;
}

/* Show the real radio input inside the card */
.mygenetix-shipping-option .mygenetix-shipping-radio {
    position: relative !important;
    left: 12px;
    opacity: 1 !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 0 !important;
    pointer-events: auto !important;
    flex-shrink: 0;
}

/* Label takes remaining space */
.mygenetix-shipping-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #172B54;
    font-size: 14px;
    flex: 1;
    margin: 0;
    gap: 0;
    padding: 14px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #172B54 !important;
}

.mygenetix-shipping-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mygenetix-shipping-info .woocommerce-Price-amount {
    font-weight: 600;
    color: #172B54;
}

/* Shipping section header row */
.mygenetix-shipping-header-row th {
    font-weight: 600;
    color: #172B54;
    font-size: 14px;
    padding: 12px 0 8px;
    border-bottom: none;
}

/* Shipping body cell — remove table padding so cards sit flush */
.mygenetix-shipping-td {
    padding: 0 !important;
}

.mygenetix-shipping-options {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Override Storefront default shipping input margin */
ul#shipping_method.mygenetix-shipping-options input {
    margin-right: 0;
}

/* Terms and conditions checkbox label alignment */
.woocommerce .woocommerce-form__label-for-checkbox,
.woocommerce-page .woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.5;
}

/* Checkbox in privacy policy / terms */
.woocommerce .woocommerce-terms-and-conditions-wrapper,
.woocommerce-page .woocommerce-terms-and-conditions-wrapper {
    margin: 8px 0 4px;
    padding: 0;
}

.woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    gap: 5px;
    color: #4b5563;
}

/* Terms checkbox — inherits global checkbox styles, just tweak margin */
.woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-form__input-checkbox {
    margin: 0;
}

.woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text a {
    color: #00A3F2;
    font-weight: 600;
    text-decoration: none;
}

.woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text a:hover {
    text-decoration: underline;
}

.woocommerce .woocommerce-terms-and-conditions-wrapper .form-row label.checkbox .woocommerce-form__input-checkbox {
    order: 1;
}

.woocommerce .woocommerce-terms-and-conditions-wrapper .form-row label.checkbox abbr.required {
    order: 2;
    margin: 0 2px 0 0;
}

.woocommerce .woocommerce-terms-and-conditions-wrapper .form-row label.checkbox .woocommerce-terms-and-conditions-checkbox-text {
    order: 3;
}

/* Remember me checkbox */
.woocommerce .woocommerce-form-login .woocommerce-form__label-for-checkbox,
.woocommerce-page .woocommerce-form-login .woocommerce-form__label-for-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Create account checkbox on checkout */
.woocommerce .woocommerce-account-fields .woocommerce-form__label-for-checkbox,
.woocommerce-page .woocommerce-account-fields .woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Kybernaut ICO DIC — "Buying as a company" checkbox */
#billing_iscomp_field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    clear: both;
    float: none !important;
    width: 100% !important;
}

#billing_iscomp_field .woocommerce-input-wrapper {
    display: inline-flex;
    align-items: center;
    width: auto !important;
}

#billing_iscomp_field input#billing_iscomp {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
}

#billing_iscomp_field>label {
    order: -1;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #172B54;
    cursor: pointer;
}

/* Ship to different address checkbox */
#ship-to-different-address {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#ship-to-different-address label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.woocommerce .button,
.woocommerce button[type="submit"],
.woocommerce input[type="submit"] {
    background: linear-gradient(135deg, #00A3F2 0%, #38BDF8 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 163, 242, 0.25);
}

.woocommerce .button:hover,
.woocommerce button[type="submit"]:hover,
.woocommerce input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 163, 242, 0.35);
}

/* Alt button style */
.woocommerce .button.alt,
.woocommerce .checkout-button {
    background: linear-gradient(135deg, #00A3F2 0%, #38BDF8 100%);
    box-shadow: 0 8px 30px rgba(0, 163, 242, 0.35);
}

/* Secondary buttons */
.woocommerce .button:not(.alt):not(.checkout-button) {
    background: #172B54;
    box-shadow: 0 4px 20px rgba(23, 43, 84, 0.15);
}

/* ========================================
   NOTICES
   Notices are now placed inside page content containers
   ======================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Ensure notices are visible and not hidden */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice,
.woocommerce-error li {
    list-style: none;
}

/* Error list styling */
.woocommerce-error {
    flex-direction: column;
    align-items: flex-start;
}

.woocommerce-error li {
    padding: 4px 0;
}

.woocommerce-error li:first-child {
    padding-top: 0;
}

.woocommerce-error li:last-child {
    padding-bottom: 0;
}

.woocommerce-message {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

/* Info notice - warm theme colors (overrides WooCommerce defaults) */
.woocommerce-info,
.woocommerce .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-info {
    background: #FFF7ED !important;
    color: #172B54 !important;
    border-left: 4px solid #00A3F2 !important;
}

.woocommerce-info a,
.woocommerce .woocommerce-info a,
.woocommerce-MyAccount-content .woocommerce-info a {
    color: #00A3F2 !important;
    font-weight: 600;
    text-decoration: underline;
}

.woocommerce-info a:hover,
.woocommerce .woocommerce-info a:hover,
.woocommerce-MyAccount-content .woocommerce-info a:hover {
    color: #172B54 !important;
}

/* Info notice button styling */
.woocommerce-info .button,
.woocommerce-info a.button,
.woocommerce-info a.wc-forward {
    background: #00A3F2 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    margin-left: auto !important;
}

.woocommerce-info .button:hover,
.woocommerce-info a.button:hover,
.woocommerce-info a.wc-forward:hover {
    background: #172B54 !important;
    color: white !important;
}

.woocommerce-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

/* General notice - amber/warning theme colors (overrides WooCommerce defaults) */
.woocommerce-notice,
.woocommerce .woocommerce-notice,
.woocommerce-MyAccount-content .woocommerce-notice {
    background: #FFF7ED !important;
    color: #172B54 !important;
    border-left: 4px solid #00A3F2 !important;
}

.woocommerce-notice a,
.woocommerce .woocommerce-notice a,
.woocommerce-MyAccount-content .woocommerce-notice a {
    color: #00A3F2 !important;
    font-weight: 600;
    text-decoration: underline;
}

.woocommerce-notice a:hover,
.woocommerce .woocommerce-notice a:hover,
.woocommerce-MyAccount-content .woocommerce-notice a:hover {
    color: #172B54 !important;
}

/* General notice button styling */
.woocommerce-notice .button,
.woocommerce-notice a.button,
.woocommerce-notice a.wc-forward {
    background: #00A3F2 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    margin-left: auto !important;
}

.woocommerce-notice .button:hover,
.woocommerce-notice a.button:hover,
.woocommerce-notice a.wc-forward:hover {
    background: #172B54 !important;
    color: white !important;
}

/* ========================================
   QUANTITY INPUT
   ======================================== */

.woocommerce .quantity {
    display: inline-flex;
    align-items: center;
    background: #F3F4F6;
    border-radius: 12px;
    overflow: hidden;
}

.woocommerce .quantity input[type="number"] {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    padding: 10px 5px;
    -moz-appearance: textfield;
}

.woocommerce .quantity input::-webkit-outer-spin-button,
.woocommerce .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ========================================
   CART PAGE
   ======================================== */

.woocommerce-cart .woocommerce-cart-form__contents {
    border: none;
}

.woocommerce-cart .product-remove a {
    color: #008AC9 !important;
    font-size: 20px;
    transition: all 0.2s;
}

.woocommerce-cart .product-remove a:hover {
    color: #00A3F2 !important;
}

/* ========================================
   CHECKOUT PAGE LAYOUT
   ======================================== */

/* Two-column checkout layout */
.woocommerce-checkout .col2-set {
    width: 55%;
    float: left;
    padding-right: 40px;
    box-sizing: border-box;
}

.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    width: 100% !important;
    float: none !important;
    clear: none;
}

/* Clearfix for checkout form */
.woocommerce-checkout form.checkout::after {
    content: "";
    display: table;
    clear: both;
}

/* Override Storefront default float layout for order review (we use flex) */
.woocommerce-checkout .w-full.lg\:w-1\/3 #order_review_heading,
.woocommerce-checkout .w-full.lg\:w-1\/3 #order_review {
    width: 100% !important;
    float: none !important;
    clear: none !important;
}

/* ========================================
   CHECKOUT FORM FIELDS
   ======================================== */

.woocommerce-checkout .form-row {
    margin-bottom: 16px;
    box-sizing: border-box;
}

/* Name/Surname side-by-side layout */
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: 48% !important;
    display: inline-block !important;
    vertical-align: top;
    box-sizing: border-box;
}

.woocommerce-checkout .form-row-first {
    float: left !important;
    clear: left;
    margin-right: 4%;
}

.woocommerce-checkout .form-row-last {
    float: right !important;
    margin-right: 0;
}

.woocommerce-checkout .form-row-wide {
    width: 100% !important;
    float: none !important;
    clear: both;
}

/* Clearfix after paired fields */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper::after,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   SHIPPING ADDRESS TOGGLE
   ======================================== */

/* Custom checkbox styling - match billing card design */
.woocommerce-checkout .ship-to-different-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 600;
    color: #172B54;
    width: auto;
    max-width: 100%;
}

.woocommerce-checkout .ship-to-different-checkbox-label:hover {
    border-color: #00A3F2;
    background: #FFF5F5;
}

.woocommerce-checkout .ship-to-different-checkbox-label-text {
    flex: 0 1 auto;
    order: 1;
}

.woocommerce-checkout .ship-to-different-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #00A3F2;
    flex-shrink: 0;
    order: 2;
}

/* Override WooCommerce core absolute positioning of shipping checkbox */
@media (min-width: 768px) {
    #ship-to-different-address .woocommerce-form__input-checkbox {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        margin-right: 0 !important;
        margin-left: 8px;
    }
}

/* Shipping address fields - animated expand/collapse */
.woocommerce-checkout .shipping_address {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.woocommerce-checkout .shipping_address.active {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1.5rem;
}

/* ========================================
   ORDER NOTES FIX
   ======================================== */

/* Ensure order notes textarea is visible and editable */
.woocommerce-checkout .woocommerce-additional-fields {
    clear: both;
    margin-top: 24px;
}

.woocommerce-checkout #order_comments_field {
    width: 100%;
}

.woocommerce-checkout #order_comments {
    width: 100% !important;
    min-height: 120px;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    background: white;
    resize: vertical;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.woocommerce-checkout #order_comments:focus {
    outline: none;
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

/* ========================================
   RESPONSIVE CHECKOUT
   ======================================== */

@media (max-width: 768px) {
    .woocommerce-checkout .col2-set {
        width: 100%;
        float: none;
        padding-right: 0;
    }

    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100% !important;
        float: none !important;
        margin-top: 32px;
    }

    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100% !important;
        float: none !important;
        margin-right: 0;
    }
}

/* ========================================
   ORDER REVIEW TABLE
   ======================================== */

/* Remove all background coloring from order review (overrides Customizer inline styles) */


.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.woocommerce-checkout-review-order-table tr,
.woocommerce-checkout-review-order-table tr td,
.woocommerce-checkout-review-order-table tr th {
    background: transparent !important;
}

/* Column widths */
.woocommerce-checkout-review-order-table .product-name {
    width: 65%;
}

.woocommerce-checkout-review-order-table .product-total {
    width: 35%;
    text-align: right;
}

/* Base cell styles */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    vertical-align: top;
}

/* Header row */
.woocommerce-checkout-review-order-table thead th {
    font-weight: 600;
    color: #9ca3af;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    background: transparent;
}

.woocommerce-checkout-review-order-table thead th.product-total {
    text-align: right;
}

/* Body rows — product items */
.woocommerce-checkout-review-order-table .cart_item td {
    padding: 12px 0;
}

.woocommerce-checkout-review-order-table .cart_item .product-name {
    font-weight: 600;
    color: #172B54;
    font-size: 13px;
    line-height: 1.5;
    padding-right: 12px;
}

.woocommerce-checkout-review-order-table .cart_item .product-name .product-quantity {
    color: #9ca3af;
    font-weight: 400;
}

/* Addon / variation data below product name */
.woocommerce-checkout-review-order-table .cart_item .product-name dl.variation,
.woocommerce-checkout-review-order-table .cart_item .product-name .wc-item-meta {
    margin: 4px 0 0;
    padding: 0;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.woocommerce-checkout-review-order-table .cart_item .product-total {
    text-align: right;
    font-weight: 600;
    color: #172B54;
    font-size: 13px;
}

/* Addon prices inside subtotal column */
.woocommerce-checkout-review-order-table .cart_item .product-total .checkout-addon-price {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    margin-top: 2px;
}

.woocommerce-checkout-review-order-table .cart_item .product-total .checkout-addon-price .checkout-addon-amount {
    color: #172B54;
    font-weight: 500;
}

/* Footer rows — subtotal, shipping, etc */
.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table tfoot td {
    background: transparent;
    padding: 8px 0;
}

.woocommerce-checkout-review-order-table tfoot th {
    text-align: left;
    color: #6b7280;
    font-weight: 500;
    font-size: 13px;
}

.woocommerce-checkout-review-order-table tfoot td {
    text-align: right;
    color: #172B54;
    font-weight: 600;
    font-size: 13px;
}

/* Order total row */
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 16px;
    font-weight: 700;
    color: #172B54;
    padding-top: 14px;
    border-top: 2px solid #e5e7eb;
    border-bottom: none;
}

/* ========================================
   PAYMENT METHODS
   ======================================== */

.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Boost specificity to override standard WooCommerce #payment selectors */
.wc_payment_methods .wc_payment_method,
#payment .payment_methods li.wc_payment_method,
#payment .payment_methods li.wc_payment_method:last-child {
    padding: 0 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    transition: all 0.2s;
    overflow: hidden;
    background: transparent !important;
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
}

#payment .payment_methods li.wc_payment_method:hover,
#payment .payment_methods li.wc_payment_method:last-child:hover {
    border-color: #00A3F2 !important;
}

/* Active/selected payment method card border */
#payment .payment_methods li.wc_payment_method:has(input[type="radio"]:checked),
#payment .payment_methods li.wc_payment_method:last-child:has(input[type="radio"]:checked) {
    border-color: #00A3F2 !important;
    background: #FFF5F5 !important;
}

/* Hide the raw radio input — we use ::before on label instead */
#payment .payment_methods li .input-radio,
#payment .payment_methods li>input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none;
}

/* Label is the visible clickable row */
#payment .payment_methods li.wc_payment_method label,
#payment .payment_methods li.wc_payment_method:last-child label {
    font-weight: 600;
    color: #172B54;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 16px 20px;
    background: transparent;
    width: 100%;
    transition: background-color 0.2s;
}

/* Custom radio circle via label ::before */
#payment .payment_methods li.wc_payment_method label[for^="payment_method"]::before {
    content: "" !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: none;
}

/* Hover state */
#payment .payment_methods li.wc_payment_method label[for^="payment_method"]:hover::before {
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

/* Checked state — input:checked + label ::before */
#payment .payment_methods li.wc_payment_method input[type="radio"]:checked+label[for^="payment_method"]::before {
    border-color: #00A3F2;
    background: white;
    box-shadow: inset 0 0 0 4px #00A3F2;
}

/* Selected payment method label highlight */
#payment .payment_methods li.wc_payment_method input[type="radio"]:checked+label,
#payment .payment_methods li.wc_payment_method:last-child input[type="radio"]:checked+label {
    background-color: #FFF5F5;
}

.wc_payment_methods .payment_box {
    padding: 20px;
    font-size: 14px;
    color: #6B7280;
    background: #ffffff;
    border-top: 1px solid #F3F4F6;
}

/* ========================================
   MY ACCOUNT
   ======================================== */

/* Reset Storefront's default float layout to allow Tailwind flexbox */
.woocommerce-MyAccount-navigation {
    width: auto !important;
    float: none !important;
    margin-right: 0 !important;
}

.woocommerce-MyAccount-content {
    width: auto !important;
    float: none !important;
    margin-right: 0 !important;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Override Storefront's default link padding */
.woocommerce-MyAccount-navigation ul li a,
.hentry .entry-content .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link a {
    padding: 1rem 1.25rem !important;
    display: flex !important;
}

/* Hide Storefront's default icons (::before pseudo-elements) */
.woocommerce-MyAccount-navigation ul li a::before,
.hentry .entry-content .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link a::before {
    display: none !important;
    content: none !important;
}

/* Remove default borders on navigation items */
.woocommerce-MyAccount-navigation ul li,
.hentry .entry-content .woocommerce-MyAccount-navigation ul li {
    border: none !important;
}

/* ========================================
   SELECT2 STYLING
   ======================================== */

.select2-container--default .select2-selection--single {
    height: auto;
    padding: 10px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: #172B54;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 12px;
}

.select2-container--open .select2-dropdown {
    border-color: #00A3F2;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #00A3F2;
}

/* Country flag emoji in billing/shipping Select2 */
.mygenetix-country-flag {
    display: inline-block;
    margin-right: 8px;
    font-size: 1.2em;
    line-height: 1;
    vertical-align: middle;
}

.mygenetix-country-selection .mygenetix-country-flag,
.select2-container--default .select2-selection--single .mygenetix-country-selection .mygenetix-country-flag {
    margin-right: 6px;
}

.mygenetix-country-option,
.mygenetix-country-selection {
    display: inline-flex;
    align-items: center;
}

.select2-results__option .mygenetix-country-option .mygenetix-country-flag {
    margin-right: 8px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .woocommerce .button {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   FOOTER FIX FOR WOOCOMMERCE PAGES
   ======================================== */

/* Ensure footer displays properly on WooCommerce pages */
.woocommerce-cart .site-footer,
.woocommerce-checkout .site-footer,
.woocommerce-account .site-footer {
    position: relative !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    overflow: visible !important;
}

/* Fix footer container width */
.woocommerce-cart footer.site-footer .footer-widgets,
.woocommerce-checkout footer.site-footer .footer-widgets,
.woocommerce-account footer.site-footer .footer-widgets,
.woocommerce-cart footer.site-footer>div,
.woocommerce-checkout footer.site-footer>div,
.woocommerce-account footer.site-footer>div {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    left: auto !important;
    transform: none !important;
}

/* Ensure footer grid/flex displays correctly */
.woocommerce-cart .site-footer .container,
.woocommerce-checkout .site-footer .container,
.woocommerce-account .site-footer .container,
.woocommerce-cart .site-footer .footer-content,
.woocommerce-checkout .site-footer .footer-content,
.woocommerce-account .site-footer .footer-content {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    position: relative !important;
    left: 0 !important;
}

/* ========================================
   CHECKOUT SIDEBAR
   ======================================== */

/* Sidebar container stacking context - prevent overlay bleed-through */
.woocommerce-checkout .w-full.lg\:w-1\/3>.bg-white.lg\:sticky {
    position: relative;
    z-index: 10;
}

/* Ensure #order_review can receive blockUI overlay */
#order_review.woocommerce-checkout-review-order {
    position: relative;
}

/* Payment section — flex column for reordering (products → methods → totals → terms → button) */
#payment.woocommerce-checkout-payment {
    display: flex !important;
    flex-direction: column;
    margin-top: 20px;
}

/* Remove clearfix pseudo-elements (not needed with flex) */
.woocommerce-checkout #payment::before,
.woocommerce-checkout #payment::after {
    display: none !important;
}

/* --- Flex order for #payment children --- */
.mg-payment-heading {
    order: 1;
}

#payment .wc_payment_methods {
    order: 2;
}

.mg-shipping-heading {
    order: 3;
}

#payment .mg-order-totals-inner {
    order: 4;
}

#payment .form-row.place-order {
    order: 5;
}

/* Payment heading */
.mg-payment-heading {
    font-size: 15px;
    font-weight: 700;
    color: #172B54;
    margin: 0 0 12px;
}

/* Shipping heading */
.mg-shipping-heading {
    font-size: 15px;
    font-weight: 700;
    color: #172B54;
    margin: 16px 0 12px;
}

/* Totals section (extracted from tfoot) */
#payment .mg-order-totals-inner {
    padding-top: 4px;
}

/* Inherit the review-order-table styles for the totals table */
#payment .mg-totals-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#payment .mg-totals-table th,
#payment .mg-totals-table td {
    background: transparent !important;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

#payment .mg-totals-table th {
    text-align: left;
    color: #6b7280;
    font-weight: 500;
}

.woocommerce-checkout ul#shipping_method {
    margin-bottom: 15px !important;
}

.mg-totals-table {
    margin-bottom: 0px !important;
}

.mg-payment-heading {
    margin-top: 0px !important;
}

#payment .mg-totals-table td {
    text-align: right;
    color: #172B54;
    font-weight: 600;
}

/* Order total row inside totals table */
#payment .mg-totals-table .order-total th,
#payment .mg-totals-table .order-total td {
    font-size: 16px;
    font-weight: 700;
    color: #172B54;
    padding-top: 14px;
    border-top: 2px solid #e5e7eb;
    border-bottom: none;
}


/* Trust badges should come last */
.woocommerce-checkout .w-full.lg\:w-1\/3 .mt-6.pt-6.border-t {
    order: 10;
    margin-top: auto;
}

/* Hide trust badges if they appear before order_review */
.woocommerce-checkout .w-full.lg\:w-1\/3>.bg-white>.grid.grid-cols-2:first-of-type {
    display: none !important;
}

/* Hide any grid inside order_review that looks like trust badges */
#order_review .grid.grid-cols-2 {
    display: none !important;
}

/* (Order review table styles consolidated above) */

/* ========================================
   COUPON NOTICE STYLING (Checkout)
   ======================================== */

/* Style the coupon notice wrapper on checkout - appears before checkout form */
.woocommerce-checkout .woocommerce-form-coupon-toggle {
    margin-bottom: 24px;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
    background: #FFF7ED;
    color: #172B54;
    border-left: 4px solid #00A3F2;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before {
    color: #00A3F2;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a {
    color: #00A3F2;
    font-weight: 600;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a:hover {
    color: #172B54;
}

/* Coupon form styling */
.woocommerce-checkout .checkout_coupon {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.woocommerce-checkout .checkout_coupon p:first-child {
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 14px;
}

.woocommerce-checkout .checkout_coupon .form-row-first {
    width: 70%;
    float: left;
    margin-right: 16px;
}

.woocommerce-checkout .checkout_coupon .form-row-last {
    width: auto;
}

.woocommerce-checkout .checkout_coupon input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
}

.woocommerce-checkout .checkout_coupon .button {
    padding: 14px 24px;
}

/* ========================================
   ADDITIONAL INFO (ORDER NOTES) SECTION
   ======================================== */

/* Ensure the additional fields section is visible */
.woocommerce-additional-fields {
    margin-top: 24px;
}

.woocommerce-additional-fields h3 {
    display: none;
    /* Hide default WC heading since we have our own */
}

/* Order notes textarea */
.woocommerce-additional-fields textarea {
    min-height: 120px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    resize: vertical;
}

/* ========================================
   HIDE DEFAULT COUPON NOTICE
   ======================================== */

/* Hide the default WooCommerce coupon toggle - we have our own styled section */
.woocommerce-checkout .woocommerce-form-coupon-toggle {
    display: none !important;
}

/* Also hide the default checkout_coupon form that appears when toggle is clicked */
.woocommerce-checkout .checkout_coupon.woocommerce-form-coupon {
    display: none !important;
}

/* ========================================
   CHECKOUT LOADING OVERLAY (blockUI)
   ======================================== */

/* Overlay that covers the form during processing */
.woocommerce .blockUI.blockOverlay {
    position: absolute;
    background: rgba(255, 255, 255, 0.7) !important;
    z-index: 9999;
}

/* Loading spinner */
.woocommerce .blockUI.blockOverlay::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -20px 0 0 -20px;
    border: 3px solid #E5E7EB;
    border-top-color: #00A3F2;
    border-radius: 50%;
    animation: wc-spin 0.8s linear infinite;
}

@keyframes wc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Processing state on checkout form */
.woocommerce-checkout.processing .blockOverlay {
    display: block !important;
}

/* ========================================
   ACCOUNT AUTH - LOGIN / REGISTER
   ======================================== */

/* Entrance animation for auth forms */
.mygenetix-auth-forms {
    opacity: 0;
    transform: translateY(12px);
    animation: mygenetix-auth-enter 0.4s ease-out forwards;
}

@keyframes mygenetix-auth-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Register submit button - loading state */
.woocommerce-form-register .mygenetix-register-submit.is-loading,
.mygenetix-register-submit.is-loading {
    position: relative;
    cursor: not-allowed;
    opacity: 0.9;
    pointer-events: none;
}

.woocommerce-form-register .mygenetix-register-submit.is-loading::after,
.mygenetix-register-submit.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wc-spin 0.7s linear infinite;
}

/* ========================================
   THANK YOU PAGE - ORDER DETAILS
   ======================================== */

/* Order details section wrapper */
.woocommerce-order-details {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Section headings */
.woocommerce-order-details__title,
.woocommerce-column__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #172B54;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #F3F4F6;
}

/* Customer details wrapper */
.woocommerce-customer-details {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
}

/* Two-column address layout */
.woocommerce-columns--addresses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Thank you page: override Storefront col2-set float layout for addresses */
.woocommerce-order .woocommerce-customer-details .col2-set.addresses,
.woocommerce-order .woocommerce-columns--addresses {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.woocommerce-order .woocommerce-customer-details .col2-set.addresses .col-1,
.woocommerce-order .woocommerce-customer-details .col2-set.addresses .col-2,
.woocommerce-order .woocommerce-columns--addresses .col-1,
.woocommerce-order .woocommerce-columns--addresses .col-2 {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

@media (max-width: 768px) {

    .woocommerce-order .woocommerce-customer-details .col2-set.addresses,
    .woocommerce-order .woocommerce-columns--addresses {
        grid-template-columns: 1fr;
    }
}

/* Individual address cards */
.woocommerce-column--billing-address,
.woocommerce-column--shipping-address {
    background: #F9FAFB;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #E5E7EB;
}

/* Address text styling */
.woocommerce-customer-details address {
    font-style: normal;
    line-height: 1.8;
    color: #4B5563;
    font-size: 0.9375rem;
}

.woocommerce-customer-details address p {
    margin: 0.25rem 0;
}

/* Order details table on thank you page */
.woocommerce-order-details .woocommerce-table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-order-details .woocommerce-table th,
.woocommerce-order-details .woocommerce-table td {
    padding: 1rem;
    border-bottom: 1px solid #F3F4F6;
    text-align: left;
}

.woocommerce-order-details .woocommerce-table thead th {
    background: #F9FAFB;
    font-weight: 600;
    color: #6B7280;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.woocommerce-order-details .woocommerce-table tfoot th {
    font-weight: 500;
    color: #6B7280;
}

.woocommerce-order-details .woocommerce-table tfoot td {
    font-weight: 600;
    color: #172B54;
}

/* Hide the payment method description text (e.g., "Pay with cash upon delivery") */
.woocommerce-order>p:first-of-type {
    display: none;
}

/* Increase spacing between thank you page sections */
.woocommerce-order .woocommerce-order-details {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.woocommerce-order .woocommerce-customer-details {
    margin-top: 2rem;
}

/* ========================================
   MY ACCOUNT - ADDRESS OVERVIEW PAGE
   ======================================== */

/* Container - uses col2-set from WooCommerce; override float layout */
.woocommerce-Addresses.col2-set {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    float: none !important;
    width: 100% !important;
}

/* Reset WooCommerce/Storefront default widths and floats on column wrappers */
.woocommerce-Addresses .u-column1,
.woocommerce-Addresses .u-column2,
.woocommerce-Addresses .col-1,
.woocommerce-Addresses .col-2 {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .woocommerce-Addresses.col2-set {
        grid-template-columns: 1fr;
    }
}

/* Individual address card */
.woocommerce-Addresses .woocommerce-Address {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
}

/* Address card title row (heading + edit link) - .title is WooCommerce class */
.woocommerce-Address-title.title,
.woocommerce-Address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #F3F4F6;
}

/* Address card heading (h2 in WooCommerce template) - inline-flex for Lucide icon alignment */
.woocommerce-Address-title h2,
.woocommerce-Address-title h3 {
    display: inline-flex;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #172B54;
    margin: 0;
}

/* Edit link styling */
.woocommerce-Address-title .edit {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #00A3F2;
    text-decoration: none;
    transition: all 0.2s;
}

.woocommerce-Address-title .edit:hover {
    color: #008AC9;
    transform: translateX(2px);
}

/* Address content text */
.woocommerce-Addresses .woocommerce-Address address {
    font-style: normal;
    line-height: 1.8;
    color: #4B5563;
    font-size: 0.9375rem;
}

/* Intro text above address cards */
.woocommerce-MyAccount-content>p:first-child {
    color: #6B7280;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* ========================================
   MY ACCOUNT - ADDRESS EDIT FORM
   ======================================== */

/* Form wrapper - applies to both billing and shipping edit forms */
.woocommerce-address-fields {
    max-width: 600px;
}

/* Page heading for edit address (h2 in form-edit-address) - inline-flex for Lucide icon alignment */
.woocommerce-address-fields form h2 {
    display: inline-flex;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #172B54;
    margin-bottom: 1.5rem;
}

.woocommerce-MyAccount-content>h3:first-of-type {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #172B54;
    margin-bottom: 1.5rem;
}

/* Field wrapper: flexbox for reliable two-column layout */
.woocommerce-address-fields__field-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 1rem;
    margin: 0 -0.5rem;
}

/* Form row spacing - consistent vertical gap between rows */
.woocommerce-address-fields .form-row {
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

/* Labels: inline-flex so Lucide icon aligns with text; spacing from inputs */
.woocommerce-address-fields .form-row label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #172B54;
}

/* First/Last name side by side - flex basis so they align in one row */
.woocommerce-address-fields .form-row-first,
.woocommerce-address-fields .form-row-last {
    flex: 1 1 calc(50% - 1rem) !important;
    min-width: 0;
    width: auto !important;
    max-width: calc(50% - 0.5rem) !important;
    float: none !important;
    margin: 0 !important;
}

.woocommerce-address-fields .form-row-wide {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Input styling within address form */
.woocommerce-address-fields input[type="text"],
.woocommerce-address-fields input[type="email"],
.woocommerce-address-fields input[type="tel"],
.woocommerce-address-fields select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.woocommerce-address-fields input:focus,
.woocommerce-address-fields select:focus {
    outline: none;
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

/* Select2 within address form */
.woocommerce-address-fields .select2-container--default .select2-selection--single {
    height: auto;
    padding: 10px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: white;
}

.woocommerce-address-fields .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: #172B54;
    line-height: 1.5;
}

.woocommerce-address-fields .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 12px;
}

/* Save button */
.woocommerce-address-fields button[type="submit"] {
    margin-top: 0.5rem;
}

/* Responsive: stack name fields on small screens */
@media (max-width: 480px) {

    .woocommerce-address-fields .form-row-first,
    .woocommerce-address-fields .form-row-last {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
}

/* ========================================
   INTERNATIONAL TELEPHONE INPUT (ITI)
   Softech Country & Phone Validator
   ======================================== */

/* Main ITI wrapper — fill the full width of its form-row */
.woocommerce .iti {
    width: 100%;
    display: block;
    position: relative;
}

/* The phone input inside ITI — match theme input styling.
   Override the inline padding-left set by the plugin via !important
   so the text aligns neatly after the country flag+code. */
.woocommerce .iti .iti__tel-input,
.woocommerce .iti input[type="tel"] {
    width: 100% !important;
    height: auto;
    padding: 14px 16px 14px 96px !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    box-sizing: border-box;
}

.woocommerce .iti .iti__tel-input:focus,
.woocommerce .iti input[type="tel"]:focus {
    outline: none;
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

/* Country selector container — holds both the flag button AND the dropdown.
   The plugin toggles the dropdown open/closed inside this container. */
.woocommerce .iti__country-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
}

/* When the dropdown is open, the container expands to full width to
   anchor the dropdown panel properly beneath the input. */
.woocommerce .iti__country-container:has(.iti__dropdown-content) {
    width: 100%;
}

.woocommerce .iti__country-container .iti__selected-country {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px 0 16px;
    height: 100%;
    background: transparent;
    border: none;
    border-right: 1px solid #e5e7eb !important;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.woocommerce .iti__country-container .iti__selected-country:hover {
    background: #F9FAFB;
}

/* Dial code text next to the flag */
.woocommerce .iti__country-container .iti__selected-country-primary .iti__selected-dial-code {
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: #172B54;
    font-weight: 500;
}

/* Arrow indicator */
.woocommerce .iti__country-container .iti__arrow {
    border-left-color: #9CA3AF;
    border-right-color: #9CA3AF;
}

/* Dropdown content wrapper — override the plugin's inline width
   so it stays the same width as the phone input */
.woocommerce .iti__dropdown-content,
.iti__dropdown-content {
    width: 100% !important;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background: white;
    margin-top: 4px;
    z-index: 9999;
    overflow: hidden;
}

/* Country list inside the dropdown */
.woocommerce .iti__country-list,
.iti__country-list {
    max-height: 220px;
    overflow-y: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: white;
}

/* Search input inside the dropdown */
.woocommerce .iti__search-input,
.iti__search-input {
    padding: 10px 14px !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: 'DM Sans', sans-serif !important;
    margin: 8px !important;
    width: calc(100% - 16px) !important;
    box-sizing: border-box !important;
}

.woocommerce .iti__search-input:focus,
.iti__search-input:focus {
    outline: none !important;
    border-color: #00A3F2 !important;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1) !important;
}

/* Individual country items */
.woocommerce .iti__country,
.iti__country {
    padding: 8px 14px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: #172B54;
    cursor: pointer;
    transition: background 0.15s;
}

.woocommerce .iti__country:hover,
.iti__country:hover,
.woocommerce .iti__country--highlight,
.iti__country--highlight {
    background: #FFF5F5 !important;
}

/* Dial code in dropdown */
.woocommerce .iti__dial-code,
.iti__dial-code {
    color: #6B7280;
}

/* Validation states — use border-color instead of inset box-shadow
   because the country selector covers the left edge of the input */
.woocommerce .form-row.woocommerce-validated .iti input[type="tel"] {
    border-color: #0f834d;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.woocommerce .form-row.woocommerce-invalid .iti input[type="tel"] {
    border-color: #e2401c;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Also override the base WooCommerce .input-text validation shadows for phone */
.form-row.woocommerce-validated .iti .input-text,
.form-row.woocommerce-validated .iti .iti__tel-input {
    box-shadow: none !important;
    border-color: #0f834d;
}

.form-row.woocommerce-invalid .iti .input-text,
.form-row.woocommerce-invalid .iti .iti__tel-input {
    box-shadow: none !important;
    border-color: #e2401c;
}

.iti--inline-dropdown .iti__dropdown-content {
    top: 50px;
}

.iti input#billing-phone,
.iti input#billing_phone,
.iti input[name="billing_phone"],
.iti input#shipping_phone,
.iti input[name="shipping_phone"] {
    border-radius: 12px !important;
}

/* Force phone field labels visible — the ITI plugin hides/removes them.
   Target both billing and shipping phone form-row wrappers. */
#billing_phone_field>label,
#shipping_phone_field>label {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    clip: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    font-size: 13px;
    font-weight: 600;
    color: #172B54;
    margin-bottom: 6px;
    font-family: 'DM Sans', sans-serif;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before,
.woocommerce-noreviews::before,
p.no-comments::before {
    display: none;
}

.woocommerce-order .woocommerce-order-details {
    display: none !important;
}

.woocommerce-error a {
    color: #008AC9 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    text-align: left !important;
    text-decoration-skip-ink: none !important;
}

/* ========================================
   SHOP / ARCHIVE PAGE - CUSTOM CARD GRID
   ======================================== */

/* Override Storefront's default shop wrapper styles */
.post-type-archive-product .site-content,
body.woocommerce.archive .site-content,
body.tax-product_cat .site-content {
    background: transparent !important;
}

.post-type-archive-product #primary,
body.woocommerce.archive #primary {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    width: 100% !important;
}

/* Hide the Storefront default content wrapper when our custom archive is active */
.post-type-archive-product .site-main>.storefront-sorting,
body.woocommerce.archive .site-main>.storefront-sorting {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

/* Transform default WooCommerce product list into the themed grid layout */
.mygenetix-shop ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
    width: 100% !important;
    clear: both !important;
}

@media (min-width: 1024px) {
    .mygenetix-shop ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1280px) {
    .mygenetix-shop ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 639px) {
    .mygenetix-shop ul.products {
        grid-template-columns: 1fr !important;
    }
}

.mygenetix-shop ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    list-style: none !important;
    text-align: left !important;
}

/* Override Storefront/WC default product image styles */
.mygenetix-shop ul.products li.product img {
    margin: 0 !important;
    display: block !important;
}

/* Override Storefront's default product title styles */
.mygenetix-shop ul.products li.product .woocommerce-loop-product__title {
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* Override Storefront/WC default button styles on shop product cards */
.mygenetix-shop ul.products li.product>.button,
.mygenetix-shop ul.products li.product>a.button,
.mygenetix-shop ul.products li.product>.added_to_cart {
    display: none !important;
    /* hide default button, we use our custom ones */
}

/* Override default WooCommerce price styles */
.mygenetix-shop ul.products li.product .price {
    color: #0B1428 !important;
    font-weight: 700 !important;
    margin: 0 !important;
    display: inline !important;
}

.mygenetix-shop ul.products li.product .price del {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
    font-size: 0.85em !important;
}

.mygenetix-shop ul.products li.product .price ins {
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* Override Storefront's sale flash on shop cards (we use custom badge) */
.mygenetix-shop ul.products li.product .onsale {
    display: none !important;
}

/* Sorting controls — themed */
.mygenetix-shop .storefront-sorting {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 2rem !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

.mygenetix-shop .storefront-sorting::before,
.mygenetix-shop .storefront-sorting::after {
    display: none !important;
}

.mygenetix-shop .storefront-sorting .woocommerce-ordering {
    float: none !important;
    margin: 0 !important;
}

.mygenetix-shop .storefront-sorting .woocommerce-result-count {
    float: none !important;
    order: 2;
}

.mygenetix-shop .storefront-sorting .woocommerce-ordering {
    order: 1;
}

/* Hide the pagination that Storefront adds inside the top sorting bar */
.mygenetix-shop .storefront-sorting nav.woocommerce-pagination {
    display: none !important;
}

/* Hide bottom sorting/result count, keep pagination */
.mygenetix-shop ul.products+.storefront-sorting {
    margin-top: 3rem;
    margin-bottom: 0;
    justify-content: center;
    border-top: none;
}

.mygenetix-shop ul.products+.storefront-sorting .woocommerce-ordering,
.mygenetix-shop ul.products+.storefront-sorting .woocommerce-result-count {
    display: none !important;
}

.mygenetix-shop .woocommerce-result-count {
    color: #64748b;
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    margin: 0 !important;
    font-weight: 500;
}

.mygenetix-shop .woocommerce-ordering select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    color: #334155;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 220px;
}

.mygenetix-shop .woocommerce-ordering select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mygenetix-shop .woocommerce-ordering select:focus {
    outline: none;
    border-color: #00A3F2;
    box-shadow: 0 0 0 3px rgba(0, 163, 242, 0.1);
}

/* Pagination — themed */
.mygenetix-shop .woocommerce-pagination {
    text-align: center;
    margin: 0 !important;
    width: 100%;
}

.mygenetix-shop .woocommerce-pagination ul {
    display: inline-flex;
    gap: 0.5rem;
    border: none !important;
}

.mygenetix-shop .woocommerce-pagination ul li {
    border: none !important;
    overflow: visible !important;
}

.mygenetix-shop .woocommerce-pagination ul li a,
.mygenetix-shop .woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #334155;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    text-decoration: none;
}

.mygenetix-shop .woocommerce-pagination ul li a:hover {
    border-color: #00A3F2;
    color: #00A3F2;
    background: #FFF5F5;
}

.mygenetix-shop .woocommerce-pagination ul li span.current {
    background: #00A3F2 !important;
    color: white !important;
    border-color: #00A3F2 !important;
}

/* Hide breadcrumbs on shop page — we use the big title instead */
.mygenetix-shop .woocommerce-breadcrumb,
.post-type-archive-product .woocommerce-breadcrumb {
    display: none !important;
}

/* Hide default Storefront page header on shop */
.post-type-archive-product .page-header,
body.woocommerce.archive .page-header {
    display: none !important;
}

/* Make the Storefront primary wrapper transparent and full-width for our custom archive */
.post-type-archive-product #primary,
body.tax-product_cat #primary,
body.tax-product_tag #primary {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main {
    padding: 0 !important;
    margin: 0 !important;
}

/* Fix sidebar not showing on shop */
.post-type-archive-product #secondary,
body.woocommerce.archive #secondary {
    display: none !important;
}

/* line-clamp utility for short descriptions */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* No products found — themed */
.mygenetix-shop .woocommerce-info {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    padding: 2rem !important;
    text-align: center;
    color: #334155;
    font-family: 'DM Sans', sans-serif;
}

/* Shop page body background */
.post-type-archive-product .site-content,
body.tax-product_cat .site-content,
body.tax-product_tag .site-content {
    background: transparent !important;
}

.post-type-archive-product .hentry,
body.tax-product_cat .hentry,
body.tax-product_tag .hentry {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.products::before,
ul.products::after {
    display: none !important;
}