/*
 * Storefront component integrity layer.
 * Loaded after theme and page styles so border, radius and clipping behaviour
 * has one final source of truth without changing the theme source package.
 */

:root {
    --dk-radius-inner: calc(var(--dk-radius-card) - 4px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

#wrapper,
.dekon-page-content,
.dekon-page-content > section,
.dekon-page-content .container,
.dekon-page-content .row,
.dekon-page-content [class*="col-"] {
    min-width: 0;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

/* Controls: keep the border footprint stable in every interaction state. */
.tf-field input:not([type="checkbox"]):not([type="radio"]),
.tf-field select,
.tf-field textarea,
.box-ip-checkout input:not([type="checkbox"]):not([type="radio"]),
.box-ip-checkout select,
.box-ip-checkout textarea,
.tf-select select,
.tf-dropdown-select,
.form-control,
.form-select,
.dk-phone-field {
    max-width: 100%;
    border-width: 1px !important;
    border-radius: var(--dk-radius-control) !important;
    background-clip: padding-box;
}

.tf-field input:not([type="checkbox"]):not([type="radio"]):focus,
.tf-field select:focus,
.tf-field textarea:focus,
.box-ip-checkout input:not([type="checkbox"]):not([type="radio"]):focus,
.box-ip-checkout select:focus,
.box-ip-checkout textarea:focus,
.tf-select select:focus,
.tf-dropdown-select:focus,
.form-control:focus,
.form-select:focus {
    border-width: 1px !important;
    outline: 0;
    box-shadow: var(--dk-shadow-focus) !important;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.tf-btn,
.dk-btn {
    border-width: 1px;
    border-radius: var(--dk-radius-control) !important;
    background-clip: padding-box;
}

.tf-btn:hover,
.tf-btn:active,
.tf-btn:focus-visible,
.dk-btn:hover,
.dk-btn:active,
.dk-btn:focus-visible {
    border-width: 1px;
}

/* Search and select groups remain one coherent control. */
.form-search-nav,
.form-search-nav fieldset,
.tf-select,
.password-wrapper {
    min-width: 0;
    max-width: 100%;
}

.form-search-nav fieldset input {
    width: 100%;
    border-width: 1px;
    border-radius: var(--dk-radius-control) !important;
    background-clip: padding-box;
}

.form-search-nav .btn-action {
    border: 0;
    border-radius: calc(var(--dk-radius-control) - 3px);
}

.dk-phone-field {
    overflow: hidden;
}

.dk-phone-field input[data-phone-input] {
    border-radius: 0 !important;
}

/* Product and category media: wrapper and image share the same clipping edge. */
.card-product,
.card-product_info,
.card-product .price-wrap {
    min-width: 0;
    max-width: 100%;
}

.card-product_wrapper {
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--dk-radius-inner);
    isolation: isolate;
}

.card-product_wrapper .product-img,
.card-product_wrapper .product-img img,
.card-product_wrapper .img-product,
.card-product_wrapper .img-hover {
    border-radius: inherit !important;
}

.card-product_wrapper .product-img {
    overflow: hidden;
    background-clip: padding-box;
}

.card-product_wrapper .product-img img {
    display: block;
}

.card-product .product-action_bot,
.card-product .product-action_bot form,
.card-product .product-action_bot .tf-btn {
    max-width: 100%;
    min-width: 0;
}

.card-product .product-action_bot .tf-btn {
    min-height: 44px;
    border-width: 1px !important;
    border-radius: var(--dk-radius-control) !important;
}

.dekon-category-card,
.category-v01 .cate-image,
.dekon-lookbook-mobile-product .lookbook-product,
.banner-lookbook,
.section-thumbs-arrival .sw-image {
    overflow: hidden;
    border-radius: var(--dk-radius-inner);
    background-clip: padding-box;
}

.dekon-category-card > img,
.category-v01 .cate-image > img,
.banner-lookbook > img,
.banner-lookbook .img-banner,
.section-thumbs-arrival .sw-image > img {
    display: block;
    width: 100%;
    border-radius: inherit;
}

/* Cart, checkout and account cards. */
.box-order-summary,
.box-your-order,
.wg-my-order,
.my-account-content,
.sidebar-account-wrap,
.dk-card,
.dk-address-card,
.dekon-addr-card,
.dekon-pay-card,
.payment_accordion,
.dk-payment-frame,
.dk-otp-card,
.dk-otp-panel {
    border-width: 1px !important;
    border-radius: var(--dk-radius-card) !important;
    background-clip: padding-box;
}

.wg-my-order,
.sidebar-account-wrap,
.dekon-pay-card,
.payment_accordion,
.dk-payment-frame {
    overflow: hidden;
}

.wg-my-order .order-heading,
.dekon-pay-body,
.dekon-summary-grand,
.box-order-summary .subtotal,
.box-order-summary .discount,
.box-order-summary .ship,
.box-your-order .list-total {
    border-width: 1px;
}

.wg-my-order .order-heading {
    border-radius: 0;
    background-clip: padding-box;
}

.wg-my-order .order_prd_item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dk-address-card,
.dekon-addr-card {
    overflow: hidden;
}

.dk-address-card > :first-child,
.dekon-addr-card > :first-child {
    border-top-left-radius: calc(var(--dk-radius-card) - 1px);
    border-top-right-radius: calc(var(--dk-radius-card) - 1px);
}

.dk-address-card > :last-child,
.dekon-addr-card > :last-child {
    border-bottom-right-radius: calc(var(--dk-radius-card) - 1px);
    border-bottom-left-radius: calc(var(--dk-radius-card) - 1px);
}

.dekon-pay-card > :first-child,
.payment_accordion > :first-child {
    border-top-left-radius: calc(var(--dk-radius-card) - 1px);
    border-top-right-radius: calc(var(--dk-radius-card) - 1px);
}

.dekon-pay-card > :last-child,
.payment_accordion > :last-child {
    border-bottom-right-radius: calc(var(--dk-radius-card) - 1px);
    border-bottom-left-radius: calc(var(--dk-radius-card) - 1px);
}

/* Product, cart and order thumbnails never expose square placeholder corners. */
.dekon-cart-row .img-prd,
.tf-mini-cart-image,
.dk-checkout-order-image,
.wg-my-order .prd__image,
.tf-product-media-main .item,
.tf-product-media-thumbs .item,
.canvas-quickview .dekon-quick-media {
    overflow: hidden;
    border-radius: var(--dk-radius-control) !important;
    background-clip: padding-box;
}

.dekon-cart-row .img-prd img,
.tf-mini-cart-image img,
.dk-checkout-order-image,
.wg-my-order .prd__image img,
.tf-product-media-main .item img,
.tf-product-media-thumbs .item img,
.canvas-quickview .dekon-quick-media img {
    display: block;
    border-radius: inherit !important;
}

/* Quantity and joined controls: one outer border, no doubled inner edges. */
.wg-quantity,
.dekon-qty-wrap.wg-quantity,
.dekon-pqty-wrap.wg-quantity {
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-radius-control) !important;
    overflow: hidden;
    background: #fff;
    background-clip: padding-box;
}

.wg-quantity .quantity-product,
.wg-quantity .btn-quantity,
.wg-quantity .dekon-qty-btn,
.wg-quantity .dekon-mini-qty-btn {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.wg-quantity .btn-quantity:focus-visible,
.wg-quantity .quantity-product:focus-visible {
    position: relative;
    z-index: 1;
    outline: 0;
    box-shadow: inset 0 0 0 2px rgba(17, 17, 17, .22) !important;
}

/* Alerts and informational surfaces use the control radius consistently. */
.alert,
.dk-alert,
.dk-inline-alert,
.dekon-shipping-note,
.dekon-product-shipping-estimate,
.dekon-product-packaging-note,
.dekon-legal-company {
    overflow: hidden;
    border-width: 1px;
    border-radius: var(--dk-radius-control) !important;
    background-clip: padding-box;
}

/* Tabs and pagination: stable borders, clean dividers and no width expansion. */
.tab-btn-wrap-v1,
.tab-btn-wrap-v2,
.tab-btn-wrap-v3,
.tab-btn-wrap-v4,
.tf-page-pagination {
    max-width: 100%;
    min-width: 0;
}

.tab-btn-wrap-v1 .tf-btn-tab,
.tab-btn-wrap-v2 .tf-btn-tab,
.tab-btn-wrap-v3 .tf-btn-tab,
.tab-btn-wrap-v4 .tf-btn-tab {
    box-sizing: border-box;
}

.tf-page-pagination .pag-item {
    border-width: 1px !important;
    border-radius: var(--dk-radius-control) !important;
    background-clip: padding-box;
}

.tf-page-pagination .pag-item:hover,
.tf-page-pagination .pag-item:focus-visible,
.tf-page-pagination .pag-item.active {
    border-width: 1px !important;
}

.tf-page-pagination .pag-item.dots {
    border-width: 0 !important;
}

/* Dropdowns and centered dialogs clip their internal backgrounds to one edge. */
.dropdown-menu,
.bootstrap-select > .dropdown-menu {
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-radius-control);
    background-clip: padding-box;
}

.dropdown-menu > :first-child {
    border-top-left-radius: calc(var(--dk-radius-control) - 1px);
    border-top-right-radius: calc(var(--dk-radius-control) - 1px);
}

.dropdown-menu > :last-child {
    border-bottom-right-radius: calc(var(--dk-radius-control) - 1px);
    border-bottom-left-radius: calc(var(--dk-radius-control) - 1px);
}

.modal:not(.fullRight):not(.fullLeft):not(.fullBottom) .modal-content,
.offcanvas.offcanvas-center {
    overflow: hidden;
    border: 1px solid var(--dk-border) !important;
    border-radius: var(--dk-radius-card) !important;
    background-clip: padding-box;
}

.modal.fullRight .modal-content,
.modal.fullLeft .modal-content,
.modal.fullBottom .modal-content,
.offcanvas.offcanvas-start,
.offcanvas.offcanvas-end {
    border-radius: 0 !important;
}

.canvas-wrapper,
.canvas-header,
.canvas-body,
.canvas-footer,
.canvas-bottom,
.popup-shopping-cart .wrap,
.popup-shopping-cart .tf-mini-cart-wrap,
.popup-shopping-cart .tf-mini-cart-main {
    min-width: 0;
    max-width: 100%;
}

.canvas-header::after {
    height: 1px;
}

.canvas-footer,
.canvas-bottom,
.popup-shopping-cart .tf-mini-cart-bottom-wrap {
    background-clip: padding-box;
}

/* Async surfaces reserve their normal footprint while work is in flight. */
.dekon-stock-warning,
.dekon-qty-feedback {
    display: block !important;
    min-height: 16px;
    visibility: hidden;
    opacity: 0;
}

.dekon-stock-warning.is-visible,
.dekon-qty-feedback.is-visible {
    visibility: visible;
    opacity: 1;
}

#dekon-mini-cart-inner {
    transition: opacity .16s ease;
}

#dekon-mini-cart-inner.is-refreshing {
    opacity: .72;
    pointer-events: none;
}

