/* ========================================
   PAGE LAYOUT - SIDEBAR OUTSIDE BOX
======================================== */

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-border {
    0% {
        --angle: 0deg;
    }

    100% {
        --angle: 360deg;
    }
}

body.boxed {
    background-color: #0d0d0d;
    padding: 0 !important;
    margin: 0;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* html {
    overflow-x: hidden;
    width: 100%;
} */

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

/* Page wrapper - Flex layout: content + sidebar */
.page-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main boxed container - flexible width, fills remaining space */
.boxed-container {
    flex: 1;
    min-width: 0;
    background-color: #1a1b1b;
    border-right: 1px solid #302E2E;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Header with full image display */
/* Header styling moved to styles.css for global availability */

/* Main content area */
#primary.site-main {
    padding: 20px 30px 40px 30px;
    background-color: #1a1b1b;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========================================
   POE CATALOGUE - ITEM DISPLAY
   ======================================== */

/* 2-column layout for items */
.poe-catalogue {
    display: flex;
    flex-wrap: wrap;
    font-size: 17px;
    color: #8787fe;
    line-height: 1.4;
}

.poe-catalogue .row {
    display: flex;
    width: 33.333%;
    margin-right: 0;
    margin-left: 0;
    padding: 3px;
    box-sizing: border-box;
}

/* Row content - item card */
.poe-catalogue .row-content {
    width: 100%;
    border: 1px solid rgba(43, 51, 60, 0.8);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    display: flex;
    text-align: center;
    box-sizing: border-box;
    background-color: #151519;
    background-image: linear-gradient(135deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(40, 70, 120, 0.02) 100%);
    box-shadow:
        0 0 3px rgba(40, 70, 120, 0.38),
        0 0 5px rgba(0, 0, 0, 0.45);
}

/* Alternating row backgrounds - 3 per row */
/* Row 2 (4,5,6), Row 4 (10,11,12)... repeats every 6 */
.poe-catalogue .row:nth-child(6n+4) .row-content,
.poe-catalogue .row:nth-child(6n+5) .row-content,
.poe-catalogue .row:nth-child(6n) .row-content {
    background-color: #111114;
    background-image: linear-gradient(135deg,
            rgba(255, 255, 255, 0.02) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(40, 70, 120, 0.01) 100%);
}

/* Hover effect with embers */
.poe-catalogue .row-content:hover {
    box-shadow:
        0 0 5px rgba(255, 69, 0, 0.4),
        0 0 10px rgba(255, 69, 0, 0.3),
        0 0 15px rgba(255, 69, 0, 0.2) !important;
    border: 1px solid orange;
    z-index: 1;
    background: #393939 !important;
}

.poe-catalogue .row-content:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://i.ibb.co/20LYSncc/embers.gif');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
    filter: brightness(60%);
    z-index: -1;
}

.poe-catalogue .row-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    border-radius: 5px;
}

/* Left side (icon) */
.poe-catalogue .row-content>.left {
    width: 20%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 6px 0px 6px;
}

.poe-catalogue .row-content .left img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 2px;
    border-radius: 8px;
    border: 1px groove rgba(51, 51, 51, 0.4);
    background-color: rgba(19, 19, 19, 0.5);
    background-size: cover;
}

/* Right side (details) */
.poe-catalogue .row-content>.right {
    width: 79%;
    display: inline-block;
    padding: 10px 4px 20px 10px;
    border-left: 1px dashed #333;
    text-align: center;
    line-height: 1.2;
    position: relative;
}

/* Vertical buffer to prevent text from overlapping the absolutely positioned whisper box at the bottom */
/* Dynamic buffer: 170px at 2560px (1440p), scales up to 220px at 1600px viewport */
.poe-catalogue .row-content>.right::after {
    content: "";
    display: block;
    /* clamp(min, preferred, max) - scales linearly between 1600px and 2560px viewport */
    height: clamp(150px, calc(260px - 4.3vw), 205px);
    width: 100%;
    pointer-events: none;
}

/* Elder backgrounds */
.poe-catalogue .row-content .left img.elder11 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=1&h=1);
}

.poe-catalogue .row-content .left img.elder13 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=1&h=3);
}

.poe-catalogue .row-content .left img.elder21 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=1);
}

.poe-catalogue .row-content .left img.elder22 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=2);
}

.poe-catalogue .row-content .left img.elder23 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=3);
}

.poe-catalogue .row-content .left img.elder24 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=4);
}

/* Shaper backgrounds */
.poe-catalogue .row-content .left img.shaper11 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=1&h=1&x=551&y=782);
}

.poe-catalogue .row-content .left img.shaper13 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=1&h=3&x=169&y=132);
}

.poe-catalogue .row-content .left img.shaper21 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=1&x=216&y=25);
}

.poe-catalogue .row-content .left img.shaper22 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=2&x=216&y=427);
}

.poe-catalogue .row-content .left img.shaper23 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=3&x=321&y=25);
}

.poe-catalogue .row-content .left img.shaper24 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=4&x=64&y=226);
}

/* Item name header */
div.itemName2 {
    background:
        url('https://web.poecdn.com/protected/image/item/popup/header-double-rare-left.png?v=1739989653429&key=7fOI1NQk5oFidrmivWNAqw') top left no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup/header-double-rare-right.png?v=1739989653429&key=0DQ30sqHO9eanQuL1NTpNQ') top right no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup/header-double-rare-middle.png?v=1739989653429&key=Hzon14Iy53cgwlmBET_yqw') top center repeat-x;
    text-align: center;
    height: 56px;
    background-size: auto 100%;
    padding-top: 5px;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.itemName2 span {
    display: block;
    line-height: 1.3;
}

.poe-catalogue .itemName2 {
    color: #ffff77;
    font-size: 19px;
    padding: 3px;
}

/* Reset transform for PoE 2 English and Chinese pages to fix item name position */
html[lang="en"] .poe2-page .itemName2 span,
html[lang="zh"] .poe2-page .itemName2 span {
    transform: translateY(-1px) !important;
}

