@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-green: #2E7D32;
    --primary-green-light: #4CAF50;
    --primary-green-dark: #1B5E20;
    --accent-gold: #FFB300;
    --white: #FFFFFF;
    --background: #F8FAF8;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --danger: #EF4444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(12px);
    --skeleton-bg: #e2e8f0;
}

[data-theme="dark"] {
    --background: #0B0E14;
    --white: #161B22;
    --text-dark: #F0F6FC;
    --text-muted: #8B949E;
    --border-color: #30363D;
    --glass-bg: rgba(22, 27, 34, 0.8);
    --skeleton-bg: #21262D;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--background);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header (Static & Glassmorphism) */
.main-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    background: var(--white);
}

@media (max-width: 768px) {

    .desktop-only,
    .desktop-nav {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green-dark);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

header nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

header nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

header nav a:hover {
    color: var(--primary-green);
}

/* Location Bar */
.location-bar {
    background: var(--white);
    height: 56px;
    border-bottom: 1px solid var(--border-color);
}

.location-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.location-display:hover {
    background: #f0f7f0;
    color: var(--primary-green);
}

.location-display i:first-child {
    color: var(--primary-green);
    font-size: 18px;
}

.search-container-header {
    flex: 1;
    max-width: 600px;
    margin-left: 24px;
}

.search-container-header form {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    transition: 0.3s;
}

.search-container-header form:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.search-container-header input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}

.search-container-header button {
    background: transparent;
    border: none;
    padding: 0 16px;
    color: var(--text-muted);
    cursor: pointer;
}

.search-container-header button:hover {
    color: var(--primary-green);
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-green);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid var(--primary-green);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
    flex: 1;
}

/* Masonry / Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
}

/* Skeleton Loading */
.skeleton {
    background-color: var(--skeleton-bg);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0));
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.skeleton-card {
    height: 380px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--white);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-img {
    height: 200px;
    width: 100%;
    border-radius: var(--border-radius-sm);
}

.skeleton-text {
    height: 20px;
    width: 80%;
}

.skeleton-text.short {
    width: 40%;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Added for badges */
}

.badge-wanted {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFB300 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    letter-spacing: 0.8px !important;
    display: block !important;
    border: 1px solid rgba(255, 179, 0, 0.35) !important;
}

.badge-selling {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #4CAF50 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    letter-spacing: 0.8px !important;
    display: block !important;
    border: 1px solid rgba(76, 175, 80, 0.35) !important;
}

.badge-expiring {
    position: absolute !important;
    top: 42px !important;
    left: 12px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FF9800 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    letter-spacing: 0.8px !important;
    display: flex !important;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 152, 0, 0.35) !important;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), 0 0 0 0px rgba(255, 152, 0, 0.3);
    }

    70% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), 0 0 0 6px rgba(255, 152, 0, 0);
    }

    100% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), 0 0 0 0px rgba(255, 152, 0, 0);
    }
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Standard square format */
    object-fit: cover;
    background-color: #f0f0f0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-green-dark);
    margin-bottom: 8px;
}

.product-card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-meta {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.verified-badge {
    color: #3b82f6;
    margin-left: 6px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.verified-badge i {
    background: #eff6ff;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
    border: 1px solid #bfdbfe;
}

/* Forms */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    animation: authSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes authSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    transition: border-color 0.2s;
    background: var(--background);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.password-field-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    transition: color 0.2s;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-green);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: auto;
}

/* Detail Page */
.product-detail-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-detail-image img {
    width: 100%;
    border-radius: var(--border-radius);
    object-fit: cover;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 24px;
    transition: background-color 0.2s;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

/* Mobile Bottom Nav (Premium iOS Style) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 2000;
    border-top: 0.5px solid var(--border-color);
    height: 70px;
    padding-bottom: env(safe-area-inset-bottom);
    transition: transform 0.3s cubic-bezier(0.1, 0.76, 0.55, 0.94), background 0.3s, border 0.3s;
}

.mobile-bottom-nav--hidden {
    transform: translateY(100%);
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    /* Brand-style muted color */
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    gap: 4px;
}

.mobile-bottom-nav .nav-item i {
    font-size: 22px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-green);
}

.mobile-bottom-nav .nav-item.active i {
    transform: scale(1.15);
}

/* Universal Product Post Tab (Standard Sleek Design) */
.mobile-bottom-nav .post-tab {
    position: relative;
}

.mobile-bottom-nav .post-tab i {
    font-size: 26px !important;
    color: var(--primary-green);
    opacity: 0.85;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
}

