/*
Theme Name: AdNova
Theme URI: https://example.com/adnova
Author: Your Studio
Author URI: https://example.com
Description: AdNova is a fast, lightweight, SEO & AdSense-friendly WordPress theme with full WooCommerce support. Every header, footer, page, post and section is editable from the Customizer. Built for premium editorial and store sites that need clean semantic markup, quick load times, and ready-made ad placements that are policy friendly.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adnova
Tags: e-commerce, blog, one-column, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, theme-options, wide-blocks, block-styles

AdNova is distributed under the terms of the GNU General Public License v2 or later.
*/

/* ==========================================================================
   1. CSS RESET & VARIABLES
   ========================================================================== */
:root{
  --an-accent: #2451e6;
  --an-accent-dark: #1a3bb3;
  --an-ink: #14161a;
  --an-ink-soft: #4b505c;
  --an-line: #e7e9ee;
  --an-bg: #ffffff;
  --an-bg-soft: #f6f7fb;
  --an-radius: 14px;
  --an-radius-sm: 8px;
  --an-shadow: 0 2px 10px rgba(20,22,26,.06);
  --an-shadow-lg: 0 12px 40px rgba(20,22,26,.10);
  --an-maxw: 1180px;
  --an-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--an-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--an-ink);
  background: var(--an-bg);
  text-rendering: optimizeLegibility;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: var(--an-accent); text-decoration: none; }
