/*
Theme Name: YayColouring Child
Theme URI: https://yaycolouring.com
Description: GeneratePress child theme for YayColouring — playful, warm, kid-friendly design for the YayColouring coloring pages + digital books platform.
Author: YayColouring
Author URI: https://yaycolouring.com
Template: generatepress
Version: 1.0.0
Text Domain: yaycolouring-child
*/

/* =========================================================
   YayColouring — Design System
   Warm cream foundation. Candy accents. Playful but premium.
   ========================================================= */

/* Google Fonts loaded via functions.php — Fredoka (display) + Nunito (body) + Caveat (handwritten) */

:root {
  /* Core colors */
  --cream: #FFF8EC;
  --cream-2: #FFF1D9;
  --paper: #FFFFFF;
  --ink: #2A1B3D;
  --ink-soft: #5A4A6B;
  --muted: #8B7B9B;
  --line: rgba(42, 27, 61, 0.10);

  /* Brand candy palette */
  --berry: #FF5C8A;
  --berry-dark: #E63F70;
  --sun: #FFC93C;
  --sky: #6EC4F2;
  --mint: #7DD3A8;
  --grape: #9B6BF7;
  --coral: #FF8E5C;

  /* Surfaces & shadows */
  --surface: var(--cream);
  --card: var(--paper);
  --shadow-sm: 0 2px 0 rgba(42, 27, 61, 0.06);
  --shadow-md: 0 4px 0 rgba(42, 27, 61, 0.08), 0 12px 32px -8px rgba(42, 27, 61, 0.15);
  --shadow-lg: 0 6px 0 rgba(42, 27, 61, 0.10), 0 20px 48px -12px rgba(42, 27, 61, 0.20);

  /* Radius */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Type */
  --font-display: 'Fredoka', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', cursive;

  /* Spacing scale (4px base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --container: 1240px;
}

/* ============ GLOBAL OVERRIDES (GeneratePress base) ============ */

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .entry-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

h1, .entry-title { font-size: clamp(2.2rem, 4vw + 1rem, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1vw + 0.8rem, 1.5rem); }

p { color: var(--ink-soft); }

a { color: var(--berry); text-decoration: none; }
a:hover { color: var(--berry-dark); }

/* Hand-written accent */
.hand, em.hand {
  font-family: var(--font-hand);
  font-style: normal;
  font-weight: 700;
  color: var(--grape);
}

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

.site-header {
  background: rgba(255, 248, 236, 0.92);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.main-navigation,
.main-navigation .main-nav ul {
  background: transparent;
}

.main-navigation .main-nav ul li a {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  transition: background 0.2s, color 0.2s;
}

.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li a:hover {
  background: var(--ink);
  color: var(--cream);
}

.site-logo img,
.site-branding img {
  max-height: 44px;
  width: auto;
}

.site-branding-text .site-title,
.site-branding-text .site-title a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ============ BUTTONS ============ */

.wp-block-button__link,
.button,
button[type="submit"],
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  font-family: var(--font-body);
  font-weight: 700;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  background: var(--berry);
  color: var(--paper) !important;
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wp-block-button__link:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
  background: var(--berry-dark);
  color: var(--paper) !important;
}

.button-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--paper);
  color: var(--ink) !important;
}

.button-secondary:hover {
  background: var(--cream-2);
}

/* ============ CARDS ============ */

.yc-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--ink);
  padding: var(--s-5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.yc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

/* ============ BADGES / TAGS ============ */

.yc-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ink);
}

.yc-badge--free { background: var(--mint); color: var(--ink); }
.yc-badge--premium { background: var(--grape); color: var(--paper); }
.yc-badge--sale { background: var(--sun); color: var(--ink); }
.yc-badge--new { background: var(--berry); color: var(--paper); }

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

.yc-hero {
  padding: var(--s-8) 0 var(--s-7);
}

.yc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 2px solid var(--ink);
  margin-bottom: var(--s-5);
}

.yc-eyebrow::before {
  content: "✦";
  color: var(--sun);
}

/* ============ WOOCOMMERCE ============ */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--ink);
  padding: var(--s-4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  padding: 8px 0 4px;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
  color: var(--berry);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.woocommerce ul.products li.product .price del {
  color: var(--muted);
  font-weight: 400;
  opacity: 0.7;
  margin-right: 8px;
}

.woocommerce span.onsale {
  background: var(--sun);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 700;
  padding: 6px 14px;
  min-height: auto;
  min-width: auto;
  line-height: 1.2;
}

.woocommerce div.product .product_title {
  font-family: var(--font-display);
  font-weight: 700;
}

.woocommerce-cart table.cart,
.woocommerce-checkout #order_review {
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--card);
  padding: var(--s-5);
}

.woocommerce-cart table.cart th,
.woocommerce-checkout #order_review th {
  font-family: var(--font-display);
  color: var(--ink);
}

.woocommerce-message,
.woocommerce-info {
  background: var(--cream-2);
  border-top-color: var(--berry);
  color: var(--ink);
}

/* My Account page */
.woocommerce-MyAccount-navigation ul {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: var(--s-3);
  list-style: none;
}

.woocommerce-MyAccount-navigation ul li {
  margin: 0;
}

.woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--r);
  color: var(--ink);
  font-weight: 600;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
  background: var(--ink);
  color: var(--cream);
}

/* ============ COLORING PAGES ARCHIVE ============ */

.yc-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-5);
  margin: var(--s-6) 0;
}

.yc-page-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--ink);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.yc-page-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.yc-page-card__thumb {
  aspect-ratio: 1 / 1;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
}

.yc-page-card__thumb img,
.yc-page-card__thumb svg {
  max-width: 80%;
  max-height: 80%;
}

.yc-page-card__body {
  padding: var(--s-4);
  border-top: 2px solid var(--ink);
}

.yc-page-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 4px;
}

.yc-page-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.yc-page-card .yc-badge {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 2;
}

/* ============ THEME GRID ============ */

.yc-themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-4);
}

.yc-theme-card {
  display: block;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--ink);
  padding: var(--s-4);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--ink);
}

.yc-theme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.yc-theme-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--s-3);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
}

.yc-theme-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 2px;
}

.yc-theme-card__count {
  font-size: 0.8rem;
  color: var(--muted);
}

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

.site-footer {
  background: var(--cream-2);
  border-top: 1px solid var(--line);
  padding: var(--s-7) 0 var(--s-5);
  margin-top: var(--s-8);
}

.site-info {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ============ MEMBERSHIP CARD ============ */

.yc-membership {
  background: linear-gradient(135deg, var(--grape), var(--berry));
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: 0 6px 0 var(--ink);
  padding: var(--s-7);
  margin: var(--s-7) 0;
}

.yc-membership h2,
.yc-membership h3 {
  color: var(--paper);
}

.yc-membership p {
  color: rgba(255, 255, 255, 0.92);
}

.yc-membership .wp-block-button__link {
  background: var(--paper);
  color: var(--ink) !important;
}

/* ============ FORMS ============ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-family: var(--font-body);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 12px 16px;
  color: var(--ink);
  width: 100%;
  max-width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--sun);
}

/* ============ UTILITY ============ */

.yc-section { padding: var(--s-7) 0; }
.yc-section--tight { padding: var(--s-6) 0; }

.yc-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.yc-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-5); }
.yc-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-5); }
.yc-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }

/* ============ MOBILE ============ */

@media (max-width: 768px) {
  .yc-section { padding: var(--s-6) 0; }
  .yc-hero { padding: var(--s-6) 0; }
  h1, .entry-title { font-size: clamp(1.8rem, 5vw + 1rem, 2.5rem); }
}
