/* 
 * SIAMPR - Premium Luxury Marketplace Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
    /* Light Theme Palette */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --primary: #0f172a; /* Deep Blue Dark */
    --accent: #e55300; /* Ennxo Brand Copper Orange */
    --accent-glow: rgba(229, 83, 0, 0.2);
    --accent-gold: #d4af37; /* Luxury Gold */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Navbar & Hero Light variables */
    --navbar-bg: #ffffff;
    --navbar-text: #111111;
    --navbar-border: rgba(229, 83, 0, 0.25);
    --hero-bg: linear-gradient(135deg, #111827 0%, #030712 100%);
    --hero-text: #ffffff;
    --hero-desc: rgba(255, 255, 255, 0.75);
}

/* Class-based Dark Theme Triggers */
body.dark-theme {
    --bg-base: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --primary: #d4af37;
    --accent-gold: #ffd700; /* Vibrant Gold for Dark Theme */
    --border-color: #374151;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);

    /* Navbar & Hero Dark variables */
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
    --navbar-border: rgba(229, 83, 0, 0.2);
    --hero-bg: linear-gradient(135deg, #09090b, #020202);
    --hero-text: #ffffff;
    --hero-desc: rgba(255, 255, 255, 0.7);
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
    transition: var(--transition-smooth);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.luxury-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--accent);
}

/* Premium Header styling */
.navbar-siampr {
    background-color: var(--navbar-bg) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--navbar-border);
    transition: var(--transition-smooth);
}

.navbar-siampr .nav-link {
    color: var(--navbar-text) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 1rem;
    transition: var(--transition-smooth);
}

.navbar-siampr .logo-text {
    color: var(--navbar-text) !important;
    transition: var(--transition-smooth);
}

.navbar-siampr .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.navbar-siampr .nav-link:hover::after,
.navbar-siampr .nav-link.active::after {
    width: 80%;
}

.navbar-siampr .nav-link:hover {
    color: var(--accent) !important;
}

/* Luxury Gold Badge */
.gold-badge {
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    color: #111827;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Mega Hero Section */
.hero-slider {
    position: relative;
    height: 38vh;
    min-height: 280px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/premium-marketplace-banner.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: var(--transition-smooth);
}

body.dark-theme .hero-slider {
    background-image: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('../img/premium-marketplace-banner.jpg');
}

.hero-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Premium Card Components */
.premium-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.premium-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 66%; /* 3:2 Ratio */
}

.premium-card .card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.premium-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.premium-card .card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

/* Skeleton Loading Template */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface-elevated) 25%, var(--border-color) 50%, var(--bg-surface-elevated) 75%);
    background-size: 200% 100%;
    animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* Premium Dashboard Sidebars */
.dashboard-sidebar {
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 70px);
}

.dashboard-sidebar .list-group-item {
    background: transparent;
    color: var(--text-primary);
    border: none;
    font-weight: 500;
    padding: 0.85rem 1.5rem;
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
}

.dashboard-sidebar .list-group-item:hover,
.dashboard-sidebar .list-group-item.active {
    background-color: var(--bg-surface-elevated);
    color: var(--accent) !important;
    border-left-color: var(--accent);
}

/* Footer structure styling */
.footer-siampr {
    background-color: #0b0f19;
    color: #94a3b8;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.footer-siampr h5 {
    color: #ffffff;
}

.footer-siampr a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-siampr a:hover {
    color: var(--accent);
}

/* ENNXO Circular Categories & Product Animations */
.premium-circle-category {
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.group-category:hover .premium-circle-category {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    border-color: var(--accent) !important;
}
.text-category-name {
    transition: var(--transition-smooth);
}
.group-category:hover .text-category-name {
    color: var(--accent) !important;
}

/* Product Cards ENNXO Style */
.group-product {
    transition: var(--transition-smooth);
}
.group-product-hover-zoom {
    transition: var(--transition-smooth);
}
.group-product:hover .group-product-hover-zoom {
    transform: scale(1.08);
}
.hover-warning {
    transition: var(--transition-smooth);
}
.hover-warning:hover {
    color: var(--accent) !important;
}
.bg-gradient-transparent {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}
.text-muted-50 {
    color: rgba(148, 163, 184, 0.7);
}

/* ENNXO category pills */
.category-pill {
    white-space: nowrap;
    transition: var(--transition-smooth);
}
.category-pill:hover, .category-pill.active {
    background-color: var(--accent) !important;
    color: #111827 !important;
    border-color: var(--accent) !important;
}

/* Custom premium scrollbar for horizontal scrolling containers */
.scroll-container::-webkit-scrollbar {
    height: 6px;
}
.scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}
.scroll-container {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.05);
}

