/*
 | Ilan67 Premium theme layer
 | Conversion focus: search-first UX, mega menu, premium cards, soft modern look
 */

:root {
    --premium-primary: var(--sahibinden-orange, #ff6b00);
    --premium-primary-dark: var(--sahibinden-dark-orange, #e85f00);
    --premium-secondary: var(--sahibinden-yellow, #ffb347);
    --premium-surface: var(--sahibinden-surface, #ffffff);
    --premium-bg: var(--sahibinden-light-gray, #f1f5f9);
    --premium-border: var(--sahibinden-border, #dbe3ee);
    --premium-text: var(--sahibinden-text, #0f172a);
    --premium-muted: var(--sahibinden-gray, #64748b);
    --premium-radius: 12px;
    --premium-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body.theme-premium {
    background:
        radial-gradient(circle at 8% -5%, rgba(15, 23, 42, 0.06), transparent 32%),
        radial-gradient(circle at 88% 0%, rgba(15, 23, 42, 0.05), transparent 38%),
        var(--premium-bg);
    color: var(--premium-text);
}

body.theme-premium .top-bar {
    border-bottom: 1px solid var(--premium-border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 1300;
    overflow: visible;
}

body.theme-premium .top-bar .container,
body.theme-premium .top-bar .top-bar-inner,
body.theme-premium .top-bar .top-bar-right,
body.theme-premium .top-bar .dropdown {
    position: relative;
    overflow: visible;
}

body.theme-premium .top-bar .dropdown-menu {
    z-index: 1320 !important;
}

body.theme-premium .main-header {
    border-bottom: 1px solid var(--premium-border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.theme-premium .logo {
    color: var(--premium-primary) !important;
}

body.theme-premium .logo span {
    color: var(--premium-secondary) !important;
}

body.theme-premium .search-container {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #fff;
    padding: 4px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.theme-premium .search-input {
    border: 0 !important;
    width: min(560px, 46vw);
    border-radius: 10px !important;
    background: transparent !important;
}

body.theme-premium .search-input:focus {
    outline: none;
    box-shadow: none;
}

body.theme-premium .search-btn {
    border-radius: 10px !important;
    background: linear-gradient(140deg, var(--premium-primary) 0%, var(--premium-secondary) 100%) !important;
    border: 0 !important;
    min-width: 124px;
    font-weight: 700;
}

body.theme-premium .post-ad-btn,
body.theme-premium .btn-sahibinden {
    border-radius: 12px !important;
    background: linear-gradient(140deg, var(--premium-primary) 0%, var(--premium-secondary) 100%) !important;
    border: 0 !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

body.theme-premium .post-ad-btn:hover,
body.theme-premium .btn-sahibinden:hover,
body.theme-premium .search-btn:hover {
    filter: brightness(0.96);
}

/* Premium mega navigation */
body.theme-premium .premium-mega-nav {
    border-top: 1px solid var(--premium-border);
    border-bottom: 1px solid var(--premium-border);
    background: rgba(255, 255, 255, 0.96);
    position: relative;
    z-index: 1100;
}

body.theme-premium .premium-mega-nav .container {
    position: relative;
}

body.theme-premium .premium-mega-root {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.theme-premium .premium-mega-root-item {
    position: static;
    flex: 1 1 0;
}

body.theme-premium .premium-mega-root-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 10px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 700;
    font-size: 13px;
    border-right: 1px solid var(--premium-border);
}

body.theme-premium .premium-mega-root-item:first-child .premium-mega-root-link {
    border-left: 1px solid var(--premium-border);
}

body.theme-premium .premium-mega-root-item:hover .premium-mega-root-link {
    color: #fff;
    background: linear-gradient(140deg, var(--premium-primary) 0%, var(--premium-secondary) 100%);
}

body.theme-premium .premium-mega-panel {
    position: absolute;
    left: 50%;
    top: calc(100% + 1px);
    z-index: 1200;
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--premium-border);
    border-radius: 0 0 14px 14px;
    background: #fff;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translate(-50%, 6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.theme-premium .premium-mega-root-item:hover .premium-mega-panel {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

body.theme-premium .premium-mega-col h6 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

body.theme-premium .premium-mega-links {
    display: grid;
    gap: 4px;
}

body.theme-premium .premium-mega-links a {
    display: block;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 13px;
}

body.theme-premium .premium-mega-links a:hover {
    background: #f8fafc;
    color: var(--premium-primary-dark);
}

body.theme-premium .premium-mega-featured-list {
    display: grid;
    gap: 8px;
}

body.theme-premium .premium-mega-featured-item {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 8px;
    align-items: center;
    padding: 7px;
    border: 1px solid var(--premium-border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

body.theme-premium .premium-mega-featured-item img,
body.theme-premium .premium-mega-featured-placeholder {
    width: 66px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
}

body.theme-premium .premium-mega-featured-item strong {
    display: block;
    font-size: 12px;
    color: #0f172a;
    line-height: 1.35;
}

body.theme-premium .premium-mega-featured-item small {
    display: block;
    font-size: 12px;
    color: var(--premium-primary-dark);
    font-weight: 800;
}

@media (max-width: 1199.98px) {
    body.theme-premium .premium-mega-panel {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    body.theme-premium .premium-mega-col-featured {
        display: none;
    }
}

/* Shared card language */
body.theme-premium .content-wrapper,
body.theme-premium .sidebar-section,
body.theme-premium .pro-filter-card,
body.theme-premium .ad-detail-page .detail-card,
body.theme-premium .category-page .category-hero,
body.theme-premium .ads-listing-page .results-topbar {
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius) !important;
    box-shadow: var(--premium-shadow) !important;
    background: var(--premium-surface) !important;
}

body.theme-premium .section-header {
    border-bottom: 1px solid var(--premium-border);
    background: #fff;
}

body.theme-premium .section-header h3,
body.theme-premium .section-header h5 {
    color: #0f172a;
}

body.theme-premium .section-header a {
    color: var(--premium-primary-dark);
    font-weight: 700;
}

body.theme-premium .ad-card {
    border: 1px solid var(--premium-border);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

body.theme-premium .ad-card:hover {
    border-color: var(--premium-border);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

body.theme-premium .ad-card-title,
body.theme-premium .ad-title {
    color: #0f172a !important;
}

body.theme-premium .ad-card-price,
body.theme-premium .ad-price {
    color: var(--premium-primary-dark) !important;
}

body.theme-premium .featured-badge {
    background: linear-gradient(140deg, var(--premium-primary) 0%, var(--premium-secondary) 100%) !important;
    color: #fff !important;
    border-radius: 999px;
    font-weight: 700;
}

body.theme-premium .urgent-badge {
    border-radius: 999px;
    font-weight: 700;
}

body.theme-premium .sidebar-title {
    background: linear-gradient(140deg, var(--premium-primary) 0%, var(--premium-secondary) 100%);
}

body.theme-premium .sidebar-ad-price {
    color: var(--premium-primary-dark);
}

body.theme-premium .pro-filter-head {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    border-bottom: 1px solid var(--premium-border);
}

body.theme-premium .pro-filter-card .form-control:focus,
body.theme-premium .pro-filter-card .form-select:focus {
    border-color: var(--premium-secondary);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

body.theme-premium .pro-filter-chip {
    border-color: var(--premium-border);
    color: var(--premium-primary-dark);
    background: #fff;
}

body.theme-premium .ad-detail-page {
    background: transparent;
}

body.theme-premium .ad-detail-page .detail-price {
    color: var(--premium-primary-dark);
}

body.theme-premium .ad-detail-page .detail-thumb-btn.active {
    border-color: var(--premium-primary);
}

body.theme-premium .ad-detail-page .detail-related-item:hover {
    border-color: var(--premium-border);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body.theme-premium .ad-detail-page .detail-gallery-counter {
    background: rgba(15, 23, 42, 0.72);
}

body.theme-premium .ad-detail-page .seller-avatar {
    border-color: #dbe3ee;
}

body.theme-premium .ad-mobile-action-btn.is-primary {
    background: linear-gradient(140deg, var(--premium-primary) 0%, var(--premium-secondary) 100%);
    border: 0;
}

/* Home premium blocks */
body.theme-premium .home-premium-hero {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--premium-border);
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%),
        #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    padding: clamp(20px, 4vw, 40px);
}

body.theme-premium .home-premium-hero h1 {
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.18;
    margin-bottom: 8px;
    color: #0f172a;
}

body.theme-premium .home-premium-hero p {
    color: #334155;
    margin-bottom: 18px;
    max-width: 760px;
}

body.theme-premium .home-premium-search {
    border: 1px solid #d8e3f1;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    padding: 14px;
}

body.theme-premium .home-premium-search .form-control,
body.theme-premium .home-premium-search .form-select {
    min-height: 44px;
    border-radius: 10px;
}

body.theme-premium .home-premium-search .btn {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 700;
}

body.theme-premium .home-premium-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

body.theme-premium .home-premium-kpi {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #d8e3f1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

body.theme-premium .home-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

body.theme-premium .home-category-card {
    display: block;
    padding: 14px;
    border: 1px solid var(--premium-border);
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.2s ease;
}

body.theme-premium .home-category-card:hover {
    border-color: var(--premium-border);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

body.theme-premium .home-category-card i {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--premium-primary-dark);
    font-size: 20px;
    margin-bottom: 8px;
}

body.theme-premium .home-category-card strong {
    display: block;
    font-size: 14px;
}

body.theme-premium .home-category-card small {
    color: var(--premium-muted);
}

body.theme-premium .home-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

body.theme-premium .home-blog-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--premium-border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

body.theme-premium .home-blog-card img,
body.theme-premium .home-blog-cover {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: #e2e8f0;
}

body.theme-premium .home-blog-body {
    padding: 12px;
}

body.theme-premium .home-blog-body h6 {
    margin: 0 0 6px;
    color: #0f172a;
    line-height: 1.35;
}

body.theme-premium .home-blog-body p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

body.theme-premium .main-footer {
    border-top-color: var(--premium-primary);
}

body.theme-premium .footer-col h5 {
    border-bottom-color: var(--premium-primary);
}

/* Mobile polishing */
@media (max-width: 1199.98px) {
    body.theme-premium .home-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    body.theme-premium .search-container {
        width: 100%;
    }

    body.theme-premium .search-input {
        width: 100%;
    }

    body.theme-premium .home-premium-hero {
        border-radius: 14px;
        padding: 16px;
    }

    body.theme-premium .home-premium-kpis {
        margin-top: 10px;
    }

    body.theme-premium .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-premium .home-blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    body.theme-premium .home-premium-search .row > [class*="col-"] {
        margin-bottom: 8px;
    }
}
