/* Phone shell overrides intentionally follow the generated storefront refinements. */
@media (max-width: 767.98px), (max-width: 991.98px) and (max-height: 500px) {
  #wrapwrap { --kc-mobile-clearance: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .kc-head { position: static; }
  .kc-head > .kc-wrap {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center; gap: 8px; min-height: 0;
    padding: 10px max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
  }
  .kc-head .kc-logo { grid-column: 1; grid-row: 1; width: auto; min-width: 0; gap: 6px; }
  .kc-head .kc-logo svg { width: 28px; height: 36px; }
  .kc-head .kc-logo__word { font-size: 19px !important; line-height: 1; letter-spacing: 0 !important; }
  .kc-head .kc-logo__sub { font-size: 8px; letter-spacing: 1.8px !important; margin-top: 3px; line-height: 1.3; }
  .kc-head .kc-head-actions { display: contents; }
  .kc-head .kc-head-search { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; margin: 0; }
  .kc-head .kc-head-search__input { flex: 1 1 auto; width: 100%; min-width: 0; font-size: 16px; min-height: 44px; }
  .kc-head .kc-head-search__submit { min-width: 44px; min-height: 44px; }
  .kc-head .kc-head-btn { min-width: 0; min-height: 44px; padding: 8px 10px; font-size: 13px; line-height: 1.25; justify-content: center; text-align: center; white-space: normal; }
  .kc-head .kc-head-btn > span { min-width: 0; overflow-wrap: anywhere; }
  .kc-head .kc-head-btn--cart { grid-column: 3; grid-row: 1; }
  .kc-head .kc-head-btn--location { grid-column: 1; grid-row: 3; justify-content: flex-start; }
  .kc-head .kc-head-btn--account { grid-column: 2; grid-row: 3; }
  .kc-head .kc-head-btn--register { grid-column: 3; grid-row: 3; }
  .kc-head .kc-head-btn--member { display: none; }
  .kc-head .kc-lang-form { grid-column: 2; grid-row: 1; margin: 0; min-width: 0; }
  .kc-head .kc-lang__select { width: 66px; max-width: 100%; min-height: 44px; font-size: 16px; padding: 6px 16px 6px 4px; }
  .kc-head .kc-native-cart { grid-column: 1 / -1; grid-row: 4; }
  .kc-head .kc-native-cart:has(> .d-none) { display: none !important; }
  .kc-head .kc-native-cart > li { flex: 1 1 auto; min-width: 0; }
  .kc-head .kc-native-cart a { width: 100%; }
  .kc-label--mobile { display: inline; }
  .kc-label--desktop { display: none; }

  .kc-subnav > .kc-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 12px; overflow: visible; }
  .kc-subnav .kc-subnav__links { width: 100%; min-width: 0; gap: 20px; overflow-x: auto; scroll-padding-inline: 4px; }
  .kc-subnav .kc-subnav__links > a { flex: 0 0 auto; font-size: 13px; min-height: 44px; padding-block: 12px; letter-spacing: .2px; }
  .kc-subnav .kc-subnav__more { justify-self: start; width: auto; max-width: 100%; min-height: 44px; padding: 8px 0; font-size: 13px; letter-spacing: .2px; text-transform: none; }
  .kc-subnav__menu .kc-wrap { max-height: 60vh; max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; }
  .kc-subnav__menu a { min-height: 44px; overflow-wrap: anywhere; }
  .kc-hero .kc-hero__title { font-size: clamp(30px, 8.8vw, 38px); line-height: 1.12; overflow-wrap: anywhere; }
  .kc-hero .kc-hero__copy { padding: 24px 20px; }
  .kc-main .kc-tile h3 { max-width: calc(100% - 30px); min-width: 0; line-height: 1.15; overflow-wrap: anywhere; }
  .kc-main .kc-section-title { gap: 12px; }
  .kc-main p, .kc-footer p, .kc-footer a { overflow-wrap: anywhere; }
  .kc-main input:not([type=checkbox]):not([type=radio]), .kc-main select, .kc-main textarea,
  .kc-customer-auth input:not([type=checkbox]):not([type=radio]), .kc-customer-auth select, .kc-customer-auth textarea,
  .kc-toolbar .kc-toolbar__input, .kc-toolbar .kc-toolbar__select { font-size: 16px; min-height: 44px; max-width: 100%; }
  .kc-customer-auth { width: auto; margin: 20px 12px !important; padding: 20px 16px !important; }
  .kc-customer-auth .oe_login_buttons { gap: 12px; }
  .kc-customer-auth .oe_login_buttons a { display: inline-flex; align-items: center; min-height: 44px; line-height: 1.35; }
  .kc-main { padding-bottom: var(--kc-mobile-clearance); }
  .kc-footer { padding-bottom: var(--kc-mobile-clearance); }
  .kc-mobile-nav { display: block; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .kc-mobile-nav > .kc-wrap { display: flex; gap: 0; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .kc-mobile-nav .kc-wrap > a, .kc-mobile-nav .kc-wrap > button { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 10px 4px; font-size: 12px; line-height: 1.35; letter-spacing: 0; text-transform: none; white-space: normal; overflow-wrap: anywhere; text-align: center; justify-content: center; }
  .kc-location-modal { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
  .kc-location-modal__panel { padding: 20px; }
  .kc-location-modal .kc-location-modal__title { font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; }
  .kc-location-modal .kc-location-option { gap: 8px; flex-wrap: wrap; min-height: 48px; }
  .kc-location-modal .kc-btn { min-height: 44px; }
  .kc-toast { bottom: var(--kc-mobile-clearance); max-width: calc(100% - 24px); }
}
@media (min-width: 992px), (min-width: 768px) and (min-height: 501px) { .kc-label--mobile { display: none; } }

/* Catalogue, detail, basket and customer forms share the phone typography. */
.kc-catalog__filters { min-width: 0; align-self: start; }
.kc-catalog__filter-toggle { cursor: pointer; min-height: 48px; padding: 12px 16px; border: 1px solid var(--kc-line); border-radius: var(--kc-radius); color: var(--kc-olive); background: var(--kc-white); font-size: 15px; font-weight: 700; }
@media (min-width: 992px) {
  .kc-catalog:has(> .kc-catalog__filters) { grid-template-columns: 258px minmax(0,1fr); }
  .kc-catalog__filters { position: sticky; top: calc(var(--kc-head-min) + 56px); }
  .kc-catalog__filters .kc-catalog__side { position: static; }
  .kc-catalog__filters[open] > .kc-catalog__filter-toggle { display: none; }
}
@media (max-width: 991.98px) {
  .kc-catalog .kc-catalog__filters { width: 100%; }
  .kc-catalog .kc-catalog__filters[open] > summary { border-radius: var(--kc-radius) var(--kc-radius) 0 0; }
  .kc-catalog .kc-catalog__side { max-height: 60vh; max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; margin-top: 8px; }
}
@media (max-width: 767.98px), (max-width: 991.98px) and (max-height: 500px) {
  .kc-catalog { padding-bottom: var(--kc-mobile-clearance, 76px); }
  .kc-catalog__main .kc-section-title { align-items: flex-start; gap: 8px; }
  .kc-catalog__main .kc-section-title h2 { line-height: 1.2; overflow-wrap: anywhere; }
  .kc-catalog .kc-breadcrumb, #product_detail .breadcrumb { flex-wrap: wrap; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
  .kc-catalog input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
  .kc-catalog select, .kc-related select, #product_details select,
  #product_details input:not([type=hidden]):not([type=checkbox]):not([type=radio]) { font-size: 16px; min-height: 44px; min-width: 0; max-width: 100%; }
  .kc-catalog .kc-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 10px; }
  .kc-catalog .kc-toolbar__search { grid-column: 1 / -1; min-width: 0; }
  .kc-catalog .kc-toolbar__sort { min-width: 0; }
  .kc-catalog .kc-toolbar__apply, .kc-catalog .kc-toolbar__reset { min-height: 44px; font-size: 14px; padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center; }
  .kc-catalog .kc-accessory-facet select { width: 100%; }
  .kc-catalog .kc-side-family__link, .kc-catalog .kc-side-reset, .kc-catalog .kc-side-sub, .kc-catalog .kc-side-leaf, .kc-catalog summary { min-height: 44px; }
  .kc-card .kc-card__body { min-width: 0; }
  .kc-card .kc-card__name, .kc-card .kc-card__meta { overflow-wrap: anywhere; }
  .kc-card .kc-card__name { line-height: 1.2; }
  .kc-card .kc-card__price-row { flex-wrap: wrap; gap: 8px; }
  .kc-card .kc-card__add { width: 100%; min-width: 0; display: flex; gap: 8px; }
  .kc-card .kc-card__add select { flex: 1 1 0; min-width: 0; width: 100%; font-size: 16px; min-height: 44px; }
  .kc-card .kc-card__add-btn { flex: 0 0 44px; min-width: 44px; min-height: 44px; }
  .kc-card a.kc-card__cta { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; line-height: 1.35; letter-spacing: 0; text-transform: none; white-space: normal; overflow-wrap: anywhere; }
  #product_detail { padding-inline: 16px; }
  #product_details { min-width: 0; }
  #product_details h1 { font-size: clamp(26px,7vw,34px); line-height: 1.15; overflow-wrap: anywhere; }
  #product_details #add_to_cart_wrap { flex-wrap: wrap; max-width: 100%; gap: 8px; }
  #product_details .kc-policy-note { flex: 1 1 100%; min-width: 0; margin-block: 8px; overflow-wrap: anywhere; line-height: 1.5; }
  #product_details #o_wsale_cta_wrapper { max-width: 100%; flex-wrap: wrap; gap: 10px; }
  #product_details .js_add_cart_variants { max-width: 100%; }
  #product_details .radio_input_value { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; letter-spacing: 0; padding: 10px 14px; }
  #product_details .css_quantity { min-height: 44px; max-width: 100%; }
  #product_details .css_quantity .btn { min-width: 44px; min-height: 44px; }
  #product_details .kc-btn, #product_details #add_to_cart { min-height: 48px; max-width: 100%; white-space: normal; line-height: 1.35; font-size: 15px; }
  .kc-related { min-width: 0; }
  .kc-related .kc-related__head { flex-wrap: wrap; gap: 8px; }
  .kc-related .kc-related__title { font-size: 22px; line-height: 1.25; }
  .kc-related .kc-related__all { min-height: 44px; display: inline-flex; align-items: center; }
  .kc-customer-auth form.oe_signup_form, .kc-customer-auth form.oe_login_form, .kc-customer-auth form.oe_reset_password_form { width: 100%; max-width: 100%; margin: 20px auto; }
  .kc-customer-auth form label { font-size: 14px; line-height: 1.4; }
  .kc-customer-auth form .btn[type=submit] { min-height: 48px; width: 100%; font-size: 16px; line-height: 1.4; white-space: normal; }
  .kc-customer-auth .oe_login_buttons { display: flex; flex-wrap: wrap; gap: 12px; }
  .kc-customer-auth .oe_login_buttons a { max-width: 100%; overflow-wrap: anywhere; }
}
@media (max-width: 575.98px) {
  .kc-products-grid .kc-card, .kc-related__grid .kc-card { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: stretch; }
  .kc-card .kc-card__media { width: auto; min-width: 0; height: 100%; min-height: 150px; }
  .kc-card .kc-card__body { padding: 14px; }
  .kc-card .kc-card__name { font-size: 20px; }
  .kc-card .kc-card__placeholder-name { display: none; }
  .kc-card .kc-card__placeholder-text { font-size: 11px; line-height: 1.4; letter-spacing: 0; white-space: normal; }
  .kc-card .kc-badge { max-width: calc(100% - 20px); white-space: normal; font-size: 10px; line-height: 1.35; letter-spacing: 0; padding: 6px; }
  .kc-order .kc-order-table-wrap { overflow: visible; }
  .kc-order .kc-order-table { display: block; width: 100%; min-width: 0; overflow: visible; }
  .kc-order-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .kc-order-table tbody, .kc-order-table tfoot { display: block; }
  .kc-order-table tbody tr { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 12px; padding: 16px; border-bottom: 1px solid var(--kc-line); }
  .kc-order-table tbody td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .kc-order-table tbody td:first-child { grid-column: 1 / -1; font-size: 16px; line-height: 1.45; }
  .kc-order-table .kc-order-amount { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  .kc-order-table tbody td:nth-child(3) { text-align: right; }
  .kc-order-table tbody td:last-child { grid-column: 1 / -1; justify-self: end; }
  .kc-order-table tbody td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--kc-muted); margin-bottom: 6px; white-space: normal; }
  .kc-order-table .kc-qty-form { flex-wrap: wrap; gap: 8px; max-width: 100%; }
  .kc-order-table .kc-qty-form select, .kc-order-table .kc-qty-input { width: 90px; min-width: 0; font-size: 16px; min-height: 44px; }
  .kc-order-table .kc-qty-btn { width: auto; min-width: 44px; height: auto; min-height: 44px; padding: 8px 10px; font-size: 14px; }
  .kc-order-table .kc-link-btn { min-height: 44px; padding: 8px; }
  .kc-order-table tfoot tr { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 16px; }
  .kc-order-table tfoot td { padding: 0; border: 0; min-width: 0; }
  .kc-order-table tfoot td:last-child:empty { display: none; }
  .kc-order .kc-order-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .kc-order .kc-order-actions a, .kc-order .kc-order-actions button { min-height: 48px; max-width: 100%; font-size: 15px; line-height: 1.4; white-space: normal; text-align: center; }
}