/* Influence icons in header */
.influence-icon {
    width: 27px;
    height: 27px;
    vertical-align: middle;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.influence-icon.left {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.influence-icon.right {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Item text colors and mods */
.colorWhite {
    color: #FFFFFF !important;
}

.coloraugmented {
    color: #8787fe;
}

.lc {
    max-width: 95%;
    word-wrap: break-word;
    margin: 3px auto;
    color: #7f7f7f;
    font-size: 17px;
    text-align: center;
}

div.lc img {
    vertical-align: middle;
    margin-right: 2px;
}

.explicitMod,
.implicitMod {
    color: #8787fe;
    margin: 3px auto;
    max-width: 95%;
    word-wrap: break-word;
}

.enchantMod {
    color: #b4b4ff;
    margin: 1px auto;
    max-width: 95%;
    word-wrap: break-word;
}

.craftedMod {
    color: #b4b4ff;
    max-width: 95%;
    word-wrap: break-word;
    margin: 3px auto;
    font-size: 17px;
}

.crucibleMod {
    color: #e76424;
    margin: 3px auto;
    max-width: 95%;
    word-wrap: break-word;
}

.fracturedMod {
    color: #a29162;
    margin: 3px auto;
    max-width: 95%;
    word-wrap: break-word;
}

/* Property wrappers - match .lc spacing */
[class^="type"] {
    max-width: 95%;
    word-wrap: break-word;
    margin: 3px auto;
    font-size: 17px;
    color: #7f7f7f;
}

/* Property values should be blue like explicit mods */
[class^="type"] span:not(.lc) {
    color: #8787fe;
}

/* Separator line */
div.separator {
    margin: 2px auto;
    border: none;
    height: 2px;
    width: 80%;
    max-width: 300px;
    background: linear-gradient(to right, transparent 0%, #cb9645 50%, transparent 100%);
}

/* Socket icons */
.lc .socket-icon {
    display: inline-block;
    margin-right: 0px;
    height: 20px;
    width: 20px;
    vertical-align: middle;
}

.lc .link-icon {
    display: inline-block;
    margin: 0;
    height: 16px;
    /* width: 8px; */
    vertical-align: middle;
}

/* ========================================
   WHISPER SECTION - EXACT WORDPRESS MATCH
======================================== */

/* Hidden inputs */
input.whisper,
textarea.pobtext {
    position: fixed !important;
    top: -100px !important;
    left: -100px !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0.01 !important;
    pointer-events: none !important;
}

/* Whisper container */
div.whisper {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 4px;
    padding: 12px 8px;
    border: 1px solid #3333336b;
    background-color: rgba(19, 19, 19, 0.5);
    border-radius: 8px;
    text-align: center;
}

/* Fee text styling */
.textCurrency {
    color: #AA9E82;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
}

/* Fee label */
.fee-label {
    font-size: 18px;
    color: #c49c50;
    font-weight: normal;
    font-family: 'Fontin SmallCaps', sans-serif;
    text-transform: none;
    letter-spacing: 0.5px;
}

/* Divine styling */
.divine-number {
    font-size: 18px;
    color: #c49c50;
    margin-right: 0px;
    font-weight: 500;
}


.divine-x {
    color: #c49c50;
    font-size: 12px;
    margin: 0 1px;
}

.divine-icon {
    width: 24px !important;
    height: 24px !important;
    vertical-align: middle;
    background: transparent !important;
    border: none !important;
    margin: 0 1px !important;
    padding: 0 !important;
}

/* Mirror styling */
.mirror-number {
    font-size: 12px;
    color: #AA9E82;
    margin-right: 0px;
}

.mirror-x {
    color: #AA9E82;
    font-size: 10px;
    margin: 0 1px;
}

.mirror-icon {
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle;
    background: transparent !important;
    border: none !important;
    margin: 0 1px !important;
    padding: 0 !important;
}

/* Fee text parts */
.fee-and-text {
    color: #AA9E82;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fee-plus {
    color: #c49c50;
    font-size: 16px;
    margin: 0 4px;
}

/* Ownership info */
.ownership-info {
    cursor: help;
    background: rgba(212, 175, 55, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    color: #a29162;
    position: relative;
    font-size: 14px;
    display: inline-block;
    margin: 6px 0;
}

.ownership-info::after {
    content: attr(data-owners);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #d4af37;
    padding: 10px 14px;
    border-radius: 4px;
    white-space: pre-wrap;
    max-width: 350px;
    width: max-content;
    min-width: 100px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 8px;
    z-index: 1000;
    font-size: 14px;
    text-align: center;
    border: 1px solid #444;
}

.ownership-info:hover::after {
    opacity: 1;
}

/* Warning note */
.item-note {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c49c50;
    font-size: 14px;
    margin: 8px 0 4px 0;
    gap: 4px;
}

.warning-icon {
    width: 18px;
    height: 18px;
}

/* Buttons */
button.item-whisper {
    background-color: transparent;
    color: #c49c50;
    font-size: 15px;
    font-family: 'Fontin SmallCaps', sans-serif;
    border-radius: 5px;
    margin: 3px;
    padding: 6px 12px;
    border: 1px solid rgba(196, 156, 80, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

button.item-whisper:hover {
    background-color: rgba(196, 156, 80, 0.1);
    border-color: #c49c50;
    color: #d4af37;
}

button.item-whisper:focus {
    outline: none;
}

/* Request Service Tooltip - JS-based for multi-color support */
button.item-whisper[onclick*="whisper"],
button.item-whisper[onclick*="pobtext"] {
    position: relative;
}

.whisper-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 1000;
    background: linear-gradient(135deg, #1a1a28 0%, #0d1120 100%);
    border: 1px solid #4a5568;
    border-radius: 5px;
    padding: 12px 16px;
    font-size: 13px;
    color: #a8b5d1;
    width: 290px;
    text-align: center;
    line-height: 1.5;
}

.whisper-tooltip .tooltip-message {
    margin-bottom: 10px;
}

.whisper-tooltip .tooltip-cost {
    color: #ff4444;
    font-weight: bold;
    font-size: 14px;
    border-top: 1px solid #4a5568;
    padding-top: 8px;
    margin-top: 8px;
}

button.item-whisper[onclick*="whisper"]:hover .whisper-tooltip,
button.item-whisper[onclick*="pobtext"]:hover .whisper-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Button icons */
.btn-icon {
    width: 16px;
    height: 16px;
}

/* ========================================
   FILTERS SECTION
======================================== */

.filters {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 30px;
    column-gap: 20px;
    row-gap: 0;
}

.search-fields-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    column-gap: 20px !important;
    margin: 10px 0 20px 0 !important;
}

.search-fields-row .filter-group {
    flex: 1 !important;
    min-width: calc(50% - 14px) !important;
    max-width: calc(50% - 0px) !important;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 100%;
}

.filter-group:nth-child(2),
.filter-group:nth-child(3) {
    min-width: calc(50% - 10px);
    position: relative;
}

.filter-group>span {
    display: block;
    text-align: center;
    width: 100%;
    padding: 6px 0;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #e0d0c5;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(35, 10, 5, 0.6) 40%,
            rgba(35, 10, 5, 0.6) 60%,
            rgba(0, 0, 0, 0) 95%);
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(180, 70, 50, 0.2) 20%,
            rgba(180, 70, 50, 0.5) 50%,
            rgba(180, 70, 50, 0.2) 80%,
            rgba(0, 0, 0, 0) 90%) 1;
}

/* Name filter input */
input#name-filter {
    width: 100%;
    max-width: 500px;
    height: 40px;
    background-color: #0d0d0d !important;
    color: #c8c8c8;
    border: 1px solid #475673;
    padding: 6px 12px;
    font: 18px 'Fontin SmallCaps', sans-serif;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
}

input#name-filter:focus {
    outline: none;
    border-color: orange;
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 0 auto 5px auto;
}

/* Mod suggestions input */
input#mod-suggestions-input {
    width: 100%;
    max-width: 500px;
    height: 40px;
    background-color: #0d0d0d !important;
    color: #c8c8c8;
    border: 1px solid #475673;
    padding: 6px 12px;
    font: 18px 'Fontin SmallCaps', sans-serif;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 0px;
    margin-left: 0;
    margin-right: 0;
}

input#mod-suggestions-input:focus {
    outline: none;
    border-color: orange;
}