.dekon-cart-subtotal,
.dekon-cart-tax,
.dekon-cart-shipping,
.dekon-cart-packaging,
.dekon-cart-grand,
.dekon-mini-subtotal,
.dekon-mini-tax,
.dekon-mini-shipping,
.dekon-mini-packaging,
.dekon-mini-grand {
    display: inline-block;
    min-width: 9ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

button.dk-is-loading,
.dekon-cart-form-ajax button[type="submit"].is-loading {
    justify-content: center;
}

/* Desktop quick view: mobile gallery controls must never take layout space. */
@media (min-width: 768px) {
    .canvas-quickview {
        height: min(720px, calc(100dvh - 32px)) !important;
        max-height: calc(100dvh - 32px) !important;
        transform: translate(100%, -50%) !important;
    }

    /* Bootstrap's .offcanvas.show:not(.hiding) sets transform:none with a
       more specific selector. Keep the desktop quick view vertically
       centered when the drawer becomes visible. */
    .offcanvas.canvas-quickview.show:not(.hiding),
    .offcanvas.canvas-quickview.showing {
        transform: translate(0, -50%) !important;
    }

    .canvas-quickview .dekon-qv-pagination,
    .canvas-quickview .dekon-qv-focus-done,
    .canvas-quickview .dekon-qv-image-count,
    .canvas-quickview .dekon-qv-zoom-hint {
        display: none !important;
    }

    .canvas-quickview .dekon-qv-gallery {
        height: 100%;
        min-width: 0;
        align-self: stretch;
    }

    .canvas-quickview .dekon-qv-gallery .wrap-quick,
    .canvas-quickview .dekon-qv-gallery .dekon-quick-media:first-child,
    .canvas-quickview .dekon-qv-gallery .swiper-zoom-container {
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .canvas-quickview .dekon-qv-gallery .dekon-quick-media:first-child {
        aspect-ratio: auto;
        border: 0;
        background: var(--dk-surface);
    }

    .canvas-quickview .dekon-qv-gallery .dekon-quick-media:first-child img {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: contain;
        object-position: center;
    }

    .canvas-quickview .wrap-canvas {
        min-height: 0;
        padding-right: 4px;
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}

/* Responsive integrity: preserve the same edge geometry at every breakpoint. */
@media (max-width: 1024px) {
    .dekon-page-content .container,
    .dekon-account-shell,
    .dekon-catalog-products,
    .tf-table-page-cart,
    .tf-checkout-wrap,
    .box-order-summary,
    .box-your-order {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 767px) {
    .card-product_wrapper,
    .category-v01 .cate-image,
    .section-thumbs-arrival .sw-image {
        border-radius: var(--dk-radius-control);
    }

    .dekon-account-shell .my-account-nav {
        overflow: hidden;
        border-radius: var(--dk-radius-card) !important;
        background-clip: padding-box;
    }

    .dekon-account-shell .my-account-nav .link-account {
        min-height: 44px;
        border-width: 1px !important;
        border-color: transparent !important;
        border-radius: var(--dk-radius-control) !important;
    }

    .dekon-account-shell .my-account-nav .link-account.active {
        border-color: var(--dk-border) !important;
    }

    .dk-checkout-order-item,
    .dk-checkout-order-product,
    .dekon-mini-cart-item,
    .dekon-mini-cart-info,
    .dekon-summary-row {
        min-width: 0;
        max-width: 100%;
    }

    .canvas-quickview,
    .popup-shopping-cart,
    .canvas-mb {
        border-radius: 0 !important;
    }

    .modal:not(.fullRight):not(.fullLeft):not(.fullBottom) .modal-dialog {
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        margin-right: auto;
        margin-left: auto;
        padding-right: 0;
        padding-left: 0;
    }
}

@media (max-width: 430px) {
    .tf-btn,
    .dk-btn,
    .wg-quantity {
        min-height: 44px;
    }

    .box-order-summary,
    .box-your-order,
    .my-account-content,
    .wg-my-order,
    .dk-address-card,
    .dekon-addr-card {
        border-radius: var(--dk-radius-card) !important;
    }
}

/* Checkout: connected progress, aligned columns and stable summary geometry. */
.dekon-checkout .dk-checkout-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 0 0 28px;
    padding: 16px 20px;
    overflow: hidden;
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-radius-card);
    background: var(--dk-surface);
    background-clip: padding-box;
}

.dekon-checkout .dk-checkout-step {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--dk-text-secondary);
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
}

.dekon-checkout .dk-checkout-step:not(:last-child)::after {
    position: absolute;
    z-index: 0;
    top: 15px;
    left: calc(50% + 16px);
    width: calc(100% - 32px);
    height: 1px;
    background: var(--dk-border);
    content: "";
}

.dekon-checkout .dk-checkout-step__number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border: 1px solid var(--dk-border);
    border-radius: 50%;
    background: #fff;
    color: var(--dk-text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.dekon-checkout .dk-checkout-step.is-available {
    color: var(--dk-text);
    font-weight: 600;
}

.dekon-checkout .dk-checkout-step.is-available .dk-checkout-step__number {
    border-color: var(--dk-primary);
    background: #fff;
    color: var(--dk-primary);
}

.dekon-checkout .dk-checkout-step.is-available:not(:last-child)::after {
    background: #b8bec8;
}

.dekon-checkout .dk-checkout-step__label {
    min-width: 0;
    overflow-wrap: break-word;
}

.dekon-checkout .dekon-checkout-grid {
    min-width: 0;
    align-items: start;
    row-gap: 24px;
}

.dekon-checkout .dekon-checkout-main,
.dekon-checkout .dekon-checkout-summary {
    min-width: 0;
}

.dekon-checkout .dekon-checkout-summary,
.dekon-checkout .dekon-checkout-summary .fl-sidebar-cart {
    margin-top: 0 !important;
}

.dekon-checkout .dekon-checkout-summary .fl-sidebar-cart.type-2 {
    padding-left: 0 !important;
}

.dekon-checkout .tf-page-checkout,
.dekon-checkout .box-order-summary {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-radius-card);
    background-clip: padding-box;
}

.dekon-checkout .tf-page-checkout {
    padding: 28px;
    background: #fff;
}

.dekon-checkout .box-order-summary {
    padding: 28px !important;
}

.dekon-checkout .box-order-summary > .title,
.dekon-checkout .tf-page-checkout .box-ip-checkout > .title,
.dekon-checkout .tf-page-checkout .box-ip-payment > .title {
    margin-top: 0;
}

.dekon-checkout .dk-radio-card,
.dekon-checkout .dekon-addr-card,
.dekon-checkout .dekon-pay-card {
    box-sizing: border-box;
    border-width: 1px !important;
    background-clip: padding-box;
}

.dekon-checkout .dekon-addr-card:has(input:focus-visible),
.dekon-checkout .dk-radio-card:has(input:focus-visible) {
    border-color: var(--dk-primary) !important;
    box-shadow: var(--dk-shadow-focus) !important;
    outline: 0;
}

.dekon-checkout .dekon-addr-card__inner,
.dekon-checkout .dekon-pay-check,
.dekon-checkout .dekon-pay-body {
    min-width: 0;
}

.dekon-checkout .box-order-summary .list-order-product {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--dk-border);
}