@media (max-width: 767.98px), (max-width: 991.98px) and (max-height: 500px) {
  html { scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .kc-catalog select.form-select { font-size: 16px; min-height: 44px; }
  .kc-catalog .kc-chip { min-height: 44px; display: inline-flex; align-items: center; }
  .kc-customer-auth input, .kc-customer-auth button, .kc-order button, .kc-order select { scroll-margin-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}

/* A fixed grid track must not inherit the legacy 4/5 media aspect ratio. */
@media (max-width: 575.98px) {
  .kc-card .kc-card__media { width: 100%; max-width: 100%; aspect-ratio: auto; }
}
@media (max-width: 359.98px) {
  .kc-products-grid .kc-card, .kc-related__grid .kc-card { grid-template-columns: minmax(0,1fr); }
  .kc-card .kc-card__media { height: 132px; min-height: 132px; }
}

/* Keep every phone label complete: the disclosure replaces the cut-off ribbon. */
.kc-select-value { display: none; }
@media (max-width: 767.98px), (max-width: 991.98px) and (max-height: 500px) {
  .kc-subnav { overflow: visible; }
  .kc-subnav .kc-subnav__links { display: none; }
  .kc-subnav .kc-subnav__more { width: 100%; min-height: 48px; font-size: 14px; justify-content: space-between; }
  .kc-subnav__menu > .kc-wrap { display: grid; grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
  .kc-subnav__menu .kc-subnav__group { min-width: 0; width: 100%; }
  .kc-subnav__menu a { font-size: 14px; line-height: 1.5; white-space: normal; }
  .kc-subnav__menu small, .kc-subnav__count { font-size: 12px; }
  .kc-head .kc-logo__sub { font-size: 12px; letter-spacing: .7px !important; }
  .kc-head .kc-head-btn--account { overflow: visible; text-overflow: clip; }
  .kc-hero .kc-hero__mark { width: calc(100% - 48px); max-width: 100%; font-size: clamp(54px, 17vw, 76px); line-height: 1; letter-spacing: -3px; transform: rotate(-6deg); }
  .kc-hero .kc-hero__mark small { font-size: 12px; letter-spacing: 3px; }
  .kc-eyebrow { font-size: 12px; line-height: 1.5; }
  .kc-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.5; letter-spacing: .3px; }
  .kc-strip > span { min-width: 0; overflow-wrap: anywhere; }
  .kc-tile small, .kc-tile small span, .kc-home__shop span { font-size: 12px; }
  .kc-catalog__side small, .kc-side-eyebrow, .kc-side-group__label, .kc-side-facet__label { font-size: 12px; line-height: 1.5; }
  .kc-card .kc-card__meta { font-size: 13px; line-height: 1.5; }
  .kc-card .kc-card__unit, .kc-card .kc-card__packsize, .kc-card .kc-card__note { font-size: 12px; line-height: 1.5; }
  .kc-card .kc-card__placeholder-text { font-size: 12px; line-height: 1.5; opacity: 1; }
  .kc-card .kc-badge { font-size: 12px; line-height: 1.5; letter-spacing: 0; text-transform: none; overflow-wrap: normal; word-break: normal; }
  .kc-card .kc-badge--stock { background: var(--kc-olive); color: var(--kc-white); }
  .kc-card .kc-card__add { flex-wrap: wrap; }
  .kc-select-value:not([hidden]) { display: block; width: 100%; min-width: 0; max-width: 100%; margin-top: 4px; color: var(--kc-olive); font-size: 14px; line-height: 1.5; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }
  .kc-card__add .kc-select-value { order: 2; flex: 1 0 100%; }
  .kc-location-modal .kc-location-option small, .kc-location-modal__hint { font-size: 14px; line-height: 1.5; }
  .kc-location-modal .kc-location-option .kc-location-option__flag { color: var(--kc-olive) !important; font-size: 14px !important; }
  .kc-subnav .kc-subnav__more, .kc-subnav .kc-subnav__more:hover, .kc-subnav .kc-subnav__more[aria-expanded="true"] { color: var(--kc-olive) !important; }
  .kc-footer { font-size: 14px; line-height: 1.5; }
  .kc-footer .small { font-size: 13px; }
  .kc-footer__list a:hover, .kc-subnav a:hover, .kc-subnav__menu a:hover { color: var(--kc-olive); text-decoration: underline; }
  html:lang(th) .kc-eyebrow, html:lang(th) .kc-strip, html:lang(th) .kc-footer__title { letter-spacing: 0; }
}
@media (max-width: 575.98px) {
  .kc-order-table tbody td:nth-child(2), .kc-order-table tbody td:nth-child(3) { grid-column: 1 / -1; text-align: left; }
  .kc-order-table .kc-order-amount > span:not(.oe_currency_value):not(:has(.oe_currency_value)) { font-size: 14px; font-weight: 500; line-height: 1.5; }
  .kc-order-table tfoot .kc-order-amount { flex: 1 0 100%; text-align: left; }
}
