/*
Theme Name: Kid Books Store
Theme URI: https://www.kidbooks.store/
Author: SSDM Education Private Limited
Description: A bright, accessible WooCommerce theme for children's books.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: kidbooks-store
*/

:root {
  --ink: #17212b;
  --muted: #5d6873;
  --paper: #ffffff;
  --soft: #f6f7f4;
  --line: #dfe4e1;
  --coral: #e95f55;
  --teal: #167c80;
  --yellow: #f1b82d;
  --green: #4c8b57;
  --blue: #2e6ea5;
  --max: 1180px;
  --shadow: 0 12px 32px rgba(23, 33, 43, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  clip: auto;
  height: auto;
  width: auto;
  left: 12px;
  top: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  z-index: 9999;
}

.site-wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

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

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--coral);
}

.brand-mark .dashicons { width: 22px; height: 22px; font-size: 22px; }

.primary-nav { justify-self: center; }
.primary-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { font-size: 15px; font-weight: 650; text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-link {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
  background: #fff;
}

.icon-link:hover { border-color: var(--teal); background: #eef8f7; }
.icon-link .dashicons { width: 20px; height: 20px; font-size: 20px; }

.cart-link { position: relative; }
.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  background: var(--coral);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.mobile-menu { display: none; }

.hero {
  position: relative;
  min-height: 610px;
  height: min(660px, calc(100svh - 96px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #eef4ef;
  background-image: url("assets/kidbooks-hero.png");
  background-size: cover;
  background-position: center center;
}

.hero-content { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.hero-copy { width: min(530px, 47%); }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: 14px; font-weight: 800; text-transform: uppercase; }

.hero h1 {
  margin: 0;
  max-width: 520px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6.3vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
  color: #16222a;
}

.hero-lead { margin: 22px 0 28px; max-width: 475px; color: #3f4b54; font-size: 19px; line-height: 1.55; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.button,
.wp-element-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: #fff;
  background: var(--ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover,
.wp-element-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { color: #fff; border-color: var(--teal); background: var(--teal); }

.button-secondary { color: var(--ink); border-color: rgba(23, 33, 43, 0.35); background: rgba(255, 255, 255, 0.78); }
.button-secondary:hover { color: var(--ink); border-color: var(--ink); background: #fff; }

.trust-band { border-bottom: 1px solid var(--line); background: #fff; }
.trust-grid { min-height: 92px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; }
.trust-item { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: left; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item .dashicons { color: var(--teal); }
.trust-item strong { display: block; font-size: 15px; }
.trust-item span:not(.dashicons) { display: block; color: var(--muted); font-size: 13px; }

.section { padding: 84px 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-head h2,
.story-copy h2,
.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
}
.section-head p { max-width: 540px; margin: 0; color: var(--muted); }
.text-link { color: var(--teal); font-weight: 750; }

.age-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.age-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent, var(--teal));
  border-radius: 7px;
  background: #fff;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.age-card:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); }
.age-card h3 { margin: 0 0 8px; font-size: 22px; }
.age-card p { margin: 0; color: var(--muted); font-size: 15px; }
.age-number { color: var(--accent, var(--teal)); font-family: Georgia, serif; font-size: 44px; font-weight: 800; line-height: 1; }

.products-wrap .woocommerce ul.products { margin-bottom: 0; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.woocommerce ul.products li.product a img { margin: 0; aspect-ratio: 4 / 5; object-fit: cover; background: #f1f3ef; }
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button { margin-left: 18px; margin-right: 18px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding-top: 16px; color: var(--ink); font-size: 17px; }
.woocommerce ul.products li.product .price { color: var(--teal); font-weight: 800; }
.woocommerce ul.products li.product .button { margin-bottom: 18px; }

.catalog-empty {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.catalog-empty h3 { margin: 0 0 10px; font-size: 25px; }
.catalog-empty p { margin: 0; color: var(--muted); }
.catalog-points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.catalog-points li { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.catalog-points .dashicons { color: var(--green); }

.story-band { padding: 90px 0; background: #153d3e; color: #fff; }
.story-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 80px; align-items: center; }
.story-kicker { color: #ffd371; }
.story-copy p { max-width: 620px; color: #d8e7e4; font-size: 18px; }
.story-values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.story-value { min-height: 150px; padding: 22px; border: 1px solid rgba(255,255,255,0.22); border-radius: 7px; }
.story-value .dashicons { color: #ffd371; }
.story-value strong { display: block; margin: 10px 0 4px; font-size: 18px; }
.story-value span { color: #c5d9d6; font-size: 14px; }

.contact-strip { padding: 50px 0; border-bottom: 1px solid var(--line); background: #f8efe4; }
.contact-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.contact-strip h2 { margin: 0; font-size: 30px; }
.contact-strip p { margin: 4px 0 0; color: var(--muted); }

.site-main { min-height: 55vh; }
.page-shell { padding: 64px 0 90px; }
.page-hero { padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.page-hero p { max-width: 680px; margin: 14px 0 0; color: var(--muted); font-size: 18px; }
.page-content { max-width: 860px; padding-top: 36px; }
.page-content h2 { margin-top: 34px; font-size: 28px; }
.page-content h3 { margin-top: 28px; font-size: 21px; }

.contact-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 54px; padding-top: 46px; }
.contact-details { display: grid; gap: 16px; align-content: start; }
.contact-detail { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.contact-detail .dashicons { color: var(--teal); }
.contact-detail h2 { margin: 8px 0 5px; font-size: 18px; }
.contact-detail p { margin: 0; color: var(--muted); }
.contact-detail a { color: var(--teal); font-weight: 700; }
.contact-form { padding: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.contact-form h2 { margin: 0 0 6px; font-size: 28px; }
.contact-form > p { margin-top: 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 750; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #bfc8c4;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(22,124,128,0.18); border-color: var(--teal); }
.form-status { padding: 12px 14px; margin-bottom: 18px; border-radius: 5px; font-weight: 700; }
.form-status.success { color: #155724; border: 1px solid #b8d9c0; background: #eaf6ed; }
.form-status.error { color: #8a2a22; border: 1px solid #e7bbb5; background: #fff0ee; }
.honeypot { position: absolute; left: -9999px; }

.woocommerce main,
.woocommerce-page main { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 56px 0 90px; }
.woocommerce .woocommerce-breadcrumb { color: var(--muted); font-size: 14px; }
.woocommerce div.product .product_title,
.woocommerce-products-header__title.page-title,
.woocommerce-cart h1,
.woocommerce-checkout h1 { font-family: Georgia, serif; font-size: clamp(36px, 5vw, 54px); letter-spacing: 0; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--teal); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--teal); }

.site-footer { color: #e6ecea; background: #17212b; }
.footer-main { display: grid; grid-template-columns: 1.2fr 0.7fr 1.35fr; gap: 60px; padding: 64px 0 48px; }
.footer-brand { color: #fff; }
.footer-main h2, .footer-main h3 { margin-top: 0; color: #fff; }
.footer-main h3 { font-size: 16px; }
.footer-main p { color: #bfc9c6; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 9px; }
.footer-links a { color: #dbe3e1; text-decoration: none; }
.footer-links a:hover { color: #ffd371; }
.company-address { font-style: normal; color: #bfc9c6; }
.company-address strong { display: block; margin-bottom: 8px; color: #fff; }
.footer-contact { display: grid; gap: 7px; margin-top: 16px; }
.footer-contact a { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,0.12); color: #9eaaa7; font-size: 13px; }
.footer-bottom p { margin: 0; }

@media (max-width: 980px) {
  .primary-nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .mobile-menu { display: block; }
  .mobile-menu summary { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; list-style: none; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu nav { position: absolute; left: 0; right: 0; top: 76px; padding: 18px 20px 24px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
  .mobile-menu ul { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
  .mobile-menu a { display: block; padding: 9px 0; font-weight: 700; text-decoration: none; }
  .hero { height: auto; min-height: 590px; background-position: 62% center; }
  .hero-copy { width: 58%; }
  .age-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid, .contact-layout { grid-template-columns: 1fr; gap: 38px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-company { grid-column: 1 / -1; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 680px) {
  .site-wrap, .hero-content, .woocommerce main, .woocommerce-page main { width: min(100% - 28px, var(--max)); }
  .site-header { position: relative; top: 0; }
  .admin-bar .site-header { top: 0; }
  .header-inner { min-height: 70px; gap: 12px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 34px; height: 34px; }
  .header-actions .account-link { display: none; }
  .mobile-menu nav { top: 70px; }
  .hero { min-height: 650px; align-items: end; padding: 0 0 42px; background-position: 69% center; }
  .hero::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.52); pointer-events: none; }
  .hero-content { position: relative; z-index: 1; }
  .hero-copy { width: 100%; }
  .hero h1 { max-width: 420px; font-size: 46px; }
  .hero-lead { max-width: 410px; color: #25323a; font-size: 17px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { justify-content: flex-start; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
  .section { padding: 62px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 12px; }
  .age-grid { grid-template-columns: 1fr; }
  .age-card { min-height: 190px; }
  .catalog-empty { grid-template-columns: 1fr; padding: 24px; }
  .story-band { padding: 64px 0; }
  .story-values { grid-template-columns: 1fr; }
  .contact-strip-inner { display: block; }
  .contact-strip .button { margin-top: 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 20px; }
  .footer-main { grid-template-columns: 1fr; gap: 34px; padding-top: 50px; }
  .footer-company { grid-column: auto; }
  .footer-bottom { display: block; }
  .footer-bottom p + p { margin-top: 7px; }
}