/* Mod suggestions dropdown */
.mod-suggestions {
    width: 100%;
    max-width: 500px;
    margin-bottom: 0px;
    border: 1.5px solid #d4743c;
    border-radius: 5px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    background: linear-gradient(135deg, #0a0a14 0%, #0d1120 100%);
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    /* Spaced from input */
}

.mod-suggestions::-webkit-scrollbar {
    width: 8px;
}

.mod-suggestions::-webkit-scrollbar-track {
    background: #050508;
    border-radius: 0 8px 8px 0;
}

.mod-suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4743c 0%, #b85a2a 100%);
    border-radius: 4px;
    border: 1px solid #8b4513;
}

.mod-suggestions::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e88a50 0%, #d4743c 100%);
}

.mod-suggestions div {
    padding: 6px 16px;
    color: #a8b5d1;
    cursor: pointer;
    border-bottom: 1px solid #1a1a28;
    transition: all 0.2s ease;
    font-size: 15px;
    position: relative;
}

.mod-suggestions div:last-child {
    border-bottom: none;
}

.mod-suggestions div:hover:not(.mod-type-toggles),
#mod-suggestions-list div.active:not(.mod-type-toggles) {
    background: linear-gradient(90deg, rgba(212, 116, 60, 0.15) 0%, rgba(212, 116, 60, 0.05) 100%);
    color: #e8a87c;
    padding-left: 20px;
    border-left: 3px solid #d4743c;
}

/* ========================================
   CATEGORY TAGS - EXACT WORDPRESS MATCH
======================================== */

.base-type-category-tags {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 25px;
    max-width: 100%;
}

.base-type-category-tag {
    min-height: 50px;
    height: 50px;
    padding: 8px 50px 8px 55px;
    font: 18px 'Fontin SmallCaps', Helvetica, Arial, sans-serif;
    color: #DDE5DE;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #1a1e26;
    background-image: linear-gradient(to bottom, #242932 0%, #202631 100%, #161a21 100%);
    border: 1px solid #4a5466;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 0 3px rgba(40, 70, 120, 0.18),
        0 0 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 8px 25px rgba(255, 255, 255, 0.03);
}


.base-type-category-tags>* img {
    position: absolute;
    left: 12px;
    max-width: 36px;
    max-height: 36px;
    width: 26px;
    height: 36px;
    scale: 110%;
    margin-bottom: 0px !important;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 5px;
    padding: 1px;
    background: #1a1b1b;
}

.base-type-category-tag .category-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #DDE5DE;
    opacity: 0.7;
}

.base-type-category-tag:hover {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.7), rgba(180, 50, 30, 0.7));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
}

.base-type-category-tag:hover .category-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag.active-orange {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.4);
}

.base-type-category-tag.active-orange .category-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag[data-category="all"] {
    color: #FFA500;
}

.base-type-category-tag[data-category="all"] .category-count {
    color: #FFA500;
}

/* Selected filters */
.selected-filters {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
    margin-bottom: 15px;
}

.selected-filters .filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    border: 1px solid #FF4500;
    padding: 4px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 16px;
    height: auto;
    width: auto;
    max-width: 900px;
    white-space: nowrap;
}

.selected-filters .filter .filter-text {
    display: inline-block;
    max-width: 730px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-filters .filter span {
    margin-left: 3px;
}

.selected-filters .filter .remove {
    margin-left: 5px;
    color: #ff8d6e;
    font-weight: bold;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 3px;
}

/* Additional filters */
.additional-filters .stat-input {
    width: 70px;
    padding: 4px 8px;
    background: #0d0d0d;
    border: 1px solid #444;
    color: #dde5de;
    transition: border-color 0.2s, color 0.2s;
    font-family: 'Fontin SmallCaps', sans-serif;
    border-radius: 3px;
}

.additional-filters .stat-input:focus {
    outline: none;
    border-color: #c49c50;
    color: #c49c50;
}

.additional-filters .stat-input::placeholder {
    color: #666;
}

.additional-filters .stat-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 0 10px;
}

.stat-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-filter span {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Toggle switches */
.iiq-toggle,
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.iiq-toggle.disabled,
.filter-toggle.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (min-width: 992px) {
    .stat-filter span {
        font-size: 17px;
    }

    .additional-filters .stat-input {
        width: 85px;
        padding: 6px 10px;
        font-size: 16px;
    }

    .iiq-toggle-switch,
    .filter-toggle-switch {
        width: 48px;
        height: 24px;
        border-radius: 12px;
    }

    .iiq-toggle-switch::after,
    .filter-toggle-switch::after {
        width: 20px;
        height: 20px;
        top: 1px;
        left: 2px;
    }

    .iiq-toggle.active .iiq-toggle-switch::after,
    .filter-toggle.active .filter-toggle-switch::after {
        transform: translateX(24px);
    }

    .additional-filters .stat-filter-row {
        gap: 30px;
    }
}

.iiq-toggle-switch,
.filter-toggle-switch {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    border: 1px solid #444;
}

.iiq-toggle-switch::after,
.filter-toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #888;
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: transform 0.2s, background 0.2s;
}

.iiq-toggle.active .iiq-toggle-switch,
.filter-toggle.active .filter-toggle-switch {
    background: rgba(180, 70, 50, 0.4);
    border-color: #c49c50;
}

.iiq-toggle.active .iiq-toggle-switch::after,
.filter-toggle.active .filter-toggle-switch::after {
    transform: translateX(20px);
    background: #c49c50;
}

