/*
Theme Name: Casually Creative Storybook
Theme URI: https://casuallycreativecrafting.com/
Author: Casually Creative Crafting
Description: A custom storybook-style WooCommerce theme for Casually Creative Crafting, adapted from the approved Codex prototype.
Version: 0.9.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: casually-creative-storybook
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* WordPress and WooCommerce integration styles. The original storybook design
   lives in assets/css/storybook-home.css. */

.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 {
  top: 8px;
  left: 8px;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  clip: auto;
  background: #fff;
  color: #17372c;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.site-content-shell {
  width: min(calc(100% - 2.5rem), 1180px);
  min-height: 52vh;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.site-content-shell > article,
.site-content-shell > .woocommerce {
  padding: clamp(1.4rem, 4vw, 3rem);
  background: #fcfaf5;
  border: 1px solid #d9d3c7;
  box-shadow: 0 12px 30px rgba(41,42,37,.07);
}

.entry-title,
.page-title { color: #17372c; }

.entry-content img { max-width: 100%; height: auto; }

.entry-content a:not(.button),
.woocommerce a:not(.button) {
  color: #8e4933;
  text-underline-offset: .18em;
}

.primary-menu,
.primary-menu ul,
.footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.primary-menu a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.primary-menu .sub-menu {
  position: absolute;
  z-index: 40;
  width: min(390px, calc(100vw - 2rem));
  padding: .55rem;
  background: #fcfaf5;
  border: 1px solid #d9d3c7;
  box-shadow: 0 16px 34px rgba(23,55,44,.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(.4rem);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}

.primary-menu li { position: relative; }
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu a {
  display: block;
  min-height: 44px;
  padding: .55rem .7rem;
}

.cart-count {
  display: inline-grid;
  min-width: 1.35rem;
  min-height: 1.35rem;
  place-items: center;
  margin-left: -.45rem;
  padding: .1rem .3rem;
  border-radius: 999px;
  background: #8e4933;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}

.cart-count.is-empty { display: none; }

.product-photo img,
img.product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.product-photo {
  display: block;
  overflow: hidden;
}

.product-content .price del { opacity: .65; }
.product-content .price ins { text-decoration: none; }

.ccc-footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem 1.2rem;
  margin: .2rem 0 0;
  font-size: .92rem;
}

.ccc-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin-top: .35rem;
}

.ccc-follow-title {
  margin: .55rem 0 -.15rem;
  color: #17372c;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.ccc-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: .45rem;
  border: 1px solid #c9a878;
  border-radius: 50%;
  color: #17372c;
  text-decoration: none;
}

.ccc-social-links a:hover { background: #f0e2cc; }

.ccc-social-links svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

@media (max-width: 680px) {
  .footer-identity {
    width: 100%;
    min-width: 0;
  }

  .footer-brand {
    width: 100%;
    max-width: 100%;
    padding-inline: .25rem;
    font-size: clamp(1.55rem, 7.5vw, 2rem);
    line-height: 1.15;
    white-space: normal;
    text-wrap: balance;
  }

  .footer-contact {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  padding: 1rem;
  background: #fff;
  border: 1px solid #d9d3c7;
  box-shadow: 0 8px 18px rgba(41,42,37,.06);
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  min-height: 46px;
  padding: .72rem 1rem;
  border: 2px solid #284b3c;
  border-radius: 3px;
  background: #284b3c;
  color: #fff;
  font-family: "Crimson Text", Georgia, serif;
  font-weight: 700;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background: #17372c;
  color: #fff;
}

.woocommerce-message,
.woocommerce-info {
  border-top-color: #8e4933;
  background: #f7f2e8;
}

.woocommerce-message::before,
.woocommerce-info::before { color: #8e4933; }

@media (max-width: 920px) {
  .primary-menu { display: block; }
  .mobile-primary-nav .primary-menu a {
    display: block;
    padding: .7rem .85rem;
  }
  .primary-menu .sub-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}
