/*
Theme Name: SmartKitchen Pro
Theme URI: https://smartkitchenpro.example.com
Author: Your Name / Brand
Author URI: https://smartkitchenpro.example.com
Description: High-converting, modern, responsive Amazon Affiliate theme for Home & Kitchen appliances.
Version: 2.0.0
Requires at least: 6.3
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, food-and-drink, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks
Text Domain: smartkitchen-pro
*/

/* ---------- Accessibility ---------- */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
  background: #fff; color: #0f172a; clip: auto; clip-path: none;
  display: block; height: auto; width: auto; left: 8px; top: 8px;
  padding: 12px 20px; z-index: 100000; font-weight: 700; border-radius: 8px;
  box-shadow: 0 0 0 3px #10b981;
}
/* Two-tone focus ring: dark outline + white halo is visible on light AND dark backgrounds (WCAG 1.4.11 / 2.4.7). */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #0f172a; outline-offset: 2px; box-shadow: 0 0 0 4px #fff;
}
/* Sticky header (~5rem) and mobile CTA bar must never cover the focused element or an anchor target (WCAG 2.4.11). */
html { scroll-padding-top: 8rem; scroll-padding-bottom: 5rem; }
@media (max-width: 639px) {
  body.sk-has-sticky-cta > footer { padding-bottom: 5.5rem; }
}

