/* =========================================================
   Royal Craft Furniture - Frontend Stylesheet
   Design tokens
   ========================================================= */
:root {
    --color-bg: #FAF6F0;
    --color-dark: #2B1E14;
    --color-primary: #7C4A2D;
    --color-primary-dark: #5C3620;
    --color-accent: #C08552;
    --color-accent-light: #E8C9A8;
    --color-text: #2B2420;
    --color-muted: #7A6F63;
    --color-white: #FFFFFF;
    --color-border: #E7DDD0;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Jost', 'Segoe UI', sans-serif;
    --radius: 6px;
    --shadow: 0 10px 30px rgba(43, 30, 20, 0.08);
    --shadow-hover: 0 16px 40px rgba(43, 30, 20, 0.16);
    --transition: 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--color-dark);
    line-height: 1.2;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 13px 32px;
    background: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 1px solid var(--color-white);
}
.btn-outline:hover { background: var(--color-white); color: var(--color-primary); }

.section { padding: 70px 0; }
.section-alt { background: var(--color-white); }

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 45px;
}
.section-head .eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 10px;
}
.section-head h2 { font-size: 2.2rem; margin-bottom: 12px; }
.section-head p { color: var(--color-muted); font-size: 1rem; }

/* =============== HEADER / NAV =============== */
.topbar {
    background: var(--color-dark);
    color: #EADFCF;
    font-size: 0.82rem;
    padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #EADFCF; }
.topbar .topbar-links { display: flex; gap: 18px; }

header.site-header {
    background: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.navwrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}
.logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
}
.logo span { color: var(--color-dark); }
.logo img { max-height: 55px; }

nav.main-nav ul { display: flex; gap: 30px; }
nav.main-nav a {
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-text);
    position: relative;
    padding: 6px 0;
}
nav.main-nav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}
nav.main-nav a:hover::after, nav.main-nav a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
}
.hamburger span { width: 26px; height: 2px; background: var(--color-dark); }

/* =============== HERO / BANNER SLIDER =============== */
.hero-slider { position: relative; overflow: hidden; height: 78vh; min-height: 420px; max-height: 720px; }
.hero-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity 0.9s ease;
    display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(20,14,9,0.62) 0%, rgba(20,14,9,0.25) 55%, rgba(20,14,9,0.05) 100%);
}
.hero-content { position: relative; z-index: 2; color: var(--color-white); max-width: 560px; padding: 0 20px; margin: 0 auto; width: 100%; }
.hero-content .eyebrow { color: var(--color-accent-light); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem; font-weight: 600; }
.hero-content h1 { font-size: 3rem; margin: 14px 0 16px; color: var(--color-white); }
.hero-content p { margin-bottom: 26px; font-size: 1.05rem; opacity: 0.92; }

.hero-dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--color-white); background: transparent; cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--color-white); }
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 3; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.5);
    color: var(--color-white); width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }
.hero-arrow:hover { background: rgba(255,255,255,0.32); }

/* =============== CATEGORY GRID =============== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 280px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.category-card:hover img { transform: scale(1.08); }
.category-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(20,14,9,0.78) 0%, rgba(20,14,9,0.05) 55%);
}
.category-card .cat-label {
    position: absolute; bottom: 18px; left: 20px; z-index: 2;
    color: var(--color-white); font-family: var(--font-display); font-size: 1.25rem;
}

/* =============== PRODUCT GRID (CATALOGUE) =============== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}
.product-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.product-thumb { height: 230px; overflow: hidden; background: #f1e9dd; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-info { padding: 18px 20px 22px; }
.product-info h3 { font-size: 1.08rem; margin-bottom: 6px; }
.product-info p { color: var(--color-muted); font-size: 0.88rem; margin-bottom: 10px; }
.product-price { color: var(--color-primary); font-weight: 600; font-family: var(--font-display); font-size: 1.05rem; }
.product-cat-tag {
    display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--color-accent); font-weight: 600; margin-bottom: 6px;
}

.filter-bar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-bar a {
    padding: 9px 20px; border: 1px solid var(--color-border); border-radius: 30px;
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text);
    transition: var(--transition);
}
.filter-bar a:hover, .filter-bar a.active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-white); }

/* =============== ABOUT / SPLIT SECTION =============== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split .eyebrow { color: var(--color-accent); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; font-weight: 600; }
.split h2 { font-size: 2.1rem; margin: 12px 0 18px; }
.split p { color: var(--color-muted); margin-bottom: 16px; }
.stats-row { display: flex; gap: 40px; margin-top: 26px; }
.stats-row .stat h3 { font-size: 1.8rem; color: var(--color-primary); }
.stats-row .stat span { font-size: 0.82rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* =============== GALLERY =============== */
.gallery-grid {
    columns: 4 220px;
    column-gap: 18px;
}
.gallery-item {
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    cursor: pointer;
}
.gallery-item img { width: 100%; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.06); }

.lightbox {
    display: none; position: fixed; inset: 0; background: rgba(20,14,9,0.92);
    z-index: 2000; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: 4px; }
.lightbox-close {
    position: absolute; top: 24px; right: 30px; color: var(--color-white); font-size: 2rem;
    cursor: pointer; background: none; border: none;
}

