/**
 * EMERE Builder — E-Shop Collection Grid
 * builder-eshop.css
 * Colors 100% matched to the EMERE site design system:
 *   Background    : #ffffff / #f9f9fb
 *   Text dark     : #0f172a / #1e293b
 *   Text muted    : #64748b / #475569
 *   Accent gold   : #e59a18  (primary brand gold)
 *   Accent hover  : #d18b10
 *   Accent orange : var(--emere-builder-accent, #ea580c)
 *   Borders       : #e2e8f0 / rgba(226,232,240,0.8)
 *   Badge bg      : #fef3c7 / border #fde68a / text #d97706
 *   Hover tile bg : #fffcf9
 */

/* -----------------------------------------------------------
   SECTION WRAPPER
   ----------------------------------------------------------- */
.emere-eshop-section-wrapper {
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    overflow: hidden;
    background-color: transparent;
}

/* -----------------------------------------------------------
   HEADER BLOCK
   ----------------------------------------------------------- */
.emere-eshop-header-block {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 35px;
    box-sizing: border-box;
}

.eshop-header-left {
    flex: 1;
}

/* Badge — matches site "PREMIUM AUCTIONS & MARKETPLACE" pill exactly */
.emere-eshop-tag-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 30px;
    padding: 5px 14px 5px 10px;
    font-size: 10px;
    font-weight: 800;
    color: #d97706;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.emere-eshop-tag-badge .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    color: #d97706;
}

.emere-eshop-tag-badge .badge-lbl {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #d97706;
    text-transform: uppercase;
}

/* Section title — matches hero section heading style */
.eshop-heading-main {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0 0 8px 0;
    line-height: 1.15;
    font-family: 'Outfit', sans-serif;
}

.eshop-subheading-main {
    font-size: 1.05rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    max-width: 540px;
    font-family: 'Outfit', sans-serif;
}

/* -----------------------------------------------------------
   CTA BUTTON — matches site "Explore Marketplace" gold button
   ----------------------------------------------------------- */
.emere-eshop-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e59a18;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(229, 154, 24, 0.18);
    border: 1px solid #e59a18;
}

.emere-eshop-cta-btn:hover {
    background-color: #d18b10;
    border-color: #d18b10;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 154, 24, 0.28);
    color: #ffffff;
    text-decoration: none !important;
}

.emere-eshop-cta-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.emere-eshop-cta-btn:hover svg {
    transform: translateX(4px);
}

/* Bottom CTA row — hidden on desktop, shown on mobile */
.emere-eshop-bottom-cta-row {
    display: none;
    justify-content: center;
    margin-top: 32px;
}

.emere-eshop-cta-btn--full {
    width: 100%;
    max-width: 320px;
    justify-content: center;
}

/* -----------------------------------------------------------
   GRID WRAPPER — shared base
   ----------------------------------------------------------- */
.emere-eshop-grid-wrapper {
    position: relative;
    display: grid;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* -----------------------------------------------------------
   LAYOUT: UNIFORM GRID (3 columns equal)
   ----------------------------------------------------------- */
.emere-eshop-layout--grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
}

/* -----------------------------------------------------------
   LAYOUT: MASONRY (3 columns, alternating tall / normal)
   ----------------------------------------------------------- */
.emere-eshop-layout--masonry {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 190px;
}

.emere-eshop-layout--masonry .tile--tall {
    grid-row: span 2;
}

.emere-eshop-layout--masonry .tile--normal {
    grid-row: span 1;
}

/* -----------------------------------------------------------
   LAYOUT: FEATURED (hero left + smaller right tiles)
   ----------------------------------------------------------- */
.emere-eshop-layout--featured {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 215px;
}

.emere-eshop-layout--featured .tile--hero {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 446px;
}

.emere-eshop-layout--featured .tile--small {
    grid-row: span 1;
}

/* -----------------------------------------------------------
   COLLECTION TILE — shared
   ----------------------------------------------------------- */
.emere-eshop-collection-tile {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
    background-color: #f1f5f9;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02);
    transition: all 0.3s ease;
    min-height: 190px;
}

.emere-eshop-collection-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    border-color: var(--emere-builder-accent, #ea580c);
    text-decoration: none !important;
}

/* -----------------------------------------------------------
   TILE MEDIA (background image)
   ----------------------------------------------------------- */
.tile-media-frame {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.tile-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover zoom — only if enabled */
.has-hover-zoom .emere-eshop-collection-tile:hover .tile-bg-image {
    transform: scale(1.06);
}

/* Gradient overlay — dark bottom fade like categories section */
.tile-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 25%,
        rgba(15, 23, 42, 0.88) 100%
    );
    z-index: 1;
    transition: background 0.3s ease;
}

