.stech-sort-container { --stech-text: #002009; --stech-accent: #008C35; --stech-bg: #EFFFF1; --stech-border: #002009; font-family: inherit; color: var(--stech-text); position: relative; display: inline-block; } .stech-sort-btn-wrap { position: relative; z-index: 10; } /* Button styling mirroring STECH filters */ .stech-sort-button { position: relative; background: transparent !important; border: none !important; padding: 14px 28px; font-weight: 800; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-width: 160px; outline: none !important; box-shadow: none !important; color: var(--stech-text); white-space: nowrap; } .stech-sort-button::before { content: ''; position: absolute; inset: 0; background: var(--stech-border); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); z-index: -2; } .stech-sort-button .stech-btn-bg { position: absolute; inset: 2px; background: var(--stech-bg); clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%); z-index: -1; transition: background 0.3s ease; } .stech-sort-button .stech-btn-text { position: relative; z-index: 1; color: var(--stech-text); transition: color 0.3s ease; } .stech-sort-button:hover .stech-btn-bg, .stech-sort-container.is-open .stech-sort-button .stech-btn-bg { background: var(--stech-text); } .stech-sort-button:hover .stech-btn-text, .stech-sort-container.is-open .stech-sort-button .stech-btn-text { color: var(--stech-bg); } /* Dropdown Panel — ширина строго по кнопке */ .stech-sort-dropdown { position: absolute; top: calc(100% - 2px); left: 0; right: auto; width: 100%; background: var(--stech-bg); border: 2px solid var(--stech-border); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease; padding: 0 20px; opacity: 0; z-index: 9; box-sizing: border-box; } .stech-sort-container.is-open .stech-sort-dropdown { max-height: 800px; padding: 20px; padding-bottom: 25px; /* ensure bottom option is not cut by clip path */ opacity: 1; } .stech-sort-options { list-style: none; margin: 0; padding: 0; } .stech-sort-option { padding: 10px 15px; margin-bottom: 5px; cursor: pointer; font-weight: 600; transition: all 0.2s ease; border-left: 3px solid transparent; white-space: nowrap; } .stech-sort-option:hover { color: var(--stech-accent); border-left-color: var(--stech-accent); background: rgba(0, 140, 53, 0.05); } .stech-sort-option.is-active { color: var(--stech-accent); border-left-color: var(--stech-accent); font-weight: 800; background: rgba(0, 140, 53, 0.1); }