/*
Theme Name: Bida Tan Loc
Theme URI: https://billiardstanloc.com.vn
Author: Bida Tan Loc
Description: Theme chuyên ngành bàn bida và bàn bi lắc cho Bida Tấn Lộc. Thiết kế hiện đại, responsive, tối ưu cho doanh nghiệp kinh doanh bàn bida.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: bidatanloc
Tags: business, e-commerce, custom-menu, featured-images, translation-ready
*/

:root {
  --green: #0e5c3a;
  --green-dark: #0a3d28;
  --green-light: #14794e;
  --gold: #d4a017;
  --gold-light: #e9c55c;
  --dark: #1c1c1c;
  --text: #3a3a3a;
  --muted: #6b7280;
  --light: #f6f7f5;
  --border: #e5e7eb;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--green-light); }

h1, h2, h3, h4, h5 { line-height: 1.3; color: var(--dark); margin: 0 0 .5em; }

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

.clear::after { content: ""; display: block; clear: both; }

/* ===== Top bar ===== */
.topbar {
  background: var(--dark);
  color: #ddd;
  font-size: 13px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #eee; }
.topbar a:hover { color: var(--gold-light); }
.topbar .tb-left span { margin-right: 18px; }
.topbar .tb-left svg { vertical-align: -2px; margin-right: 5px; }
.topbar .tb-right a { margin-left: 14px; }

/* ===== Header ===== */
.site-header {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  color: #fff;
  position: relative;
  z-index: 60;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 24px;
}
.site-branding { display: flex; align-items: center; flex: 0 0 auto; }
.site-branding .logo { display: block; }
.site-branding .logo img { height: 56px; width: auto; display: block; }

/* ===== Navigation (single row) ===== */
.main-nav { margin-left: auto; }
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.main-nav li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  color: #fff;
  padding: 10px 15px;
  font-size: 14.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-radius: 6px;
  cursor: pointer;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a,
.main-nav > ul > li.open > a {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.main-nav li.menu-item-has-children > a::after { content: " ▾"; font-size: 11px; }
.main-nav ul.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  display: none;
  z-index: 100;
}
.main-nav li:hover > ul.sub-menu,
.main-nav li:focus-within > ul.sub-menu,
.main-nav li.open > ul.sub-menu { display: block; }
.main-nav ul.sub-menu li a {
  display: block;
  padding: 12px 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.main-nav ul.sub-menu li a:hover { background: var(--light); color: var(--green); padding-left: 24px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  padding: 8px 4px;
}

/* ===== Hero slider ===== */
.hero { position: relative; overflow: hidden; }
.hero .slide {
  display: none;
  position: relative;
  height: 460px;
  background-size: cover;
  background-position: center;
}
.hero .slide.active { display: block; }
.hero .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 40, 26, .88) 0%, rgba(6, 40, 26, .55) 55%, rgba(6, 40, 26, .15) 100%);
  display: flex;
  align-items: center;
}
.hero .slide-caption { color: #fff; max-width: 620px; }
.hero .slide-caption h2 { color: #fff; font-size: 40px; margin-bottom: 14px; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.hero .slide-caption p { font-size: 17px; margin-bottom: 26px; color: #eaf4ee; max-width: 540px; }
.hero .slide-caption .btn { box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; z-index: 10; }
.hero-dots button {
  width: 12px; height: 12px; border-radius: 50%;
  border: 0; margin: 0 4px; cursor: pointer;
  background: rgba(255,255,255,.5);
}
.hero-dots button.active { background: var(--gold); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 26px;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 14px;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: #b8890f; color: #fff; transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green);
}
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-light); }

