/*
Theme Name: Kawaii Chic Diary
Theme URI: https://example.com/kawaii-chic-diary
Author: Your Name
Author URI: https://example.com
Description: A kawaii-inspired WordPress theme for fashion, lifestyle, and Harajuku style bloggers. Features a pastel aesthetic with cute decorative elements, a full-width image slider, and a magazine-style blog grid layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kawaii-chic-diary
Tags: blog, fashion, lifestyle, kawaii, pastel, two-columns, custom-colors, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   CSS VARIABLES & RESET
   ============================================================ */

:root {
  --pink:       #f4a7c3;
  --pink-light: #fde8f0;
  --pink-mid:   #f9c8dc;
  --mint:       #b5e8d8;
  --lavender:   #d8cff5;
  --yellow:     #ffeea0;
  --peach:      #ffd5b8;
  --white:      #ffffff;
  --text:       #4a3f50;
  --text-light: #7a6e82;
  --border:     #f0dcea;
  --shadow:     rgba(220, 150, 190, 0.18);

  --font-heading: 'Fredoka One', 'Nunito', cursive;
  --font-body:    'Nunito', 'Quicksand', sans-serif;

  --radius:     16px;
  --radius-sm:  8px;
  --radius-lg:  24px;
  --max-width:  1100px;
  --sidebar-w:  280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: #fff9fd;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--pink); text-decoration: none; transition: color .2s; }
a:hover { color: #d4607e; }

ul { list-style: none; }

/* ============================================================
   SKIP LINK (ACCESSIBILITY)
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--pink);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* ============================================================
   SITE WRAPPER
   ============================================================ */

.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   ADMIN BAR OFFSET
   ============================================================ */

.admin-bar .site-header { top: 32px; }

/* ============================================================
   FLOATING DECO ELEMENTS
   ============================================================ */

.deco-float {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  animation: floatY 4s ease-in-out infinite alternate;
}
@keyframes floatY {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: #fff;
  border-bottom: 2px solid var(--border);
  padding: 24px 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

/* Logo / Site title */
.site-branding { margin-bottom: 20px; }

.custom-logo-link img { margin: 0 auto; max-height: 100px; }

.site-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  background: linear-gradient(135deg, #f4a7c3, #9b8ddf, #f4a7c3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.site-title a { color: inherit; -webkit-text-fill-color: inherit; }
.site-title a:hover { opacity: .8; }

.site-description {
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--text-light);
  margin-top: 4px;
  letter-spacing: 1px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.main-navigation {
  background: var(--white);
  border-top: 1px solid var(--border);
}

.main-navigation ul {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0;
  flex-wrap: wrap;
}

.main-navigation li { position: relative; }

.main-navigation a {
  display: block;
  padding: 12px 20px;
  font-family: var(--font-heading);
  font-size: .95rem;
  color: var(--text);
  letter-spacing: .5px;
  transition: all .2s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background: var(--pink-light);
  color: var(--pink);
}

/* Dropdown */
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 200;
}
.main-navigation li:hover > .sub-menu { display: block; }
.main-navigation .sub-menu a {
  padding: 10px 16px;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: .9rem;
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: var(--pink);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin: 10px auto;
}

/* ============================================================
   HERO SLIDER
   ============================================================ */

.hero-slider-section {
  position: relative;
  background: var(--pink-light);
  padding: 40px 0 20px;
  overflow: hidden;
}

.hero-slider-section::before,
.hero-slider-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--lavender);
  opacity: .3;
  pointer-events: none;
}
.hero-slider-section::before {
  width: 300px; height: 300px;
  top: -80px; left: -80px;
}
.hero-slider-section::after {
  width: 200px; height: 200px;
  bottom: -60px; right: -60px;
  background: var(--mint);
}

.slider-container {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.slider-track {
  display: flex;
  gap: 12px;
  align-items: center;
  overflow: hidden;
}

.slider-track .slide {
  flex: 0 0 calc(33.333% - 8px);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform .3s;
}

.slider-track .slide.center-slide {
  flex: 0 0 calc(40% - 8px);
  box-shadow: 0 12px 40px rgba(220,120,160,.3);
  transform: scale(1.04);
  z-index: 2;
}

.slider-track .slide img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Slider buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.9);
  border: 2px solid var(--pink);
  color: var(--pink);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  box-shadow: 0 4px 12px var(--shadow);
}
.slider-btn:hover { background: var(--pink); color: #fff; }
.slider-btn.prev { left: 24px; }
.slider-btn.next { right: 24px; }

/* Dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.slider-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--pink-mid);
  cursor: pointer;
  border: none;
  transition: background .2s, transform .2s;
}
.slider-dot.active { background: var(--pink); transform: scale(1.3); }

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.site-main {
  max-width: var(--max-width);
  margin: 48px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 40px;
  align-items: start;
}

/* ============================================================
   BLOG GRID
   ============================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* Post card */
.post-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(220,120,160,.22);
}

