/* ═══ ENCYCLOPEDIA ADDITIONS ═══ */
#encyclopedia {
    padding: 2rem 2rem 0;
    position: relative;
    z-index: 1
}

.enc-container {
    max-width: 1200px;
    margin: 0 auto
}

.search-container {
    max-width: 700px;
    margin: 0 auto 2rem;
    position: relative
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 24px;
    background: rgba(15, 15, 15, .9);
    border: 1.5px solid var(--border);
    border-radius: 60px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all .4s;
    backdrop-filter: blur(10px)
}

.search-input::placeholder {
    color: rgba(255, 255, 255, .3)
}

.search-input:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 40px rgba(191, 161, 74, .15)
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 20px rgba(191, 161, 74, .4)
}

.search-btn svg {
    width: 20px;
    height: 20px;
    stroke: #0A0A0A;
    fill: none;
    stroke-width: 2.5
}

.live-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap
}

.live-stat {
    text-align: center
}

.live-stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(252, 246, 186, .2)
}

.live-stat-label {
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted)
}

.enc-sec-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem
}

.enc-sec-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.enc-sec-header svg {
    width: 18px;
    height: 18px;
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.5
}

.enc-sec-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent)
}

.enc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem
}

.enc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: rgba(252, 246, 186, .03);
    font-size: .78rem;
    color: var(--gold);
    cursor: pointer;
    transition: all .3s;
    white-space: nowrap
}

.enc-chip:hover {
    background: rgba(252, 246, 186, .1);
    border-color: var(--gold-dark);
    transform: translateY(-2px)
}

.enc-chip.active {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0A0A0A;
    border-color: var(--gold);
    font-weight: 600
}

.enc-chip .cc {
    font-size: .6rem;
    opacity: .7
}

.perfume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem
}

.perfume-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all .4s cubic-bezier(.16, 1, .3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px)
}

.perfume-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(252, 246, 186, .04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .4s
}

.perfume-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .4), 0 0 30px rgba(191, 161, 74, .06)
}

.perfume-card:hover::before {
    opacity: 1
}

.pc-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    position: relative
}

.pc-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(191, 161, 74, .2), rgba(191, 161, 74, .05));
    border: 1px solid rgba(252, 246, 186, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px
}

.pc-info {
    flex: 1;
    min-width: 0
}

.pc-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.pc-brand {
    font-size: .75rem;
    color: var(--gold-dark);
    margin-top: 2px
}

.pc-rating {
    position: absolute;
    top: 0;
    right: 0;
    font-size: .7rem;
    color: var(--gold)
}

.pc-family-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid rgba(252, 246, 186, .1);
    background: rgba(252, 246, 186, .04);
    font-size: .68rem;
    color: var(--gold);
    margin-bottom: 10px
}

.pc-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px
}

.pc-note {
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    font-size: .62rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, .06)
}

.pc-gender {
    font-size: .65rem;
    color: var(--text-muted);
    margin-top: 8px
}

.pc-amazon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 153, 0, .1);
    border: 1px solid rgba(255, 153, 0, .2);
    color: #FF9900;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s
}

.pc-amazon:hover {
    background: rgba(255, 153, 0, .2);
    transform: translateY(-1px)
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .5rem
}

.results-count {
    font-size: .85rem;
    color: var(--text-muted)
}

.results-count strong {
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem
}

.clear-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 80, 80, .3);
    background: rgba(255, 80, 80, .08);
    color: #ff6b6b;
    font-size: .75rem;
    cursor: pointer;
    transition: all .3s
}

.clear-btn:hover {
    background: rgba(255, 80, 80, .15)
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 2rem 0;
    flex-wrap: wrap
}

.page-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: .8rem;
    cursor: pointer;
    transition: all .3s;
    font-family: 'Inter', sans-serif
}

.page-btn:hover {
    border-color: var(--gold-dark);
    color: var(--gold)
}

.page-btn.active {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0A0A0A;
    border-color: var(--gold);
    font-weight: 600
}