.iiq-toggle-label,
.filter-toggle-label {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.iiq-toggle.active .iiq-toggle-label,
.filter-toggle.active .filter-toggle-label {
    color: #c49c50;
}


/* Star Icon - move just the icon to the right */
.star-icon {
    width: 40px;
    height: 33px;
    background: none;
    border: none;
    position: absolute;
    top: 60px;
    right: -1px;
    opacity: 0.9;
    cursor: pointer;
    z-index: 999;
}

/* Star Container */
.star-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
    width: 40px;
    height: 33px;
    display: block;
    margin: 0;
    padding: 0;
}

/* Star Popup */
.star-popup {
    display: none;
    position: absolute;
    background-color: #222;
    color: #ffbb33;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
    top: 65px;
    right: calc(100% + 10px);
    z-index: 9999;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.9);
    border: 1px solid orange;
    white-space: normal;
    text-align: center;
}

.star-popup .white-text {
    color: #ffffff !important;
}

.star-popup .red-text {
    color: #ff4444 !important;
}

.star-popup::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("https://i.ibb.co/20LYSncc/embers.gif");
    background-size: cover;
    filter: brightness(50%);
    z-index: -1;
    border-radius: inherit;
    opacity: 0.5;
}

.star-container:hover .star-popup {
    display: block;
}

.star-popup .build-name {
    color: #ffb43d;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 180, 60, 0.4);
    display: block;
    margin: 10px 0;
}

.star-popup .white-text {
    color: #ffffff !important;
    display: block;
    line-height: 1.3;
}

.star-popup .red-text {
    color: #ff4444 !important;
    display: block;
    line-height: 1.31;
}

/* PoE Tooltip */
.poe-hoverable {
    cursor: pointer;
}

.poe-hoverable:hover {
    color: #ff6600;
}

#poe-tooltip {
    position: absolute;
    background: #1a1a1a;
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 8px 12px !important;
    min-width: 250px;
    max-width: 450px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    font-family: 'Fontin SmallCaps', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #ccc;
    display: block !important;
}

#poe-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

#poe-tooltip::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #8b4513;
}

.tooltip-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tooltip-left {
    flex: 1;
}

.tooltip-right {
    text-align: right;
    flex-shrink: 0;
}

.tooltip-range {
    color: #ff6600;
    font-weight: bold;
}

.tooltip-tier {
    color: #8888ff;
    font-style: italic;
}

.tooltip-ilvl {
    color: #888;
    font-size: 12px;
    font-family: sans-serif !important;
}

.tooltip-paren {
    font-family: sans-serif !important;
    font-size: 12px;
    color: #888;
}

/* Hybrid modifier styles */
.tooltip-hybrid-line {
    margin-bottom: 4px;
}

.tooltip-hybrid-line:last-child {
    margin-bottom: 0;
}

/* Lazy load sentinel */
#lazy-load-sentinel {
    height: 1px;
    width: 100%;
}

/* Loading */
#poe-loading {
    text-align: center;
    padding: 30px;
    color: #dde5de;
}

.spinner {
    border: 3px solid #333;
    border-top: 3px solid #c49c50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Main site scrollbar */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #0a0a0a;
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4743c 0%, #b85a2a 100%);
    border-radius: 6px;
    border: 1px solid #8b4513;
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e88a50 0%, #d4743c 100%);
}

/* ========================================
   INFLUENCE ICONS
======================================== */

.influence-icon {
    width: 27px;
    height: 27px;
    vertical-align: middle;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute;
    top: 14px;
}

.influence-icon.left {
    left: 5px;
}

.influence-icon.right {
    right: 5px;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */


/* ========================================
   FEE DISPLAY STYLES - MATCHES WORDPRESS
======================================== */

.fee-label {
    font-size: 1.5em;
    vertical-align: middle;
    position: relative;
    top: -1px;
    color: #c49c50;
}

.divine-number {
    font-size: 1.5em;
    vertical-align: middle;
    color: #c49c50;
    position: relative;
    top: -1px;
}

.divine-x {
    vertical-align: middle;
    color: #c49c50;
    position: relative;
    font-size: 1.0em;
    margin-right: 0px;
}

.divine-icon {
    width: 30px !important;
    height: 30px !important;
    vertical-align: middle;
    margin: 0 2px 0 0;
    object-fit: contain;
    left: -2px;
    background: transparent !important;
    position: relative;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.fee-plus {
    font-size: 1.5em;
    vertical-align: middle;
    color: #c49c50;
    margin-left: -3px;
    margin-right: 1px;
    position: relative;
    top: -1px;
}

.fee-and-text {
    vertical-align: middle;
    position: relative;
    top: -1px;
    color: #8b8b8b;
    font-size: 0.85em;
}

.fee-and-x {
    vertical-align: middle;
    position: relative;
    top: -1px;
    color: #8b8b8b;
    font-size: 0.6em;
    margin: 0 1px;
}

.mirror-icon {
    width: 22px !important;
    height: 22px !important;
    vertical-align: middle;
    margin: 0 2px;
    object-fit: contain;
    background: transparent !important;
    position: relative;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Fee Text Styling */
.fee-text-upper {
    text-transform: lowercase;
    color: #a3977c;
    font-family: 'Fontin SmallCaps', sans-serif;
}

.fee-mirror-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    /* Close spacing */
    color: #a3977c;
}

.fee-mirror-group img {
    vertical-align: middle;
    margin: 0 1px;
}

.small-x {
    font-size: 0.8em;
    vertical-align: middle;
    margin-right: -1px;
    margin-top: 0.5px;

}

/* PoE 2 Specific Styles */
.poe2-page .itemName2 {
    font-family: 'Fontin SmallCaps', sans-serif;
    background:
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-left.png?v=1739989653373&key=GlFK9dDlo33Cw3Ak7P5MnA') top left / 46px auto no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-right.png?v=1739989653373&key=rXqdxbUkuIkWyVJPJVY9cQ') top right / calc(46px - 1px) auto no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-middle.png?v=1739989653373&key=yJGcA667EzDzrPzd1_9-vg') top center / 46px auto repeat-x;
    text-align: center;
    background-size: auto 100%;
    height: 68px !important;
    padding-top: 10px !important;
    font-size: 19px;
    color: #ffff77;
    text-shadow: 1px 1px 2px black;
    position: relative;
    padding-left: 45px !important;
    padding-right: 45px !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.poe2-page .itemName2 span {
    display: block;
    line-height: 1.3;
    transform: translatey(5px);
    color: #ffff77;
}

.influence-icon-poe2 {
    position: absolute;
    top: 48%;
    transform: translateY(-50%);
    width: 30px !important;
    height: 30px !important;
    pointer-events: none;
    z-index: 5;
}

.influence-icon-poe2.left {
    left: 10px;
}

.influence-icon-poe2.right {
    right: 10px;
}

.poe2-page .row-content {
    position: relative;
}

.colorWhite {
    color: #ffffff;
}

/* Toggle switches */
.iiq-toggle,
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.iiq-toggle.disabled,
.filter-toggle.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.iiq-toggle-switch,
.filter-toggle-switch {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    border: 1px solid #444;
}

.iiq-toggle-switch::after,
.filter-toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #888;
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: transform 0.2s, background 0.2s;
}

.iiq-toggle.active .iiq-toggle-switch,
.filter-toggle.active .filter-toggle-switch {
    background: rgba(180, 70, 50, 0.4);
    border-color: #c49c50;
}

.iiq-toggle.active .iiq-toggle-switch::after,
.filter-toggle.active .filter-toggle-switch::after {
    transform: translateX(20px);
    background: #c49c50;
}

.iiq-toggle-label,
.filter-toggle-label {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.iiq-toggle.active .iiq-toggle-label,
.filter-toggle.active .filter-toggle-label {
    color: #c49c50;
}

/* Additional filters */
.additional-filters .stat-input {
    width: 70px;
    padding: 4px 8px;
    background: #0d0d0d;
    border: 1px solid #444;
    color: #dde5de;
    transition: border-color 0.2s, color 0.2s;
    font-family: 'Fontin SmallCaps', sans-serif;
    border-radius: 3px;
}

.additional-filters .stat-input:focus {
    outline: none;
    border-color: #c49c50;
    color: #c49c50;
}

.additional-filters .stat-input::placeholder {
    color: #666;
}

.additional-filters .stat-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 0 10px;
}

.stat-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-filter span {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Search Fields Alignment */
.search-fields-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.search-fields-row .filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    min-width: 300px;
}

.search-fields-row .filter-group span {
    margin-bottom: 8px;
    font-weight: bold;
    color: #e0d0c5;
    text-transform: uppercase;
    font-size: 14px;
    text-align: center;
}

.search-fields-row .filter-group input {
    width: 100% !important;
}

.base-type-category-tags {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 25px;
    max-width: 100%;
    width: 100%;
    margin-top: 15px;
}

.base-type-category-tag {
    min-height: 50px;
    height: 50px;
    padding: 8px 50px 8px 55px;
    font: 21px 'Fontin SmallCaps', Helvetica, Arial, sans-serif;
    color: #DDE5DE;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    background-color: #1a1e26;
    background-image: linear-gradient(to bottom, #242932 0%, #202631 100%, #161a21 100%);
    border: 1px solid #4a5466;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center !important;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 0 3px rgba(40, 70, 120, 0.18),
        0 0 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 8px 25px rgba(255, 255, 255, 0.03);
}

.base-type-category-tags>* img {
    position: absolute;
    left: 6px;
    max-width: 36px;
    max-height: 36px;
    width: 36px;
    height: 46px;
    scale: 110%;
    margin-bottom: 0.5px !important;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 5px;
    padding: 2px;
    background: #1a1b1b;
}

.base-type-category-tag .category-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #DDE5DE;
    opacity: 0.7;
}

.base-type-category-tag .weapon-count {
    /* Added for compatibility if weapon-count is used in HTML */
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #DDE5DE;
    opacity: 0.7;
    margin-left: 0;
}

.base-type-category-tag:hover {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.7), rgba(180, 50, 30, 0.7));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
}