.mobile-bottom-nav .post-tab:hover i {
    transform: scale(1.1);
    opacity: 1;
}

.mobile-bottom-nav .post-tab.active i {
    opacity: 1;
    transform: scale(1.18);
}

.nav-item span {
    transition: font-weight 0.2s;
}

.nav-item.active span {
    font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    [data-theme="dark"] {
        --background: #000000;
        --white: #0A0E14;
        --border-color: #1F242C;
        --glass-bg: rgba(10, 14, 20, 0.75);
    }

    .desktop-nav {
        display: none !important;
    }

    footer {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 74px;
        /* Space for the bottom nav */
    }

    /* 2x2 grid on mobile */
    .product-grid,
    .my-ads-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .main-sticky-header {
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    }

    header {
        padding: 12px 16px;
        background: transparent !important;
        border-bottom: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .container {
        padding: 16px;
    }

    .product-card-image {
        aspect-ratio: 1 / 1;
        height: auto !important;
    }

    .product-card-price {
        font-size: 16px;
    }

    .product-card-title {
        font-size: 14px;
    }

    .location-bar {
        height: auto;
        padding: 4px 0 8px 0;
        background: transparent !important;
        border-bottom: none !important;
    }

    .location-bar .container {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start !important;
    }

    .search-container-header {
        margin-left: 0;
        width: 100%;
        max-width: none;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 24px;
}

.btn-location-action {
    width: 100%;
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-location-action:hover {
    background: var(--primary-green-dark);
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--white);
    padding: 0 12px;
    position: relative;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.city-list {
    max-height: 250px;
    overflow-y: auto;
}

.city-item {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.city-item i {
    color: var(--text-muted);
}

.city-item:hover {
    background: #f5f5f5;
    color: var(--primary-green);
}

.city-item:hover i {
    color: var(--primary-green);
}

/* Swiggy-style Pulse Locating Dot */
.location-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--primary-green, #2E7D32);
    border-radius: 50%;
    margin-right: 6px;
    animation: locationPulse 1.2s infinite ease-in-out;
    vertical-align: middle;
}

@keyframes locationPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4);
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(46, 125, 50, 0);
    }

    100% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(46, 125, 50, 0);
    }
}

/* Loader Page */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2E7D32;
    /* Primary green */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-wrapper.loader-hide {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    color: #FFFFFF;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    animation: pulse 2s infinite ease-in-out;
}

.loader-logo-img {
    max-width: 180px;
    max-height: 120px;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
    /* Force white if it's a dark logo */
    animation: pulse 2s infinite ease-in-out;
}

.loader-tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 300;
    /* Sleek Apple-style weight */
    letter-spacing: 4px;
    /* Pro tracking */
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    animation: fadeInTagline 1s forwards 0.5s;
}

@keyframes fadeInTagline {
    to {
        opacity: 1;
        transform: translateY(0);
    }

    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

@media (max-width: 480px) {
    .loader-logo {
        font-size: 32px;
    }

    .loader-logo-img {
        max-width: 140px;
    }

    .loader-tagline {
        font-size: 12px;
        letter-spacing: 2px;
    }
}

.loader-location-status {
    position: absolute;
    bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: fadeInTagline 1s forwards 0.8s;
    opacity: 0;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Tutorial System */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.tutorial-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 32px;
    max-width: 400px;
    width: 85%;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    animation: tutorialScaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutorial-icon-large {
    font-size: 54px;
    color: #22c55e;
    margin-bottom: 24px;
    display: block;
}

.tutorial-step-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.tutorial-step-desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

@keyframes tutorialScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Category Grid */
.category-section {
    margin-bottom: 32px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.category-scroll-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-item {
    text-decoration: none;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    transition: transform 0.2s;
    scroll-snap-align: start;
}

.category-item:hover {
    transform: translateY(-2px);
}

.category-item-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid transparent;
    padding: 2px;
    transition: all 0.2s;
}

.category-item-img.active {
    border-color: var(--primary-green);
}

.category-item-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 2px solid transparent;
}

.category-item-placeholder.active {
    border-color: var(--primary-green);
}

.category-item-text {
    font-size: 13px;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-item-text.active {
    font-weight: 700;
}

/* Sub-categories */
.category-l2-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 16px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

.category-l2-container::-webkit-scrollbar {
    display: none;
}

.category-l2-item {
    text-decoration: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 50px;
    background: #f0f0f0;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.category-l2-item.active {
    background: var(--primary-green);
    color: var(--white);
}

.category-l2-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

/* Toast System */
.toast-msg {
    background: var(--primary-green-dark);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* Misc UI Components */
.section-title-premium {
    color: var(--primary-green-dark);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.wishlist-icon-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.wishlist-icon-btn:hover {
    transform: scale(1.1);
}

/* Help & Support Page */
.support-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 24px;
}

.support-back-link {
    text-decoration: none;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-weight: 600;
    transition: color 0.2s;
}

.support-back-link:hover {
    color: var(--primary-green);
}

.support-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.support-channels {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.support-channel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--background);
}

.support-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f0fdf4;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.support-whatsapp-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
    background: #25D366;
    color: white;
    transition: transform 0.2s, opacity 0.2s;
    border: none;
}

.support-whatsapp-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: white;
}

