/* =========================================================
   FurnishDirect — Base Stylesheet
   Functional layout for now (per Seconique structure),
   themed visually later. Keep selectors generic & reusable.
   ========================================================= */

:root {
    --fd-navy: #0a2342;
    --fd-blue: #1d4ed8;
    --fd-orange: #ea580c;
    --fd-bg: #ffffff;
    --fd-white: #ffffff;
    --fd-text: #1a1a1a;
    --fd-muted: #6b7280;
    --fd-border: #e2e4e9;
    --fd-success: #15803d;
    --fd-radius: 4px;
    --fd-maxwidth: 1280px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--fd-text);
    background: var(--fd-bg);
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--fd-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
    max-width: var(--fd-maxwidth);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Top utility bar ---------- */
.fd-topbar {
    background: var(--fd-navy);
    color: #fff;
    font-size: 13px;
    padding: 6px 0;
}
.fd-topbar .container {
    display: flex;
    justify-content: space-between;
}
.fd-topbar a { color: #cfe0ff; }

/* ---------- Header ---------- */
.fd-header {
    background: #fff;
    border-bottom: 1px solid var(--fd-border);
    padding: 18px 0;
}
.fd-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.fd-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--fd-navy);
    letter-spacing: -0.5px;
}
.fd-logo span { color: var(--fd-orange); }
.fd-tagline {
    font-size: 12px;
    color: var(--fd-muted);
    margin-top: -2px;
}

.fd-search {
    flex: 1;
    max-width: 480px;
    display: flex;
}
.fd-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--fd-border);
    border-right: none;
    border-radius: var(--fd-radius) 0 0 var(--fd-radius);
    font-size: 14px;
}
.fd-search button {
    background: var(--fd-orange);
    color: #fff;
    border: none;
    padding: 0 18px;
    border-radius: 0 var(--fd-radius) var(--fd-radius) 0;
    cursor: pointer;
    font-weight: 600;
}

.fd-header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 13px;
}
.fd-header-actions a {
    color: var(--fd-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.fd-icon { font-size: 20px; }
.fd-basket-total { font-weight: 700; }

/* ---------- Main nav ---------- */
.fd-nav {
    background: var(--fd-navy);
}
.fd-nav .container { display: flex; }
.fd-nav a {
    color: #fff;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}
.fd-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.fd-nav a.fd-nav-highlight { color: var(--fd-orange); }

/* ---------- Breadcrumbs ---------- */
.fd-breadcrumbs {
    padding: 14px 0;
    font-size: 13px;
    color: var(--fd-muted);
}
.fd-breadcrumbs a { color: var(--fd-muted); }
.fd-breadcrumbs .sep { margin: 0 6px; }

/* ---------- Hero ---------- */
/* ---------- Hero (full-bleed image with overlay text) ---------- */
.fd-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}
.fd-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.fd-hero-bg-placeholder {
    background: linear-gradient(120deg, #0a2342 0%, #163a66 55%, #1d4ed8 130%);
}
.fd-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,35,66,0.55) 0%, rgba(10,35,66,0.25) 55%, rgba(10,35,66,0) 100%);
    z-index: 1;
}
.fd-hero .container { position: relative; z-index: 2; }
.fd-hero h1 {
    font-size: 38px;
    margin: 0 0 10px;
    max-width: 600px;
    line-height: 1.15;
}
.fd-hero p {
    font-size: 17px;
    color: #e6edf8;
    max-width: 480px;
    margin: 0 0 26px;
}
.fd-hero-badges {
    display: flex;
    gap: 18px;
    margin-top: 26px;
    flex-wrap: wrap;
}
.fd-hero-badge {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(2px);
    padding: 8px 14px;
    border-radius: 99px;
    font-size: 13px;
}
.fd-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 3;
}
.fd-hero-arrow.left { left: 24px; }
.fd-hero-arrow.right { right: 24px; }
.fd-hero-arrow:hover { background: rgba(255,255,255,0.28); text-decoration: none; }

.fd-btn {
    display: inline-block;
    background: var(--fd-orange);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--fd-radius);
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
}
.fd-btn:hover { background: #c2470a; text-decoration: none; }
.fd-btn-outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

/* ---------- Section headings ---------- */
.fd-section { padding: 44px 0; }
.fd-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}
.fd-section-head h2 {
    font-size: 22px;
    margin: 0;
    color: var(--fd-navy);
}
.fd-section-head a { font-size: 14px; font-weight: 600; }