a:hover{ color: var(--an-accent-dark); text-decoration: underline; }
ul, ol{ padding-left: 1.2em; }
h1,h2,h3,h4,h5,h6{ line-height: 1.25; font-weight: 800; margin: 0 0 .55em; letter-spacing: -.01em; }
h1{ font-size: clamp(1.9rem, 3vw, 2.6rem); }
h2{ font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3{ font-size: 1.3rem; }
p{ margin: 0 0 1.2em; }
table{ width:100%; border-collapse: collapse; }
figure{ margin: 0; }
button, input, select, textarea{ font-family: inherit; font-size: inherit; }
.screen-reader-text{
  position: absolute !important; width:1px; height:1px; overflow:hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap; border:0; padding:0; margin:-1px;
}
.skip-link{
  position: absolute; left: -9999px; top: 0; background: var(--an-ink); color:#fff;
  padding: 12px 18px; z-index: 999999; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

/* ==========================================================================
   2. LAYOUT
   ========================================================================== */
.an-container{ max-width: var(--an-maxw); margin: 0 auto; padding: 0 24px; }
.an-main-wrap{ display: grid; grid-template-columns: 1fr; gap: 48px; padding: 40px 0 64px; }
.an-main-wrap.has-sidebar{ grid-template-columns: minmax(0,1fr) 300px; align-items: start; }
@media (max-width: 880px){
  .an-main-wrap.has-sidebar{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.an-topbar{ background: var(--an-ink); color: #fff; font-size: 13.5px; }
.an-topbar .an-container{ display:flex; justify-content: space-between; align-items:center; padding-top:8px; padding-bottom:8px; gap: 16px; flex-wrap: wrap; }
.an-topbar a{ color: rgba(255,255,255,.85); }
.an-topbar a:hover{ color:#fff; }
.an-social{ display:flex; gap:14px; }

.an-header{ border-bottom: 1px solid var(--an-line); background: var(--an-bg); position: sticky; top:0; z-index: 500; }
.an-header-inner{ display:flex; align-items:center; justify-content: space-between; gap: 24px; padding: 16px 0; }
.an-logo{ display:flex; align-items:center; gap:10px; font-size: 1.5rem; font-weight: 900; color: var(--an-ink); }
.an-logo img{ max-height: 46px; width:auto; }
.an-logo:hover{ text-decoration:none; color: var(--an-ink); }
.an-tagline{ font-size:.72rem; color: var(--an-ink-soft); display:block; font-weight:500; letter-spacing:.02em; }

.an-primary-nav{ display:flex; align-items:center; gap: 4px; }
.an-primary-nav ul{ list-style:none; margin:0; padding:0; display:flex; gap: 2px; }
.an-primary-nav li{ position: relative; }
.an-primary-nav a{ display:block; padding: 10px 14px; color: var(--an-ink); font-weight:600; font-size:.96rem; border-radius: var(--an-radius-sm); }
.an-primary-nav a:hover{ background: var(--an-bg-soft); text-decoration:none; }
.an-primary-nav ul ul{ display:none; position:absolute; left:0; top:100%; background:#fff; min-width:220px; box-shadow: var(--an-shadow-lg); border-radius: var(--an-radius-sm); padding:8px; flex-direction:column; border:1px solid var(--an-line); }
.an-primary-nav li:hover > ul{ display:flex; }
.an-primary-nav ul ul li{ width:100%; }

.an-header-actions{ display:flex; align-items:center; gap:14px; }
.an-icon-btn{ position:relative; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%; background: var(--an-bg-soft); color: var(--an-ink); }
.an-icon-btn:hover{ background: var(--an-line); text-decoration:none; }
.an-cart-count{ position:absolute; top:-4px; right:-4px; background: var(--an-accent); color:#fff; font-size:11px; font-weight:700; min-width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center; }

.an-menu-toggle{ display:none; background:none; border:1px solid var(--an-line); border-radius: var(--an-radius-sm); width:42px; height:42px; align-items:center; justify-content:center; cursor:pointer; }
.an-menu-toggle span, .an-menu-toggle span::before, .an-menu-toggle span::after{ content:""; display:block; width:20px; height:2px; background: var(--an-ink); position:relative; transition:.2s; }
.an-menu-toggle span::before{ position:absolute; top:-6px; } .an-menu-toggle span::after{ position:absolute; top:6px; }

@media (max-width: 880px){
  .an-menu-toggle{ display:inline-flex; }
  .an-primary-nav{ position:fixed; inset:0 0 0 auto; width:min(320px,86vw); height:100vh; background:#fff; flex-direction:column; align-items:stretch; transform:translateX(100%); transition:transform .25s ease; box-shadow: var(--an-shadow-lg); padding: 20px; overflow-y:auto; }
  .an-primary-nav.is-open{ transform:translateX(0); }
  .an-primary-nav ul{ flex-direction:column; width:100%; }
  .an-primary-nav ul ul{ position:static; box-shadow:none; border:none; padding-left:12px; display:none; }
  .an-primary-nav li.is-open > ul{ display:flex; }
  .an-nav-overlay{ display:none; position:fixed; inset:0; background:rgba(20,22,26,.4); z-index:490; }
  .an-nav-overlay.is-open{ display:block; }
  .an-social{ display:none; }
}

/* ==========================================================================
   4. AD SLOTS (Customizer-controlled, AdSense/Auto-ads friendly)
   ========================================================================== */
.an-ad-slot{ margin: 28px auto; text-align:center; overflow:hidden; }
.an-ad-slot span{ display:block; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color: var(--an-ink-soft); margin-bottom:6px; }
.an-ad-slot--header{ margin: 0 0 0; padding: 14px 0; border-bottom: 1px solid var(--an-line); }
.an-ad-slot--incontent{ margin: 32px 0; }
.an-ad-slot--sidebar{ margin: 0 0 24px; }

/* ==========================================================================
   5. HERO / HOMEPAGE
   ========================================================================== */
.an-hero{ background: linear-gradient(180deg, var(--an-bg-soft), #fff); border-bottom:1px solid var(--an-line); padding: 56px 0; }
.an-hero-inner{ display:grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items:center; }
.an-hero-eyebrow{ display:inline-block; background: rgba(36,81,230,.1); color: var(--an-accent); font-weight:700; font-size:.8rem; padding:6px 12px; border-radius:999px; margin-bottom:14px; }
.an-hero p.lead{ font-size:1.15rem; color: var(--an-ink-soft); }
.an-btn{ display:inline-flex; align-items:center; gap:8px; background: var(--an-accent); color:#fff; font-weight:700; padding:13px 24px; border-radius:999px; border:none; cursor:pointer; }
.an-btn:hover{ background: var(--an-accent-dark); color:#fff; text-decoration:none; }
.an-btn.outline{ background:transparent; color: var(--an-ink); border:1.5px solid var(--an-line); }
.an-hero-media img{ border-radius: var(--an-radius); box-shadow: var(--an-shadow-lg); }
@media (max-width: 880px){ .an-hero-inner{ grid-template-columns: 1fr; } }

.an-section{ padding: 52px 0; }
.an-section-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom: 28px; flex-wrap:wrap; }
.an-section-head p{ margin:0; color: var(--an-ink-soft); }

/* Post grid */
.an-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 960px){ .an-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px){ .an-grid{ grid-template-columns: 1fr; } }

.an-card{ background:#fff; border:1px solid var(--an-line); border-radius: var(--an-radius); overflow:hidden; transition: transform .18s ease, box-shadow .18s ease; display:flex; flex-direction:column; }
.an-card:hover{ transform: translateY(-4px); box-shadow: var(--an-shadow-lg); }
.an-card-thumb{ aspect-ratio: 16/10; overflow:hidden; background: var(--an-bg-soft); }
.an-card-thumb img{ width:100%; height:100%; object-fit:cover; }
.an-card-body{ padding: 18px 20px 22px; flex:1; display:flex; flex-direction:column; }
.an-card-cat{ font-size:.72rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color: var(--an-accent); margin-bottom:8px; }
.an-card-title{ font-size:1.08rem; margin-bottom:8px; }
.an-card-title a{ color: var(--an-ink); }
.an-card-title a:hover{ color: var(--an-accent); text-decoration:none; }
.an-card-excerpt{ color: var(--an-ink-soft); font-size:.94rem; margin-bottom:0; }
.an-card-meta{ margin-top:auto; padding-top:14px; font-size:.82rem; color: var(--an-ink-soft); display:flex; gap:10px; align-items:center; }
.an-card-meta img.avatar{ width:22px; height:22px; border-radius:50%; }

/* ==========================================================================
   6. WOOCOMMERCE PRODUCT SECTIONS
   ========================================================================== */
.an-products-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style:none; margin:0; padding:0; }
@media (max-width: 960px){ .an-products-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .an-products-grid{ grid-template-columns: 1fr 1fr; gap:14px; } }

ul.products{ display:grid !important; grid-template-columns: repeat(4,1fr); gap:24px; list-style:none; margin:0 !important; padding:0 !important; }
@media (max-width: 960px){ ul.products{ grid-template-columns: repeat(2,1fr) !important; } }

.an-product-card, ul.products li.product{ background:#fff; border:1px solid var(--an-line); border-radius: var(--an-radius); padding: 16px 16px 20px; text-align:center; transition: box-shadow .18s ease, transform .18s ease; position:relative; }
ul.products li.product:hover{ box-shadow: var(--an-shadow-lg); transform: translateY(-4px); }
ul.products li.product img{ border-radius: var(--an-radius-sm); margin-bottom: 12px; aspect-ratio: 1/1; object-fit:cover; }
ul.products li.product .price{ color: var(--an-accent); font-weight:800; }
ul.products li.product h2, ul.products li.product h3{ font-size: 1rem; margin: 6px 0; }
.onsale{ position:absolute; top:12px; left:12px; background: var(--an-ink); color:#fff; font-size:.7rem; font-weight:800; padding:4px 9px; border-radius:999px; z-index:2; }
.an-add-to-cart, a.button.add_to_cart_button, a.single_add_to_cart_button, button.single_add_to_cart_button{
  display:inline-flex; align-items:center; justify-content:center; background: var(--an-accent) !important; color:#fff !important;
  font-weight:700 !important; padding:10px 20px !important; border-radius:999px !important; border:none !important; cursor:pointer;
}
a.button.add_to_cart_button:hover, a.single_add_to_cart_button:hover{ background: var(--an-accent-dark) !important; }

.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews{
  background: var(--an-bg-soft); border-left:4px solid var(--an-accent); padding:14px 18px; border-radius: var(--an-radius-sm); list-style:none;
}
.woocommerce-error{ border-left-color:#e0453b; }

/* ==========================================================================
   7. SINGLE POST / PAGE
   ========================================================================== */
.an-entry-header{ margin-bottom: 24px; }
.an-entry-meta{ color: var(--an-ink-soft); font-size:.9rem; display:flex; gap:16px; flex-wrap:wrap; align-items:center; }
.an-entry-thumb{ margin: 22px 0; border-radius: var(--an-radius); overflow:hidden; }
.an-content{ font-size:1.08rem; }
.an-content h2{ margin-top:1.4em; }
.an-content blockquote{ margin:1.6em 0; padding: 6px 22px; border-left:4px solid var(--an-accent); color: var(--an-ink-soft); font-style:italic; }
.an-content pre{ background: var(--an-ink); color:#f4f5f7; padding:16px; border-radius: var(--an-radius-sm); overflow:auto; }
.an-content img{ border-radius: var(--an-radius-sm); }
.an-tags{ margin-top: 28px; display:flex; gap:8px; flex-wrap:wrap; }
.an-tags a{ background: var(--an-bg-soft); padding:6px 14px; border-radius:999px; font-size:.85rem; color: var(--an-ink); }
.an-tags a:hover{ background: var(--an-line); text-decoration:none; }

.an-author-box{ display:flex; gap:18px; background: var(--an-bg-soft); border-radius: var(--an-radius); padding:22px; margin: 36px 0; }
.an-author-box img{ border-radius:50%; width:64px; height:64px; }

.an-post-nav{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin: 36px 0; }
.an-post-nav a{ display:block; border:1px solid var(--an-line); border-radius: var(--an-radius); padding:16px; color: var(--an-ink); }
.an-post-nav a:hover{ border-color: var(--an-accent); text-decoration:none; }
.an-post-nav span{ display:block; font-size:.75rem; color: var(--an-ink-soft); text-transform:uppercase; letter-spacing:.05em; margin-bottom:4px; }
@media (max-width:640px){ .an-post-nav{ grid-template-columns:1fr; } }

/* ==========================================================================
   8. SIDEBAR & WIDGETS
   ========================================================================== */
.widget{ background:#fff; border:1px solid var(--an-line); border-radius: var(--an-radius); padding: 20px; margin-bottom: 24px; }
.widget-title{ font-size:1rem; text-transform:uppercase; letter-spacing:.04em; margin-bottom:16px; padding-bottom:10px; border-bottom:2px solid var(--an-ink); display:inline-block; }
.widget ul{ list-style:none; padding:0; margin:0; }
.widget ul li{ padding: 9px 0; border-bottom:1px dashed var(--an-line); }
.widget ul li:last-child{ border-bottom:none; }
.widget select, .widget input[type="text"], .widget input[type="search"]{ width:100%; padding:10px 12px; border:1px solid var(--an-line); border-radius: var(--an-radius-sm); }

/* ==========================================================================
   9. COMMENTS
   ========================================================================== */
.an-comments{ margin-top:48px; }
.comment-list{ list-style:none; margin:0; padding:0; }
.comment-list li{ margin-bottom:20px; }
.an-comment{ display:flex; gap:14px; background: var(--an-bg-soft); padding:18px; border-radius: var(--an-radius); }
.an-comment img{ border-radius:50%; }
.comment-respond input, .comment-respond textarea{ width:100%; padding:11px 14px; border:1px solid var(--an-line); border-radius: var(--an-radius-sm); margin-bottom:14px; }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.an-footer{ background: var(--an-ink); color: rgba(255,255,255,.78); margin-top: 40px; }
.an-footer-widgets{ display:grid; grid-template-columns: repeat(4,1fr); gap: 32px; padding: 56px 0 32px; border-bottom:1px solid rgba(255,255,255,.1); }
.an-footer-widgets .widget{ background:transparent; border:none; padding:0; }
.an-footer-widgets .widget-title{ color:#fff; border-bottom-color: rgba(255,255,255,.25); }
.an-footer-widgets a{ color: rgba(255,255,255,.75); }
.an-footer-widgets a:hover{ color:#fff; }
@media (max-width:880px){ .an-footer-widgets{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:560px){ .an-footer-widgets{ grid-template-columns: 1fr; } }
.an-footer-bottom{ padding: 20px 0; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; font-size:.88rem; }
.an-footer-bottom a{ color: rgba(255,255,255,.8); }
.an-back-top{ position:fixed; right:22px; bottom:22px; width:46px; height:46px; border-radius:50%; background: var(--an-ink); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow: var(--an-shadow-lg); opacity:0; pointer-events:none; transition:.2s; z-index:600; }
.an-back-top.is-visible{ opacity:1; pointer-events:auto; }

/* ==========================================================================
   10b. SEARCH DROPDOWN / ARCHIVE HEADER / RELATED / MISC BLOCKS
   ========================================================================== */
.an-search-drop{ max-height:0; overflow:hidden; transition:.2s ease; background:#fff; border-bottom:1px solid transparent; }
.an-search-drop.is-open{ max-height:120px; border-bottom-color: var(--an-line); }
.an-search-drop .an-container{ padding-top:16px; padding-bottom:16px; }
.an-search-form{ display:flex; gap:10px; }
.an-search-field{ flex:1; padding:12px 16px; border:1px solid var(--an-line); border-radius: var(--an-radius-sm); }

.an-archive-header{ max-width: var(--an-maxw); margin: 0 auto; padding: 8px 24px 0; }
.an-archive-desc{ color: var(--an-ink-soft); }

.an-related{ margin-top: 56px; padding-top: 40px; border-top:1px solid var(--an-line); }
.an-related h2{ margin-bottom: 20px; }

.an-no-results{ text-align:center; padding: 60px 20px; }
.an-page-links{ margin-top: 24px; font-weight:700; }

/* ==========================================================================
   11. BREADCRUMBS / PAGINATION / UTILITIES
   ========================================================================== */
.an-breadcrumbs{ font-size:.86rem; color: var(--an-ink-soft); margin-bottom:20px; }
.an-breadcrumbs a{ color: var(--an-ink-soft); }
.an-pagination{ display:flex; gap:8px; justify-content:center; margin: 40px 0 0; flex-wrap:wrap; }
.an-pagination a, .an-pagination span{ display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:40px; border-radius: var(--an-radius-sm); border:1px solid var(--an-line); color: var(--an-ink); padding:0 12px; }
.an-pagination a:hover{ border-color: var(--an-accent); color: var(--an-accent); text-decoration:none; }
.an-pagination .current{ background: var(--an-ink); color:#fff; border-color: var(--an-ink); }
.an-alignwide{ width:100%; }
.bypostauthor{ display:block; }
.sticky{ position:relative; }