.support-social-section {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
    text-align: center;
}

.support-social-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.support-social-icon {
    font-size: 32px;
    transition: transform 0.2s;
    text-decoration: none;
}

.support-social-icon:hover {
    transform: scale(1.2);
}

/* Profile Page */
/* Profile Page Improvements */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
}

.profile-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.profile-avatar {
    cursor: pointer;
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 16px auto;
    transition: transform 0.3s;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-green);
    box-shadow: var(--shadow-sm);
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.profile-avatar-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--primary-green);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-info-side {
    text-align: center;
    flex: 0 0 300px;
}

.profile-actions-side {
    flex: 1;
}

@media (min-width: 768px) {
    .profile-card {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .profile-info-side {
        border-right: 1px solid #f1f5f9;
        padding-right: 40px;
        text-align: center;
    }

    .profile-actions-side {
        padding-left: 20px;
    }
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

@media (min-width: 992px) {
    .profile-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.profile-menu-item {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.profile-menu-item:hover {
    background: #ffffff;
    border-color: var(--primary-green);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.profile-menu-icon {
    width: 44px;
    height: 44px;
    background: #f0fdf4;
    color: var(--primary-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.profile-menu-item:hover .profile-menu-icon {
    background: var(--primary-green);
    color: white;
}

/* Alerts */
.alert-success-light {
    background: #e8f5e9;
    color: var(--primary-green-dark);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-danger-light {
    background: #ffebee;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Post Ad Form */
.form-container-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.type-btn-label {
    flex: 1;
    cursor: pointer;
}

.type-btn-box {
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #eee;
    text-align: center;
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 700;
    transition: all 0.3s;
}

.type-btn-box.active-sell {
    border-color: var(--primary-green);
    background: #e8f5e9;
    color: var(--primary-green);
}

.type-btn-box.active-buy {
    border-color: #ffb300;
    background: #fff8e1;
    color: #ff8f00;
}

.contact-options-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.toggle-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

input[type="checkbox"]:checked+.toggle-btn {
    background: var(--primary-green);
    color: white !important;
    border-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.location-detect-wrapper {
    display: flex;
    gap: 8px;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: var(--primary-green);
    background: #f0fdf4;
}

.upload-icon {
    font-size: 32px;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.upload-text {
    color: var(--text-dark);
    font-weight: 500;
}

.upload-subtext {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item.is-cover {
    border-color: var(--primary-green);
}

.cover-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary-green);
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
    display: none;
}

.preview-item.is-cover .cover-badge {
    display: block;
}

.order-num {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Verified Badge Styles */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #3897f0;
    /* Instagram/Twitter blue */
    color: white;
    border-radius: 50%;
    font-size: 10px;
    margin-left: 4px;
    vertical-align: middle;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.verified-badge i {
    transform: translateY(0px);
}

.verified-tag-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #bae6fd;
}

/* Premium Empty State */
.empty-state-premium {
    text-align: center;
    padding: 80px 24px;
    background: var(--white);
    border-radius: 32px;
    box-shadow: var(--shadow-sm);
    margin: 40px 0;
}

.empty-illustration {
    width: 120px;
    height: 120px;
    background: var(--background);
    color: #94a3b8;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 32px;
    transform: rotate(-10deg);
}

.empty-state-premium h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.empty-state-premium p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.btn-premium-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white !important;
    padding: 16px 32px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.2);
    transition: all 0.3s;
}

.btn-premium-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(46, 125, 50, 0.3);
}

/* New Utility & Component Classes */
.section-title-premium {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
}

.btn-clear-filter {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn-clear-filter:hover {
    opacity: 0.8;
}

.category-placeholder-icon {
    font-size: 24px;
    color: #94a3b8;
}

.empty-state-card {
    text-align: center;
    padding: 60px 32px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    margin: 40px 0;
}

.empty-state-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

.mt-16 {
    margin-top: 16px !important;
}

.placeholder-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9 !important;
}

.placeholder-icon {
    font-size: 40px;
    color: #cbd5e1 !important;
}

.wishlist-icon-btn i.active {
    color: var(--primary-green) !important;
}

.wishlist-icon-btn i:not(.active) {
    color: #94a3b8 !important;
}

.meta-icon-sm {
    font-size: 10px;
}

.distance-badge {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 11px;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 6px;
}

/* ==========================================
   PRODUCT DETAIL PAGE STYLES
   ========================================== */
.product-page-premium {
    background: var(--background);
    padding: 30px 0 100px;
    min-height: 100vh;
}

.premium-breadcrumbs {
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.premium-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.premium-breadcrumbs i {
    font-size: 10px;
    margin: 0 8px;
    opacity: 0.5;
}

.product-main-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    align-items: start;
}

.main-gallery-wrapper {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4/3;
}

.image-carousel-premium {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 100%;
    scrollbar-width: none;
}

.image-carousel-premium::-webkit-scrollbar {
    display: none;
}

.carousel-item-premium {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
}

.carousel-item-premium img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    background: var(--background);
}

.badge-type {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 800;
    font-size: 12px;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.badge-type.status-buy {
    background: linear-gradient(135deg, #FFB300 0%, #FF8F00 100%);
}

.badge-type.status-sell {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.carousel-counter-premium {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.carousel-nav-btns {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    pointer-events: none;
}

.carousel-nav-btns button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s;
}

.carousel-nav-btns button:hover {
    transform: scale(1.1);
    background: var(--primary-green);
    color: white;
}

.thumbnail-grid-premium {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumb-item {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: all 0.2s;
}

.thumb-item:hover {
    border-color: var(--primary-green);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.description-card-premium {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 32px;
    margin-top: 40px;
    box-shadow: var(--shadow-sm);
}

.description-card-premium h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.description-content {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 16px;
}

.sticky-info-card {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

.price-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.price-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 4px;
    display: block;
}

.price-value {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-green-dark);
    margin: 0;
    letter-spacing: -1.5px;
}

.info-actions {
    display: flex;
    gap: 12px;
}

.action-circle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-circle-btn.wishlist.active {
    color: var(--primary-green);
    border-color: var(--primary-green);
    background: #f0fdf4;
}

.action-circle-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

.product-title-premium {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.4;
}

.meta-tags-premium {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.meta-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--background);
    padding: 8px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.meta-tag:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.meta-tag i {
    color: var(--primary-green);
    margin-right: 6px;
}

.verified-banner-premium {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.v-icon {
    font-size: 24px;
    color: #1d4ed8;
}

.v-text strong {
    display: block;
    font-size: 15px;
    color: #1e3a8a;
}

.v-text span {
    font-size: 13px;
    color: #3b82f6;
}

.seller-card-premium {
    background: var(--background);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
}

.seller-info-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.seller-avatar,
.seller-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

.seller-names h4 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.seller-names p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

.contact-btns-grid {
    display: flex;
    gap: 10px;
}

.btn-chat-primary {
    flex: 1;
    background: var(--primary-green);
    color: white !important;
    text-decoration: none;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    gap: 10px;
    transition: all 0.3s;
}

.btn-chat-primary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-3px);
}

.btn-edit-ad {
    width: 100%;
    background: var(--background);
    color: var(--text-dark) !important;
    text-decoration: none;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    gap: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.btn-edit-ad:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-whatsapp,
.btn-phone {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white !important;
    text-decoration: none;
}

.btn-whatsapp {
    background: #25D366;
}

.btn-phone {
    background: #0F172A;
}

.safety-tips-premium {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.safety-tips-card {
    background: #fff9f0;
    border: 1px solid #ffedd5;
    border-radius: 16px;
    padding: 20px;
}

.safety-tips-card h4 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #9a3412;
    display: flex;
    align-items: center;
    gap: 8px;
}

.safety-tips-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.safety-tips-card li {
    font-size: 13px;
    color: #c2410c;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-report-link {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.description-section-fullwidth {
    grid-column: 1 / -1;
}

@media (max-width: 992px) {
    .product-main-layout {
        grid-template-columns: 1fr;
    }

    .sticky-info-card {
        position: relative;
        top: 0;
    }

    .description-section-fullwidth {
        order: 3;
    }

    .product-media-section {
        order: 1;
    }

    .product-info-section {
        order: 2;
    }
}

@media (max-width: 768px) {
    .main-gallery-wrapper {
        border-radius: 0;
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }

    .product-page-premium {
        padding-top: 0;
    }

    .premium-breadcrumbs {
        display: none;
    }

    .price-value {
        font-size: 28px;
    }

    .description-card-premium {
        padding: 24px;
        margin-top: 20px;
    }
}

/* Lightbox Premium */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.98);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-gallery {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.lightbox-gallery::-webkit-scrollbar {
    display: none;
}

.lightbox-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    padding: 40px;
}

.lightbox-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    z-index: 20002;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
    z-index: 20001;
}

.lightbox-nav button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 20px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.lightbox-nav button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    backdrop-filter: blur(5px);
    font-size: 14px;
    z-index: 20001;
}

.status-warning-banner-premium {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeInDown 0.5s ease;
}

.status-warning-banner-premium .banner-icon {
    width: 50px;
    height: 50px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.status-warning-banner-premium .banner-text h3 {
    font-size: 18px;
    font-weight: 800;
    color: #991b1b;
    margin: 0;
}

.status-warning-banner-premium .banner-text p {
    color: #b91c1c;
    font-weight: 500;
    font-size: 14px;
    margin: 4px 0 0 0;
}

.btn-banner-action {
    margin-left: auto;
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid #fee2e2;
    border-radius: 12px;
    text-decoration: none;
    color: #991b1b;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-banner-action:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   POST AD / EDIT AD PAGE STYLES
   ========================================== */
.alert-danger-premium {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-danger-premium::before {
    content: '\f06a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.alert-success-premium {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #166534;
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-ad-page-premium {
    padding: 40px 0 100px;
    background: var(--background);
}

.stepper-wrapper-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 50px;
}

.stepper-wrapper-premium .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: 0.3s;
}

.stepper-wrapper-premium .step.active {
    opacity: 1;
}

.stepper-wrapper-premium .dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--text-dark);
    border: 2px solid transparent;
}

.stepper-wrapper-premium .step.active .dot {
    background: var(--primary-green);
    color: white;
    border-color: #f0fdf4;
}

.stepper-wrapper-premium .step span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stepper-wrapper-premium .step-line {
    flex: 0 0 40px;
    height: 2px;
    background: #E2E8F0;
    margin-bottom: 24px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.form-section-premium {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.section-num {
    width: 28px;
    height: 28px;
    background: var(--primary-green);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
}

.form-grid-premium {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.full-width {
    grid-column: span 2;
}

.premium-input,
.premium-select,
.premium-textarea {
    width: 100%;
    background: #F8FAFC;
    border: 2px solid #F1F5F9;
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text-dark);
    transition: 0.3s;
}

.premium-input:focus {
    border-color: var(--primary-green);
    background: var(--white);
    outline: none;
}

.type-button-group {
    display: flex;
    background: #F1F5F9;
    padding: 6px;
    border-radius: 18px;
    gap: 6px;
}

.type-btn {
    flex: 1;
    cursor: pointer;
}

.type-btn input {
    display: none;
}

.type-btn .btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s;
}

.type-btn input:checked+.btn-content {
    background: var(--white);
    color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-actions-premium {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
}

.btn-next-premium,
.btn-post-premium {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-back-premium {
    background: #E2E8F0;
    color: var(--text-dark);
    border: none;
    padding: 16px 30px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
}

.premium-contact-toggles {
    display: flex;
    gap: 12px;
}

.contact-toggle {
    flex: 1;
    cursor: pointer;
}

.contact-toggle input {
    display: none;
}

.toggle-box {
    padding: 14px;
    background: #F8FAFC;
    border: 2px solid #F1F5F9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    color: #64748B;
    transition: 0.3s;
}

.contact-toggle input:checked+.toggle-box.whatsapp {
    border-color: #25D366;
    background: #F0FDF4;
    color: #166534;
}

.contact-toggle input:checked+.toggle-box.phone {
    border-color: var(--primary-green);
    background: #F0FDF4;
    color: var(--primary-green);
}

.perishable-warning-premium {
    background: #FFF7ED;
    border: 2px solid #FFEDD5;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: center;
}

.warning-icon {
    width: 48px;
    height: 48px;
    background: #FFEDD5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #9A3412;
}

.warning-content h4 {
    color: #9A3412;
    font-weight: 800;
    margin-bottom: 4px;
    font-size: 16px;
}

.premium-location-wrapper {
    display: flex;
    gap: 10px;
}

.location-input-box {
    flex: 1;
    position: relative;
}

.location-input-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-green);
}

.premium-input.with-icon {
    padding-left: 45px;
}

.btn-detect-premium {
    padding: 0 20px;
    background: #F1F5F9;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: 0.3s;
}

.upload-area-premium {
    border: 2px dashed #E2E8F0;
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.photo-management-side-wise {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--background);
    border-radius: 24px;
    border: 2px dashed #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.image-preview-side-container {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.photo-management-side-wise::-webkit-scrollbar {
    display: none;
}

.add-photo-btn-card {
    min-width: 110px;
    height: 110px;
    background: var(--white);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: 2px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    flex-shrink: 0;
}

.add-photo-btn-card:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: #f0fdf4;
    transform: scale(0.98);
}

.preview-item {
    width: 110px;
    height: 110px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--white);
    border: 2px solid white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-green);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.preview-item:hover img {
    transform: scale(1.1);
}

.delete-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 800;
    backdrop-filter: blur(4px);
    background: rgba(239, 68, 68, 0.7);
    z-index: 5;
}

.preview-item.marked-delete .delete-overlay {
    display: flex;
}

.preview-item.marked-delete {
    border-color: #EF4444;
    transform: scale(0.95);
    opacity: 0.8;
}

.post-success-card {
    background: var(--white);
    border-radius: 40px;
    padding: 80px 40px;
    text-align: center;
    max-width: 650px;
    margin: 60px auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.success-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #f0fdf4;
    border-radius: 50%;
    animation: ringPulse 2s infinite;
}

.success-bounce {
    font-size: 80px;
    color: var(--primary-green);
    position: relative;
    z-index: 2;
    animation: iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.success-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-manage-premium,
.btn-home-premium {
    padding: 16px 32px;
    border-radius: 18px;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-manage-premium {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
}

.btn-manage-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.3);
}

.btn-home-premium {
    background: var(--background);
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
}

.btn-home-premium:hover {
    background: var(--background);
    transform: translateY(-3px);
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes iconBounce {
    0% {
        transform: scale(0);
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-success {
    animation: fadeInScale 0.6s ease-out;
}


.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.premium-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Inbox & Messages */
.inbox-wrapper-premium {
    padding: 40px 0;
    background: var(--background);
    min-height: 100vh;
}

.inbox-container {
    max-width: 800px;
    margin: 0 auto;
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.inbox-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.inbox-header p {
    color: var(--text-muted);
    margin: 5px 0 0 0;
    font-weight: 600;
}

.pulse-badge {
    background: #fef2f2;
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid #fee2e2;
    animation: subtlePulse 2s infinite;
}

@keyframes subtlePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.conversations-list {
    background: var(--white);
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.conv-row {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
}

.conv-row:last-child {
    border-bottom: none;
}

.conv-row:hover {
    background: var(--background);
}

.conv-row.unread {
    background: #f0fdf4;
}

.conv-row.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-green);
}

.user-avatar,
.user-avatar-initials {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    object-fit: cover;
    flex-shrink: 0;
}

.user-avatar-initials {
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

.conv-avatar-group {
    position: relative;
}

.unread-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #ef4444;
    border: 3px solid white;
    border-radius: 50%;
}

.conv-main-info {
    flex: 1;
    min-width: 0;
}

.conv-top-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.username {
    font-weight: 800;
    font-size: 16px;
    color: var(--text-dark);
}

.time {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-green);
    background: #f0fdf4;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.last-message-snippet {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.unread .last-message-snippet {
    color: var(--text-dark);
    font-weight: 700;
}

.you-prefix {
    color: #94a3b8;
    font-weight: 700;
}

.conv-product-thumb {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--background);
    border: 1px solid var(--border-color);
}

.conv-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #cbd5e1;
}

.empty-inbox-state {
    text-align: center;
    padding: 100px 40px;
    background: var(--white);
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.empty-illustration {
    width: 100px;
    height: 100px;
    background: #f0fdf4;
    color: var(--primary-green);
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.empty-inbox-state h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.empty-inbox-state p {
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto 30px;
    font-weight: 500;
}

.btn-browse-premium {
    display: inline-block;
    padding: 16px 32px;
    background: var(--primary-green);
    color: white;
    text-decoration: none;
    border-radius: 18px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
    transition: 0.3s;
}

.btn-browse-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.3);
}

@media (max-width: 600px) {
    .conv-product-thumb {
        display: none;
    }

    .inbox-wrapper-premium {
        padding: 20px 0;
    }

    .conv-row {
        padding: 16px;
    }

    .user-avatar,
    .user-avatar-initials {
        width: 50px;
        height: 50px;
    }
}

/* Chat & Real-time Messaging */
.chat-page-wrapper {
    position: fixed;
    top: 110px;
    /* Header + Location Bar height on desktop */
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.chat-main-container {
    max-width: 900px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-window-premium {
    background: var(--white);
    border-radius: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.chat-header-premium {
    padding: 16px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.chat-header-premium .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--background);
    text-decoration: none;
    transition: 0.3s;
}

.back-btn:hover {
    background: var(--background);
    color: var(--text-dark);
}

.user-info-chat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar,
.header-avatar-initials {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    object-fit: cover;
}

.header-avatar-initials {
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 800;
    color: var(--text-dark);
    font-size: 16px;
}

.online-status {
    font-size: 12px;
    color: var(--primary-green);
    font-weight: 700;
}

.btn-chat-action.delete {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: #fff1f2;
    color: #e11d48;
    cursor: pointer;
    transition: 0.3s;
}

.btn-chat-action.delete:hover {
    background: #ffe4e6;
    transform: scale(1.05);
}

/* Product Bar Styling */
.product-context-bar {
    padding: 12px 24px;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-mini-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-mini-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.product-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-mini-text {
    display: flex;
    flex-direction: column;
}

.mini-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-price {
    font-weight: 800;
    font-size: 13px;
    color: var(--primary-green);
}

.btn-view-ad-chat {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-dark);
    transition: 0.3s;
}

.btn-view-ad-chat:hover {
    background: var(--background);
    border-color: #cbd5e1;
}

/* Messages Styling */
.messages-area {
    flex: 1;
    min-height: 0;
    /* Crucial flexbox scroll fix */
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--white);
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 200px 20px;
    -webkit-overflow-scrolling: touch;
}

.message-row {
    display: flex;
    width: 100%;
}

.msg-me {
    justify-content: flex-end;
}

.msg-other {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.msg-me .message-bubble {
    background: var(--primary-green);
    color: white;
    border-bottom-right-radius: 4px;
}

.msg-other .message-bubble {
    background: var(--background);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    word-break: break-word;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    opacity: 0.7;
}

.msg-time {
    font-size: 10px;
    font-weight: 600;
}

.msg-status {
    font-size: 10px;
}

/* Input Area Styling */
.chat-input-area {
    padding: 20px 24px;
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

.input-wrapper-premium {
    background: var(--background);
    border-radius: 20px;
    padding: 6px 6px 6px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.input-wrapper-premium:focus-within {
    background: var(--white);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.input-wrapper-premium input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
}

.btn-send-chat {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-green);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
    flex-shrink: 0;
}

.btn-send-chat:hover {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

/* Loading & Empty States */
.loading-messages,
.empty-chat-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
}

.chat-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.empty-chat-icon {
    font-size: 48px;
    color: #f1f5f9;
    margin-bottom: 16px;
}

.empty-chat-state h3 {
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 8px;
}

.empty-chat-state p {
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 768px) {

    /* Prevent page-level scroll and double-scroll bugs */
    body.chat-page-body {
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    body.chat-page-body .main-sticky-header {
        display: none !important;
    }

    body.chat-page-body .chat-page-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: calc(70px + env(safe-area-inset-bottom)) !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.chat-page-body .chat-main-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    .chat-page-wrapper {
        position: fixed;
        top: 110px;
        /* Fallback top position if not locked to top */
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0;
    }

    .chat-main-container {
        height: 100%;
        min-height: 0;
    }

    .chat-window-premium {
        border-radius: 0;
        border: none;
        height: 100%;
        min-height: 0;
    }

    .chat-header-premium {
        padding: 12px 16px !important;
    }

    .product-context-bar {
        padding: 10px 16px !important;
    }

    .messages-area {
        padding: 16px !important;
        gap: 12px !important;
    }

    .chat-input-area {
        padding: 12px 16px !important;
    }

    .input-wrapper-premium {
        padding: 4px 4px 4px 16px !important;
        gap: 8px !important;
    }

    .message-bubble {
        max-width: 85%;
        padding: 10px 14px !important;
    }

    .mini-title {
        max-width: 120px;
    }
}

/* Microphone & Voice Note Chat Premium UI */
.btn-mic-chat {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted, #64748b);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.btn-mic-chat:hover {
    color: var(--primary-green);
    background: rgba(34, 197, 94, 0.08);
    transform: scale(1.08);
}

.btn-mic-chat.recording-active {
    background: #ef4444 !important;
    color: white !important;
    animation: recordingBtnPulse 1.2s infinite alternate !important;
}

@keyframes recordingBtnPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    100% {
        transform: scale(1.08);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.recording-status-premium {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: #ef4444;
    font-weight: 700;
    font-size: 15px;
}

.recording-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    display: inline-block;
}

.recording-dot.animate-pulse {
    animation: voicePulse 1s infinite alternate;
}

@keyframes voicePulse {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.recording-timer {
    font-family: monospace;
    font-size: 16px;
    color: var(--text-dark, #1e293b);
}

.recording-label {
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.btn-cancel-rec {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
    padding: 8px;
    transition: transform 0.2s;
}

.btn-cancel-rec:hover {
    transform: scale(1.1);
}

/* Custom Audio Note Player bubble styles */
.message-audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    max-width: 300px;
    padding: 6px 4px;
}

.audio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.msg-me .audio-play-btn {
    background: var(--white);
    color: var(--primary-green);
}

.msg-other .audio-play-btn {
    background: var(--primary-green);
    color: var(--white);
}

.audio-play-btn:active {
    transform: scale(0.95);
}

.audio-waveform-wrapper {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    position: relative;
}

.msg-me .audio-waveform-wrapper {
    background: rgba(255, 255, 255, 0.35);
}

.msg-other .audio-waveform-wrapper {
    background: rgba(0, 0, 0, 0.1);
}

.audio-track-wave {
    width: 100%;
    height: 100%;
    border-radius: 2px;
}

.audio-progress-wave {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 2px;
}

.msg-me .audio-progress-wave {
    background: var(--white);
}

.msg-other .audio-progress-wave {
    background: var(--primary-green);
}

.audio-duration-tag {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.8;
}

/* Premium Chat Image Attachment Styles */
.message-image-wrapper {
    display: block;
    margin: 6px 0;
}

.message-chat-image {
    max-width: 220px;
    max-height: 160px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-chat-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.msg-other .message-chat-image {
    border-color: rgba(0, 0, 0, 0.05);
}

.chat-disabled-banner i {
    animation: alertPulse 2.5s infinite ease-in-out;
}

@keyframes alertPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* WhatsApp-style Image Grid & Collage in Web Chat */
.message-bubble-images.message-bubble {
    padding: 3px;
    background: transparent !important;
    box-shadow: none;
    border: none;
}

.msg-me .message-bubble-images.message-bubble {
    background: var(--primary-green) !important;
    border-radius: 20px;
    border-bottom-right-radius: 4px;
}

.msg-other .message-bubble-images.message-bubble {
    background: var(--background) !important;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color) !important;
}

.message-bubble-images .message-meta {
    padding-right: 8px;
    padding-bottom: 4px;
    padding-top: 2px;
}

.chat-image-single {
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
}

.chat-image-single .message-chat-image {
    max-width: 280px;
    max-height: 200px;
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.chat-image-grid {
    display: grid;
    gap: 4px;
    border-radius: 14px;
    overflow: hidden;
    width: 280px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
}

/* 2 columns layout */
.chat-image-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    height: 140px;
}

.chat-image-grid.grid-2 .grid-item {
    width: 100%;
    height: 100%;
}

.chat-image-grid.grid-2 .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

/* 3 images: 1 large left, 2 stacked right */
.chat-image-grid.grid-3 {
    display: flex;
    height: 180px;
    gap: 4px;
}

.chat-image-grid.grid-3 .grid-left {
    flex: 1.2;
    height: 100%;
    overflow: hidden;
}

.chat-image-grid.grid-3 .grid-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

.chat-image-grid.grid-3 .grid-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
}

.chat-image-grid.grid-3 .grid-right .grid-sub-item {
    flex: 1;
    height: 50%;
    overflow: hidden;
}

.chat-image-grid.grid-3 .grid-right .grid-sub-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

/* 4 or more images: 2x2 grid */
.chat-image-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 200px;
}

.chat-image-grid.grid-4 .grid-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.chat-image-grid.grid-4 .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

/* Overlay for the 4th item when > 4 images */
.chat-image-grid .grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 750;
    backdrop-filter: blur(2px);
}

/* Fullscreen Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInWeb 0.25s ease-out;
}

@keyframes fadeInWeb {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 85%;
}

.lightbox-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lightbox-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomInWeb 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomInWeb {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1010;
    opacity: 0.8;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 1010;
    user-select: none;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-nav-btn.prev {
    left: 20px;
}

.lightbox-nav-btn.next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 16px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }

    .lightbox-nav-btn.prev {
        left: 10px;
    }

    .lightbox-nav-btn.next {
        right: 10px;
    }

    .chat-image-grid {
        width: 220px;
    }

    .chat-image-grid.grid-2 {
        height: 110px;
    }

    .chat-image-grid.grid-3 {
        height: 140px;
    }

    .chat-image-grid.grid-4 {
        height: 160px;
    }
}