/*
Theme Name: Captain Cookie
Theme URI: https://captaincookieworld.com/
Author: Captain Cookie
Author URI: https://captaincookieworld.com/
Description: Classic editable WordPress theme for Captain Cookie with WooCommerce support.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: captain-cookie
Domain Path: /languages
Tags: e-commerce, custom-logo, editor-style, wide-blocks
*/

:root {
  --theme-content-width: 760px;
  --theme-wide-width: 1180px;
  --theme-spacing: clamp(1rem, 2vw, 1.5rem);
  --theme-border: #e5e7eb;
  --theme-muted: #6b7280;
  --cc-font-heading: "Fredoka", sans-serif;
  --cc-font-body: "Nunito Sans", sans-serif;
  --cc-leading-tight: 1.05;
  --cc-leading-heading: 1.15;
  --cc-leading-body: 1.6;
  --cc-leading-small: 1.4;
  --cc-weight-body: 600;
  --cc-weight-strong: 800;
  --cc-weight-heading: 700;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--cc-font-body);
  line-height: var(--cc-leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { max-width: 100%; height: auto; }
a { text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--cc-font-heading);
  line-height: var(--cc-leading-heading);
  text-wrap: balance;
}
:where(p, li) { text-wrap: pretty; }
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.site-main, .cc-main, .cc-content-shell, .cc-product-page { flex: 1; padding-block: clamp(2rem, 5vw, 4rem); }
.cc-container { width: min(var(--theme-wide-width), calc(100% - 2rem)); margin-inline: auto; }
.alignwide { max-width: var(--theme-wide-width); }
.alignfull { max-width: none; }

/* Accessibility */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus, .skip-link:focus {
  position: fixed !important;
  z-index: 100000;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  width: auto; height: auto;
  padding: .75rem 1rem;
  clip: auto !important;
  overflow: visible;
  background: #fff;
  color: #111827;
  border: 2px solid currentColor;
}
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Clean structural header/footer only. Replace freely with your own HTML/CSS. */
.site-header, .site-footer { border-color: var(--theme-border); }
.site-header { border-bottom: 1px solid var(--theme-border); }
.site-footer { margin-top: auto; border-top: 1px solid var(--theme-border); }
.site-header__inner, .site-footer__inner {
  width: min(var(--theme-wide-width), calc(100% - 2rem));
  margin-inline: auto;
  padding-block: 1rem;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header .wp-block-navigation { gap: 1rem; }
.site-footer p { margin: 0; color: var(--theme-muted); }

/* WordPress content defaults */
.wp-block-post-featured-image img { width: 100%; }
.wp-block-query-pagination { margin-top: 2rem; }
.wp-block-post-template { row-gap: 2rem; }
.wp-block-post-title a { text-decoration: none; }

/* WooCommerce compatibility baseline: light structure, no custom visual branding. */
.woocommerce, .wc-block-components-notice-banner, .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { max-width: 100%; }
.woocommerce div.product form.cart, .wp-block-add-to-cart-form form.cart { margin-block: 1.25rem; }
.wc-block-grid__product, .wp-block-woocommerce-product-template > li { min-width: 0; }
.wp-block-woocommerce-product-image-gallery { width: 100%; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; }

@media (max-width: 782px) {
  .site-header__inner { align-items: flex-start; flex-direction: column; }
  .site-main, .cc-main, .cc-content-shell, .cc-product-page { padding-block: 2rem; }
}

/* Classic WordPress templates */
.captain-content-area {
  min-height: 50vh;
  padding: clamp(8rem, 12vw, 11rem) 1rem clamp(3rem, 7vw, 5rem);
  background: #fffaf2;
  color: #082a5e;
  font-family: "Nunito Sans", sans-serif;
}

.captain-content-container {
  width: min(1040px, 100%);
  margin-inline: auto;
}

.captain-content-container--wide {
  width: min(1280px, 100%);
}

.captain-entry-header h1,
.captain-post-card h2 {
  font-family: "Fredoka", sans-serif;
  color: #072b65;
  letter-spacing: 0;
}

.captain-content-area :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--cc-font-heading);
  color: #072b65;
}

.captain-entry-content,
.captain-entry-description,
.captain-post-card__content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.captain-breadcrumbs {
  margin: 0 0 1.5rem;
  color: #53647d;
  font-size: .875rem;
  line-height: 1.5;
}

.captain-breadcrumbs :where(p, nav) {
  margin: 0;
}

.captain-breadcrumbs a {
  color: #072b65;
  font-weight: 700;
  text-decoration: none;
}

.captain-breadcrumbs a:hover {
  color: #ff6508;
  text-decoration: underline;
}

.captain-breadcrumbs--designed {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto;
  font-family: "Nunito Sans", sans-serif;
}

.captain-entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  color: #66758b;
  font-size: .9rem;
  line-height: 1.5;
}

.captain-entry-meta a {
  color: #072b65;
  font-weight: 700;
  text-decoration: none;
}

.captain-entry-featured-image {
  margin: 1.5rem 0 2rem;
}

.captain-entry-featured-image img {
  width: 100%;
  display: block;
  border-radius: 24px;
  object-fit: cover;
}

.captain-post-list {
  display: grid;
  gap: 1.4rem;
}

.captain-post-card {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 1.4rem;
  padding: 1.2rem;
  border: 1px solid #eadcc7;
  border-radius: 22px;
  background: #fff;
}

.captain-post-card__image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.captain-post-card a {
  color: inherit;
  text-decoration: none;
}

.captain-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: #072b65;
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.cookie-navigation .cookie-menu {
  display: flex;
  align-items: inherit;
  justify-content: inherit;
  flex-direction: inherit;
  gap: inherit;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cookie-navigation .cookie-menu li {
  margin: 0;
}

@media (max-width: 720px) {
  .captain-post-card {
    grid-template-columns: 1fr;
  }
}
