/* ================================================================
   Explore Fallah Gold - Pinterest / Instagram Visual Masonry Styles
   ================================================================ */

.explore-page-wrapper {
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Hero & Header */
.explore-hero-section {
    padding: 18px 15px 15px;
    background: radial-gradient(circle at 50% 0%, rgba(202, 163, 98, 0.05) 0%, transparent 70%);
}

/* Explore Search Box (Simple & Luxury) */
.explore-search-wrap {
    max-width: 520px;
    margin: 0 auto 16px;
}

.explore-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card, #1c1b18);
    border: 1.5px solid rgba(202, 163, 98, 0.30);
    border-radius: 50px;
    padding: 6px 18px 6px 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.explore-search-box:focus-within {
    border-color: #d4af37;
    box-shadow: 0 6px 22px rgba(212, 175, 55, 0.25);
    background: var(--bg-card, #22201c);
}

.explore-search-input {
    border: none !important;
    background: transparent !important;
    color: var(--text-primary, #ffffff) !important;
    font-size: 0.90rem;
    padding: 6px 4px;
    outline: none !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 0;
}

.explore-search-input::placeholder {
    color: var(--text-muted, #8e887c);
    font-size: 0.86rem;
}

.explore-search-clear {
    background: transparent;
    border: none;
    color: var(--text-muted, #8e887c);
    padding: 4px 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s ease;
    flex-shrink: 0;
    margin-right: 4px;
}

.explore-search-clear:hover {
    color: var(--gold-primary, #d4af37);
}

.explore-search-icon {
    color: var(--gold-primary, #d4af37);
    font-size: 1.10rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    flex-shrink: 0;
}

[data-theme="light"] .explore-search-box {
    background: #ffffff;
    border-color: rgba(202, 163, 98, 0.40);
    box-shadow: 0 4px 18px rgba(184, 146, 46, 0.08);
}

[data-theme="light"] .explore-search-box:focus-within {
    background: #ffffff;
    border-color: #b8922e;
    box-shadow: 0 6px 22px rgba(184, 146, 46, 0.18);
}

[data-theme="light"] .explore-search-input {
    color: #1a1a1a !important;
}

[data-theme="light"] .explore-search-input::placeholder {
    color: #737373;
}

.explore-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold-light, #e6be75);
    background: rgba(202, 163, 98, 0.10);
    border: 1px solid rgba(202, 163, 98, 0.25);
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 12px;
}

.explore-hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary, #ffffff);
    letter-spacing: -0.5px;
}

.explore-hero-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary, #b8b3a8);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Category Filter Chips Bar */
.explore-chips-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .explore-chips-bar {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .explore-chips-bar::-webkit-scrollbar {
        display: none;
    }
}

.explore-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #b8b3a8);
    border: 1px solid rgba(202, 163, 98, 0.20);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.explore-chip:hover {
    color: #e6be75;
    border-color: rgba(202, 163, 98, 0.45);
    background: rgba(202, 163, 98, 0.08);
    transform: translateY(-1px);
}

.explore-chip.active {
    background: linear-gradient(135deg, #d4af37, #b8922e);
    color: #121212 !important;
    border-color: #d4af37;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

/* ================================================================
   Masonry Flex Columns Layout (Lag-Free & True Masonry)
   ================================================================ */
.explore-feed-section {
    padding-top: 15px;
}

.explore-masonry {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}

.explore-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

@media (max-width: 1400px) {
    .explore-masonry {
        gap: 14px;
    }
    .explore-col {
        gap: 14px;
    }
}

@media (max-width: 992px) {
    .explore-masonry {
        gap: 12px;
    }
    .explore-col {
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .explore-masonry {
        gap: 8px;
    }
    .explore-col {
        gap: 8px;
    }
}

/* Masonry Item Card */
.explore-item {
    width: 100%;
    margin-bottom: 0;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-card, #191816);
    border: 1px solid rgba(202, 163, 98, 0.16);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 280px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 600px) {
    .explore-item {
        border-radius: 10px;
    }
}

.explore-item:hover {
    transform: translateY(-4px);
    border-color: rgba(202, 163, 98, 0.50);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 16px rgba(202, 163, 98, 0.16);
}

.explore-item-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(30, 28, 25, 0.6);
}

[data-theme="light"] .explore-item-img-wrap {
    background: rgba(220, 215, 205, 0.4);
}

.explore-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.explore-item img.loaded {
    opacity: 1;
}

.explore-item:hover img {
    transform: scale(1.05);
}

/* Hover Dark Gradient Overlay (Instagram/Pinterest Pin Feel) */
.explore-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.60) 40%, rgba(0, 0, 0, 0.15) 70%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    z-index: 2;
}

@media (max-width: 768px) {
    /* Always show a rich bottom scrim on mobile/tablet so users see information clearly */
    .explore-item-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.65) 42%, rgba(0, 0, 0, 0.18) 72%, transparent 100%);
        padding: 10px;
    }
}

.explore-item:hover .explore-item-overlay {
    opacity: 1;
}

/* Ensure title is always pure white and ultra-crisp with high-contrast text shadow, even in light mode */
body.jewelry-gallery .explore-item-title,
html[data-theme="light"] body.jewelry-gallery .explore-item-title,
html[data-theme="dark"] body.jewelry-gallery .explore-item-title,
.explore-item-title {
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 700 !important;
    margin: 0 0 6px;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 600px) {
    body.jewelry-gallery .explore-item-title,
    html[data-theme="light"] body.jewelry-gallery .explore-item-title,
    .explore-item-title {
        font-size: 0.80rem;
        margin-bottom: 4px;
        font-weight: 700 !important;
    }
}

.explore-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.explore-meta-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.70rem;
    font-weight: 600;
    color: #e6be75 !important;
    background: rgba(18, 18, 18, 0.82);
    border: 1px solid rgba(202, 163, 98, 0.40);
    padding: 3px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
    .explore-meta-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

.explore-quickview-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(202, 163, 98, 0.25);
    border: 1px solid rgba(202, 163, 98, 0.5);
    color: #e6be75;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.explore-item:hover .explore-quickview-btn {
    background: #d4af37;
    color: #121212;
    transform: scale(1.1);
}

/* Loader & End of Feed */
.explore-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    gap: 12px;
}