/* Autocomplete & Dropdowns adaptation */
.navbar-siampr #autocomplete-search {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
.navbar-siampr #autocomplete-search::placeholder {
    color: var(--text-muted) !important;
}
.navbar-siampr #autocomplete-suggestions {
    background-color: var(--bg-surface) !important;
    border-color: var(--border-color) !important;
}
.navbar-siampr #autocomplete-suggestions .list-group-item {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
.navbar-siampr #autocomplete-suggestions .list-group-item:hover {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--accent) !important;
}

/* Override language switcher / user menus and custom buttons */
.navbar-siampr .btn-outline-light {
    color: var(--navbar-text) !important;
    border-color: var(--navbar-border) !important;
}
.navbar-siampr .btn-outline-light:hover {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}
.dropdown-menu {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.5rem !important;
}
.dropdown-menu .dropdown-item {
    color: var(--text-primary) !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.88rem;
}
.dropdown-menu .dropdown-item:hover {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--accent) !important;
}

/* Premium Navigation Dropdown enhancements */
.menu-icon-wrapper {
    width: 28px;
    height: 28px;
    background-color: var(--bg-surface-elevated);
    color: var(--text-secondary);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: var(--transition-smooth);
    font-size: 0.8rem;
}
.dropdown-item:hover .menu-icon-wrapper {
    background-color: var(--accent-glow);
    color: var(--accent) !important;
}
body.dark-theme .menu-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Premium Form Controls with micro-interactions */
.premium-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.premium-input-group .input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    pointer-events: none;
    font-size: 0.95rem;
    z-index: 5;
}
.premium-input-group .form-control,
.premium-input-group .form-select {
    padding-left: 46px !important;
    border-radius: 14px !important;
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    transition: var(--transition-smooth) !important;
    height: 48px;
}
.premium-input-group textarea.form-control {
    height: auto;
    padding-top: 12px;
}
.premium-input-group .form-control:focus,
.premium-input-group .form-select:focus {
    background-color: var(--bg-surface) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px var(--accent-glow) !important;
}
.premium-input-group .form-control:focus + .input-icon,
.premium-input-group .form-select:focus + .input-icon,
.premium-input-group .form-control:focus ~ .input-icon,
.premium-input-group .form-select:focus ~ .input-icon {
    color: var(--accent);
}
.profile-card-glow {
    transition: var(--transition-smooth);
}
.profile-card-glow:hover {
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.08) !important;
}

/* SiamPR Custom Premium Toast System */
.siampr-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.siampr-toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #000000 !important;
    animation: siamprSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: transform 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.siampr-toast.success {
    background-color: #22c55e !important; /* Premium green */
}
.siampr-toast.danger, .siampr-toast.error {
    background-color: #fca5a5 !important; /* Light red */
}
.siampr-toast.warning {
    background-color: #fde047 !important; /* Premium light yellow */
}
.siampr-toast.info {
    background-color: #93c5fd !important; /* Premium light blue */
}
.siampr-toast .toast-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000 !important;
}
.siampr-toast .toast-message {
    flex: 1;
    color: #000000 !important;
    line-height: 1.4;
}
.siampr-toast .toast-close {
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.siampr-toast .toast-close:hover {
    color: #000000 !important;
}
.siampr-toast.siampr-toast-fadeout {
    animation: siamprSlideOut 0.35s ease forwards;
}

@keyframes siamprSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes siamprSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ENNXO Redesign Elements */
.ennxo-primary {
    color: #e55300 !important;
}
.ennxo-bg-primary {
    background-color: #e55300 !important;
}
.ennxo-border-primary {
    border-color: #e55300 !important;
}

.home-cat-pill.active {
    background-color: #e55300 !important;
    color: #ffffff !important;
    border-color: #e55300 !important;
}
.home-cat-pill.active i {
    color: #ffffff !important;
}

/* Dynamic filter transitions */
.listing-fade-enter {
    opacity: 0;
    transform: translateY(10px);
}
.listing-fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Custom premium card design (Ennxo style) */
.ennxo-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}
.ennxo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(229, 83, 0, 0.12);
    border-color: #e55300;
}
.ennxo-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #e55300;
}
.ennxo-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ennxo-card-location {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Search bar styling */
.ennxo-search-btn {
    background: #e55300;
    color: #ffffff;
    border: none;
    transition: all 0.2s ease;
}
.ennxo-search-btn:hover {
    background: #c84800;
    color: #ffffff;
}
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}