.page-btn:disabled {
    opacity: .3;
    cursor: not-allowed
}

.page-info {
    color: var(--text-muted);
    font-size: .75rem;
    margin: 0 8px
}

.random-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(191, 161, 74, .04), rgba(191, 161, 74, .01));
    border: 1px solid var(--border);
    border-radius: 24px;
    text-align: center
}

.random-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0A0A0A;
    font-size: .85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    cursor: pointer;
    transition: all .3s;
    margin-top: 1rem
}

.random-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 25px rgba(191, 161, 74, .35)
}

.random-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem
}

.enc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 3rem;
    color: var(--text-muted)
}

.enc-spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: espin .8s linear infinite
}

@keyframes espin {
    to {
        transform: rotate(360deg)
    }
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted)
}

.no-results h3 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    margin-bottom: .5rem;
    font-size: 1.2rem
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all
}

.modal-card {
    background: #0a0a0a;
    border: 1.5px solid var(--border-hover);
    border-radius: 28px;
    padding: 2.5rem;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 60px rgba(191, 161, 74, .1);
    transform: scale(.95);
    transition: transform .3s
}

.modal-overlay.show .modal-card {
    transform: scale(1)
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s
}

.modal-close:hover {
    background: rgba(255, 80, 80, .15);
    color: #ff6b6b
}

.modal-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 4px;
    padding-right: 40px
}

.modal-brand {
    font-size: .9rem;
    color: var(--gold-dark);
    letter-spacing: 1px;
    margin-bottom: 1.5rem
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem
}

.modal-badge {
    padding: 6px 14px;
    border-radius: 15px;
    border: 1px solid var(--border);
    background: rgba(252, 246, 186, .04);
    font-size: .75rem;
    color: var(--gold)
}

.pyramid-section {
    margin-bottom: 1rem
}

.pyramid-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px
}

.pyramid-label svg {
    width: 14px;
    height: 14px;
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.5
}

.pyramid-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

.pyramid-note {
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(252, 246, 186, .06);
    border: 1px solid rgba(252, 246, 186, .1);
    font-size: .8rem;
    color: var(--text)
}

.modal-amazon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
    padding: 14px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 153, 0, .12), rgba(255, 153, 0, .06));
    border: 1px solid rgba(255, 153, 0, .25);
    color: #FF9900;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s
}

.modal-amazon:hover {
    background: linear-gradient(135deg, rgba(255, 153, 0, .2), rgba(255, 153, 0, .1));
    transform: translateY(-2px)
}

/* ═══ PRICE COMPARATOR ═══ */
.comp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(12px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s
}

.comp-overlay.show {
    opacity: 1;
    pointer-events: all
}

.comp-card {
    background: linear-gradient(180deg, #0c0c0c 0%, #080808 100%);
    border: 1.5px solid rgba(191, 161, 74, .3);
    border-radius: 28px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .7), 0 0 80px rgba(191, 161, 74, .08);
    transform: scale(.92) translateY(20px);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1)
}

.comp-overlay.show .comp-card {
    transform: scale(1) translateY(0)
}

.comp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05);
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
    z-index: 2
}

.comp-close:hover {
    background: rgba(255, 80, 80, .15);
    color: #ff6b6b
}

.comp-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-right: 30px
}

.comp-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.comp-subtitle {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 4px
}

.comp-perfume-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(252, 246, 186, .03);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1.5rem
}

.comp-perfume-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(191, 161, 74, .2), rgba(191, 161, 74, .05));
    border: 1px solid rgba(252, 246, 186, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0
}

.comp-perfume-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-light)
}

.comp-perfume-brand {
    font-size: .75rem;
    color: var(--gold-dark);
    margin-top: 2px
}

.comp-vendors {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.vendor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
    transition: all .3s;
    position: relative;
    overflow: hidden
}

.vendor-row:hover {
    border-color: rgba(252, 246, 186, .2);
    transform: translateX(4px)
}

