/*
Theme Name: Photo Shayari Theme
Theme URI: https://example.com/photo-shayari
Author: Photo Shayari Team
Author URI: https://example.com
Description: Professional, responsive, SEO-friendly theme for Photo + Shayari Status Poster Generator. Works with Photo Shayari Generator plugin.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: photo-shayari
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, responsive, seo
*/

/* ===== CSS Variables ===== */
:root {
  --psg-primary: #e91e63;
  --psg-primary-dark: #c2185b;
  --psg-secondary: #9c27b0;
  --psg-accent: #ff4081;
  --psg-text: #1a1a1a;
  --psg-text-light: #666;
  --psg-bg: #fafafa;
  --psg-white: #ffffff;
  --psg-border: #e0e0e0;
  --psg-success: #4caf50;
  --psg-shadow: 0 4px 20px rgba(0,0,0,0.08);
  --psg-radius: 12px;
  --psg-font: 'Poppins', 'Noto Sans Devanagari', system-ui, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--psg-font);
  color: var(--psg-text);
  background: var(--psg-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--psg-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--psg-primary-dark); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--psg-text); }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.section { padding: 60px 0; }
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 { margin-bottom: 10px; }
.section-title p { color: var(--psg-text-light); max-width: 600px; margin: 0 auto; }

/* ===== Header ===== */
.site-header {
  background: var(--psg-white);
  box-shadow: var(--psg-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--psg-text);
}
.site-logo img { height: 40px; width: auto; }
.site-logo span { color: var(--psg-primary); }
.main-nav ul {
  display: flex;
  gap: 28px;
  align-items: center;
}
.main-nav a {
  color: var(--psg-text);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover, .main-nav a.active { color: var(--psg-primary); }
.header-cta {
  background: linear-gradient(135deg, var(--psg-primary), var(--psg-secondary));
  color: white !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(233,30,99,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233,30,99,0.4);
  color: white !important;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--psg-text);
  padding: 5px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #fff5f8 0%, #f3e5f5 50%, #e8eaf6 100%);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--psg-primary), var(--psg-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--psg-text-light);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--psg-primary), var(--psg-secondary));
  color: white;
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(233,30,99,0.35);
  transition: all 0.3s;
}
.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(233,30,99,0.45);
  color: white;
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--psg-white);
  border-radius: var(--psg-radius);
  overflow: hidden;
  box-shadow: var(--psg-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
.card-img {
  aspect-ratio: 9/16;
  object-fit: cover;
  width: 100%;
  background: #f0f0f0;
}
.card-body { padding: 16px; }
.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta { font-size: 0.85rem; color: var(--psg-text-light); }

/* ===== Category Pills ===== */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 30px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--psg-white);
  border: 1px solid var(--psg-border);
  border-radius: 50px;
  font-weight: 500;
  color: var(--psg-text);
  transition: all 0.2s;
  cursor: pointer;
}
.pill:hover, .pill.active {
  background: var(--psg-primary);
  color: white;
  border-color: var(--psg-primary);
}

/* ===== How it Works ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  text-align: center;
}
.step {
  background: var(--psg-white);
  padding: 30px 20px;
  border-radius: var(--psg-radius);
  box-shadow: var(--psg-shadow);
}
.step-num {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--psg-primary), var(--psg-secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 auto 16px;
}
.step h3 { margin-bottom: 8px; font-size: 1.15rem; }
.step p { color: var(--psg-text-light); font-size: 0.95rem; }

/* ===== Creator Page ===== */
.creator-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  padding: 30px 0 60px;
  min-height: 70vh;
}
.canvas-area {
  background: var(--psg-white);
  border-radius: var(--psg-radius);
  box-shadow: var(--psg-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#psg-canvas-container {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9/16;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
#psg-canvas {
  width: 100% !important;
  height: 100% !important;
}
.editor-sidebar {
  background: var(--psg-white);
  border-radius: var(--psg-radius);
  box-shadow: var(--psg-shadow);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 90px;
}
.sidebar-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--psg-border);
}
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }
.sidebar-section h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.upload-zone {
  border: 2px dashed var(--psg-border);
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--psg-primary);
  background: #fff5f8;
}
.upload-zone input { display: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  font-size: 0.95rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--psg-primary), var(--psg-secondary));
  color: white;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--psg-border);
  color: var(--psg-text);
}
.btn-outline:hover { border-color: var(--psg-primary); color: var(--psg-primary); }
.btn-success { background: var(--psg-success); color: white; }
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--psg-text-light);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--psg-border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--psg-primary);
}
textarea.form-control { min-height: 100px; resize: vertical; }
.shayari-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shayari-item {
  padding: 10px 12px;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  line-height: 1.4;
}
.shayari-item:hover, .shayari-item.active {
  border-color: var(--psg-primary);
  background: #fff5f8;
}
.template-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.template-thumb {
  aspect-ratio: 9/16;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.template-thumb img { width: 100%; height: 100%; object-fit: cover; }
.template-thumb.active, .template-thumb:hover { border-color: var(--psg-primary); }

/* ===== Footer ===== */
.site-footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 50px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand h3 {
  color: white;
  margin-bottom: 12px;
  font-size: 1.3rem;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #aaa; font-size: 0.9rem; }
.footer-col a:hover { color: var(--psg-accent); }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .creator-wrap { grid-template-columns: 1fr; }
  .editor-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--psg-shadow);
    padding: 20px;
  }
  .main-nav.open ul { flex-direction: column; gap: 16px; }
  .mobile-menu-btn { display: block; }
  .header-cta { display: none; }
  .hero { padding: 50px 0 40px; }
  .section { padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .template-thumbs { grid-template-columns: repeat(2, 1fr); }
}
