/*
Theme Name: Best Tech Shop
Theme URI: https://besttechshop.com
Author: Antigravity AI
Author URI: https://google.com
Description: A simple, modern WordPress theme for Best Tech Shop, featuring a sticky header, left blog posts layout with star ratings, sidebar ads, and a customized footer.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: besttechshop
*/

/* ==========================================
   1. DESIGN SYSTEM & CSS VARIABLES
   ========================================== */
:root {
  --primary-color: #4f46e5;       /* Indigo */
  --primary-hover: #4338ca;
  --secondary-color: #0f172a;     /* Deep slate for headings */
  --bg-color: #f8fafc;            /* Clean light grey/slate background */
  --card-bg: #ffffff;             /* Card and header background */
  --text-main: #334155;           /* Body text */
  --text-muted: #64748b;          /* Secondary text */
  --border-color: #e2e8f0;        /* Subtle lines */
  --accent-gold: #fbbf24;         /* Rating star color */
  --header-bg: rgba(255, 255, 255, 0.85); /* Glassmorphism header */
  --max-width: 1200px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.3s ease;
}

/* ==========================================
   2. GLOBAL STYLES
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ==========================================
   3. STICKY HEADER & LOGO
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 48px;
  width: auto;
  transition: var(--transition);
}

.site-logo img:hover {
  transform: scale(1.02);
}

/* NAVIGATION */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-navigation a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary-color);
  position: relative;
  padding: 0.5rem 0;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.main-navigation a:hover {
  color: var(--primary-color);
}

.main-navigation a:hover::after {
  width: 100%;
}

/* ==========================================
   4. CONTENT LAYOUT (COLUMNS)
   ========================================== */
.site-main {
  padding: 3rem 0;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 992px) {
  .layout-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* ==========================================
   5. BLOG POSTS (LEFT)
   ========================================== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.post-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-image-link {
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: #f1f5f9;
}

.post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-image-link img {
  transform: scale(1.03);
}

.post-content {
  padding: 2rem;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
}

.post-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.post-title a {
  color: var(--secondary-color);
}

.post-title a:hover {
  color: var(--primary-color);
}

.post-excerpt {
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* 5 STAR RATING GRAPHIC */
.post-rating-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.rating-stars {
  display: flex;
  gap: 0.25rem;
}

.rating-stars svg {
  width: 22px;
  height: 22px;
  fill: var(--border-color);
  transition: var(--transition);
}

.rating-stars svg.filled {
  fill: var(--accent-gold);
}

.rating-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================
   6. SIDEBAR (RIGHT) & AD PLACEHOLDER
   ========================================== */
.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

/* PREMIUM AD PLACEHOLDER */
.ad-widget {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  text-align: center;
  position: sticky;
  top: 100px; /* Offset to stay below the sticky header + 20px spacer */
  z-index: 10;
}

.ad-widget::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.ad-placeholder-box {
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ad-icon {
  width: 48px;
  height: 48px;
  opacity: 0.8;
  color: var(--primary-color);
}

.ad-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f8fafc;
}

.ad-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 200px;
}

/* ==========================================
   7. FOOTER
   ========================================== */
.site-footer {
  background-color: var(--secondary-color);
  color: #cbd5e1;
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* FOOTER MENU */
.footer-navigation ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-navigation ul {
    flex-direction: row;
  }
}

.footer-navigation a {
  color: #94a3b8;
  font-weight: 500;
}

.footer-navigation a:hover {
  color: #ffffff;
}

/* SOCIAL MEDIA ICONS */
.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  transition: var(--transition);
}

.social-icon-link:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-3px);
}

.social-icon-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* COPYRIGHT SECTION */
.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

/* ==========================================
   8. WORDPRESS CLASS COMPATIBILITY
   ========================================== */
.alignleft {
  float: left;
  margin: 0.5em 1.5em 0.5em 0;
}
.alignright {
  float: right;
  margin: 0.5em 0 0.5em 1.5em;
}
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wp-caption {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  max-width: 100%;
  padding: 5px;
  text-align: center;
}
.wp-caption img {
  margin: 0;
  max-width: 100%;
}
.wp-caption-text {
  font-size: 0.85rem;
  margin: 5px 0 0;
  color: var(--text-muted);
}
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ==========================================
   9. SEARCH FORM STYLING
   ========================================== */
.search-form {
  width: 100%;
}

.search-input-group {
  display: flex;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  padding: 4px;
  transition: var(--transition);
}

.search-input-group:focus-within {
  border-color: #fca5a5; /* light red highlight on focus */
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.search-field {
  border: none;
  background: transparent;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  color: var(--secondary-color);
  flex-grow: 1;
  outline: none;
  width: 100%;
}

.search-field::placeholder {
  color: var(--text-muted);
}

.search-submit {
  background-color: #f87171; /* Beautiful light red */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.search-submit:hover {
  background-color: #ef4444; /* Slightly deeper red on hover */
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.search-submit svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

