/**
 * EMERE Builder Frontend Section Styling
 * Configured specifically to render a premium B2B industrial marketplace Hero section.
 */

.emere-premium-industrial-hero {
    position: relative;
    width: 100%;
    margin-bottom: var(--emere-builder-section-spacing);
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    overflow: hidden;
    background-color: #fafbfc;
    border-bottom: 1px solid #f1f5f9;
}

/* Concentric radial rings decor */
.hero-radial-bg-decor {
    position: absolute;
    top: 55%;
    left: 60%;
    transform: translate(-50%, -50%);
    width: 1400px;
    height: 1400px;
    pointer-events: none;
    z-index: 1;
}

.hero-radial-bg-decor::before {
    content: '';
    position: absolute;
    width: 750px;
    height: 750px;
    border: 1px dashed rgba(226, 232, 240, 0.8);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-radial-bg-decor::after {
    content: '';
    position: absolute;
    width: 1050px;
    height: 1050px;
    border: 1px dashed rgba(226, 232, 240, 0.4);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.emere-hero-container {
    max-width: var(--emere-builder-container-width);
    margin: 0 auto;
    padding: 70px 20px 85px 20px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.emere-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
    max-width: var(--emere-builder-max-hero-width);
    margin: 0 auto;
}

/* LEFT COLUMN DETAILS */
.emere-hero-text-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

.emere-hero-trusted-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #fef3c7; /* warm light beige */
    border: 1px solid #fde68a;
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    color: #d97706;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.emere-hero-trusted-badge .badge-icon {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

.emere-hero-heading-main {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.12;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin: 0;
}

.emere-hero-heading-main .highlight-gold {
    color: #e59a18; /* Rich golden color from mockup */
}

.emere-hero-subheading-main {
    font-size: 1.15rem;
    line-height: 1.55;
    color: #475569;
    margin: 0;
    max-width: 520px;
}

/* Premium Combined Search Bar */
.emere-hero-search-wrapper {
    width: 100%;
    max-width: 580px;
    margin-top: 5px;
}

.emere-hero-search-form-premium {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    gap: 10px;
    width: 100%;
    transition: all 0.25s ease;
}

.emere-hero-search-form-premium:focus-within {
    border-color: #e59a18;
    box-shadow: 0 0 0 4px rgba(229, 154, 24, 0.15);
}

.input-with-icon {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.input-with-icon .search-icon-lead {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.input-with-icon .emere-hero-search-input {
    width: 100%;
    border: none !important;
    outline: none !important;
    padding: 10px 10px 10px 38px !important;
    font-size: 14px;
    color: #1e293b;
    background: transparent !important;
}

.category-dropdown-wrapper {
    border-left: 1px solid #e2e8f0;
    padding-left: 8px;
    flex-shrink: 0;
}

/* HIGH-SPECIFICITY OVERRIDES: Force dark background, white text, and strip native browser select chrome */
select.emere-hero-cat-select,
select.emere-hero-cat-select:focus,
select.emere-hero-cat-select:active,
.emere-hero-search-form-premium select.emere-hero-cat-select,
.category-dropdown-wrapper select.emere-hero-cat-select {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #0f172a !important;
    border-radius: 8px !important;
    padding: 10px 32px 10px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    box-shadow: none !important;
}

/* Ensure dropdown select options have highly visible dark text on a solid white background */
select.emere-hero-cat-select option,
.category-dropdown-wrapper select.emere-hero-cat-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.emere-hero-search-submit-btn {
    background-color: #e59a18;
    color: #0f172a;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.emere-hero-search-submit-btn:hover {
    background-color: #d18b10;
}

.emere-hero-search-submit-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Action CTAs Buttons */
.emere-hero-ctas-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.emere-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    gap: 8px;
}

.emere-hero-btn .btn-arrow {
    transition: transform 0.2s ease;
}

.emere-hero-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.emere-hero-btn.btn-dark-navy {
    background-color: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.emere-hero-btn.btn-dark-navy:hover {
    background-color: #1e293b;
    border-color: #1e293b;
}

.emere-hero-btn.btn-gold-orange {
    background-color: #e59a18;
    color: #ffffff;
    border: 1px solid #e59a18;
    box-shadow: 0 4px 14px rgba(229, 154, 24, 0.15);
}

.emere-hero-btn.btn-gold-orange:hover {
    background-color: #d18b10;
    border-color: #d18b10;
}

.btn-lead-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Trustpilot Rating Strip */
.emere-hero-trustpilot-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.tp-star-logo {
    font-weight: 800;
    font-size: 13.5px;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.tp-stars {
    display: flex;
    gap: 2px;
}

.tp-box-star {
    background-color: #00b67a;
    color: #ffffff;
    font-size: 8px;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tp-score-text {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* RIGHT COLUMN MEDIA & ABSOLUTE CARDS STACK */
.emere-hero-media-col {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-media-frame-premium {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.emere-hero-main-img-premium {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

/* Absolute Floating Cards Stack Styling */
.emere-hero-bid-cards-stack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* HORIZONTAL MINIMAL CARD DESIGN */
.emere-floating-bid-card {
    position: absolute;
    background: #ffffff;
    border-radius: 24px; /* Highly rounded corners */
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    gap: 14px;
    width: 250px;
    pointer-events: auto;
    transition: all 0.3s ease;
}

/* Pauses auto levitation animation on hover and scales beautifully */
.emere-floating-bid-card:hover {
    animation-play-state: paused !important;
    transform: translateY(-6px) scale(1.02) !important;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.1);
}

.floating-card-anchor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* Rounded square image container */
.card-thumb-square {
    width: 60px;
    height: 60px;
    border-radius: 16px; /* highly rounded square image */
    overflow: hidden;
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.card-thumb-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right side content */
.card-info-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    text-align: left;
}

.card-info-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info-price {
    font-size: 16px;
    font-weight: 700;
    color: #e59a18 !important; /* Gold price color */
}

/* SPACING POLISH & ORGANIC LEVITATING ANIMATIONS (Delays are offset to float out of sync) */
.card-top-right {
    top: -30px;
    right: -70px;
    animation: emerePremiumLevitate 6s ease-in-out infinite;
}

.card-middle-left {
    top: 25%;
    left: -110px;
    animation: emerePremiumLevitate 7s ease-in-out infinite -2s;
}

.card-bottom-right {
    bottom: -35px;
    right: -95px;
    animation: emerePremiumLevitate 5.5s ease-in-out infinite -4s;
}

/* Levitating Micro-animation Keyframes */
@keyframes emerePremiumLevitate {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0);
    }
}

/* RESPONSIVE DESIGN POLISH */
@media (max-width: 1200px) {
    .card-top-right {
        right: -30px;
    }
    
    .card-middle-left {
        left: -30px;
    }
    
    .card-bottom-right {
        right: -30px;
    }
}

/* Tablet & Smaller Portrait Viewports */
@media (max-width: 991.98px) {
    .emere-hero-container {
        padding: 50px 20px 60px 20px;
    }
    
    .emere-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .emere-hero-text-col {
        text-align: center;
        align-items: center;
    }
    
    .emere-hero-subheading-main {
        max-width: 100%;
    }
    
    .emere-hero-trusted-badge {
        align-self: center;
    }
    
    .emere-hero-search-wrapper {
        max-width: 100%;
    }
    
    .emere-hero-trustpilot-strip {
        justify-content: center;
    }
    
    .emere-hero-media-col {
        margin-top: 20px;
        padding-bottom: 0;
        width: 100%;
    }
    
    /* MAINTAINS FLUID FLOATING LAYOUT FOR RIGHT COLUMN ON TABLET/MOBILE VIEWS */
    .emere-hero-bid-cards-stack {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        pointer-events: none !important;
        margin: 0 !important;
        max-width: none !important;
    }
    
    .emere-floating-bid-card {
        position: absolute !important;
        width: 180px !important; /* Scale down card width */
        border-radius: 18px !important;
        padding: 10px !important;
        gap: 10px !important;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
    }

    .card-thumb-square {
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
    }

    .card-info-title {
        font-size: 11.5px !important;
    }

    .card-info-price {
        font-size: 13.5px !important;
    }

    /* Scaling offsets inward to remain on-screen across tablets */
    .card-top-right {
        top: -15px !important;
        right: -30px !important;
        bottom: auto !important;
        left: auto !important;
    }

    .card-middle-left {
        top: 30% !important;
        left: -35px !important;
        right: auto !important;
        bottom: auto !important;
    }

    .card-bottom-right {
        bottom: -20px !important;
        right: -35px !important;
        top: auto !important;
        left: auto !important;
    }
}

/* Narrow SmartPhone layout */
@media (max-width: 767.98px) {
    .emere-hero-heading-main {
        font-size: 2.3rem;
    }
    
    /* ELEGANT RESPONSIVE SEARCH GRID - Magnifying button placed inline next to categories */
    .emere-hero-search-form-premium {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 8px !important;
        padding: 6px !important;
        border-radius: 14px !important;
    }
    
    .input-with-icon {
        grid-column: span 2 !important;
        width: 100% !important;
    }
    
    .category-dropdown-wrapper {
        grid-column: 1 !important;
        border-left: none !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
    
    .emere-hero-cat-select {
        width: 100% !important;
    }
    
    .emere-hero-search-submit-btn {
        grid-column: 2 !important;
        width: 44px !important; /* Retained as a small square inline icon button! */
        height: 44px !important;
        margin: 0 !important;
    }
    
    .emere-hero-ctas-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .emere-hero-btn {
        width: 100%;
    }
}

/* Super narrow viewports (e.g. iPhone SE / 320px screens) */
@media (max-width: 480px) {
    /* Scale the floating bid cards down slightly further to ensure 0% overflow */
    .emere-floating-bid-card {
        width: 145px !important;
        padding: 6px !important;
        gap: 6px !important;
        border-radius: 14px !important;
    }
    .card-thumb-square {
        width: 36px !important;
        height: 36px !important;
        border-radius: 8px !important;
    }
    .card-info-title {
        font-size: 10px !important;
    }
    .card-info-price {
        font-size: 11.5px !important;
    }
    .card-top-right {
        top: -10px !important;
        right: -15px !important;
    }
    .card-middle-left {
        top: 35% !important;
        left: -15px !important;
    }
    .card-bottom-right {
        bottom: -15px !important;
        right: -15px !important;
    }
}