.post-card .post-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-body {
  padding: 18px 20px 20px;
}

.post-card-category {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink);
  font-size: .72rem;
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 8px;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--pink); }

.post-card-excerpt {
  font-size: .85rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-family: var(--font-heading);
  font-size: .85rem;
  color: var(--pink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.read-more::after { content: '»'; }
.read-more:hover { gap: 8px; }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: 0 4px 20px var(--shadow);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 14px;
  text-align: center;
  position: relative;
}
.widget-title::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--pink);
  border-radius: 2px;
  margin: 6px auto 0;
}

/* About widget */
.about-widget .about-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--pink-mid);
}

.about-widget p {
  font-size: .85rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.6;
}

/* Social icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.social-icons a {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: transform .2s, box-shadow .2s;
  color: #fff;
}
.social-icons a:hover { transform: scale(1.15); box-shadow: 0 4px 12px var(--shadow); }

.social-icon-fb   { background: #3b5998; }
.social-icon-tw   { background: #1da1f2; }
.social-icon-ig   { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-icon-pin  { background: #e60023; }
.social-icon-li   { background: #0077b5; }

/* Widget posts list */
.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); }
.widget ul li a:hover { color: var(--pink); }

/* Widget search */
.widget-search form {
  display: flex;
  gap: 6px;
}
.widget-search input[type="search"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .88rem;
  outline: none;
  transition: border-color .2s;
}
.widget-search input[type="search"]:focus { border-color: var(--pink); }
.widget-search button {
  background: var(--pink);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: .88rem;
  transition: opacity .2s;
}
.widget-search button:hover { opacity: .85; }

/* Tag cloud */
.tag-cloud a {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem !important;
  margin: 3px;
  transition: background .2s, color .2s;
}
.tag-cloud a:hover { background: var(--pink); color: #fff; }

/* ============================================================
   SINGLE POST
   ============================================================ */

.single-post-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
}

.post-category-badge {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink);
  font-family: var(--font-heading);
  font-size: .8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.entry-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}

.post-meta {
  font-size: .82rem;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.post-meta a { color: var(--text-light); }
.post-meta a:hover { color: var(--pink); }

.featured-image-single {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 28px 0;
  box-shadow: 0 8px 32px var(--shadow);
}

/* Entry content */
.entry-content {
  max-width: 740px;
  margin: 0 auto;
  font-size: .97rem;
  line-height: 1.8;
  color: var(--text);
}

.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--font-heading);
  margin: 28px 0 12px;
  color: var(--text);
}

.entry-content p { margin-bottom: 16px; }