.emere-eshop-collection-tile:hover .tile-overlay-gradient {
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 10%,
        rgba(15, 23, 42, 0.94) 100%
    );
}

/* -----------------------------------------------------------
   TILE SHIMMER — warm gold on hover (matches brand accent)
   ----------------------------------------------------------- */
.tile-shimmer-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        135deg,
        rgba(229, 154, 24, 0.07) 0%,
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.emere-eshop-collection-tile:hover .tile-shimmer-layer {
    opacity: 1;
}

/* -----------------------------------------------------------
   TILE CONTENT OVERLAY
   ----------------------------------------------------------- */
.tile-content-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    padding: 24px 20px;
}

.tile-content-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    transform: translateY(4px);
    transition: transform 0.3s ease;
}

.emere-eshop-collection-tile:hover .tile-content-inner {
    transform: translateY(0);
}

/* Count badge — matches category item count tag: warm orange */
.tile-count-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #ffedd5;
    background-color: rgba(234, 88, 12, 0.9);
    border-radius: 4px;
    padding: 3px 8px;
    letter-spacing: 0.02em;
    width: fit-content;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 4px;
}

/* Collection name */
.tile-collection-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Explore row — fades in on hover like categories "Explore Range" */
.tile-explore-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease 0.04s, transform 0.25s ease 0.04s;
}

.emere-eshop-collection-tile:hover .tile-explore-row {
    opacity: 1;
    transform: translateY(0);
    color: #fed7aa;
}

.tile-explore-label {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.tile-explore-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.emere-eshop-collection-tile:hover .tile-explore-arrow {
    background: rgba(229, 154, 24, 0.85);
    transform: translateX(3px);
}

.tile-explore-arrow svg {
    width: 12px;
    height: 12px;
    color: #fff;
}

/* -----------------------------------------------------------
   EMPTY STATE
   ----------------------------------------------------------- */
.emere-eshop-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 40px;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
    text-align: center;
    background: #f8fafc;
    font-style: italic;
}

.emere-eshop-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #cbd5e1;
}

.emere-eshop-empty-state p {
    color: #64748b;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    max-width: 420px;
    margin: 0;
}

/* -----------------------------------------------------------
   TILE STAGGERED ENTRY ANIMATION
   ----------------------------------------------------------- */
@keyframes eshopTileIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.emere-eshop-collection-tile {
    opacity: 0;
    animation: eshopTileIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.emere-eshop-collection-tile:nth-child(1) { animation-delay: 0.05s; }
.emere-eshop-collection-tile:nth-child(2) { animation-delay: 0.12s; }
.emere-eshop-collection-tile:nth-child(3) { animation-delay: 0.19s; }
.emere-eshop-collection-tile:nth-child(4) { animation-delay: 0.26s; }
.emere-eshop-collection-tile:nth-child(5) { animation-delay: 0.33s; }
.emere-eshop-collection-tile:nth-child(6) { animation-delay: 0.40s; }
.emere-eshop-collection-tile:nth-child(7) { animation-delay: 0.47s; }
.emere-eshop-collection-tile:nth-child(8) { animation-delay: 0.54s; }

/* -----------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------- */
@media (max-width: 1200px) {
    .eshop-heading-main {
        font-size: 2rem;
    }
}

@media (max-width: 991.98px) {
    .emere-eshop-layout--grid,
    .emere-eshop-layout--masonry,
    .emere-eshop-layout--featured {
        grid-template-columns: repeat(2, 1fr);
    }

    .emere-eshop-layout--featured .tile--hero {
        grid-column: span 2;
        min-height: 300px;
    }
}

@media (max-width: 767.98px) {
    .emere-eshop-header-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    /* Hide header CTA — show bottom row on mobile */
    .eshop-header-right {
        display: none;
    }

    .emere-eshop-bottom-cta-row {
        display: flex;
    }

    .eshop-heading-main {
        font-size: 1.8rem;
    }

    .emere-eshop-layout--grid,
    .emere-eshop-layout--masonry,
    .emere-eshop-layout--featured {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .emere-eshop-collection-tile,
    .emere-eshop-layout--masonry .tile--tall,
    .emere-eshop-layout--masonry .tile--normal,
    .emere-eshop-layout--featured .tile--hero,
    .emere-eshop-layout--featured .tile--small {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        min-height: 200px;
    }

    /* Always show explore row on touch screens */
    .tile-explore-row {
        opacity: 1;
        transform: translateY(0);
        color: #fed7aa;
    }
}

@media (max-width: 575.98px) {
    .tile-content-overlay {
        padding: 16px;
    }
}
