/* ============================================
   Serwis Ogłoszeń Lokalnych – Design System
   Mobile-first, responsive, modern aesthetics
   ============================================ */

/* Google Fonts loaded asynchronously via <link> in header.php */

/* ---- CSS Custom Properties ---- */
:root {
    /* Primary palette */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;

    /* Accent */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;

    /* Status colors */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Layout */
    --max-width: 1200px;
    --header-height: 64px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;

    /* Semantic aliases */
    --border: var(--gray-200);
    --border-light: var(--gray-200);
    --bg-light: var(--gray-50);
    --bg-secondary: var(--gray-50);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-500);
    --text-muted: var(--gray-400);
    --color-error: var(--error);
    --radius-md: var(--radius);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--gray-900);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Header / Navbar ---- */
.header {
    background: var(--gray-900);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--transition);
}

.logo:hover {
    opacity: 0.85;
}

.logo-text {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-dot {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.5px;
    line-height: 1;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a {
    color: var(--gray-300);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav a.active {
    color: #fff;
    background: var(--primary);
}

.nav-btn {
    background: var(--primary) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
}

.nav-btn:hover {
    background: var(--primary-dark) !important;
}

/* Logout button styled as nav link */
.nav-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-300);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition);
}

.nav-link-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* Mobile nav */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--gray-900);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-top: 1px solid var(--gray-700);
        box-shadow: var(--shadow-lg);
    }

    .nav.open {
        display: flex;
    }

    .nav a,
    .nav .nav-link-btn {
        width: 100%;
        padding: 12px 16px;
        text-align: left;
    }
}

/* ---- Hero Section ---- */
.hero {
    background: linear-gradient(135deg, var(--gray-900) 0%, #1e3a5f 50%, var(--primary-dark) 100%);
    color: #fff;
    padding: 60px 0 70px;
    position: relative;
    overflow: visible;
    z-index: 10;
}


.hero h1 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
}

.hero p {
    color: var(--gray-300);
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 600px;
}

/* ---- Search Form (Hero) ---- */
.search-box {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 16px;
    width: 100%;
    position: relative;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}


.search-row .search-main {
    flex: 3;
}

.search-row .search-city {
    flex: 1.2;
    min-width: 160px;
}

.search-row .search-radius {
    flex: 0 0 auto;
    min-width: 100px;
}

.search-row select,
.search-row input[type="text"] {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    color: var(--gray-800);
    font-family: inherit;
    transition: border-color var(--transition);
    box-sizing: border-box;
}

.search-row .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    min-width: 0;
}

.search-row select:focus,
.search-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-search {
    height: 56px;
    padding: 0 28px;
    background: var(--accent);
    color: var(--gray-900);
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;
}

.btn-search:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
    .search-row {
        flex-wrap: wrap;
    }

    .search-row .search-main,
    .search-row .search-city,
    .search-row .search-radius {
        flex: 1 1 100%;
    }

    .btn-search {
        width: 100%;
        padding: 14px 28px;
    }
}

/* ---- Sections ---- */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ---- Category Grid ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.category-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--gray-800);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    color: var(--gray-800);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.category-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.category-count {
    color: var(--gray-400);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ---- Listing Cards ---- */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.listing-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.listing-card.listing-highlighted {
    background: linear-gradient(135deg, #fffbeb 0%, #fff 40%);
    border-color: var(--accent-light);
    box-shadow: 0 0 0 1px var(--accent-light), var(--shadow);
}

.listing-card.listing-top {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light), var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fff 40%);
}

.listing-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--gray-100);
}

.listing-thumb-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-300);
}