.entry-content blockquote {
  border-left: 4px solid var(--pink);
  padding: 12px 20px;
  background: var(--pink-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-style: italic;
}

.entry-content ul, .entry-content ol {
  margin: 12px 0 16px 20px;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content img {
  border-radius: var(--radius);
  margin: 16px auto;
}

.entry-content a { color: var(--pink); text-decoration: underline; }

/* Post tags */
.post-tags {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.post-tags-label {
  font-family: var(--font-heading);
  font-size: .88rem;
  color: var(--text-light);
}
.post-tags a {
  background: var(--pink-light);
  color: var(--pink);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: .82rem;
  transition: background .2s, color .2s;
}
.post-tags a:hover { background: var(--pink); color: #fff; }

/* Post navigation */
.post-navigation {
  display: flex;
  gap: 16px;
  margin-top: 40px;
}
.post-navigation a {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: block;
  font-size: .88rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.post-navigation a:hover {
  border-color: var(--pink);
  box-shadow: 0 4px 16px var(--shadow);
}
.post-nav-label {
  font-family: var(--font-heading);
  font-size: .75rem;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.post-nav-title { font-family: var(--font-heading); color: var(--text); }

/* ============================================================
   COMMENTS
   ============================================================ */

.comments-area {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}

.comments-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.comment {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.comment .comment-avatar img {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--pink-mid);
}

.comment-meta { font-size: .82rem; color: var(--text-light); margin-bottom: 6px; }
.comment-meta .comment-author { font-family: var(--font-heading); color: var(--text); font-size: .95rem; }

.comment-content p { font-size: .9rem; }

.children { margin-left: 48px; margin-top: 16px; }

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  margin-bottom: 12px;
  background: #fefafa;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--pink); }

.comment-form textarea { min-height: 120px; resize: vertical; }

.comment-form .submit {
  background: var(--pink);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 1rem;
  cursor: pointer;
  transition: opacity .2s;
}
.comment-form .submit:hover { opacity: .85; }

/* ============================================================
   PAGES (About, Contact, Gallery)
   ============================================================ */

.page-header {
  background: linear-gradient(135deg, var(--pink-light), var(--lavender));
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 40px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  background: linear-gradient(135deg, #d46090, #9b8ddf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform .3s, box-shadow .3s;
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px var(--shadow);
}

/* Contact form */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  background: #fefafa;
  margin-bottom: 14px;
  outline: none;
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--pink); }

.btn-kawaii {
  background: linear-gradient(135deg, var(--pink), #c87ab8);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  letter-spacing: .5px;
}
.btn-kawaii:hover { opacity: .9; transform: translateY(-2px); }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: .9rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: #fff;
  transition: all .2s;
}
.pagination .page-numbers:hover,
.pagination .current {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

/* ============================================================
   404 / NO RESULTS
   ============================================================ */

.error-404-inner,
.no-results-inner {
  text-align: center;
  padding: 60px 20px;
}
.error-404-inner .error-emoji { font-size: 5rem; margin-bottom: 20px; }
.error-404-inner h1 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: #fff;
  border-top: 2px solid var(--border);
  padding: 48px 20px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pink-light);
}

.footer-widget ul li {
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.footer-widget ul li:last-child { border-bottom: none; }
.footer-widget ul li a { color: var(--text-light); }
.footer-widget ul li a:hover { color: var(--pink); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: .82rem;
  color: var(--text-light);
}
.footer-bottom a { color: var(--text-light); }
.footer-bottom a:hover { color: var(--pink); }

/* ============================================================
   KAWAII DECO ELEMENTS
   ============================================================ */

.kawaii-deco {
  display: inline-block;
  font-size: 1.8rem;
  animation: spin 8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.bow-icon::before    { content: '🎀'; }
.star-icon::before   { content: '⭐'; }
.heart-icon::before  { content: '💕'; }
.flower-icon::before { content: '🌸'; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .site-main {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .blog-grid { grid-template-columns: 1fr; }
  .slider-track .slide { flex: 0 0 90%; }
  .slider-track .slide.center-slide { flex: 0 0 90%; transform: none; }
  .footer-widgets { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .post-navigation { flex-direction: column; }

  .menu-toggle { display: block; }
  .main-navigation .menu { display: none; flex-direction: column; }
  .main-navigation.toggled .menu { display: flex; }
  .main-navigation a { border-radius: 0; }
  .main-navigation .sub-menu { position: static; border: none; box-shadow: none; padding-left: 16px; }
  .main-navigation li:hover > .sub-menu { display: block; }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .site-header, .site-footer, .sidebar, .hero-slider-section { display: none; }
  .site-main { display: block; }
}
