/* =========================
   Base and variables (New Dark Theme)
========================= */
:root{
  --bg: #111827; /* Dark Blue/Black */
  --panel: #1f2937; /* Lighter Grey/Blue for Panels */
  --ink: #f9fafb; /* White for Headings */
  --text: #d1d5db; /* Light Grey for Body Text */
  --muted: #9ca3af; /* Muted Grey for hints/subtext */
  --border: #374151; /* Subtle Border */
  --card: #1f2937; /* Card Background */
  --brand: #f59e0b; /* Amber/Gold Accent */
  --brand-dk: #d97706; /* Darker Amber */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dk); }
img { max-width: 100%; height: auto; display: block; }
.alert-info { background: var(--panel); border: 1px solid var(--border); padding: 20px; border-radius: 8px; }

/* =========================
   Header / Navigation
========================= */
header.main-header { position: sticky; top: 0; z-index: 1000; background: var(--panel); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand a { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .5px; font-size: 1.25rem; }
nav.main-nav { display: flex; gap: 10px; }
nav.main-nav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-weight: 500; transition: background .2s; white-space: nowrap; }
nav.main-nav a:hover { background: var(--border); color: var(--ink); }
.menu-toggle { display: none; cursor: pointer; color: var(--ink); font-size: 22px; line-height: 1; padding: 6px 8px; border-radius: 6px; }
.menu-toggle:hover { background: var(--border); }
nav.main-nav.show { position: absolute; right: 20px; top: 110px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px; flex-direction: column; width: min(260px, calc(100% - 40px)); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.top-bar { background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 20px; }
.top-bar .container { display: flex; align-items: center; gap: 20px; }
.search-form { position: relative; flex: 1; display: flex; max-width: 600px; margin: 0 auto; }
.search-input { flex: 1; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px 0 0 8px; background: var(--bg); color: var(--ink); font-size: 1rem; }
.search-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
.search-button { padding: 10px 18px; border: none; background: var(--brand); color: #111; border-radius: 0 8px 8px 0; font-weight: 600; cursor: pointer; transition: background .2s; }
.search-button:hover { background: var(--brand-dk); }

/* =========================
   Hero Section v2 (UPDATED)
========================= */
.hero-v2 {
  --hero-overlay: linear-gradient(to right, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  color: var(--ink);
  padding: 80px 0;
  text-align: center;
}
.hero-v2 h1 { font-size: 2.8rem; letter-spacing: .2px; margin-bottom: 12px; }
.hero-v2 p { color: var(--text); max-width: 600px; margin: 0 auto 28px auto; font-size: 1.1rem; }
.btn-primary { display: inline-block; padding: 12px 28px; background: var(--brand); color: #111; border-radius: 50px; text-decoration: none; font-weight: 700; transition: background .2s, transform .2s; }
.btn-primary:hover { background: var(--brand-dk); transform: translateY(-2px); }

/* =========================
   Featured Categories
========================= */
.featured-categories { padding: 40px 0; background: var(--bg); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.category-card { display: block; position: relative; border-radius: 12px; overflow: hidden; color: white; text-decoration: none; }
.category-card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%); transition: background 0.3s; }
.category-card:hover::after { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.1) 60%); }
.category-card img { width: 100%; height: 350px; object-fit: cover; transition: transform 0.3s; }
.category-card:hover img { transform: scale(1.05); }
.category-card span { position: absolute; bottom: 20px; left: 20px; font-size: 1.5rem; font-weight: 600; z-index: 2; }

/* =========================
   Main Layout & Grids
========================= */
.main-content { padding: 40px 0; }
.section-title { font-size: 1.75rem; margin-bottom: 24px; color: var(--ink); border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.main-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }
.product-area { flex: 1; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.2); border-color: var(--brand); }
.product-card .product-image-link { display: block; }
.product-card img { width: 100%; height: 280px; object-fit: cover; display: block; background-color: var(--bg); }
.product-card .product-info { padding: 16px; flex-grow: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 1rem; color: var(--ink); margin: 0; line-height: 1.4; flex-grow: 1; }
.product-card h3 a { color: inherit; text-decoration: none; }
.product-card .card-category { color: var(--muted); font-size: 0.8rem; font-weight: 500; margin-bottom: 4px; }
.product-card .card-price { margin-top: 8px; font-weight: 600; color: var(--ink); }
.product-card .card-footer { padding-top: 16px; margin-top: auto; }

/* =========================
   Sidebar & Content Cards
========================= */
.sidebar { }
.side-block, .content-card { background: var(--panel); border: 1px solid var(--border); padding: 20px; border-radius: 12px; margin-bottom: 24px; }
.side-block:last-child { margin-bottom: 0; }
.side-block h3 { font-size: 1rem; color: var(--ink); margin: 0 0 12px 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); letter-spacing: .2px; }
.side-block ul { list-style: none; padding-left: 0; }
.side-block ul li { margin-bottom: 8px; }
.side-block a { color: var(--text); text-decoration: none; font-weight: 500; transition: color .2s; }
.side-block a:hover { color: var(--brand); }