.base-type-category-tag:hover .category-count,
.base-type-category-tag:hover .weapon-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag.active,
.base-type-category-tag.active-orange {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.4);
    position: relative;
    /* Ensure ::after is positioned correctly */
}

/* Animated Border */
.base-type-category-tag.active::after,
.base-type-category-tag.active-orange::after,
.weapon-type-category-tag.active-orange::after,
.item-type-tag.active-orange::after,
.main-navigation .current-menu-item>a::after,
.selected-filters .filter::after {
    content: '';
    position: absolute;
    inset: 0px;
    border-radius: inherit;
    /* Match parent border radius */
    background: conic-gradient(from var(--angle),
            transparent 0deg,
            transparent 20deg,
            #ff6600 345deg,
            #ff8800 350deg,
            #ffaa00 355deg,
            #ff8800 357deg,
            #ff6600 360deg,
            transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 2px;
    animation: rotate-border 1.5s linear infinite;
    pointer-events: none;
    z-index: 10;
}

.base-type-category-tag.active .category-count,
.base-type-category-tag.active-orange .category-count,
.base-type-category-tag.active .weapon-count,
.base-type-category-tag.active-orange .weapon-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag[data-category="all"],
.view-all-items {
    color: #FFA500;
}

.base-type-category-tag[data-category="all"] .category-count,
.base-type-category-tag[data-category="all"] .weapon-count,
.view-all-items .category-count,
.view-all-items .weapon-count {
    color: #FFA500;
}

/* Selected filters */
.selected-filters {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
    margin-bottom: 15px;
}

.selected-filters .filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    border: 1px solid #FF4500;
    padding: 4px 8px;
    border-radius: 7px;
    cursor: url('../images/cursor.png'), auto;
    font-size: 16px;
    height: auto;
    width: auto;
    max-width: 900px;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .selected-filters .filter {
        margin-top: -10px;
    }
}

.selected-filters .filter .filter-text {
    display: inline-block;
    max-width: 730px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-filters .filter span {
    margin-left: 3px;
}

.selected-filters .filter .remove {
    margin-left: 5px;
    color: #ff8d6e;
    font-weight: bold;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 3px;
    position: relative;
    z-index: 20;
    cursor: url('../images/pointer.png'), pointer;
}

.selected-filters .filter .remove::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    cursor: inherit;
    z-index: 20;
}

