/* Modern Sidebar & Grid Layout (Black / Maroon / Brass Aesthetic) */
body {
    background-color: #050505 !important; /* Pure Dark/Black Background */
}

.modern-layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: flex-start;
}

/* Deep Maroon & Brass theme basics */
:root {
    --mc-maroon: #2A0A0A;
    --mc-maroon-light: #4A1212;
    --mc-maroon-dark: #120303;
    --mc-brass: #C5A059;
    --mc-brass-light: #E8D399;
    --mc-brass-dark: #8B6B32;
    --mc-text-muted: #A89B85;
}

/* Sidebar Styling */
.modern-sidebar {
    flex: 0 0 280px;
    background: linear-gradient(145deg, var(--mc-maroon) 0%, rgba(10,10,10,0.9) 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(197, 160, 89, 0.15); /* Faint Brass Border */
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--mc-brass);
    font-size: 18px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.filter-reset {
    color: var(--mc-text-muted);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
}
.filter-reset:hover { color: #FFF; }

.filter-group {
    margin-bottom: 25px;
    font-family: 'Kanit', sans-serif;
}
.filter-group label {
    display: block;
    color: var(--mc-text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}
.filter-select {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--mc-maroon-light);
    color: var(--mc-brass-light);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/200.svg' width='12' height='12' fill='%23C5A059' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    transition: all 0.3s ease;
}
.filter-select:focus { outline: none; border-color: var(--mc-brass); box-shadow: 0 0 10px rgba(197, 160, 89, 0.2); }

.btn-apply-filter {
    width: 100%;
    background: linear-gradient(135deg, #701010, #3d0505);
    color: var(--mc-brass-light);
    padding: 14px;
    border: 1px solid var(--mc-maroon-light);
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-apply-filter:hover { 
    background: linear-gradient(135deg, #901515, #5e0808); 
    box-shadow: 0 5px 15px rgba(112, 16, 16, 0.4);
}

.filter-tip {
    background: rgba(197, 160, 89, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.15);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    color: var(--mc-text-muted);
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    gap: 10px;
    font-family: 'Kanit', sans-serif;
}
.filter-tip i { color: var(--mc-brass); padding-top: 3px; }


/* Main Content Grid */
.modern-main {
    flex: 1;
}
.modern-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    gap: 15px;
    align-items: center;
}
.modern-toolbar-left {
    display: flex; gap: 10px; flex: 1;
    overflow-x: auto;
    padding-bottom: 5px;
}
.modern-toolbar-left::-webkit-scrollbar { height: 4px; }
.modern-toolbar-left::-webkit-scrollbar-thumb { background: var(--mc-maroon-light); border-radius: 4px; }

.tab-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px; font-family: 'Kanit', sans-serif;
    background: rgba(0,0,0,0.6);
    color: var(--mc-text-muted);
    border: 1px solid var(--mc-maroon-light);
    text-decoration: none; 
    transition: all 0.3s;
    white-space: nowrap;
}
.tab-btn:hover {
    border-color: var(--mc-brass);
    color: var(--mc-brass-light);
}
.tab-btn.active {
    background: linear-gradient(135deg, #701010, #3d0505);
    color: var(--mc-brass-light); 
    font-weight: 600;
    border-color: #701010;
    box-shadow: 0 4px 10px rgba(112, 16, 16, 0.3);
}

.modern-toolbar-right {
    display: flex; align-items: center; gap: 15px;
    color: var(--mc-text-muted); font-size: 14px; font-family: 'Prompt';
}
.sort-select {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--mc-maroon-light);
    color: var(--mc-brass);
    padding: 8px 15px;
    border-radius: 6px;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/200.svg' width='12' height='12' fill='%23C5A059' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.sort-select:focus { outline: none; border-color: var(--mc-brass); }

.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* Modern Card */
.modern-card {
    background: linear-gradient(180deg, var(--mc-maroon) 0%, rgba(10,10,10,0.9) 100%);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(197, 160, 89, 0.15) !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 15px rgba(197, 160, 89, 0.1);
    border-color: rgba(197, 160, 89, 0.4) !important;
}

.mc-img-wrap {
    height: 220px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--mc-maroon-light);
}
.mc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}
.modern-card:hover .mc-img-wrap img {
    transform: scale(1.1);
}
.mc-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: linear-gradient(135deg, #701010, #3d0505);
    color: var(--mc-brass-light);
    font-size: 11px;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.mc-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.mc-title {
    color: var(--mc-brass);
    font-size: 21px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.mc-location {
    color: var(--mc-text-muted);
    font-family: 'Kanit', sans-serif;
    font-size: 13px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mc-location i { color: #A01010 !important; }

.mc-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--mc-brass-light) !important;
}
.mc-price {
    font-family: 'Kanit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.mc-price-unit {
    color: var(--mc-text-muted);
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
}

.mc-specs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.mc-spec-badge {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--mc-maroon-light);
    color: var(--mc-brass);
    font-family: 'Kanit', sans-serif;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mc-spec-badge i { color: var(--mc-text-muted); }

.mc-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}
.mc-btn {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mc-btn-outline {
    border: 1px solid var(--mc-brass-dark);
    color: var(--mc-brass);
    background: transparent;
}
.mc-btn-outline:hover { 
    background: rgba(197, 160, 89, 0.1); 
    border-color: var(--mc-brass);
    color: var(--mc-brass-light);
}

.mc-btn-solid {
    background: linear-gradient(135deg, #701010, #3d0505) !important;
    color: var(--mc-brass-light) !important;
    border: 1px solid rgba(197, 160, 89, 0.4);
    box-shadow: 0 4px 15px rgba(112, 16, 16, 0.4);
}
.mc-btn-solid:hover { 
    background: linear-gradient(135deg, #901515, #5e0808) !important; 
    box-shadow: 0 6px 20px rgba(112, 16, 16, 0.6);
    transform: translateY(-2px);
}

/* Loading overlay for UI interactions */
.grid-loading {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Redesigned Category Hero (No Image, Pure Luxury CSS) */
.category-hero {
    background-image: none !important;
    background: linear-gradient(180deg, var(--mc-maroon-dark) 0%, #050505 100%) !important;
    border-bottom: 2px solid var(--mc-maroon-light);
    position: relative;
    padding: 80px 0 60px 0 !important;
    height: auto !important;
    box-shadow: inset 0 -20px 50px rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.category-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: 50%; transform: translateX(-50%);
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(112, 16, 16, 0.2) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}
.category-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mc-brass), transparent);
    opacity: 0.5;
}
.category-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}
.category-hero-content h1 {
    color: var(--mc-brass) !important;
    font-family: 'Kanit', sans-serif !important;
    font-size: 46px !important;
    letter-spacing: 6px !important;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8), 0 0 40px rgba(197, 160, 89, 0.3) !important;
    margin-bottom: 25px !important;
}
.category-hero-content p {
    color: var(--mc-text-muted) !important;
    font-family: 'Kanit', sans-serif !important;
    font-size: 16px !important;
    line-height: 1.8;
    text-shadow: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .modern-layout { flex-direction: column; }
    .modern-sidebar { width: 100%; flex: auto; margin-bottom: 20px; }
}

/* Quick View Modal Styles */
.mc-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.mc-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.mc-modal-content {
    background: linear-gradient(145deg, var(--mc-maroon-dark) 0%, #111 100%);
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    position: relative;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 30px rgba(197, 160, 89, 0.15);
}
.mc-modal-overlay.active .mc-modal-content {
    transform: scale(1) translateY(0);
}

.mc-modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--mc-brass-dark);
    color: var(--mc-brass);
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.mc-modal-close:hover {
    background: var(--mc-maroon);
    color: var(--mc-brass-light);
    transform: rotate(90deg);
}

.mc-modal-grid {
    display: flex;
    flex-wrap: wrap;
}

.mc-modal-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}
.mc-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 350px;
}
.mc-modal-badge {
    position: absolute;
    top: 20px; left: 20px;
    background: linear-gradient(135deg, #701010, #3d0505);
    color: var(--mc-brass-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.mc-modal-details {
    flex: 1;
    min-width: 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mc-modal-title {
    color: var(--mc-brass);
    font-family: 'Kanit', sans-serif;
    font-size: 32px;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.mc-modal-price-wrap {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
    padding-bottom: 15px;
}
.mc-modal-price {
    font-family: 'Kanit', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--mc-brass-light);
}
.mc-modal-unit {
    color: var(--mc-text-muted);
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    margin-left: 8px;
}

.mc-modal-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}
.mc-modal-spec {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #E8D399;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    background: rgba(0,0,0,0.3);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(197,160,89,0.1);
}
.mc-modal-spec i { color: #A01010; font-size: 16px; width: 20px;}

.mc-modal-desc {
    color: var(--mc-text-muted);
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.mc-modal-actions .mc-btn {
    font-size: 16px;
    padding: 15px 0;
    border-radius: 10px;
}
.mc-modal-actions i {
    margin-right: 8px;
    font-size: 18px;
}

@media (max-width: 768px) {
    .mc-modal-grid { flex-direction: column; }
    .mc-modal-details { padding: 25px; }
    .mc-modal-title { font-size: 26px; }
    .mc-modal-price { font-size: 28px; }
    .mc-modal-image img { min-height: 250px; height: 250px; }
}

/* Premium LINE Button */
.mc-btn-line-premium {
    background: linear-gradient(135deg, #1A1A1A, #0A0A0A) !important;
    color: #FFF !important;
    border: 1px solid #00B900 !important;
    box-shadow: 0 4px 15px rgba(0, 185, 0, 0.15) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.mc-btn-line-premium::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 185, 0, 0.2), transparent);
    transition: all 0.6s ease;
}
.mc-btn-line-premium:hover::before {
    left: 100%;
}
.mc-btn-line-premium i {
    color: #00B900 !important;
    font-size: 24px !important;
    filter: drop-shadow(0 0 8px rgba(0, 185, 0, 0.6));
    margin-right: 0 !important;
}
.mc-btn-line-premium:hover {
    background: linear-gradient(135deg, #222, #111) !important;
    border-color: #00E600 !important;
    box-shadow: 0 8px 25px rgba(0, 185, 0, 0.3) !important;
    transform: translateY(-2px);
}