/* =========================
   Trust Section
========================= */
.trust-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; background: var(--panel); padding: 24px; border-radius: 12px; margin-bottom: 32px; border: 1px solid var(--border); }
.trust-item h4 { color: var(--ink); margin-bottom: 4px; font-size: 1.1rem; }
.trust-item p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin: 0; }

/* =========================
   Blog & Content Pages
========================= */
.post-list .post-card { display: flex; flex-direction: column; gap: 20px; border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 24px; }
.post-list .post-card:last-child { border-bottom: none; margin-bottom: 0; }
@media (min-width: 768px) { .post-list .post-card { flex-direction: row; } }
.post-card-image { display: block; flex-shrink: 0; }
.post-card-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; }
@media (min-width: 768px) { .post-card-image img { width: 250px; height: 160px; } }
.post-card-content h2 { margin: 8px 0; font-size: 1.5rem; }
.post-card-content h2 a { color: var(--ink); text-decoration: none; }
.post-card-content h2 a:hover { color: var(--brand); }
.post-meta { font-size: 0.875rem; color: var(--muted); }
.read-more { display: inline-block; margin-top: 12px; font-weight: 600; }
.post-featured-image { margin: 24px 0; }
.post-featured-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
}
.post-content { line-height: 1.7; font-size: 1.1rem; }
.post-content h1, .post-content h2 { color: var(--ink); margin-top: 1.5em; margin-bottom: 0.5em; }
.post-content p { margin-bottom: 1em; }
.post-content ul, .post-content ol { margin-left: 20px; margin-bottom: 1em; }

/* =========================
   Breadcrumbs, Product Single
========================= */
.breadcrumbs { font-size: 0.9rem; padding: 24px 0 0; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs li::after { content: "/"; margin-left: 8px; }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }

/* Pagination & Footer */
.pagination { text-align: center; margin-top: 30px; }
.pagination a { display: inline-block; margin: 0 4px; padding: 8px 14px; border: 1px solid var(--border); color: var(--text); text-decoration: none; border-radius: 8px; background: var(--panel); transition: all .2s; }
.pagination a:hover { background: var(--border); border-color: var(--muted); }
.pagination a.active { background: var(--brand); color: #111; border-color: var(--brand); }
footer.main-footer { border-top: 1px solid var(--border); background: var(--bg); color: var(--muted); margin-top: 36px; padding: 30px 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.footer-brand a { color: var(--ink); text-decoration: none; font-weight: 700; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.footer-nav a:hover { color: var(--brand); }
.footer-copy { margin-top: 16px; font-size: .9rem; text-align: center; border-top: 1px solid var(--border); padding-top: 16px; }

/* =========================
   Responsive styles
========================= */
@media (max-width: 992px){
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 768px){
  .header-inner { flex-wrap: wrap; }
  nav.main-nav { display: none; order: 3; width: 100%; margin-top: 10px; }
  .menu-toggle { display: inline-block; }
  .top-bar .container { flex-direction: column; gap: 12px; }
  .search-form { width: 100%; }
  .hero-v2 h1 { font-size: 2rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px){
  .product-grid { grid-template-columns: 1fr; }
}

/* =========================
   Product Single Page (NEW professional layout)
========================= */
.product-single {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 40px;
    align-items: start;
    padding-top: 40px;
}
.gallery {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 140px; /* Distance from top to stick */
}
.gallery-main {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--panel);
}
.gallery-main img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}
.gallery-thumbs img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.gallery-thumbs img:hover {
    border-color: var(--brand);
}
.product-info-card {
    display: flex;
    flex-direction: column;
}
.product-info-card h1 {
    font-size: 2rem;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 16px;
}
.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 24px;
}
.product-description {
    margin-bottom: 24px;
    line-height: 1.7;
    flex-grow: 1;
}
.product-info-card .card-footer {
    margin-top: auto;
    background: var(--panel);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.product-info-card .card-footer .btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    text-align: center;
    border-radius: 8px;
    background: var(--brand);
    color: #111;
}
.product-info-card .card-footer .btn-primary:hover {
    background: var(--brand-dk);
}
.affiliate-note {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    margin-top: 16px;
}
.related-products {
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

/* Responsive adjustments for product page */
@media (max-width: 992px) {
    .product-single {
        grid-template-columns: 1fr; /* Stack on smaller screens */
        gap: 24px;
    }
    .gallery {
        position: static; /* Remove sticky positioning on smaller screens */
    }
}

/* =========================
   Post Tags Styling
========================= */
.post-tags {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    display: inline-block;
    background-color: var(--border);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 50px; /* Pill shape */
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}
.tag-item:hover {
    background-color: var(--brand);
    color: #111;
}