/* The menu is closed by default and opens only through the click/keyboard state. */
.tf-shop-menu-item { position: relative; }
.tf-shop-menu-item > .tf-shop-dropdown,
.tf-shop-menu-item:hover > .tf-shop-dropdown { display: none !important; }
.tf-shop-menu-item.tf-menu-open > .tf-shop-dropdown { display: block !important; }
.tf-shop-dropdown { min-width: 260px; z-index: 99999; }
.tf-shop-dropdown .tf-womens-dropdown,
.tf-womens-menu:hover > .tf-womens-dropdown { display: none !important; }
.tf-womens-menu.tf-menu-open > .tf-womens-dropdown { display: block !important; }
.tf-shop-trigger,
.tf-menu-toggle { align-items: center; background: transparent; border: 0; color: inherit; cursor: pointer; display: flex; font: inherit; gap: .35rem; justify-content: space-between; line-height: inherit; padding: .65rem 1rem; text-align: left; width: 100%; }
.tf-menu-chevron { font-size: .95em; line-height: 1; }
.tf-shop-dropdown a,
.tf-shop-dropdown button { white-space: normal; }
.tf-infinite-status { clear: both; margin: 1.5rem auto; min-height: 1.5rem; padding: .5rem; text-align: center; }
.tf-infinite-retry { background: transparent; border: 1px solid currentColor; border-radius: 3px; cursor: pointer; margin-left: .5rem; padding: .3rem .7rem; }
.tf-pagination-fallback { display: none !important; }

@media (max-width: 921px) {
  .tf-shop-menu-item > .tf-shop-dropdown,
  .tf-shop-menu-item.tf-menu-open > .tf-shop-dropdown { left: 0; max-width: 100%; min-width: 0; position: static; width: 100%; }
  .tf-shop-dropdown .tf-womens-dropdown,
  .tf-womens-menu.tf-menu-open > .tf-womens-dropdown { position: static; width: 100%; }
  .tf-shop-trigger, .tf-menu-toggle { min-height: 44px; }
}

/* Header hierarchy and keyboard/touch-safe visual treatment. */
.tf-shop-menu-item,
.tfse-search-menu-item { position: relative; z-index: 100000; }
.tf-shop-menu-item > .tf-shop-dropdown,
.tf-shop-menu-item:hover > .tf-shop-dropdown { background: #fff !important; border: 1px solid rgba(40, 31, 35, .14); border-radius: 10px; box-shadow: 0 14px 35px rgba(34, 23, 29, .16); color: #2d2528; left: 0; margin: 0; min-height: 0; overflow: visible; padding: .4rem; right: auto; top: calc(100% + 8px); width: 320px; }
.tf-shop-dropdown > .menu-item > a,
.tf-shop-dropdown > .menu-item > button,
.tf-womens-dropdown > .menu-item > a { background: #fff !important; border-radius: 7px; color: #2d2528 !important; display: flex; font-size: .9rem; font-weight: 600; min-height: 42px; padding: .65rem .8rem; text-decoration: none; width: 100%; }
.tf-shop-dropdown > .menu-item > a:hover,
.tf-shop-dropdown > .menu-item > button:hover,
.tf-womens-dropdown > .menu-item > a:hover,
.tf-shop-dropdown > .menu-item > a:focus-visible,
.tf-shop-dropdown > .menu-item > button:focus-visible { background: #f8e9ee !important; color: #8e3653 !important; outline: 2px solid #8e3653; outline-offset: -2px; }
.tf-womens-menu { position: relative; }
.tf-shop-dropdown .tf-womens-dropdown,
.tf-womens-menu:hover > .tf-womens-dropdown { background: #fff !important; border: 1px solid rgba(40, 31, 35, .1); border-radius: 8px; box-shadow: none; left: calc(100% + 8px); margin: 0; min-width: 280px; padding: .35rem; top: 0; }
.tfse-search-menu-item { margin-left: .15rem; }
.tfse-search-trigger { align-items: center; background: transparent; border: 0; color: inherit; cursor: pointer; display: flex; font: inherit; gap: .3rem; min-height: 44px; padding: .65rem .8rem; }
.tfse-search-icon { font-size: 1.25rem; line-height: 1; }
.tfse-search-root { position: relative; z-index: 100001; }
.tfse-search-panel { background: #fff; border: 1px solid rgba(40, 31, 35, .16); border-radius: 10px; box-shadow: 0 14px 35px rgba(34, 23, 29, .18); padding: .75rem; position: fixed; right: 24px; top: 84px; width: min(420px, calc(100vw - 32px)); }
.tfse-search-enhanced .tfse-search-panel { display: none; }
.tfse-search-enhanced .tfse-search-panel.is-open { display: block; }
.tfse-search-form { display: flex; gap: .45rem; }
.tfse-search-form input[type="search"] { border: 1px solid #cfc4c8; border-radius: 7px; flex: 1; min-width: 0; padding: .7rem .75rem; }
.tfse-search-form button { background: #8e3653; border: 0; border-radius: 7px; color: #fff; cursor: pointer; padding: .7rem .85rem; }
.tfse-search-status { color: #5c4d52; font-size: .86rem; min-height: 1.3rem; padding: .55rem .15rem .35rem; }
.tfse-search-results { list-style: none; margin: 0; max-height: 360px; overflow: auto; padding: 0; }
.tfse-search-result { border-top: 1px solid #eee6e9; }
.tfse-search-result-link { align-items: center; color: #2d2528; display: flex; gap: .65rem; padding: .55rem .15rem; text-decoration: none; }
.tfse-search-result-link img { background: #fff; flex: 0 0 52px; height: 52px; object-fit: contain; width: 52px; }
.tfse-search-result-copy { display: grid; gap: .2rem; min-width: 0; }
.tfse-search-result-copy strong { font-size: .86rem; line-height: 1.3; }
.tfse-search-result-meta { color: #6f5f65; font-size: .78rem; }
.tfse-search-result[aria-selected="true"] { background: #f8e9ee; }
.tfse-search-view-all { color: #8e3653; display: inline-block; font-size: .88rem; font-weight: 700; margin-top: .55rem; }
.tfse-search-view-all[hidden] { display: none; }

/* Keep product imagery proportional and centered in consistent cards. */
ul.products li.product .astra-shop-thumbnail-wrap,
ul.products li.product > .woocommerce-LoopProduct-link:first-child { align-items: center; aspect-ratio: 4 / 5; background: #fff; display: flex; justify-content: center; overflow: hidden; width: 100%; }
ul.products li.product .astra-shop-thumbnail-wrap img,
ul.products li.product > .woocommerce-LoopProduct-link:first-child img { height: 100% !important; object-fit: contain !important; width: 100% !important; }
.woocommerce-product-gallery .woocommerce-product-gallery__image img,
.woocommerce-product-gallery .flex-viewport img { height: auto !important; max-height: 78vh; object-fit: contain !important; width: 100%; }

@media (max-width: 921px) {
  .tf-shop-menu-item > .tf-shop-dropdown,
  .tf-shop-menu-item:hover > .tf-shop-dropdown,
  .tf-shop-menu-item.tf-menu-open > .tf-shop-dropdown { left: 0; position: static; top: auto; width: 100%; }
  .tf-shop-dropdown .tf-womens-dropdown,
  .tf-womens-menu:hover > .tf-womens-dropdown,
  .tf-womens-menu.tf-menu-open > .tf-womens-dropdown { left: 0; position: static; width: 100%; }
  .tfse-search-panel { right: 12px; top: 62px; width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .tfse-search-panel { transition: none; }
}