.explore-gold-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(202, 163, 98, 0.20);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: exploreSpin 0.8s linear infinite;
}

@keyframes exploreSpin {
    to { transform: rotate(360deg); }
}

.explore-loader-text {
    font-size: 0.84rem;
    color: var(--text-secondary, #b8b3a8);
}

.explore-end-message {
    text-align: center;
    padding: 50px 20px;
}

.explore-end-message .end-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.explore-end-message h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 6px;
}

.explore-end-message p {
    font-size: 0.86rem;
    color: var(--text-secondary, #b8b3a8);
    margin-bottom: 16px;
}

.explore-empty-state {
    text-align: center;
    padding: 70px 20px;
}

.explore-empty-state .empty-icon {
    font-size: 3rem;
    color: rgba(202, 163, 98, 0.4);
    margin-bottom: 14px;
}

.explore-sentinel {
    height: 30px;
    width: 100%;
}

/* ================================================================
   Quick View Modal Styles
   ================================================================ */
.modal-explore-quickview {
    max-width: 820px;
}

.explore-modal-content {
    background: var(--bg-card, #191816);
    border: 1px solid rgba(202, 163, 98, 0.35);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    color: var(--text-primary, #ffffff);
    position: relative;
}

.explore-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(202, 163, 98, 0.3);
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: all 0.2s ease;
    padding: 0;
}

.explore-modal-close:hover {
    opacity: 1;
    background: #d4af37;
    color: #121212;
    transform: rotate(90deg);
}

.explore-modal-visual {
    background: #111111;
    display: flex;
    flex-direction: column;
}

.explore-modal-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #0e0e0e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explore-modal-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.explore-modal-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

.explore-badge-item {
    font-size: 0.72rem;
    font-weight: 600;
    color: #e6be75;
    background: rgba(18, 18, 18, 0.82);
    border: 1px solid rgba(202, 163, 98, 0.35);
    backdrop-filter: blur(6px);
    border-radius: 50px;
    padding: 4px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.explore-modal-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(202, 163, 98, 0.12);
}

.explore-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 1px solid rgba(202, 163, 98, 0.25);
    overflow: hidden;
    padding: 0;
    background: none;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.explore-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.explore-thumb:hover,
.explore-thumb.active {
    opacity: 1;
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.explore-modal-info {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.explore-modal-header {
    margin-bottom: 4px;
}

.explore-category-chip {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gold-light, #e6be75);
    background: rgba(202, 163, 98, 0.10);
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(202, 163, 98, 0.25);
    display: inline-block;
    margin-bottom: 8px;
}

.explore-code-chip {
    font-size: 0.74rem;
    color: var(--text-secondary, #b8b3a8);
    margin-right: 8px;
}

.explore-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin: 0;
    line-height: 1.4;
}

.explore-modal-specs {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(202, 163, 98, 0.14);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.explore-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(202, 163, 98, 0.12);
}

.explore-spec-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.explore-spec-row .spec-name {
    color: var(--text-secondary, #b8b3a8);
}

.explore-spec-row .spec-val {
    color: var(--text-primary, #ffffff);
    font-weight: 600;
}

.explore-modal-desc {
    font-size: 0.82rem;
    color: var(--text-secondary, #b8b3a8);
    line-height: 1.6;
    max-height: 80px;
    overflow-y: auto;
}

.explore-modal-actions {
    margin-top: auto;
    padding-top: 10px;
}

.btn-explore-telegram {
    background: rgba(41, 169, 234, 0.14);
    color: #29a9ea;
    border: 1px solid rgba(41, 169, 234, 0.35);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.btn-explore-telegram:hover {
    background: #29a9ea;
    color: #ffffff;
}

.btn-explore-whatsapp {
    background: rgba(37, 211, 102, 0.14);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.35);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.btn-explore-whatsapp:hover {
    background: #25d366;
    color: #ffffff;
}

.btn-explore-call {
    background: rgba(202, 163, 98, 0.14);
    color: #e6be75;
    border: 1px solid rgba(202, 163, 98, 0.35);
    border-radius: 10px;
    width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-explore-call:hover {
    background: #d4af37;
    color: #121212;
}

.btn-explore-fullpage {
    background: linear-gradient(135deg, rgba(202, 163, 98, 0.18), rgba(202, 163, 98, 0.08));
    color: #e6be75;
    border: 1px solid rgba(202, 163, 98, 0.35);
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.btn-explore-fullpage:hover {
    background: var(--gold-gradient, linear-gradient(135deg, #d4af37, #b8922e));
    color: #121212;
    border-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

/* Light Mode Overrides */
html[data-theme="light"] .explore-item {
    background: #ffffff;
    border-color: rgba(202, 163, 98, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .explore-hero-title,
html[data-theme="light"] .explore-modal-title {
    color: #1a1a1a;
}

html[data-theme="light"] .explore-modal-content {
    background: #ffffff;
    color: #1a1a1a;
    border-color: rgba(184, 146, 46, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .explore-modal-close {
    background: rgba(0, 0, 0, 0.08);
    color: #333333;
    border-color: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .explore-modal-close:hover {
    background: #b8922e;
    color: #ffffff;
}

html[data-theme="light"] .explore-modal-visual {
    background: #f7f5f0;
}

html[data-theme="light"] .explore-modal-img-wrap {
    background: #fdfcf9;
}

html[data-theme="light"] .explore-modal-thumbs {
    background: #f0ede6;
    border-top-color: rgba(184, 146, 46, 0.2);
}

html[data-theme="light"] .explore-modal-specs {
    background: #faf8f5;
    border-color: rgba(184, 146, 46, 0.2);
}

html[data-theme="light"] .explore-spec-row .spec-name {
    color: #555555;
}

html[data-theme="light"] .explore-spec-row .spec-val {
    color: #1a1a1a;
}

html[data-theme="light"] .explore-modal-desc {
    color: #555555;
}

html[data-theme="light"] .explore-code-chip {
    color: #777777;
}

html[data-theme="light"] .explore-category-chip {
    background: rgba(184, 146, 46, 0.12);
    color: #8c6827;
    border-color: rgba(184, 146, 46, 0.3);
}

html[data-theme="light"] .btn-explore-fullpage {
    background: linear-gradient(135deg, rgba(184, 146, 46, 0.12), rgba(184, 146, 46, 0.06));
    color: #8c6827;
    border-color: rgba(184, 146, 46, 0.35);
}

html[data-theme="light"] .btn-explore-fullpage:hover {
    background: linear-gradient(135deg, #caa362, #96762c);
    color: #ffffff;
    border-color: #caa362;
}

html[data-theme="light"] .btn-explore-call {
    background: rgba(184, 146, 46, 0.12);
    color: #8c6827;
    border-color: rgba(184, 146, 46, 0.35);
}

html[data-theme="light"] .btn-explore-call:hover {
    background: #b8922e;
    color: #ffffff;
}

html[data-theme="light"] .explore-chip {
    background: #ffffff;
    color: #555555;
    border-color: rgba(184, 146, 46, 0.3);
}

html[data-theme="light"] .explore-chip:hover {
    background: #fdfaf3;
    color: #8c6827;
    border-color: rgba(184, 146, 46, 0.5);
}

html[data-theme="light"] .explore-chip.active {
    background: linear-gradient(135deg, #caa362, #96762c);
    color: #ffffff !important;
    border-color: #caa362;
    box-shadow: 0 4px 14px rgba(150, 118, 44, 0.3);
}

html[data-theme="light"] .explore-loader-text {
    color: #777777;
}