/* ---------- Category tiles ---------- */
.fd-category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.fd-category-tile {
    background: #fff;
    border-radius: var(--fd-radius);
    overflow: hidden;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fd-category-tile img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.fd-cat-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    padding: 10px;
}
.fd-category-tile span {
    display: block;
    padding: 14px 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--fd-text);
}
.fd-category-tile:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10,35,66,0.12);
}

/* ---------- Product grid ---------- */
.fd-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.fd-product-card {
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.fd-product-card img { height: 240px; object-fit: contain; width: 100%; background: #fff; }
.fd-product-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.fd-product-sku { font-size: 12px; color: var(--fd-muted); margin: 4px 0 8px; }
.fd-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fd-text);
    margin: 0 0 6px;
    min-height: 38px;
}
.fd-product-price-row {
    margin-top: auto;
    padding-top: 8px;
}
.fd-price-flatpack { font-size: 12px; color: var(--fd-muted); }
.fd-price-built { font-size: 18px; font-weight: 800; color: var(--fd-navy); }
.fd-stock-in { color: var(--fd-success); font-size: 12px; font-weight: 600; }
.fd-stock-out { color: #b91c1c; font-size: 12px; font-weight: 600; }
.fd-product-actions { display: flex; gap: 8px; margin-top: 12px; }
.fd-product-actions .fd-btn { flex: 1; text-align: center; padding: 10px; font-size: 13px; }
.fd-badge-new {
    position: absolute; top: 10px; left: 10px;
    background: var(--fd-orange); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 4px 8px; border-radius: var(--fd-radius);
}

/* ---------- USP strip ---------- */
.fd-usp-strip {
    background: #fff;
    border-top: 1px solid var(--fd-border);
    border-bottom: 1px solid var(--fd-border);
    padding: 26px 0;
}
.fd-usp-strip .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.fd-usp { text-align: center; font-size: 13px; }
.fd-usp strong { display: block; color: var(--fd-navy); font-size: 14px; margin-bottom: 4px; }

/* ---------- Footer ---------- */
.fd-footer {
    background: var(--fd-navy);
    color: #cfe0ff;
    padding: 44px 0 20px;
    margin-top: 40px;
}
.fd-footer .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.fd-footer h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.fd-footer ul { list-style: none; margin: 0; padding: 0; }
.fd-footer li { margin-bottom: 8px; font-size: 13px; }
.fd-footer a { color: #cfe0ff; }
.fd-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 30px;
    padding-top: 18px;
    font-size: 12px;
    color: #9fb4d4;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .fd-category-grid { grid-template-columns: repeat(3, 1fr); }
    .fd-product-grid { grid-template-columns: repeat(2, 1fr); }
    .fd-usp-strip .container { grid-template-columns: repeat(2, 1fr); }
    .fd-footer .container { grid-template-columns: repeat(2, 1fr); }
    .fd-header .container { flex-wrap: wrap; }
    .fd-search { order: 3; max-width: 100%; }
}
@media (max-width: 600px) {
    .fd-category-grid { grid-template-columns: repeat(2, 1fr); }
    .fd-product-grid { grid-template-columns: 1fr 1fr; }
    .fd-hero { min-height: 380px; }
    .fd-hero h1 { font-size: 26px; }
    .fd-hero-arrow { display: none; }
}

/* ---------- Light-background outline button ---------- */
.fd-btn-outline-dark {
    background: transparent;
    border: 1px solid var(--fd-navy);
    color: var(--fd-navy);
}
.fd-btn-outline-dark:hover { background: var(--fd-navy); color: #fff; text-decoration: none; }

/* ---------- Mobile nav: scroll instead of wrap ---------- */
@media (max-width: 900px) {
    .fd-nav { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .fd-nav a { display: inline-block; padding: 12px 14px; }
}

/* ---------- Product spec table: stack on mobile ---------- */
.fd-spec-table td:first-child { color: var(--fd-muted); width: 40%; }
.fd-spec-table td:last-child { text-align: right; }
@media (max-width: 600px) {
    .fd-spec-table, .fd-spec-table tbody, .fd-spec-table tr, .fd-spec-table td { display: block; width: 100% !important; }
    .fd-spec-table tr { padding-bottom: 10px; }
    .fd-spec-table td:first-child { font-weight: 600; color: var(--fd-navy); padding-bottom: 2px; border-bottom: none; }
    .fd-spec-table td:last-child { text-align: left; padding-top: 0; }
}

/* ---------- Product detail page: stack on mobile ---------- */
@media (max-width: 700px) {
    .fd-product-detail-grid { grid-template-columns: 1fr !important; }
    .fd-spec-table td:first-child { border-bottom: none !important; }
}