.vendor-row.gold {
    border-color: rgba(255, 183, 0, .35);
    background: linear-gradient(135deg, rgba(255, 183, 0, .08), rgba(255, 153, 0, .03));
    box-shadow: 0 4px 20px rgba(255, 153, 0, .1)
}

.vendor-row.gold::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 183, 0, .06), transparent 60%);
    pointer-events: none
}

.vendor-row.silver {
    border-color: rgba(192, 192, 192, .3);
    background: linear-gradient(135deg, rgba(192, 192, 192, .06), rgba(150, 150, 150, .02));
    box-shadow: 0 4px 20px rgba(192, 192, 192, .06)
}

.vendor-row.silver::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(192, 192, 255, .04), transparent 60%);
    pointer-events: none
}

.vendor-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0
}

.vendor-rank.r1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1200;
    box-shadow: 0 2px 10px rgba(255, 183, 0, .3)
}

.vendor-rank.r2 {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(192, 192, 192, .2)
}

.vendor-rank.r3 {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #fff;
    box-shadow: 0 2px 10px rgba(205, 127, 50, .2)
}

.vendor-rank.rn {
    background: rgba(255, 255, 255, .06);
    color: var(--text-muted)
}

.vendor-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08)
}

.vendor-info {
    flex: 1;
    min-width: 0
}

.vendor-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text)
}

.vendor-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: .55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 6px;
    vertical-align: middle
}

.vendor-badge.recommended {
    background: linear-gradient(135deg, rgba(255, 183, 0, .2), rgba(255, 153, 0, .1));
    color: #FFB700;
    border: 1px solid rgba(255, 183, 0, .3)
}

.vendor-badge.best {
    background: linear-gradient(135deg, rgba(108, 92, 231, .15), rgba(108, 92, 231, .05));
    color: #a29bfe;
    border: 1px solid rgba(108, 92, 231, .25)
}

.vendor-shipping {
    font-size: .65rem;
    color: var(--text-muted);
    margin-top: 2px
}

.vendor-price {
    text-align: right;
    flex-shrink: 0;
    margin-right: 8px
}

.vendor-price-val {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold)
}

.vendor-price-label {
    font-size: .55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px
}

.vendor-row.gold .vendor-price-val {
    color: #FFB700
}

.vendor-row.silver .vendor-price-val {
    color: #C0C0FF
}

.vendor-cta {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0
}

.vendor-cta.cta-gold {
    background: linear-gradient(135deg, #FFB700, #FF9500);
    color: #1a1200;
    box-shadow: 0 3px 12px rgba(255, 183, 0, .25)
}

.vendor-cta.cta-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 183, 0, .4)
}

.vendor-cta.cta-silver {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: #fff;
    box-shadow: 0 3px 12px rgba(108, 92, 231, .25)
}

.vendor-cta.cta-silver:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, .4)
}

.vendor-cta.cta-default {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--border);
    color: var(--text-muted)
}

.vendor-cta.cta-default:hover {
    background: rgba(255, 255, 255, .12);
    color: var(--text);
    border-color: var(--gold-dark)
}

.comp-disclaimer {
    text-align: center;
    margin-top: 1.2rem;
    font-size: .6rem;
    color: rgba(255, 255, 255, .25);
    line-height: 1.4
}

.pc-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(108, 92, 231, .08);
    border: 1px solid rgba(108, 92, 231, .2);
    color: #a29bfe;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
    cursor: pointer
}

.pc-compare:hover {
    background: rgba(108, 92, 231, .15);
    transform: translateY(-1px)
}

@media(max-width:768px) {
    .perfume-grid {
        grid-template-columns: 1fr
    }

    .modal-card {
        padding: 1.5rem
    }

    .comp-card {
        padding: 1.2rem
    }

    .vendor-row {
        padding: 10px 12px;
        gap: 8px
    }

    .vendor-logo {
        width: 26px;
        height: 26px;
        font-size: 13px
    }

    .vendor-cta {
        padding: 6px 12px;
        font-size: .65rem
    }

    .vendor-price-val {
        font-size: .95rem
    }
}