.listing-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.listing-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.listing-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.35;
    color: var(--gray-900);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.listing-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-desc {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-draft {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-active {
    background: var(--success-bg);
    color: var(--success);
}

.badge-expired {
    background: var(--error-bg);
    color: var(--error);
}

.badge-paused {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-deleted {
    background: var(--gray-200);
    color: var(--gray-500);
}

.badge-promoted {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: var(--gray-900);
}

.badge-highlighted {
    background: #fffbeb;
    color: var(--accent-dark);
    border: 1px solid var(--accent-light);
}

.badge-recommended {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-category {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    color: var(--gray-900);
}

.btn-warning:hover {
    background: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

.btn-phone {
    background: var(--success);
    color: #fff;
    font-size: 1rem;
    padding: 12px 28px;
}

.btn-phone:hover {
    background: #059669;
    color: #fff;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--error);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-800);
    background: #fff;
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}


.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Honeypot */
.ohnohoney {
    position: absolute;
    left: -9999px;
}

/* ---- Alerts ---- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 4px;
}

.alert-close:hover {
    opacity: 1;
}

/* ---- Card / Panel ---- */
.card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 20px;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}

.pagination a {
    background: #fff;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    font-weight: 700;
}

.pagination .disabled {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
}

.pagination-ellipsis {
    border: none !important;
    background: none !important;
    color: var(--gray-400);
    min-width: 24px;
    padding: 0 4px;
    cursor: default;
}

.pagination-arrow {
    font-weight: 700;
    font-size: 1rem;
}

/* ---- City Autocomplete ---- */
.city-ac-wrap {
    position: relative;
    flex: 1;
    height: 56px;
}

.city-ac-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 340px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 200;
    max-height: 280px;
    overflow-y: auto;
}

.city-ac-dropdown.open {
    display: block;
}

.city-ac-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.city-ac-item:last-child {
    border-bottom: none;
}

.city-ac-item:hover,
.city-ac-item.active {
    background: var(--gray-50, #f8f9fa);
}

.city-ac-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    color: var(--gray-900, #111);
}

.city-ac-meta {
    font-size: 0.78rem;
    color: var(--gray-500, #6b7280);
    display: block;
    margin-top: 1px;
}

.city-ac-empty {
    padding: 10px 14px;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.city-ac-error {
    color: var(--gray-500, #6b7280);
    font-size: 0.8rem;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    min-height: 0;
    font-style: italic;
    pointer-events: none;
}

.input-error {
    border-color: var(--warning, #f59e0b) !important;
}

/* ---- Location Indicator (header) ---- */
.location-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: default;
    white-space: nowrap;
}

.location-pin {
    font-size: 0.9rem;
}

.location-clear {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}

.location-clear:hover {
    color: #fff;
}


/* ---- Searchable Select ---- */
.ss-wrap {
    position: relative;
}

.ss-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 260px;
    overflow-y: auto;
}

.ss-dropdown.open {
    display: block;
}

.ss-option {
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.95rem;
}

.ss-option:hover,
.ss-option.active {
    background: var(--gray-50, #f8f9fa);
}

.ss-option.selected {
    font-weight: 600;
    color: var(--primary);
}

.ss-empty {
    padding: 10px 14px;
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* ---- Detail Page ---- */
.detail-header {
    padding: 32px 0 24px;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-breadcrumb a {
    color: var(--primary);
}

.detail-breadcrumb .sep {
    color: var(--gray-300);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-main .detail-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gray-700);
    white-space: pre-line;
}

/* Gallery */
.gallery {
    margin-bottom: 24px;
}

.gallery-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform var(--transition);
}

.gallery-main:hover {
    transform: scale(1.01);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary);
}

/* Sidebar contact card */
.contact-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.contact-card h3 {
    margin-bottom: 16px;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
    color: var(--gray-700);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item .icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.phone-reveal {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 0;
}

.phone-reveal:hover {
    text-decoration: underline;
}

.phone-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
}

/* ---- Sidebar Filters ---- */
.filters-sidebar {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
}

.filters-sidebar h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 900px) {
    .search-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        order: -1;
    }
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.sort-select {
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 14px;
    cursor: pointer;
}

/* ---- Auth Pages ---- */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ---- Panel Layout ---- */
.panel-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - var(--header-height));
}

@media (max-width: 900px) {
    .panel-layout {
        grid-template-columns: 1fr;
    }
}

.panel-sidebar {
    background: #fff;
    border-right: 1px solid var(--gray-200);
    padding: 24px 0;
}

.panel-sidebar .sidebar-nav {
    list-style: none;
}

.panel-sidebar .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.panel-sidebar .sidebar-nav a:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.panel-sidebar .sidebar-nav a.active {
    background: var(--primary-bg);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.panel-content {
    padding: 30px;
    background: var(--gray-50);
}

@media (max-width: 900px) {
    .panel-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: 12px 0;
    }

    .panel-sidebar .sidebar-nav {
        display: flex;
        overflow-x: auto;
    }

    .panel-sidebar .sidebar-nav a {
        padding: 10px 16px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .panel-sidebar .sidebar-nav a.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary);
    }

    .panel-content {
        padding: 20px 16px;
    }
}

.panel-title {
    font-size: 1.4rem;
    margin-bottom: 24px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--primary-bg);
}

.stat-icon.green {
    background: var(--success-bg);
}

.stat-icon.yellow {
    background: var(--warning-bg);
}

.stat-icon.red {
    background: var(--error-bg);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ---- Tables ---- */
.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: var(--gray-50);
}

.table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---- Footer ---- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 20px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---- Image upload preview ---- */
.image-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-50);
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.image-upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.image-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--gray-400);
}

