/* ============================================
   MAGNIFICENT FURNITURES LIMITED - MAIN STYLES
   VERSION 2.1 - WITH SEARCH DROPDOWN & MOBILE FIXES
   ============================================ */

/* ---------- SMOOTH SCROLL ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- CSS VARIABLES (MODERN LUXURY THEME) ---------- */
:root {
    --primary-color: #0F172A;       /* Slate blue - modern & premium */
    --primary-dark: #020617;        /* Darker slate */
    --primary-light: #1E293B;       /* Lighter slate */
    --accent-color: #D4A017;        /* Gold accent - luxury feel */
    --accent-light: #F5C542;        /* Lighter gold */
    --secondary-color: #334155;      /* Cool gray */
    --success-color: #10B981;        /* Emerald green */
    --whatsapp-color: #25D366;       /* WhatsApp green */
    --text-dark: #0F172A;
    --text-light: #475569;
    --text-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* ---------- RESET & BASE STYLES ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-dark);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ---------- UTILITY CLASSES ---------- */
/* Margins */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none; }

/* ---------- NAVIGATION BAR ---------- */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.logo h1 span {
    color: var(--accent-color);
}

.logo p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: -5px;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links li a {
    padding: 10px 0;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--accent-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--accent-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ---------- HERO SECTION WITH BACKGROUND IMAGE ---------- */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.5)), url('../images/hero/showroom.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-white);
    padding: 120px 0;
    text-align: center;
}

.hero h1 {
    color: var(--text-white);
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.95;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 40px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-whatsapp {
    background: var(--whatsapp-color);
    color: var(--text-white);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--text-white);
    transform: translateY(-3px);
}

.btn-search {
    background: var(--accent-color);
    color: var(--text-dark);
    border-radius: 40px;
}

.btn-category {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent-color);
    font-weight: 600;
    transition: var(--transition);
}

.btn-category:hover {
    color: var(--primary-color);
}

/* ---------- SEARCH SECTION ---------- */
.search-section {
    background: var(--bg-light);
    padding: 50px 0;
    text-align: center;
}

.search-container {
    position: relative;
}

.search-container h2 {
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    max-width: 650px;
    margin: 0 auto;
    gap: 15px;
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

/* ===== SEARCH RESULTS DROPDOWN ===== */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 10px;
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--bg-light);
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.search-result-price {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.85rem;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--text-light);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
}

.search-view-all {
    padding: 12px 15px;
    text-align: center;
    background: var(--bg-light);
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
    border-top: 1px solid var(--border-color);
}

.search-view-all:hover {
    background: var(--border-color);
}

/* ---------- TRUST INDICATORS ---------- */
.trust-indicators {
    padding: 50px 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    text-align: center;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.trust-icon {
    font-size: 2.2rem;
}

.trust-text h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.trust-text p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ---------- CATEGORY SHOWCASE ---------- */
.category-showcase {
    padding: 70px 0;
    background: var(--bg-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-bottom: 50px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-image {
    height: 220px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.category-card h3 {
    margin: 20px 0 5px;
    font-size: 1.3rem;
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 15px;
}

/* ---------- PRODUCT CARDS (CORE COMPONENT) ---------- */
.product-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-image {
    height: 260px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.old-price {
    text-decoration: line-through;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-right: 8px;
}

.product-specs {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-whatsapp-sm {
    background: var(--whatsapp-color);
    color: white;
    border-radius: 8px;
}

.btn-whatsapp-sm:hover {
    background: #128C7E;
}

.btn-outline-sm {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
}

.btn-outline-sm:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Badges */
.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #EF4444;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
}

/* ---------- FEATURED PRODUCTS ---------- */
.featured {
    padding: 70px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-bottom: 50px;
}

.loading {
    text-align: center;
    padding: 60px;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* ---------- WHY CHOOSE US ---------- */
.why-us {
    padding: 70px 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 35px;
}

.feature {
    text-align: center;
    padding: 35px;
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* ---------- LOCATION SECTION ---------- */
.location {
    padding: 70px 0;
}

.location-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.address {
    text-align: center;
    padding: 25px;
    font-size: 1.2rem;
}

.map iframe {
    display: block;
    width: 100%;
}

.hours {
    text-align: center;
    padding: 25px;
    background: var(--bg-light);
}

/* ---------- FLOATING WHATSAPP BUTTON ---------- */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-float {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--whatsapp-color);
    color: white;
    border-radius: 50%;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ---------- FOOTER ---------- */
.footer {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 60px 0 25px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3,
.footer-column h4 {
    color: var(--text-white);
    margin-bottom: 20px;
}

.footer-column h3 span {
    color: var(--accent-color);
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--accent-color);
}

.social-link {
    display: inline-block;
    margin-right: 20px;
    color: var(--text-white);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ===== MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .hero {
        padding: 60px 0;
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        padding: 12px 20px;
    }
    
    .btn-search {
        padding: 12px 20px;
    }
    
    /* Mobile search dropdown improvements */
    .search-results-dropdown {
        position: fixed;
        top: auto;
        left: 15px;
        right: 15px;
        max-height: 60vh;
        margin-top: 5px;
        border-radius: 12px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-item img {
        width: 40px;
        height: 40px;
    }
    
    .search-result-name {
        font-size: 0.85rem;
    }
    
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .trust-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-image {
        height: 150px;
    }
    
    .category-card h3 {
        font-size: 1rem;
        margin: 10px 0 5px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .product-specs {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }
    
    .product-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.7rem;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature {
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }
    
    .floating-wa {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 220px;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}