/* ===== Section headings ===== */
.section { padding: 60px 0; }
.section-alt { background: var(--light); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .kicker {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 8px;
}
.section-head h2 { font-size: 30px; margin-bottom: 10px; }
.section-head p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ===== Intro / about ===== */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.intro-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.intro-text h2 { font-size: 28px; }
.intro-text .lead { font-size: 17px; color: var(--green); font-weight: 600; }
.intro-features { list-style: none; padding: 0; margin: 18px 0 24px; }
.intro-features li { padding: 6px 0 6px 28px; position: relative; }
.intro-features li::before {
  content: "✓";
  position: absolute; left: 0; top: 6px;
  color: #fff; background: var(--green);
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 12px; text-align: center; line-height: 20px;
}

/* ===== Product grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-card .thumb { display: block; position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--light); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .cat-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--gold); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.product-card .body { padding: 16px; }
.product-card .title { font-size: 16px; margin: 0 0 10px; line-height: 1.45; }
.product-card .title a { color: var(--dark); }
.product-card .title a:hover { color: var(--green); }
.product-card .price {
  display: inline-block;
  color: #fff;
  background: var(--green);
  font-weight: 800;
  font-size: 15px;
  padding: 4px 12px;
  border-radius: 20px;
}
.product-card .price.contact { background: var(--gold); }
.product-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.product-card .detail-link { font-size: 13px; font-weight: 700; }

.category-tabs { text-align: center; margin-bottom: 30px; }
.category-tabs a {
  display: inline-block; padding: 9px 22px; margin: 0 6px;
  border: 1px solid var(--border); border-radius: 30px;
  color: var(--text); font-weight: 600; font-size: 14px;
}
.category-tabs a.active, .category-tabs a:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== Why choose us ===== */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-item {
  text-align: center; padding: 28px 18px;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.why-item .icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: var(--green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px;
}
.why-item h3 { font-size: 17px; margin-bottom: 8px; }
.why-item p { font-size: 14px; color: var(--muted); margin: 0; }

/* ===== Video section ===== */
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.video-card { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.video-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-card .play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.video-card .play span {
  width: 70px; height: 70px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; transition: background .2s;
}
.video-card:hover .play span { background: var(--gold); }
.video-card .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  color: #fff; padding: 30px 16px 14px; font-weight: 600;
}

/* ===== News ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s; }
.news-card:hover { box-shadow: var(--shadow); }
.news-card .thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--light); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 18px; }
.news-card .date { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.news-card h3 { font-size: 16px; margin: 0 0 8px; }
.news-card h3 a { color: var(--dark); }
.news-card h3 a:hover { color: var(--green); }

/* ===== CTA band ===== */
.cta-band {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff; text-align: center; padding: 50px 20px;
}
.cta-band h2 { color: #fff; font-size: 28px; margin-bottom: 10px; }
.cta-band p { margin-bottom: 22px; color: #d7e9df; }
.cta-band .hotline-big { font-size: 30px; font-weight: 800; color: var(--gold-light); margin-bottom: 18px; }
.cta-band .hotline-big a { color: var(--gold-light); }

/* ===== Footer ===== */
.site-footer { background: #121212; color: #bbb; padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 34px; }
.site-footer h3 {
  color: #fff; font-size: 17px; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 2px solid var(--green-light); display: inline-block;
}
.site-footer a { color: #bbb; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 5px 0; }
.site-footer .contact-list li { padding-left: 26px; position: relative; }
.site-footer .contact-list li::before { content: "•"; position: absolute; left: 8px; color: var(--gold); }
.footer-bottom {
  background: #0b0b0b; text-align: center;
  padding: 16px; font-size: 13px; color: #777;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs { background: var(--light); border-bottom: 1px solid var(--border); padding: 12px 0; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span.current { color: var(--green); font-weight: 600; }

/* ===== Page content ===== */
.page-content { padding: 40px 0 60px; }
.page-content h1, .entry-title { font-size: 30px; margin-bottom: 18px; }
.page-content p { margin-bottom: 16px; }

/* ===== Product detail ===== */
.product-detail { padding: 40px 0 60px; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.product-gallery .main-image {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--light);
}
.product-gallery .main-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.product-info h1 { font-size: 28px; margin-bottom: 14px; }
.product-info .price-box {
  background: var(--light); border-left: 4px solid var(--gold);
  padding: 16px 20px; margin-bottom: 20px; border-radius: 0 var(--radius) var(--radius) 0;
}
.product-info .price-box .label { font-size: 13px; color: var(--muted); }
.product-info .price-box .value { font-size: 26px; font-weight: 800; color: var(--green); }
.product-info .price-box .value.contact { color: var(--gold); }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.product-specs { margin-top: 26px; }
.product-specs h3 { font-size: 18px; }
.product-specs table { width: 100%; border-collapse: collapse; }
.product-specs td {
  padding: 10px 14px; border: 1px solid var(--border); font-size: 14px;
}
.product-specs td:first-child { background: var(--light); font-weight: 600; width: 38%; }

/* ===== Contact page ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.contact-info-box { background: var(--green); color: #fff; padding: 28px; border-radius: var(--radius); }
.contact-info-box h3 { color: #fff; margin-bottom: 16px; }
.contact-info-box p { margin: 0 0 12px; }
.contact-info-box a { color: var(--gold-light); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 15px; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--green); }
.form-message { padding: 14px 18px; border-radius: 6px; margin-bottom: 18px; display: none; }
.form-message.success { display: block; background: #e7f6ec; color: var(--green); border: 1px solid #bfe6cd; }
.form-message.error { display: block; background: #fdeaea; color: #b91c1c; border: 1px solid #f3b8b8; }

/* ===== Map ===== */
.map-wrap { margin-top: 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ===== Pagination ===== */
.pagination { text-align: center; margin-top: 40px; }
.pagination .page-numbers {
  display: inline-block; padding: 8px 14px; margin: 0 3px;
  border: 1px solid var(--border); border-radius: 6px; color: var(--text);
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== Misc ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.container-narrow { max-width: 800px; }
.single-content { font-size: 16.5px; line-height: 1.85; color: #333; }
.single-content h2, .single-content h3 { margin-top: 28px; }
.single-content img { border-radius: 8px; margin: 20px 0; }

/* ===== Single post ===== */
.single-post-page .post-header { margin-bottom: 26px; }
.single-post-page .entry-title { font-size: 34px; line-height: 1.25; margin-bottom: 14px; }
.post-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.post-thumbnail { margin: 0 0 26px; }
.post-thumbnail img { width: 100%; border-radius: var(--radius); }
.post-nav { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-grid, .product-detail-grid, .contact-grid, .video-grid, .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar .tb-right { display: none; }
  .nav-toggle { display: block; }
  .main-nav { position: static; }
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 200;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
  }
  .main-nav ul.open { display: flex; }
  .main-nav > ul > li > a { border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; }
  .main-nav ul.sub-menu {
    position: static; display: none; box-shadow: none; border-top: 0;
    border-radius: 0; padding-left: 16px; background: rgba(0, 0, 0, .18);
  }
  .main-nav ul.sub-menu.open { display: block; }
  .main-nav ul.sub-menu li a { color: #e6efe9; border-bottom: 0; }
  .hero .slide { height: 300px; }
  .hero .slide-caption h2 { font-size: 24px; }
  .hero .slide-caption p { font-size: 15px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .news-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}