@font-face {
    font-family: 'FontinSmallcaps';
    src: url('../fonts/Fontin-SmallCaps.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

.poe-hoverable {
    cursor: pointer;
}

.poe-hoverable:hover {
    color: #ff6600;
}

.tooltip-left {
    flex: 1;
}

.tooltip-right {
    text-align: right;
    flex-shrink: 0;
}

.tooltip-range {
    color: #ff6600;
    font-weight: bold;
}

.tooltip-tier {
    color: #8888ff;
    font-style: italic;
}

.tooltip-ilvl {
    color: #888;
    font-size: 12px;
    font-family: sans-serif !important;
}

.tooltip-paren {
    font-family: sans-serif !important;
    font-size: 12px;
    color: #888;
}

.tooltip-annoint-effect {
    color: #ff6600;
    font-weight: normal;
}

.tooltip-divider {
    border-bottom: 1px solid #555;
    margin: 4px 0;
    width: 100%;
}

/* ========================================
   RESPONSIVE BREAKPOINTS (Consolidated)
======================================== */

@media (max-width: 1880px) {
    .poe-catalogue .row {
        width: 50%;
    }

    /* Shorten Search Label */
    .mod-filter-group>span {
        font-size: 0 !important;
    }

    .mod-filter-group>span::after {
        content: "SEARCH MODS: USE MOUSE OR KEYBOARD";
        font-size: 15px;
        display: block;
    }

    /* Smaller Category Tags */
    .base-type-category-tags {
        gap: 4px;
    }

    .base-type-category-tag {
        font-size: 18px;
        padding: 5px 35px 5px 45px;
        /* Reduced padding */
        min-height: 40px;
        height: 40px;
    }

    .base-type-category-tag .category-count,
    .base-type-category-tag .weapon-count {
        font-size: 12px;
    }

    /* Smaller Category Images for intermediate resolutions */
    .base-type-category-tags>* img {
        max-width: 28px;
        max-height: 32px;
        width: 28px;
        height: 32px;
        scale: 100%;
    }
}

@media (max-width: 991px) {
    .page-wrapper {
        flex-direction: column;
    }

    .boxed-container {
        width: 100%;
        max-width: 100%;
    }

    .sidebar--sticky.hovercraft {
        position: relative;
        width: 100%;
        min-width: 100%;
        height: auto;
        order: -1;
    }

    .poe-catalogue .row {
        width: 100% !important;
    }

    .base-type-category-tags {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .poe-catalogue {
        font-size: 12px;
    }

    div.itemName2 {
        height: 44px;
        font-size: 14px !important;
    }

    .poe-catalogue .itemName2 {
        font-size: 14px;
    }

    .lc {
        max-width: 100%;
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        margin: 3px auto;
        color: #7f7f7f;
        font-size: 15px;
        text-align: center;
    }

    .lc .socket-icon {
        height: 14px !important;
        width: 14px !important;
    }

    .lc .link-icon {
        height: 12px !important;
        width: 12px !important;
    }

    .influence-icon {
        width: 23px !important;
        height: 23px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .influence-icon-poe2 {
        width: 20px !important;
        height: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }



    /* Stack search fields on mobile */
    .search-fields-row {
        flex-direction: column !important;
        gap: 15px !important;
        margin-top: 10px !important;
    }

    .search-fields-row .filter-group {
        min-width: 100% !important;
        width: 100% !important;
    }

    #primary.site-main {
        padding: 15px 5px 30px 5px !important;
    }

    .header__page-header {
        background-color: #1a1b1b !important;
        /* Fix black line gap on mobile */
    }

    .header-image {
        margin-top: 10px !important;
        /* Lowered by 10px on mobile */
    }

    input#name-filter,
    input#mod-suggestions-input {
        max-width: 100% !important;
    }

    .filter-group>span {
        text-align: center !important;
        /* Centered as requested */
        margin-bottom: 15px !important;
        margin-top: 20px !important;
        font-size: 12px !important;
        padding: 3px 5px !important;
        display: block !important;
        width: 100% !important;
    }

    /* Search Label Fix for Mobile: Remove duplicate and use short text */
    .mod-filter-group>span {
        font-size: 0 !important;
        /* Hide original text */
    }

    .mod-filter-group>span::after {
        content: "Search Mods:" !important;
        /* Override intermediate text */
        font-size: 12px !important;
        /* Make it visible */
        display: block;
    }

    /* Resize Category Images on Mobile */
    .base-type-category-tags>* img {
        width: 26px !important;
        height: 30px !important;
    }

    /* Resize Additional Filters Header on Mobile */
    .additional-filters-header {
        font-size: 12px !important;
        padding: 3px 5px !important;
        margin-top: 15px !important;
    }

    .additional-filters .stat-filter-row {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }

    .textCurrency {
        font-size: 14px !important;
    }

    .explicitMod,
    .implicitMod,
    .enchantMod,
    .craftedMod,
    .crucibleMod,
    .fracturedMod {
        font-size: 15px !important;
        /* Matching all mods to 15px on mobile */
    }

    /* Quality text line wrap on mobile (e.g., "Quality (Critical Modifiers): +20%") */
    .property {
        white-space: normal !important;
        word-wrap: break-word !important;
        max-width: 100% !important;
        font-size: 15px !important;
    }

    button.item-whisper {
        font-size: 14px !important;
        padding: 6px 12px !important;
        position: static !important;
    }

    .whisper-tooltip {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 65px !important;
        width: 90% !important;
        max-width: 350px !important;
        z-index: 10000 !important;
    }

    .poe-catalogue .row-content>.right {
        width: 100% !important;
        border-left: none !important;
        padding: 10px 5px !important;
        text-align: center !important;
    }

    .itemName2 span {
        display: block !important;
        line-height: 1.2 !important;
        font-size: 16px !important;
    }

    #poe-tooltip {
        max-width: calc(100vw - 40px) !important;
        font-size: 13px !important;
        padding: 10px 12px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }

    #poe-tooltip::before {
        display: none !important;
    }

    /* Mobile Category Tags - Single Column Layout */
    .base-type-category-tags {
        grid-template-columns: 1fr !important;
        gap: 2px !important;
    }

    .base-type-category-tag {
        font-size: 18px !important;
        padding-right: 50px !important;
        padding-left: 50px !important;
        margin-bottom: 5px !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    .base-type-category-tag .category-count,
    .base-type-category-tag .weapon-count {
        position: absolute !important;
        transform: translateY(-50%) !important;
        top: 50% !important;
        right: 15px !important;
        font-size: 15px !important;
        margin: 0 !important;
        display: inline !important;
    }

    /* Mobile Selected Filters (Wrap Text) */
    .selected-filters .filter {
        white-space: normal !important;
        height: auto !important;
        max-width: 100% !important;
    }

    .selected-filters .filter .filter-text {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        display: inline !important;
    }

    .star-icon {
        width: 30px;
        height: auto;
        background: none;
        border: none;
        position: absolute;
        top: 46px;
        right: -1px;
        opacity: 0.9;
        cursor: pointer;
        z-index: 999;
    }


}

@media (max-width: 480px) {
    .poe-catalogue .row-content .left {
        width: auto !important;
        min-width: 0 !important;
    }

    .poe-catalogue .row-content {
        flex-direction: column !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ensure row takes full width */
    .poe-catalogue .row {
        width: 100% !important;
        margin: 0 !important;
        padding: 5px 0 !important;
    }

    .poe-catalogue .itemName2 {
        white-space: normal !important;
    }

    .itemName2 span {
        font-size: 15px !important;
        padding-bottom: 1px;
    }

    html[lang="ko"] .itemName2 span {
        padding-top: 2px;
        padding-bottom: 0px;
    }

    .poe-catalogue .row-content .left img {
        max-width: 100% !important;
        max-height: 150px !important;
        object-fit: contain !important;
    }

    /* Stack filter groups */
    .filter-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    .filter-group span {
        margin-bottom: 5px !important;
        margin-right: 0 !important;
    }

    .filter-group input {
        width: 100% !important;
    }

    /* Fix overlap of Fee/Whisper box on mobile */
    div.whisper {
        position: static !important;
        width: 100% !important;
        margin: 20px 0 0 0 !important;
        box-sizing: border-box !important;
    }

    .poe-catalogue .row-content>.right::after {
        display: none !important;
    }

    /* Reduce vertical gap between Search Mods and Additional Filters */
    .filters-right-col {
        margin-top: 0 !important;
    }

    .filters-layout-row {
        gap: 5px !important;
    }

    .filter-group>span {
        margin-top: 5px !important;
    }

    .search-fields-row {
        margin-bottom: 5px !important;
    }

    /* PoE 2 Only Mobile Overrides */
    .poe2-page .influence-icon-poe2 {
        width: 30px !important;
        height: 30px !important;
        top: 48% !important;
    }

    .poe2-page .itemName2 span {
        font-size: 20px !important;
    }

}

@font-face {
    font-family: 'Fontin SmallCaps';
    src: url('../fonts/Fontin-SmallCaps.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* PoE Tooltip Styles */
.poe-hoverable {
    cursor: pointer;
}

.poe-hoverable:hover {
    color: #ff6600;
}

#poe-tooltip {
    position: absolute;
    background: #1a1a1a;
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 250px;
    max-width: 450px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    font-family: 'Fontin SmallCaps', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #ccc;
}

#poe-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

#poe-tooltip::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #8b4513;
}

.tooltip-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tooltip-left {
    flex: 1;
}

.tooltip-right {
    text-align: right;
    flex-shrink: 0;
}

.tooltip-range {
    color: #ff6600;
    font-weight: bold;
}

.tooltip-tier {
    color: #8888ff;
    font-style: italic;
}

.tooltip-ilvl {
    color: #888;
    font-size: 12px;
    font-family: sans-serif !important;
}

.tooltip-paren {
    font-family: sans-serif !important;
    font-size: 12px;
    color: #888;
}

/* Hybrid modifier styles */
.tooltip-hybrid-line {
    margin-bottom: 4px;
}

.tooltip-hybrid-line:last-child {
    margin-bottom: 0;
}

body {
    display: flex;
    background: #2a2a2a;
    color: #ccc;
    font-family: 'Fontin SmallCaps', Arial, sans-serif;
    padding: 20px;
    line-height: 1.6;
}

/* ========================================
   FILTER LAYOUT RESTRUCTURING
   ======================================== */
.filters-layout-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.filters-left-col {
    width: 60%;
    display: flex;
    flex-direction: column;
}

.filters-right-col {
    width: 40%;
}

/* Ensure inner elements behave nicely */
.filters-left-col .search-fields-row {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    margin-top: 0;
    /* Remove top margin from original style */
}

/* Header Alignment */
.filters-left-col .search-fields-row .filter-group span,
.filters-left-col .filter-group span,
.filters-right-col .additional-filters span {
    margin-bottom: 10px;
    /* Shared consistent margin */
    font-weight: bold;
    color: #e0d0c5;
    text-transform: uppercase;
    font-size: 14px;
    line-height: 1.4;
    /* Baseline height */
    text-align: center;
}

/* Specific fix for alignment: Ensure containers start at the same Y offset */
.filters-left-col .search-fields-row,
.filters-right-col .additional-filters {
    margin-top: 10px !important;
    margin-bottom: 0 !important;
}

/* Additional Filters: Row 1 (Stats) */
.filters-right-col .additional-filters .stats-row {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
    /* Better grouping for fewer items */
    gap: 20px;
    /* Consistent gap between filters */
    margin-bottom: 5px;
    padding: 0;
}

.filters-right-col .additional-filters .stats-row .stat-filter {
    flex: 0 0 auto;
    /* Don't stretch */
    min-width: 0;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    height: 26px !important;
    /* Optimized container height */
}

/* Additional Filters: Row 2 (Toggles) */
.filters-right-col .additional-filters .toggles-row {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
    /* Better grouping for fewer items */
    gap: 20px;
    /* Consistent gap between toggles */
    align-items: center;
    margin-top: 5px !important;
    padding: 0;
}

.filters-right-col .additional-filters .toggles-row .filter-toggle,
.filters-right-col .additional-filters .toggles-row .iiq-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filters-right-col .additional-filters .toggles-row .filter-toggle-label,
.filters-right-col .additional-filters .toggles-row .iiq-toggle-label {
    font-size: 11px;
    letter-spacing: 0.2px;
    line-height: normal !important;
    margin: 0 !important;
    display: inline-block !important;
    /* Block conflict with flex centering */
}

/* Specific shrink for stat inputs in the split layout */
.filters-right-col .additional-filters .stat-input {
    width: 42px !important;
    padding: 2px 4px !important;
    font-size: 11px !important;
    height: 20px !important;
    /* Fixed height for consistent midline */
    margin: 0 !important;
    box-sizing: border-box !important;
}

.filters-right-col .additional-filters .stat-filter span {
    font-size: 13px !important;
    white-space: nowrap;
    line-height: normal !important;
    /* Reset to normal to allow transformation to control positioning */
    display: inline-block !important;
    transform: translateY(-1px) !important;
    /* Significant nudge to match input centers */
    margin: 0 !important;
}

.filters-right-col .additional-filters .stat-filter {
    gap: 6px !important;
    /* Unified gap for stats */
}

/* Direct sizing for switches to avoid scale-induced misalignment */
.filters-right-col .additional-filters .toggles-row .iiq-toggle-switch,
.filters-right-col .additional-filters .toggles-row .filter-toggle-switch {
    transform: none !important;
    width: 34px !important;
    height: 16px !important;
    border-radius: 8px !important;
    margin: 0 !important;
}

.filters-right-col .additional-filters .toggles-row .iiq-toggle-switch::after,
.filters-right-col .additional-filters .toggles-row .filter-toggle-switch::after {
    width: 12px !important;
    height: 12px !important;
    top: 1px !important;
    left: 1px !important;
}

.filters-right-col .additional-filters .toggles-row .iiq-toggle.active .iiq-toggle-switch::after,
.filters-right-col .additional-filters .toggles-row .filter-toggle.active .filter-toggle-switch::after {
    transform: translateX(18px) !important;
}

/* Responsiveness for smaller screens */
@media screen and (max-width: 1200px) {
    .filters-layout-row {
        flex-direction: column;
    }

    .filters-left-col,
    .filters-right-col {
        width: 100%;
    }

    .filters-right-col {
        margin-top: 10px;
    }

    .filters-right-col .additional-filters .stats-row,
    .filters-right-col .additional-filters .toggles-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* =========================================
   New Filter Layout Styles
   ========================================= */

.search-inputs-container {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    width: 100%;
    align-items: flex-start;
}

.selected-filters:empty {
    display: none;
}

.search-inputs-container .filter-group {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Ensure inputs fill the group and have updated styling */
.search-inputs-container .filter-group input {
    width: 100% !important;
    box-sizing: border-box;
}

/* Custom Input Styles - Reverted to Standard look but kept sizing/position */
#name-filter,
#mod-suggestions-input {
    height: 44px !important;
    text-indent: 0;
    padding: 0 15px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    color: #eee;
    font-family: 'Fontin', 'Roboto', sans-serif;
    font-size: 15px !important;
    border-radius: 4px;
    margin-top: 5px !important;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Reverted Borders/Shadows to neutral */
    border: 1px solid #444 !important;
    box-shadow: none !important;
}

#name-filter:focus,
#mod-suggestions-input:focus,
.stat-filter-row-vertical .stat-input:focus {
    border-color: #ffaa00 !important;
    box-shadow: none !important;
    outline: none !important;
}

#name-filter::placeholder,
#mod-suggestions-input::placeholder {
    color: #777 !important;
    text-transform: uppercase;
    font-size: 13px;
}

/* Override existing margins for filter groups inside container */
.search-inputs-container .filter-group>span {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    display: block;
}

.additional-filters-section {
    width: 100%;
    margin-top: 10px;
}

/* Updated Header Style per User Request */
.additional-filters-header {
    display: block;
    text-align: center;
    width: 100%;
    padding: 6px 0;
    margin-bottom: 20px;
    margin-top: -10px;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #e0d0c5;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(35, 10, 5, 0.6) 40%,
            rgba(35, 10, 5, 0.6) 60%,
            rgba(0, 0, 0, 0) 95%);
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(180, 70, 50, 0.2) 20%,
            rgba(180, 70, 50, 0.5) 50%,
            rgba(180, 70, 50, 0.2) 80%,
            rgba(0, 0, 0, 0) 90%) 1;
    font-family: 'Fontin SmallCaps', sans-serif;
    box-shadow: none;
    border-radius: 0;
}