/* =============== VIDEOS =============== */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.video-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--color-white); }
.video-thumb { position: relative; height: 200px; background: #000; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.video-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.9);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--color-primary);
}
.video-info { padding: 16px 18px; }
.video-info h4 { font-size: 1rem; }
.video-embed-wrap { position: relative; padding-top: 56.25%; height: 0; }
.video-embed-wrap iframe, .video-embed-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; }

/* =============== BROCHURES =============== */
.brochure-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.brochure-card {
    background: var(--color-white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); text-align: center; transition: var(--transition);
}
.brochure-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.brochure-cover { height: 260px; background: #eee; overflow: hidden; }
.brochure-cover img { width: 100%; height: 100%; object-fit: cover; }
.brochure-body { padding: 18px; }
.brochure-body h4 { font-size: 1rem; margin-bottom: 12px; }

/* =============== CTA STRIP =============== */
.cta-strip {
    background: var(--color-primary);
    background: linear-gradient(120deg, var(--color-dark), var(--color-primary));
    color: var(--color-white);
    padding: 55px 0;
    text-align: center;
}
.cta-strip h2 { color: var(--color-white); font-size: 1.9rem; margin-bottom: 10px; }
.cta-strip p { opacity: 0.9; margin-bottom: 24px; }

/* =============== CONTACT =============== */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info-card {
    background: var(--color-white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.contact-info-card h4 { margin-bottom: 6px; }
.contact-info-card p, .contact-info-card a { color: var(--color-muted); }
form.contact-form input, form.contact-form textarea {
    width: 100%; padding: 13px 16px; border: 1px solid var(--color-border); border-radius: var(--radius);
    margin-bottom: 16px; font-family: var(--font-body); font-size: 0.95rem; background: var(--color-white);
}
form.contact-form textarea { min-height: 130px; resize: vertical; }
form.contact-form input:focus, form.contact-form textarea:focus { outline: 2px solid var(--color-accent); }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; }
.alert-success { background: #E5F3E5; color: #2A6B2A; border: 1px solid #B9DEB9; }
.alert-error { background: #FBEAEA; color: #A32828; border: 1px solid #F0C4C4; }

/* =============== FOOTER =============== */
footer.site-footer { background: var(--color-dark); color: #D9CBB8; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 40px; }
.footer-grid h4 { color: var(--color-white); font-family: var(--font-display); margin-bottom: 16px; font-size: 1.1rem; }
.footer-grid p, .footer-grid a { color: #C9B8A0; font-size: 0.9rem; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a:hover { color: var(--color-accent-light); }
.footer-logo { font-family: var(--font-display); font-size: 1.5rem; color: var(--color-white); margin-bottom: 12px; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
    width: 38px; height: 38px; border: 1px solid #5a4a3a; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--color-white);
}
.social-links a:hover { background: var(--color-accent); border-color: var(--color-accent); }
.footer-bottom { border-top: 1px solid #47392b; padding: 20px 0; text-align: center; font-size: 0.83rem; color: #9c8b76; }

/* =============== BREADCRUMB / PAGE HEADER =============== */
.page-header {
    background: var(--color-dark);
    background-size: cover; background-position: center;
    color: var(--color-white); padding: 70px 0; text-align: center; position: relative;
}
.page-header::before { content:''; position:absolute; inset:0; background: rgba(20,14,9,0.55); }
.page-header .container { position: relative; z-index: 2; }
.page-header h1 { color: var(--color-white); font-size: 2.4rem; }
.page-header .crumb { margin-top: 10px; font-size: 0.9rem; opacity: 0.85; }
.page-header .crumb a { color: var(--color-accent-light); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-muted); }

/* =============== RESPONSIVE =============== */
@media (max-width: 992px) {
    .category-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .brochure-grid { grid-template-columns: repeat(3, 1fr); }
    .split { grid-template-columns: 1fr; gap: 30px; }
    .split .split-img { order: -1; }
    .contact-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { columns: 3 180px; }
}

@media (max-width: 768px) {
    nav.main-nav {
        position: fixed; top: 0; right: -300px; width: 280px; height: 100vh;
        background: var(--color-white); box-shadow: -6px 0 20px rgba(0,0,0,0.15);
        transition: right 0.35s ease; padding: 90px 30px; z-index: 1000;
    }
    nav.main-nav.open { right: 0; }
    nav.main-nav ul { flex-direction: column; gap: 22px; }
    .hamburger { display: flex; }
    .hero-content h1 { font-size: 2.1rem; }
    .hero-slider { height: 62vh; }
    .category-grid, .product-grid, .brochure-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .video-grid { grid-template-columns: 1fr; }
    .section { padding: 50px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-row { flex-wrap: wrap; gap: 24px; }
    .gallery-grid { columns: 2 150px; }
}

@media (max-width: 480px) {
    .category-grid, .product-grid, .brochure-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 1.7rem; }
    .section-head h2 { font-size: 1.6rem; }
    .hero-arrow { width: 36px; height: 36px; }
}

/* Overlay for mobile nav */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999; }
.nav-overlay.show { display: block; }
