/* ============================================================
   Bangalore Art Hub - Main Stylesheet
   Colors are CSS variables so the admin "Theme Color" setting
   can override --primary / --primary-dark at runtime.
   ============================================================ */

:root {
    --primary: #B8863B;
    --primary-dark: #8a6329;
    --secondary: #1a1a1a;
    --accent-bg: #faf7f2;
    --text-main: #1f1f1f;
    --text-muted: #6b6b6b;
    --border-color: #e8e3da;
    --white: #ffffff;
    --radius: 10px;
    --shadow-soft: 0 4px 18px rgba(0,0,0,0.06);
    --shadow-card: 0 2px 10px rgba(0,0,0,0.07);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    color: var(--text-main);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-serif {
    font-family: Georgia, 'Times New Roman', serif;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Top utility bar ---------- */
.topbar {
    background: var(--accent-bg);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar-left, .topbar-right {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.topbar-left span, .topbar-right a {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.topbar-right a:hover { color: var(--primary); }

/* ---------- Header ---------- */
.header {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo .logo-icon { color: var(--primary); display: flex; }
.logo-img { height: 40px; width: auto; }
.logo-text { line-height: 1.1; }
.logo-text .name {
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.5px;
    display: block;
}
.logo-text .tagline {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none; border: 1px solid var(--border-color); border-radius: 6px;
    width: 40px; height: 40px; align-items: center; justify-content: center;
    color: var(--text-main); flex-shrink: 0;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 620px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
}
.search-bar select {
    border: none;
    background: var(--accent-bg);
    padding: 0 14px;
    font-size: 14px;
    border-right: 1px solid var(--border-color);
}
.search-bar input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
}
.search-bar button {
    background: var(--secondary);
    color: #fff;
    border: none;
    padding: 0 20px;
    display: flex; align-items: center; justify-content: center;
}

.header-icons { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.header-icons a { position: relative; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.cart-icon-wrap { position: relative; display: flex; }
.header-icons .badge {
    position: absolute;
    top: -8px; right: -10px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.5;
}
.header-icons .cart-total { font-size: 13px; font-weight: 600; }

/* ---------- Nav ---------- */
.navbar { border-bottom: 1px solid var(--border-color); }
.navbar .container { display: flex; gap: 34px; align-items: center; }
.navbar a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 14px 0;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-main);
    border-bottom: 2px solid transparent;
}
.navbar a:hover, .navbar a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.navbar-close { display: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--secondary);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px auto;
    max-width: 1320px;
    color: #fff;
}
.hero-slide {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    align-items: center;
    min-height: 420px;
}
.hero-text { padding: 40px 48px; position: relative; z-index: 2; }
.hero-text .eyebrow {
    color: var(--primary);
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.hero-text h1 {
    font-size: 44px;
    line-height: 1.15;
    margin: 14px 0;
}
.hero-text p { color: #ddd; margin-bottom: 22px; max-width: 380px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 13px 26px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    border: none;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.hero-img { height: 100%; min-height: 420px; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

.hero-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-card);
    z-index: 3;
    color: var(--secondary);
    border: none;
}
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }

.hero-dots {
    position: absolute;
    bottom: 18px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 3;
}
.hero-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.hero-dots span.active { background: var(--primary); width: 22px; border-radius: 4px; }

/* ---------- Trust strip ---------- */
.trust-strip {
    background: var(--accent-bg);
    border-radius: var(--radius);
    max-width: 1320px;
    margin: 0 auto 40px;
    padding: 26px 30px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item .icon { color: var(--primary); font-size: 22px; flex-shrink: 0; }
.trust-item .title { font-weight: 600; font-size: 14px; }
.trust-item .sub { font-size: 12px; color: var(--text-muted); }

/* ---------- Section headings ---------- */
.section { padding: 30px 0 50px; }
.section-heading { text-align: center; margin-bottom: 34px; }
.section-heading .rule {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    color: var(--primary); font-size: 12px; margin-bottom: 6px;
}
.section-heading .rule::before, .section-heading .rule::after {
    content: ''; width: 40px; height: 1px; background: var(--primary);
}
.section-heading h2 { font-size: 30px; margin: 4px 0; }
.section-heading p { color: var(--text-muted); font-size: 14px; }
.section-heading-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 26px;
}
.section-heading-row h2 { font-size: 26px; position: relative; padding-left: 14px; }
.view-all-btn {
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex; gap: 6px; align-items: center;
}

/* ---------- Category grid ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 220px;
    box-shadow: var(--shadow-card);
}
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.category-card:hover img { transform: scale(1.06); }
.category-card .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0) 55%);
}
.category-card .info {
    position: absolute; left: 16px; bottom: 14px; right: 16px;
    color: #fff; display: flex; align-items: center; gap: 10px;
}
.category-card .info .badge-icon {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 16px;
}
.category-card .info .name { font-weight: 700; font-size: 16px; }
.category-card .info .explore { font-size: 12.5px; color: #f1d9b0; }

/* ---------- Product grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
}
.product-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: box-shadow .25s, transform .25s;
}
.product-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.product-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--accent-bg); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-wish {
    position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    background: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-card); border: none; font-size: 14px;
}
.product-info { padding: 14px 14px 16px; }
.product-info .title { font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.product-info .meta { display: flex; justify-content: space-between; align-items: center; }
.product-info .price { font-weight: 700; color: var(--primary); font-size: 15px; }
.product-info .artist { font-size: 12px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.footer { background: var(--secondary); color: #cfcfcf; padding: 50px 0 20px; margin-top: 40px; }
.footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer ul li { margin-bottom: 9px; font-size: 13.5px; }
.footer ul li a:hover { color: var(--primary); }
.footer .bottom {
    border-top: 1px solid #333;
    margin-top: 30px; padding-top: 18px;
    text-align: center; font-size: 12.5px; color: #999;
}
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center;
}

/* ---------- Buttons / misc ---------- */
.floating-btns { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 40; }
.fab {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2); font-size: 20px; color: #fff; border: none;
}
.fab.whatsapp { background: #25D366; }
.fab.top { background: var(--primary); }

.badge-pill {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; background: var(--accent-bg); color: var(--primary);
}

/* ---------- Generic page layout ---------- */
.page-header { background: var(--accent-bg); padding: 26px 0; margin-bottom: 30px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

.filters-sidebar { border: 1px solid var(--border-color); border-radius: var(--radius); padding: 18px; }
.filters-sidebar h4 { font-size: 14px; margin: 0 0 12px; }
.filters-sidebar .filter-group { margin-bottom: 20px; }
.filters-sidebar label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 8px; color: var(--text-muted); }

.listing-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; }
.listing-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 13.5px; color: var(--text-muted); }
.listing-toolbar select { padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 6px; }

.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.pd-gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-color); aspect-ratio: 4/3; }
.pd-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-gallery-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-color); cursor: pointer; }
.pd-price { font-size: 26px; font-weight: 700; color: var(--primary); margin: 10px 0; }
.pd-meta-table td { padding: 6px 0; font-size: 14px; color: var(--text-muted); }
.pd-meta-table td:first-child { width: 130px; color: var(--text-main); font-weight: 600; }
.pd-actions { display: flex; gap: 12px; margin: 22px 0; }
.tabs-nav { display: flex; gap: 24px; border-bottom: 1px solid var(--border-color); margin: 40px 0 20px; }
.tabs-nav button { background: none; border: none; padding: 10px 0; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; }
.tabs-nav button.active { color: var(--primary); border-color: var(--primary); }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--border-color); font-size: 14px; text-align: left; }
.qty-box { display: inline-flex; border: 1px solid var(--border-color); border-radius: 6px; }
.qty-box button { border: none; background: none; width: 30px; }
.qty-box input { width: 40px; border: none; text-align: center; }

