/* ==============================================================
   THE KHATOON SHOP v4.0.1 — STABILITY, ACCOUNT & CHECKOUT FIXES
   Targeted overrides only. No product, price, shipping or payment data.
================================================================ */

/* ---------- Header search and actions ---------- */
body.tks-luxury-suite-v400 .desktop-product-search {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 56px !important;
    align-items: stretch !important;
    overflow: hidden !important;
    border: 1px solid rgba(215, 178, 74, .8) !important;
    border-radius: 13px !important;
    background: #fff !important;
}
body.tks-luxury-suite-v400 .desktop-product-search input[type="search"] {
    position: static !important;
    grid-column: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 50px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 12px 0 0 12px !important;
    color: #171318 !important;
    background: #fff !important;
    box-shadow: none !important;
}
body.tks-luxury-suite-v400 .desktop-product-search button[type="submit"] {
    position: static !important;
    grid-column: 2 !important;
    width: 56px !important;
    min-width: 56px !important;
    height: auto !important;
    min-height: 50px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 12px 12px 0 !important;
    background: var(--tks-pink) !important;
    color: #fff !important;
    display: grid !important;
    place-items: center !important;
}
body.tks-luxury-suite-v400 .desktop-product-search button[type="submit"] svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    color: #fff !important;
}
body.tks-luxury-suite-v400 .desktop-product-search .header-search-suggestions {
    grid-column: 1 / -1 !important;
}

@media (min-width: 981px) {
    body.tks-luxury-suite-v400 .header-main,
    body.tks-luxury-suite-v400.woocommerce-checkout:not(.woocommerce-order-received) .header-main {
        grid-template-columns: minmax(140px, 172px) minmax(300px, 1fr) minmax(260px, auto) !important;
        column-gap: 18px !important;
    }
    body.tks-luxury-suite-v400 .header-actions,
    body.tks-luxury-suite-v400.woocommerce-checkout:not(.woocommerce-order-received) .header-actions {
        display: flex !important;
        min-width: 260px !important;
        gap: 4px !important;
    }
    body.tks-luxury-suite-v400 .header-actions > *,
    body.tks-luxury-suite-v400.woocommerce-checkout:not(.woocommerce-order-received) .header-actions > * {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    body.tks-luxury-suite-v400 .header-action {
        padding: 7px 6px !important;
        font-size: 12px !important;
    }
}

/* ---------- Shop filter visibility ---------- */
body.tks-luxury-suite-v400 .tks-shop-filters__header,
body.tks-luxury-suite-v400 .tks-shop-filters__header * {
    color: #fff !important;
}
body.tks-luxury-suite-v400 .tks-shop-filters__header span {
    color: var(--tks-gold-soft) !important;
}
body.tks-luxury-suite-v400 .tks-shop-filters__header h2 {
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}
body.tks-luxury-suite-v400 .tks-shop-filter-form details,
body.tks-luxury-suite-v400 .tks-shop-filter-form summary,
body.tks-luxury-suite-v400 .tks-shop-filter-form label,
body.tks-luxury-suite-v400 .tks-shop-filter-form select,
body.tks-luxury-suite-v400 .tks-shop-filter-form input {
    color: #262128 !important;
}
body.tks-luxury-suite-v400 .tks-shop-filter-form details[open] > summary {
    color: var(--tks-pink-dark) !important;
}

/* ---------- Zero-price catalogue safety ---------- */
.tks-price-updating {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #e8b9ca;
    border-radius: 999px;
    color: #9a3158 !important;
    background: #fff4f8;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}
body.tks-luxury-suite-v400 ul.products li.product .tks-price-updating {
    margin: 5px 10px 11px;
}

/* ---------- My Account: guest login/register ---------- */
body.woocommerce-account.tks-account-guest .tks-account-content > .woocommerce,
body.woocommerce-account.tks-account-guest .tks-account-content .woocommerce {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}
body.woocommerce-account.tks-account-guest #customer_login {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}
body.woocommerce-account.tks-account-guest #customer_login::before,
body.woocommerce-account.tks-account-guest #customer_login::after {
    display: none !important;
    content: none !important;
}
body.woocommerce-account.tks-account-guest #customer_login .u-column1,
body.woocommerce-account.tks-account-guest #customer_login .u-column2 {
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 26px !important;
    border: 1px solid #eadce2 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 12px 32px rgba(28, 12, 20, .07) !important;
}
body.woocommerce-account.tks-account-guest #customer_login h2 {
    margin: 0 0 18px !important;
    color: #1d171b !important;
    font-size: clamp(30px, 3vw, 42px) !important;
    line-height: 1.08 !important;
}
body.woocommerce-account.tks-account-guest #customer_login .woocommerce-form,
body.woocommerce-account.tks-account-guest #customer_login .form-row,
body.woocommerce-account.tks-account-guest #customer_login .password-input {
    width: 100% !important;
    min-width: 0 !important;
}
body.woocommerce-account.tks-account-guest #customer_login input.input-text {
    width: 100% !important;
    min-height: 50px !important;
}
body.woocommerce-account.tks-account-guest .tks-register-name-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
body.woocommerce-account.tks-account-guest .woocommerce-error,
body.woocommerce-account.tks-account-guest .woocommerce-message,
body.woocommerce-account.tks-account-guest .woocommerce-info {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 0 20px !important;
    padding: 16px 18px 16px 50px !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.55 !important;
}