/* ---------- CTA animation ---------- */
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.02); }
}
.animate-pulse-cta { animation: pulse-subtle 3s infinite ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .animate-pulse-cta { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Amazon button ---------- */
.btn-amazon {
  background: linear-gradient(180deg, #FF9900 0%, #E68A00 100%);
  color: #111827; font-weight: 700; border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(230, 138, 0, 0.3);
  transition: all 0.2s ease-in-out;
}
.btn-amazon:hover {
  background: linear-gradient(180deg, #F38B00 0%, #D87D00 100%);
  box-shadow: 0 6px 12px -1px rgba(230, 138, 0, 0.4);
  transform: translateY(-1px);
}
.sticky-cta-shadow { box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15); }

/* ---------- Pagination (WordPress outputs .nav-links > .page-numbers) ---------- */
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; font-size: .875rem; font-weight: 700; }
.pagination .page-numbers { padding: .5rem .9rem; border-radius: .5rem; background: #f1f5f9; color: #334155; }
.pagination a.page-numbers:hover { background: rgb(var(--brand-100)); color: rgb(var(--brand-800)); }
.pagination .page-numbers.current { background: #0f172a; color: #fff; }

/* ---------- Core WordPress alignment / media ---------- */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .8rem; color: #475569; text-align: center; }
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
iframe[src*="youtube.com"], iframe[src*="youtube-nocookie.com"], iframe[src*="player.vimeo.com"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.alignwide { max-width: 100%; }
@media (min-width: 1024px) {
  .prose .alignwide { max-width: none; width: calc(100% + 6rem); margin-left: -3rem; margin-right: -3rem; }
}
.alignfull { width: 100%; max-width: 100%; }
.gallery-caption { font-size: .8rem; color: #475569; }
.sticky { outline: 2px solid rgb(var(--brand-200)); outline-offset: -2px; }
.bypostauthor > .comment-body { border-color: rgb(var(--brand-300)); }

/* ---------- Comments ---------- */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; margin-left: 1.5rem; padding-left: 1rem; border-left: 2px solid #e2e8f0; }
.comment-list .comment-body { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1rem; margin-bottom: 1rem; font-size: .875rem; }
.comment-list .avatar { border-radius: 9999px; float: left; margin-right: .75rem; }
.comment-list .fn { font-weight: 700; color: #0f172a; font-style: normal; }
.comment-list .comment-metadata { font-size: .75rem; color: #475569; margin-bottom: .5rem; }
.comment-list .reply a { font-size: .75rem; font-weight: 700; color: rgb(var(--brand-700)); }

/* ---------- Footer widgets (dark background) ---------- */
footer .widget-title { color: #fff; margin-bottom: 1rem; }
footer .widget, footer .widget a { color: #cbd5e1; }
footer .widget a:hover { color: rgb(var(--brand-400)); }
footer .widget ul { font-size: .875rem; }
footer .widget li { padding: .3rem 0; }
footer .widget input[type="text"], footer .widget input[type="email"], footer .widget input[type="search"], footer .widget select { background: #0f172a; color: #f8fafc; border-color: #334155; }

/* ---------- Widgets + post navigation ---------- */
.widget { margin-bottom: 2rem; }
.widget-title { font-weight: 800; color: #0f172a; margin-bottom: .75rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .25rem 0; }
.widget a { color: #334155; }
.widget a:hover { color: rgb(var(--brand-700)); }
.widget input[type="search"], .widget select { width: 100%; border: 1px solid #cbd5e1; border-radius: .5rem; padding: .5rem .75rem; }
.post-navigation .nav-links { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 640px) { .post-navigation .nav-links { grid-template-columns: 1fr 1fr; } }
.post-navigation a { display: block; padding: 1rem; border-radius: 1rem; background: #fff; box-shadow: 0 0 0 1px rgb(226 232 240 / .7); color: #0f172a; font-weight: 700; text-decoration: none; }
.post-navigation a:hover { color: rgb(var(--brand-700)); }
.post-navigation .nav-next { text-align: right; }
.sk-nav-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #475569; }

/* ---------- Back to top ---------- */
.sk-scroll-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 45; width: 2.75rem; height: 2.75rem;
  display: flex; align-items: center; justify-content: center; border: 0; border-radius: 9999px; cursor: pointer;
  background: #0f172a; color: #fff; box-shadow: 0 8px 24px -6px rgba(15, 23, 42, .45);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s, background-color .2s;
}
.sk-scroll-top[hidden] { display: none; }
.sk-scroll-top.is-visible { opacity: 1; transform: none; }
.sk-scroll-top:hover { background: rgb(var(--brand-700)); }
@media (max-width: 639px) { body.sk-has-sticky-cta .sk-scroll-top { bottom: 5.5rem; } }
@media (prefers-reduced-motion: reduce) { .sk-scroll-top { transition: none; } }

/* ---------- Live search ---------- */
.sk-live-results {
  position: absolute; left: 0; right: 0; top: calc(100% + .5rem); z-index: 50; margin: 0; padding: .375rem; list-style: none;
  background: #fff; color: #0f172a; text-align: left; border-radius: 1rem; box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .35); border: 1px solid #e2e8f0;
}
.sk-live-results[hidden] { display: none; }
.sk-live-results a, .sk-live-results .sk-live-msg { display: block; padding: .6rem .75rem; border-radius: .6rem; font-size: .875rem; font-weight: 600; color: #0f172a; text-decoration: none; }
.sk-live-results [aria-selected="true"] > a, .sk-live-results a:hover { background: rgb(var(--brand-50)); color: rgb(var(--brand-800)); }
.sk-live-results .sk-live-msg { color: #475569; font-weight: 500; }
.sk-live-results .sk-live-all a { color: rgb(var(--brand-700)); font-weight: 800; border-top: 1px solid #f1f5f9; border-radius: 0 0 .6rem .6rem; }
@media print { .sk-scroll-top, .sk-live-results { display: none !important; } }

/* ---------- Honeypot (anti-spam). Never display:none – bots skip those. ---------- */
.sk-hp { position: absolute !important; left: -9999px; height: 1px; width: 1px; overflow: hidden; }


/* =====================================================================
 * v2.0 – premium design layer
 * ===================================================================== */
html { scroll-behavior: smooth; }
body { font-family: var(--sk-font, ui-sans-serif, system-ui, sans-serif); text-rendering: optimizeLegibility; }

/* Hero background: brand-coloured mesh glow + subtle grid */
.sk-hero-bg {
  background-color: #020617;
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgb(var(--brand-600) / .35), transparent 60%),
    radial-gradient(40rem 24rem at -10% 110%, rgb(var(--accent-600) / .22), transparent 60%);
}
.sk-grid-pattern {
  background-image:
    linear-gradient(to right, rgb(255 255 255 / .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.sk-glass { background: rgb(255 255 255 / .06); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* Reading progress bar */
#sk-progress { width: 0; transition: width .1s linear; }

/* Long-form content */
.prose h2, .prose h3 { scroll-margin-top: 6.5rem; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose img { border-radius: .9rem; }
.sk-table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: .9rem; border: 1px solid #e2e8f0; }
.sk-table-wrap table { margin: 0 !important; min-width: 560px; }
.sk-table-wrap th { background: #f8fafc; }

/* TOC + FAQ <details> */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.sk-faq summary::after {
  content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .7rem;
  float: right; margin-top: .3rem; transition: transform .2s; color: #94a3b8;
}
.sk-faq details[open] summary::after { transform: rotate(180deg); }

/* Header: slightly stronger glass on scroll-capable browsers */
.sk-header { backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); }

@media print {
  .sk-header, #sk-progress, footer, aside, .sticky-cta-shadow { display: none !important; }
}