.form-control { width: 100%; padding: 11px 14px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 14px; margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============================================================
   Responsive breakpoints
   ============================================================ */

/* Tablet */
@media (max-width: 992px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-slide { grid-template-columns: 1fr; }
    .hero-text { padding: 32px 28px; }
    .hero-text h1 { font-size: 34px; }
    .hero-img { min-height: 240px; order: -1; }
    .trust-strip { grid-template-columns: repeat(3, 1fr); }
    .footer .container { grid-template-columns: 1fr 1fr; }
    .listing-layout { grid-template-columns: 220px 1fr; }
    .product-detail-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 680px) {
    .container { padding: 0 16px; }

    /* Topbar: hide secondary items, keep it compact */
    .topbar-left span:nth-child(2),
    .topbar-left span:nth-child(3) { display: none; }
    .topbar-right a span, .topbar-right { font-size: 12px; gap: 12px; }
    .topbar-right a { gap: 4px; }

    /* Header: hamburger appears, search moves to its own row */
    .header { padding: 12px 0; }
    .header .container { gap: 12px; }
    .mobile-menu-toggle { display: flex; order: 1; }
    .logo { order: 2; flex: 1; }
    .logo-text .name { font-size: 15px; }
    .header-icons { order: 3; gap: 14px; }
    .header-icons .cart-total { display: none; }
    .search-bar { order: 4; max-width: none; width: 100%; flex-basis: 100%; }

    /* Nav becomes an off-canvas drawer */
    .navbar { border-bottom: none; }
    .navbar .container { padding: 0; }
    .navbar {
        position: fixed; top: 0; left: -280px; height: 100vh; width: 260px;
        background: #fff; z-index: 100; transition: left .25s;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
    }
    .navbar.open { left: 0; }
    .navbar .container { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
    .navbar a { padding: 14px 20px; border-bottom: 1px solid var(--border-color); border-left: 3px solid transparent; }
    .navbar a.active, .navbar a:hover { border-bottom-color: var(--border-color); border-left-color: var(--primary); background: var(--accent-bg); }
    .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 90; }
    .nav-overlay.open { display: block; }

    .hero { margin: 14px auto; border-radius: 8px; }
    .hero-text { padding: 24px 20px; }
    .hero-text h1 { font-size: 26px; }
    .hero-text p { max-width: none; }
    .hero-img { min-height: 180px; }
    .hero-arrow { width: 32px; height: 32px; }

    .trust-strip { grid-template-columns: repeat(2, 1fr); padding: 18px; gap: 14px; }
    .trust-item .title { font-size: 12.5px; }
    .trust-item .sub { font-size: 11px; }

    .section-heading h2 { font-size: 22px; }
    .section-heading-row { flex-direction: column; align-items: flex-start; gap: 10px; }

    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .category-card { height: 140px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-info { padding: 10px; }
    .product-info .title { font-size: 13px; }

    .footer { padding: 34px 0 16px; }
    .footer .container { grid-template-columns: 1fr; gap: 26px; }

    .listing-layout { grid-template-columns: 1fr; }
    .filters-sidebar { order: 2; }

    .product-detail-grid { grid-template-columns: 1fr; gap: 24px; }
    .pd-actions { flex-wrap: wrap; }
    .pd-actions .btn, .pd-actions .btn-outline { flex: 1; justify-content: center; min-width: 140px; }

    .cart-table th:nth-child(2), .cart-table td:nth-child(2) { display: none; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }

    .floating-btns { right: 14px; bottom: 14px; }
    .fab { width: 46px; height: 46px; }
}
