/* Dawn-style cart drawer (demo) */
.tks-cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 10100;
    pointer-events: none;
    visibility: hidden;
}

.tks-cart-drawer:not(.is-open) {
    pointer-events: none !important;
    visibility: hidden !important;
}

.tks-cart-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.tks-cart-drawer .cart-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.tks-cart-drawer.is-open .cart-drawer__overlay {
    opacity: 1;
}

.tks-cart-drawer .cart-drawer__inner {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow: hidden;
    background: #ffffff;
    color: #121212;
}

.tks-cart-drawer.is-open .cart-drawer__inner {
    transform: translateX(0);
}

.tks-cart-drawer .cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(var(--color-foreground, 18 18 18), 0.08);
}

.tks-cart-drawer .cart-drawer__heading {
    margin: 0;
    font-size: 1.125rem;
}

.tks-cart-drawer .cart-drawer__close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.tks-cart-drawer .cart-drawer__items {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.tks-cart-drawer .cart-drawer__empty {
    text-align: center;
    padding: 2rem 0;
}

.tks-cart-drawer .tks-cart-empty-text {
    display: block;
    margin: 0 0 1rem;
    color: #121212;
}

/* Drawer line items — isolated from Dawn cart-page .cart-item styles */
.tks-cart-drawer .tks-drawer-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(18, 18, 18, 0.08);
    align-items: start;
}

.tks-cart-drawer .tks-drawer-line__media {
    width: 72px;
}

.tks-cart-drawer .tks-drawer-line__media-link {
    display: block;
    line-height: 0;
}

.tks-cart-drawer .tks-drawer-line__image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.tks-cart-drawer .tks-drawer-line__body {
    min-width: 0;
}

.tks-cart-drawer .tks-drawer-line__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tks-cart-drawer .tks-drawer-line__title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: inherit;
    text-decoration: none;
    word-break: break-word;
}

.tks-cart-drawer .tks-drawer-line__title:hover {
    opacity: 0.72;
}

.tks-cart-drawer .tks-drawer-line__price {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.tks-cart-drawer .tks-drawer-line__variant {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.72;
}

.tks-cart-drawer .tks-drawer-line__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tks-cart-drawer .tks-drawer-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(18, 18, 18, 0.14);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.tks-cart-drawer .tks-drawer-qty__btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f6f6f6;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.tks-cart-drawer .tks-drawer-qty__input {
    width: 40px;
    height: 32px;
    border: none;
    border-left: 1px solid rgba(18, 18, 18, 0.08);
    border-right: 1px solid rgba(18, 18, 18, 0.08);
    text-align: center;
    font: inherit;
    font-size: 14px;
    padding: 0;
    margin: 0;
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
}

.tks-cart-drawer .tks-drawer-qty__input::-webkit-outer-spin-button,
.tks-cart-drawer .tks-drawer-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tks-cart-drawer .tks-drawer-line__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.55;
    flex-shrink: 0;
}

.tks-cart-drawer .tks-drawer-line__remove:hover {
    opacity: 1;
}

.tks-cart-drawer .tks-drawer-line__remove svg {
    width: 18px;
    height: 18px;
    display: block;
}

.tks-cart-drawer .drawer__footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(var(--color-foreground, 18 18 18), 0.08);
}

.tks-cart-drawer .totals {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.tks-cart-drawer .totals__subtotal-value {
    margin: 0;
    font-weight: 600;
}

.tks-cart-drawer .cart__ctas {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tks-cart-drawer .cart__checkout-button,
.tks-cart-drawer .button--secondary,
.tks-cart-drawer .cart-drawer__empty .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.tks-cart-drawer .cart__checkout-button,
.tks-cart-drawer .cart-drawer__empty .button {
    background: #5a7277;
    color: #fff;
    border: 1px solid #5a7277;
}

.tks-cart-drawer .button--secondary {
    background: #fff;
    color: #121212;
    border: 1px solid rgba(18, 18, 18, 0.18);
}

.tks-cart-drawer .cart__checkout-button,
.tks-cart-drawer .button--secondary {
    width: 100%;
    text-align: center;
}

.tks-cart-drawer .tax-note {
    display: block;
    opacity: 0.75;
}

body.store-theme-active #siteHeader cart-notification {
    display: none !important;
}

body.store-theme-active .tks-cart-drawer:not(.is-open),
body.store-theme-active #cartDrawer:not(.is-open) {
    pointer-events: none !important;
    visibility: hidden !important;
}

