/* ===================================
   MEBELKU.COM - FURNITURE MARKETPLACE
   Modern Responsive Design
   =================================== */

/* CSS Variables for Theme Colors */
:root {
    --dark-brown: #4E342E;
    --wood-gold: #C89B3C;
    --cream: #F8F5F0;
    --white: #FFFFFF;
    --soft-gray: #E0E0E0;
    --light-gray: #F5F5F5;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
body.dark-mode {
    --cream: #1a1a1a;
    --white: #2d2d2d;
    --soft-gray: #3a3a3a;
    --light-gray: #2a2a2a;
    --text-dark: #e0e0e0;
    --text-light: #b0b0b0;
    --shadow: rgba(255, 255, 255, 0.05);
    --shadow-hover: rgba(255, 255, 255, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--cream);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   HEADER
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-brown);
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--dark-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.icon-btn:hover {
    background-color: var(--wood-gold);
    color: var(--white);
    transform: translateY(-2px);
}

.icon-btn .lang-text {
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    color: var(--white);
    font-size: 30px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input {
    width: 100%;
    padding: 20px 25px;
    font-size: 18px;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
}

.search-results {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--white);
    border-radius: 20px;
    padding: 10px;
}

.search-result-item {
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.search-result-item:hover {
    background-color: var(--light-gray);
}

.search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 20px var(--shadow);
    z-index: 2000;
    transition: right 0.3s ease;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    padding: 30px 20px;
}

.mobile-menu-close {
    background: transparent;
    font-size: 24px;
    color: var(--dark-brown);
    margin-bottom: 30px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav a {
    font-size: 18px;
    color: var(--text-dark);
    padding: 10px 0;
    border-bottom: 1px solid var(--soft-gray);
    transition: var(--transition);
}

.mobile-nav a:hover {
    color: var(--wood-gold);
    padding-left: 10px;
}

/* ===================================
   HERO BANNER
   =================================== */
.hero {
    margin-top: 70px;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--cream) 0%, var(--light-gray) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--dark-brown);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background-color: var(--wood-gold);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(200, 155, 60, 0.3);
}

.btn-primary:hover {
    background-color: var(--dark-brown);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(200, 155, 60, 0.4);
}

.hero-image {
    position: relative;
    animation: slideInRight 0.8s ease;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 0.8s ease 0.4s both;
}

.animate-slide-in {
    animation: slideInRight 0.8s ease;
}

/* ===================================
   PRODUCTS SECTION
   =================================== */
.products {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Product Card */
.product-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--wood-gold);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--wood-gold);
    margin-bottom: 10px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
}

.product-rating {
    color: #FFA500;
}

/* ===================================
   PRODUCT DETAIL PANEL
   =================================== */
.product-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.product-detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-detail-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-radius: 30px 30px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px var(--shadow);
}

.product-detail-overlay.active .product-detail-panel {
    transform: translateY(0);
}

.detail-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--dark-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.detail-close:hover {
    background-color: var(--wood-gold);
    color: var(--white);
}

.detail-content {
    padding: 40px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.detail-image {
    position: relative;
}

.detail-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
}

.detail-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 15px;
}

.detail-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--wood-gold);
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--soft-gray);
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.detail-description {
    margin-bottom: 30px;
}

.detail-description h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 10px;
}

.detail-description p {
    color: var(--text-light);
    line-height: 1.8;
}

.detail-specs {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.detail-specs h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 15px;
}

.spec-list {
    display: grid;
    gap: 10px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--soft-gray);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: var(--text-dark);
}

.spec-value {
    color: var(--text-light);
}

.detail-models {
    margin-bottom: 30px;
}

.detail-models h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 15px;
}

.model-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.model-chip {
    padding: 10px 20px;
    background-color: var(--light-gray);
    border-radius: 25px;
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
}

.model-chip:hover {
    background-color: var(--wood-gold);
    color: var(--white);
}

.whatsapp-btn {
    width: 100%;
    padding: 18px;
    background-color: #25D366;
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background-color: #1da851;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ===================================
   WHY US SECTION
   =================================== */
.why-us {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--wood-gold) 0%, var(--dark-brown) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===================================
   REVIEWS SECTION
   =================================== */
.reviews {
    padding: 80px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.review-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wood-gold) 0%, var(--dark-brown) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

.reviewer-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 5px;
}

.stars {
    color: #FFA500;
    font-size: 14px;
}

.review-text {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}

/* ===================================
   FAQ SECTION
   =================================== */
.faq {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-brown);
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--light-gray);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background-color: var(--dark-brown);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.footer-section i {
    margin-right: 10px;
    color: var(--wood-gold);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--wood-gold);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--wood-gold);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(200, 155, 60, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-brown);
    transform: translateY(-5px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-title {
        font-size: 36px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-image {
        height: 200px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 16px;
    }

    .detail-content {
        padding: 20px;
    }

    .detail-info h2 {
        font-size: 24px;
    }

    .detail-price {
        font-size: 28px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .hero-title {
        font-size: 24px;
    }

    .products,
    .why-us,
    .reviews,
    .faq {
        padding: 50px 0;
    }

    .product-info {
        padding: 15px;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Lazy Loading Animation */
img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

img[data-src].loaded {
    filter: blur(0);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}