.image-upload-text {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.image-upload-hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.image-previews {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--error);
    color: #fff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-order {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.image-preview-item[draggable="true"] {
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.image-preview-item[draggable="true"]:active {
    cursor: grabbing;
}

.image-preview-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.image-preview-item.drag-over {
    box-shadow: 0 0 0 2px var(--primary);
    transform: scale(1.05);
}

/* ---- Portfolio (Realizacje) ---- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.portfolio-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.portfolio-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.portfolio-card-img:hover {
    opacity: 0.9;
}

.portfolio-card-body {
    padding: 12px 16px;
}

.portfolio-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--gray-900);
}

.portfolio-card-desc {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}

/* Panel management list */
.portfolio-manage-list {
    display: flex;
    flex-direction: column;
}

.portfolio-manage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    transition: background 0.15s;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.portfolio-manage-item:last-child {
    border-bottom: none;
}

.portfolio-manage-item:hover {
    background: var(--gray-50);
}

.portfolio-manage-item.dragging {
    opacity: 0.4;
}

.portfolio-manage-item.drag-over {
    box-shadow: inset 0 -2px 0 var(--primary);
}

.portfolio-manage-item .image-preview-order {
    position: static;
    flex-shrink: 0;
}

/* ---- Abuse report modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal h3 {
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-900);
}

/* ---- Lightbox ---- */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
}

/* ---- Utilities ---- */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--gray-500);
}

.text-small {
    font-size: 0.85rem;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--gray-600);
    margin-bottom: 8px;
}

/* ---- Responsive polish ---- */
@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 40px 0 50px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .section {
        padding: 40px 0;
    }

    .auth-card {
        padding: 24px;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 16px 10px;
    }

    .category-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .category-name {
        font-size: 0.8rem;
    }
}



/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span:last-child {
    color: var(--gray-700);
    font-weight: 500;
}

/* ---- Subcategory chips ---- */
.subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.subcategory-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition);
}

.subcategory-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.subcategory-count {
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* ---- Urgent filter & badge ---- */
.urgent-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    cursor: pointer;
    color: var(--gray-600);
    white-space: nowrap;
}

.urgent-filter input {
    cursor: pointer;
}

.urgent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Cookie Consent Banner ---- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    padding: 0 16px 16px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#cookie-banner.active {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 960px;
    margin: 0 auto;
    background: rgba(17, 24, 39, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
    color: #fff;
}

.cookie-heading {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 4px;
}

.cookie-text {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.cookie-text p {
    margin: 0;
}

.cookie-text a {
    color: var(--primary-light);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #22c55e;
    color: #fff;
}

.cookie-btn-primary:hover {
    background: #16a34a;
}

.cookie-btn-outline {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid #6b7280;
}

.cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.cookie-btn-text {
    background: transparent;
    color: #9ca3af;
    border: none;
    padding: 10px 14px;
}

.cookie-btn-text:hover {
    color: #fff;
}

/* ---- Cookie Settings Modal ---- */
#cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 16px;
}

#cookie-modal-overlay.active {
    opacity: 1;
}

.cookie-modal {
    background: #1f2937;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cookie-modal-close:hover {
    color: #fff;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-category {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-category:first-child {
    padding-top: 0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.cookie-category-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-category-header strong {
    font-size: 0.95rem;
}

.cookie-category-desc {
    margin: 6px 0 0 28px;
    font-size: 0.82rem;
    color: #9ca3af;
    line-height: 1.5;
}

.cookie-modal-footer {
    padding: 0 24px 24px;
    text-align: right;
}

.cookie-modal-footer .cookie-btn-primary {
    padding: 12px 28px;
}

@media (max-width: 600px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .cookie-text {
        flex-direction: column;
    }

    .cookie-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }

    .cookie-btn-text {
        flex: 0;
    }
}

/* ---- Promotion System Styles ---- */

.badge-top {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-highlight {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}


/* Promotion package grid */
.promo-type-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.promo-type-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.promo-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.promo-package-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: all var(--transition);
}

.promo-package-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.promo-pkg-duration {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.promo-pkg-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    margin: 4px 0;
}

/* Promotion listing card in panel */
.promo-listing-card {
    transition: var(--transition);
}

.promo-listing-card:hover {
    box-shadow: var(--shadow);
}

/* Stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}


.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}


/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 20px;
    padding-bottom: 0;
}

.tab {
    padding: 8px 16px;
    border-radius: var(--radius) var(--radius) 0 0;
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}


/* ---- Reviews & Star Ratings ---- */

/* Interactive star rating input */
.star-rating-input {
    display: inline-flex;
    gap: 4px;
    font-size: 2rem;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.star-input {
    color: #d1d5db;
    transition: color 0.15s, transform 0.15s;
}

.star-input:hover,
.star-input.active {
    color: #f59e0b;
    transform: scale(1.1);
}

/* Readonly star display */
.stars-display {
    color: #f59e0b;
    font-size: 1rem;
    white-space: nowrap;
}

.stars-display.stars-inline {
    margin-left: 6px;
    font-size: 0.95rem;
}

.stars-display .stars-score {
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 2px;
}

.stars-display .stars-count {
    color: var(--text-muted);
    font-size: 0.85em;
}

.stars-display.no-reviews {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Listing card stars */
.listing-stars {
    display: inline-flex;
    align-items: center;
}

.listing-stars .stars-display {
    font-size: 0.8rem;
}

/* Review cards */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    padding: 16px;
    background: var(--bg-secondary, #f9fafb);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-light, #e5e7eb);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.review-content {
    margin: 0;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Button link (for report) */
.btn-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.btn-link:hover {
    opacity: 0.7;
}

/* Provider profile */
.provider-profile {
    max-width: 900px;
    margin: 0 auto;
}

.provider-header {
    margin-bottom: 24px;
}

.provider-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.provider-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
}

.provider-rating {
    display: inline-flex;
    align-items: center;
}

/* Badge variants for review status */
.badge-warning {
    background: #f59e0b;
    color: #fff;
}

.badge-danger {
    background: #ef4444;
    color: #fff;
}

.badge-inactive {
    background: #9ca3af;
    color: #fff;
}


.btn-outline-danger {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: #fff;
}

/* ---- Banner Carousel ---- */
.banner-carousel {
    position: relative;
    width: 100%;
    height: var(--banner-height, 120px);
    overflow: hidden;
    background: #e0e4ea;
    margin: 0;
    line-height: 0;
    animation: banner-pulse 1s ease-in-out infinite alternate;
}

@keyframes banner-pulse {
    0% { background: #e0e4ea; }
    100% { background: #c5cad3; }
}

/* Stop pulse once banner content is loaded */
.banner-carousel:has(.banner-track[style*="flex"]) {
    animation: none;
    background: transparent;
}

.banner-ad-label {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 10;
    font-size: 0.7rem;
    line-height: 1.2;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    letter-spacing: 0.04em;
    font-weight: 500;
    text-transform: uppercase;
}

.banner-carousel:has(.banner-html) {
    min-height: var(--banner-height, 120px);
    height: auto;
    overflow: visible;
}

.banner-track {
    display: flex;
    min-height: inherit;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.banner-carousel[data-effect="fade"] .banner-track {
    transition: none;
}

.banner-slide {
    min-width: 100%;
    min-height: inherit;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner-carousel[data-effect="fade"] .banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.banner-carousel[data-effect="fade"] .banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.banner-slide img {
    display: block;
    height: var(--banner-height, 120px);
    width: auto;
    max-width: none;
    object-fit: contain;
}

.banner-slide a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.banner-html {
    width: 100%;
    min-height: var(--banner-height, 120px);
    display: block;
    overflow: visible;
}

.banner-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}

.banner-dot.active {
    background: var(--primary, #f59e0b);
    transform: scale(1.3);
}

.banner-dot:hover {
    background: rgba(0, 0, 0, 0.5);
}


/* Tags grid for forms */
.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    -webkit-user-select: none;
    user-select: none;
}

.tag-checkbox:hover {
    border-color: var(--primary, #f59e0b);
    background: rgba(245, 158, 11, 0.05);
}

.tag-checkbox input[type="checkbox"] {
    display: none;
}

.tag-checkbox:has(input:checked) {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--primary, #f59e0b);
    color: var(--primary-dark, #d97706);
    font-weight: 600;
}

/* Tag badges on listing cards */
.listing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    font-weight: 500;
    white-space: nowrap;
}

.listing-completed-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #dcfce7;
    color: #166534;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 4px 0;
}

/* ---- Blog Content Tables ---- */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.blog-content table thead th {
    background: var(--gray-100);
    color: var(--gray-800);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--gray-300);
    white-space: nowrap;
}

.blog-content table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    vertical-align: top;
}

.blog-content table tbody tr:nth-child(even) {
    background: var(--gray-50, #f9fafb);
}

.blog-content table tbody tr:hover {
    background: var(--primary-bg);
}

.blog-content table tbody tr:last-child td {
    border-bottom: none;
}

/* Tables without thead – style first row as header */
.blog-content table tr:first-child td {
    font-weight: 600;
    color: var(--gray-800);
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-300);
}

.blog-content table:has(thead) tr:first-child td {
    font-weight: inherit;
    color: inherit;
    background: inherit;
    border-bottom: 1px solid var(--gray-200);
}

/* All td cells get basic styling */
.blog-content table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    vertical-align: top;
}

/* ---- Blog Content Accordion (details/summary) ---- */
.blog-content details {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
    transition: all var(--transition);
}

.blog-content details:hover {
    border-color: var(--primary-light);
}

.blog-content details[open] {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.blog-content details summary {
    padding: 14px 18px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-50, #f9fafb);
    transition: background var(--transition);
}

.blog-content details summary::-webkit-details-marker {
    display: none;
}

.blog-content details summary::before {
    content: '▸';
    font-size: 0.85em;
    color: var(--primary);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.blog-content details[open] summary::before {
    transform: rotate(90deg);
}

.blog-content details[open] summary {
    background: var(--primary-bg);
    border-bottom: 1px solid var(--gray-200);
}

.blog-content details summary:hover {
    background: var(--primary-bg);
}

.blog-content details>p,
.blog-content details>div {
    padding: 14px 18px;
    color: var(--gray-600);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .blog-content table {
        display: block;
        overflow-x: auto;

    }
}

/* ---- Form Validation Errors ---- */
.form-error {
    color: var(--color-error, #e74c3c);
    font-size: 0.82rem;
    margin-top: 4px;
    min-height: 0;
}

.form-error:empty {
    display: none;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--color-error, #e74c3c);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}

/* ---- Contact Reveal Buttons ---- */
.email-reveal,
.phone-reveal {
    background: none;
    border: none;
    color: var(--primary, #2563eb);
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
    text-decoration-style: dashed;
}

.email-reveal:hover,
.phone-reveal:hover {
    color: var(--primary-dark, #1d4ed8);
    text-decoration-style: solid;
}

.email-link {
    color: var(--primary, #2563eb);
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

/* ---- Category Multi-Select Dropdown ---- */
.cat-select {
    position: relative;
}

.cat-select-trigger {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.cat-select-trigger:hover {
    border-color: var(--primary, #2563eb);
}

.cat-select.open .cat-select-trigger {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.cat-select-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.cat-select-placeholder {
    color: var(--text-muted, #94a3b8);
    font-size: 0.92rem;
    padding: 2px 0;
}

.cat-select-arrow {
    color: var(--text-muted, #94a3b8);
    font-size: 0.9rem;
    margin-left: 8px;
    transition: transform 0.2s;
}

.cat-select.open .cat-select-arrow {
    transform: rotate(180deg);
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary, #2563eb);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.cat-tag-remove {
    cursor: pointer;
    opacity: 0.7;
    font-size: 0.85em;
    line-height: 1;
}

.cat-tag-remove:hover {
    opacity: 1;
}

.cat-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--primary, #2563eb);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
    z-index: 50;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cat-select.open .cat-select-dropdown {
    display: block;
}

.cat-group {
    margin-bottom: 2px;
}

.cat-group:last-child {
    margin-bottom: 0;
}

.cat-parent,
.cat-child {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s;
    -webkit-user-select: none;
    user-select: none;
}

.cat-parent {
    font-weight: 600;
}

.cat-parent:hover,
.cat-child:hover {
    background: var(--bg-light, #f1f5f9);
}

.cat-children {
    padding-left: 28px;
    border-left: 2px solid var(--border, #e2e8f0);
    margin-left: 16px;
    margin-bottom: 4px;
}

.cat-child {
    font-weight: 400;
    font-size: 0.9rem;
}

.cat-icon {
    flex-shrink: 0;
    font-size: 1.1em;
}

.cat-name {
    flex: 1;
}

.cat-badge {
    font-size: 0.72rem;
    background: var(--bg-light, #e2e8f0);
    color: var(--text-muted, #94a3b8);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.cat-used {
    opacity: 0.45;
    cursor: not-allowed;
}

.cat-used:hover {
    background: transparent;
}

.cat-parent input[type="checkbox"],
.cat-child input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--primary, #2563eb);
}