body.store-theme-active #cartDrawer.is-open,
body.store-theme-active .tks-cart-drawer.is-open {
    pointer-events: auto !important;
    visibility: visible !important;
}

body.store-theme-active cart-drawer,
body.store-theme-active .cart-drawer:not(#cartDrawer):not(.tks-cart-drawer) {
    display: none !important;
}

/* Predictive search results (client-side demo) */
.tks-predictive-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    background: rgb(var(--color-background, 255 255 255));
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-height: min(70vh, 420px);
    overflow: auto;
}

.tks-predictive-results[hidden] {
    display: none !important;
}

.tks-predictive-results .predictive-search__heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 1rem 0.25rem;
    margin: 0;
    opacity: 0.65;
}

.tks-predictive-results .predictive-search__results-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.5rem;
}

.tks-predictive-results .predictive-search__item {
    display: grid;
    grid-template-columns: 3.5rem 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: inherit;
}

.tks-predictive-results .predictive-search__item:hover,
.tks-predictive-results .predictive-search__item.is-active {
    background: rgba(var(--color-foreground, 18 18 18), 0.05);
}

.tks-predictive-results .predictive-search__image {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 4px;
}

.tks-predictive-results .predictive-search__item-heading {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.tks-predictive-results .predictive-search__view-all {
    display: block;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(var(--color-foreground, 18 18 18), 0.08);
    text-align: center;
    font-size: 0.875rem;
}

predictive-search .field,
.search-modal__form .field {
    position: relative;
}

/* Cart notification toast */
.tks-cart-notification {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1100;
    pointer-events: none;
}

.tks-cart-notification .cart-notification-wrapper {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    pointer-events: none;
}

.tks-cart-notification #cart-notification {
    pointer-events: auto;
    width: min(420px, calc(100vw - 2rem));
    transform: translateY(-120%);
    transition: transform 0.35s ease;
    display: block;
}

.tks-cart-notification #cart-notification.active {
    transform: translateY(0);
}

.tks-cart-notification .cart-notification-product {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 1rem;
    padding: 0 1.25rem 1rem;
    align-items: start;
}

.tks-cart-notification .cart-notification-product__image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.tks-cart-notification .cart-notification-product__name {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}

.tks-cart-notification .cart-notification__links {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tks-cart-notification .cart-notification__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.tks-cart-notification .cart-notification__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.95rem;
}

/* Cart page gift / delivery extras */
.tks-cart-extras {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(var(--color-foreground, 18 18 18), 0.08);
}

.tks-cart-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1rem;
}

.tks-cart-fieldset legend {
    margin-bottom: 0.5rem;
}

.tks-radio,
.tks-checkbox {
    display: block;
    margin: 0.35rem 0;
    font-size: 0.9rem;
}

.tks-cart-note textarea {
    width: 100%;
    min-height: 5rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.2);
    font: inherit;
    margin-bottom: 0.75rem;
}

.tks-shower-details {
    margin: 0.5rem 0 1rem;
}

.tks-shower-details .field__input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.2);
    font: inherit;
}

.tks-cart-extras-status--ok {
    color: rgb(var(--color-foreground, 18 18 18));
    margin-top: 0.5rem;
}

body.store-theme-active .reset__button:not(.hidden) {
    display: inline-flex !important;
}