.additional-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    width: 99.7%;
    margin: 0 auto;
    /* Lighter background around parameters (User said "way too dark") */
    background: rgba(20, 20, 20, 0.3);
    border: 1px solid #2a2a2a;
    border-radius: 7px;
    padding: 25px;
    box-sizing: border-box;
}

.filter-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.filter-column h4 {
    color: #dfcfab;
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-align: center;
    border-radius: 4px;
    background-color: #211f1f;
    font-weight: normal;
    letter-spacing: 1px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Fontin SmallCaps', sans-serif !important;
}

/* Match Header Widths to Content Widths */
.additional-filters-grid>.filter-column:nth-child(1) h4 {
    max-width: 400px;
    /* Matches Defenses */
}

.additional-filters-grid>.filter-column:nth-child(2) h4,
.additional-filters-grid>.filter-column:nth-child(3) h4 {
    max-width: 350px;
    /* Matches Toggles */
}

/* Defenses Column */
.stat-filter-row-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.stat-filter-row-vertical .stat-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 0 !important;
}

.stat-filter-row-vertical .stat-filter span {
    color: #e0d0c5;
    font-size: 0.9rem;
    min-width: 110px;
    text-align: left;
    margin: 0 !important;
    font-family: 'Fontin SmallCaps', sans-serif !important;
}