/* ---------- My Account: address cards ---------- */
body.woocommerce-account:not(.tks-account-guest) .tks-account-content .woocommerce-Addresses {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
}
body.woocommerce-account:not(.tks-account-guest) .tks-account-content .woocommerce-Address,
body.woocommerce-account:not(.tks-account-guest) .tks-account-content .u-column1,
body.woocommerce-account:not(.tks-account-guest) .tks-account-content .u-column2 {
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}
body.woocommerce-account:not(.tks-account-guest) .tks-account-content .woocommerce-Address {
    padding: 24px !important;
    border: 1px solid #eddae2 !important;
    border-radius: 16px !important;
    background: #fff8fb !important;
    box-shadow: 0 10px 28px rgba(28, 12, 20, .06) !important;
}
body.woocommerce-account .tks-account-content .woocommerce-Address-title {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 0 0 18px !important;
}
body.woocommerce-account .tks-account-content .woocommerce-Address-title h2 {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: #1c171b !important;
    font-size: clamp(28px, 2.7vw, 38px) !important;
    line-height: 1.08 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
body.woocommerce-account .tks-account-content .woocommerce-Address-title .edit {
    flex: 0 0 auto !important;
    margin: 3px 0 0 !important;
    padding: 7px 11px !important;
    border: 1px solid var(--tks-pink) !important;
    border-radius: 8px !important;
    color: var(--tks-pink-dark) !important;
    background: #fff !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}
body.woocommerce-account .tks-account-content .woocommerce-Address address {
    margin: 0 !important;
    color: #3f383d !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
}

/* ---------- True WooCommerce block checkout steps ---------- */
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-progress li {
    cursor: pointer;
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-progress li[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .58;
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-step-node.tks-step-hidden {
    display: none !important;
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-step-node:not(.tks-step-hidden) {
    animation: tksStepIn .2s ease both;
}
@keyframes tksStepIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: none; }
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-progress li.is-complete .tks-checkout-progress__number {
    border-color: var(--tks-pink) !important;
    color: transparent !important;
    background: #fff !important;
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-progress li.is-complete .tks-checkout-progress__number::after {
    content: "✓";
    position: absolute;
    color: var(--tks-pink) !important;
    font-size: 16px;
    font-weight: 900;
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-progress__number {
    position: relative;
}
.tks-checkout-step-note {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #f0c7d7;
    border-left: 4px solid var(--tks-pink);
    border-radius: 11px;
    background: #fff5f8;
    color: #4d4248;
    font-size: 14px;
    line-height: 1.55;
}
.tks-checkout-step-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 22px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid #eadde2;
}
.tks-checkout-step-navigation button {
    min-height: 50px !important;
    padding: 11px 22px !important;
    border-radius: 11px !important;
    font-weight: 900 !important;
}
.tks-checkout-step-navigation__back {
    border: 1px solid #d8cfd3 !important;
    color: #30292d !important;
    background: #fff !important;
}
.tks-checkout-step-navigation__next {
    margin-left: auto;
    border: 1px solid var(--tks-pink) !important;
    color: #fff !important;
    background: var(--tks-pink) !important;
}
.tks-checkout-step-navigation__next:hover,
.tks-checkout-step-navigation__next:focus-visible {
    background: var(--tks-pink-dark) !important;
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .wc-block-checkout__sidebar {
    align-self: start !important;
}
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-checkout-submit-card,
body.woocommerce-checkout.tks-real-multistep-ready:not(.woocommerce-order-received) .tks-payment-in-sidebar {
    display: none !important;
}

@media (max-width: 780px) {
    body.woocommerce-account.tks-account-guest #customer_login,
    body.woocommerce-account:not(.tks-account-guest) .tks-account-content .woocommerce-Addresses {
        grid-template-columns: 1fr !important;
    }
    body.woocommerce-account.tks-account-guest #customer_login .u-column1,
    body.woocommerce-account.tks-account-guest #customer_login .u-column2,
    body.woocommerce-account:not(.tks-account-guest) .tks-account-content .woocommerce-Address {
        padding: 20px 16px !important;
    }
    body.woocommerce-account.tks-account-guest .tks-register-name-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    body.woocommerce-account .tks-account-content .woocommerce-Address-title h2 {
        font-size: 29px !important;
    }
    .tks-checkout-step-navigation {
        display: grid;
        grid-template-columns: 1fr;
    }
    .tks-checkout-step-navigation button {
        width: 100% !important;
    }
    .tks-checkout-step-navigation__next {
        grid-row: 1;
        margin-left: 0;
    }
}

/* Classic checkout remains a native one-page form rather than displaying a
   misleading clickable progress tracker. */
body.woocommerce-checkout.tks-checkout-classic-fallback:not(.woocommerce-order-received) .tks-checkout-progress {
    display: none !important;
}