.dekon-checkout .box-order-summary .dk-checkout-order-item {
    margin-bottom: 0 !important;
    padding: 12px 0;
    border-bottom: 1px solid #eceff3;
}

.dekon-checkout .box-order-summary .dk-checkout-order-item:first-child {
    padding-top: 0;
}

.dekon-checkout .box-order-summary .dk-checkout-order-item:last-child {
    border-bottom: 0;
}

.dekon-checkout .box-order-summary .subtotal,
.dekon-checkout .box-order-summary .discount,
.dekon-checkout .box-order-summary .ship {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.dekon-checkout .box-order-summary .subtotal {
    min-height: 28px;
    gap: 16px;
}

.dekon-checkout .box-order-summary .br-line {
    width: 100%;
    height: 1px;
    border: 0;
    background: var(--dk-border);
}

.dekon-checkout .box-order-summary .total-order {
    gap: 16px;
    margin: 0;
    font-size: clamp(20px, 1.7vw, 24px);
    line-height: 1.25;
}

.dekon-checkout .dekon-charge-label__title,
.dekon-checkout .dekon-shipping-note__title {
    align-items: center;
}

.dekon-checkout .dekon-info-icon {
    vertical-align: middle;
}

.dekon-checkout .dekon-shipping-note {
    overflow: hidden;
    border-radius: var(--dk-radius-control);
    background-clip: padding-box;
}

.dekon-checkout .dekon-charge-row,
.dekon-checkout .dekon-summary-grand,
.dekon-checkout .dekon-shipping-info,
.dekon-checkout .dk-checkout-order-item {
    min-width: 0;
}

@media (min-width: 992px) {
    .dekon-checkout .dekon-checkout-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr);
        column-gap: 32px;
        margin-right: 0;
        margin-left: 0;
    }

    .dekon-checkout .dekon-checkout-grid > [class*="col-"] {
        width: auto;
        max-width: none;
        padding-right: 0;
        padding-left: 0;
    }

    .dekon-checkout .dekon-checkout-summary-sticky {
        top: 15px;
    }
}

@media (max-width: 991px) {
    .dekon-checkout .dekon-checkout-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        margin-right: 0;
        margin-left: 0;
    }

    .dekon-checkout .dekon-checkout-grid > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    .dekon-checkout .dekon-checkout-summary-sticky {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 575px) {
    .dekon-checkout .dk-checkout-steps {
        margin-bottom: 24px;
        padding: 14px 8px;
    }

    .dekon-checkout .dk-checkout-step {
        gap: 6px;
        font-size: 11px;
    }

    .dekon-checkout .dk-checkout-step__number {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        font-size: 12px;
    }

    .dekon-checkout .dk-checkout-step:not(:last-child)::after {
        top: 14px;
        left: calc(50% + 15px);
        width: calc(100% - 30px);
    }

    .dekon-checkout .tf-page-checkout,
    .dekon-checkout .box-order-summary {
        padding: 20px 16px !important;
    }

    .dekon-checkout .dk-radio-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dekon-checkout .box-order-summary .dk-checkout-order-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .dekon-checkout .dk-checkout-line-price {
        padding-left: 68px;
    }
}