.stat-filter-row-vertical .stat-inputs {
    display: flex;
    gap: 5px;
}

/* Radius on inputs */
.stat-filter-row-vertical .stat-input {
    width: 60px !important;
    background: #000;
    border: 1px solid #333;
    color: #ddd;
    text-align: center;
    padding: 5px;
    font-family: inherit;
    height: 28px !important;
    margin: 0 !important;
    border-radius: 3px !important;
}

/* Toggles Column */
.toggles-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 350px;
}

.toggles-column .filter-toggle,
.toggles-column .iiq-toggle,
.toggles-column .iir-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    margin: 0 !important;
}

.toggles-column .filter-toggle-label,
.toggles-column .iiq-toggle-label {
    color: #e0d0c5;
    font-size: 0.9rem;
    font-family: 'Fontin SmallCaps', sans-serif !important;
}

/* Switches - Lighter Colors */
.toggles-column .filter-toggle-switch,
.toggles-column .iiq-toggle-switch {
    position: relative;
    width: 40px !important;
    height: 20px !important;
    background-color: #2a2a2a !important;
    /* Lighter background */
    border: 1px solid #4a4a4a;
    border-radius: 10px !important;
    transition: background-color 0.3s;
    margin: 0 !important;
    transform: none !important;
}

.toggles-column .filter-toggle-switch::after,
.toggles-column .iiq-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px !important;
    left: 2px !important;
    width: 14px !important;
    height: 14px !important;
    background-color: #888;
    /* Lighter knob */
    border-radius: 50%;
    transition: transform 0.3s, background-color 0.3s;
}

.toggles-column .filter-toggle.active .filter-toggle-switch,
.toggles-column .iiq-toggle.active .iiq-toggle-switch,
.toggles-column .iir-toggle.active .filter-toggle-switch {
    background-color: #4a2828 !important;
    /* Brownish */
    border-color: #c49c50;
}

.toggles-column .filter-toggle.active .filter-toggle-switch::after,
.toggles-column .iiq-toggle.active .iiq-toggle-switch::after,
.toggles-column .iir-toggle.active .filter-toggle-switch::after {
    transform: translateX(20px) !important;
    background-color: #c49c50 !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .additional-filters-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }



    .stat-filter-row-vertical .stat-filter span {
        min-width: unset;
    }
}

/* Toggle Filters Button */
.toggle-filters-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 48px;
    /* Align with inputs */
}

.toggle-filters-btn {
    background: #211f1f;
    border: 1px solid #444;
    color: #e0d0c5;
    padding: 8px 16px;
    border-radius: 4px;
    margin-top: 13px;
    cursor: pointer;
    font-family: 'Fontin SmallCaps', sans-serif !important;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.toggle-filters-btn:hover {
    border-color: #ffaa00;
    color: #fff;
    background: #2a2828;
}

.additional-filters-section.hidden {
    display: none !important;
}

/* Mobile: Stack search fields vertically */
@media (max-width: 768px) {
    .search-fields-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .search-fields-row .filter-group {
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .search-inputs-container {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .search-inputs-container .filter-group {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}