/**
 * Cowyreads Theme Styles
 * All component styles for the Cowyreads theme
 */

/* ================================================
   CLOUDS
   ================================================ */
.clouds {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  color: var(--color-cloud, rgba(180, 148, 110, 0.10));
  will-change: transform;
}

.cloud--1 {
  width: 320px;
  top: 6%;
  animation: cloud-drift 55s linear infinite;
}

.cloud--2 {
  width: 280px;
  top: 28%;
  animation: cloud-drift 70s linear infinite;
  animation-delay: -25s;
}

.cloud--3 {
  width: 220px;
  top: 50%;
  color: var(--color-cloud-mid, rgba(180, 148, 110, 0.07));
  animation: cloud-drift 42s linear infinite;
  animation-delay: -10s;
}

.cloud--4 {
  width: 200px;
  top: 72%;
  color: var(--color-cloud-mid, rgba(180, 148, 110, 0.07));
  animation: cloud-drift 50s linear infinite;
  animation-delay: -35s;
}

.cloud--5 {
  width: 150px;
  top: 15%;
  color: var(--color-cloud-front, rgba(180, 148, 110, 0.05));
  animation: cloud-drift 32s linear infinite;
  animation-delay: -8s;
}

.cloud--6 {
  width: 120px;
  top: 60%;
  color: var(--color-cloud-front, rgba(180, 148, 110, 0.05));
  animation: cloud-drift 38s linear infinite;
  animation-delay: -20s;
}

@keyframes cloud-drift {
  0% { transform: translateX(-350px); }
  100% { transform: translateX(calc(100vw + 100px)); }
}

.cloud[data-parallax] {
  transition: transform 0s;
}

/* ================================================
   HEADER
   ================================================ */
.header__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-navbar);
  border-bottom: 2.5px solid var(--color-foreground);
}

.header__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 var(--page-margin, 20px);
  max-width: var(--page-width, 90rem);
  margin: 0 auto;
}

.header__left {
  flex: 1;
  display: flex;
  align-items: center;
}

.header__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-foreground);
}

.header__logo-text {
  font-family: var(--font-heading--family);
  font-size: 1.4rem;
  font-weight: 700;
}

.header__logo-img {
  max-height: 44px;
  width: auto;
}

.header__center {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.header__nav-link {
  text-decoration: none;
  color: var(--color-foreground);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.header__nav-link:hover {
  background-color: var(--color-button);
  color: var(--color-button-text);
}

.header__right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.header__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-foreground);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.header__icon:hover {
  color: var(--color-link);
  transform: scale(1.1);
}

.header__icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.header__cart {
  position: relative;
}

.header__cart-count {
  position: absolute;
  top: 0;
  right: -2px;
  background-color: var(--color-button);
  color: var(--color-button-text);
  font-size: 0.55rem;
  font-weight: 800;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.header__hamburger,
.header__hamburger::before,
.header__hamburger::after {
  display: block;
  width: 1.2rem;
  height: 2.5px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  position: relative;
}

.header__hamburger::before,
.header__hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.header__hamburger::before { top: -6px; }
.header__hamburger::after { top: 6px; }

.header__menu-toggle[aria-expanded="true"] .header__hamburger {
  background-color: transparent;
}

.header__menu-toggle[aria-expanded="true"] .header__hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.header__menu-toggle[aria-expanded="true"] .header__hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

.header__mobile-menu {
  display: none;
  flex-direction: column;
  background-color: var(--color-navbar);
  border-top: 2px dashed var(--color-border);
  padding: 0.75rem var(--page-margin, 20px) 1.25rem;
}

.header__mobile-menu.is-open {
  display: flex;
}

.header__mobile-link {
  display: block;
  text-decoration: none;
  color: var(--color-foreground);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.65rem 0;
  border-bottom: 2px dashed var(--color-border);
  transition: color 0.2s ease;
}

.header__mobile-link:last-child {
  border-bottom: none;
}

.header__mobile-link:hover {
  color: var(--color-link);
}

@media (min-width: 768px) {
  .header__bar-inner { height: 4.5rem; }
  .header__center { display: flex; }
  .header__menu-toggle { display: none; }
  .header__mobile-menu { display: none !important; }
  .header__right { gap: 0.65rem; }
  .header__icon svg { width: 1.4rem; height: 1.4rem; }
  .header__logo-img { max-height: 52px; }
}

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 5rem var(--page-margin, 20px);
  margin-top: 4rem;
  background-color: var(--color-card-bg);
  overflow: hidden;
}

.hero__image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: scale(1.05);
}

.hero__image,
.hero__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(252, 251, 229, 0.5);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 620px;
  will-change: transform, opacity;
}

.hero__subtitle {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 1.25rem;
  background-color: var(--color-button);
  color: var(--color-button-text);
  padding: 0.3em 1em;
  border-radius: 9999px;
  border: 2px solid var(--color-foreground);
}

.hero__title {
  font-family: var(--font-heading--family);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--color-foreground);
}

.hero__description {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.7;
  margin-bottom: 2rem;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero { min-height: 80vh; padding: 6rem var(--page-margin, 20px); margin-top: 4.5rem; }
  .hero__title { font-size: 3.5rem; }
  .hero__description { font-size: 1.05rem; }
}

/* ================================================
   CATEGORIES CAROUSEL
   ================================================ */
.categories {
  padding: 3.5rem 0;
  text-align: center;
}

.categories__subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  opacity: 0.45;
  margin-bottom: 0.5rem;
}

.categories__title {
  font-family: var(--font-heading--family);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.categories__carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.categories__arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2.5px solid var(--color-foreground);
  background: var(--color-background);
  color: var(--color-foreground);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--color-foreground);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 2;
}

.categories__arrow:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--color-foreground);
}

.categories__arrow:active {
  transform: translate(1px, 1px);
  box-shadow: 0 0 0 var(--color-foreground);
}

.categories__arrow svg { width: 1rem; height: 1rem; }

.categories__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex: 1;
  padding: 0.5rem 0;
}

.categories__track::-webkit-scrollbar { display: none; }

.category-card {
  flex: 0 0 155px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-foreground);
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.category-card:hover {
  color: var(--color-foreground);
  transform: translateY(-4px);
}

.category-card__image-wrap {
  aspect-ratio: 3 / 3.5;
  overflow: hidden;
  border-radius: 16px;
  border: 2.5px solid var(--color-foreground);
  background-color: var(--color-card-bg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

.category-card:hover .category-card__image-wrap {
  box-shadow: var(--shadow-card-hover);
}

.category-card__image-wrap img,
.category-card__image-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card__content {
  padding: 0.6rem 0.15rem;
  text-align: left;
}

.category-card__name {
  font-family: var(--font-heading--family);
  font-size: 0.85rem;
  font-weight: 700;
}

.category-card__description {
  font-size: 0.7rem;
  margin-top: 0.15rem;
  opacity: 0.55;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .categories { padding: 4.5rem 0; }
  .categories__title { font-size: 2.25rem; margin-bottom: 2.5rem; }
  .categories__arrow { width: 2.75rem; height: 2.75rem; }
  .categories__track { gap: 1.25rem; }
  .category-card { flex: 0 0 190px; }
  .category-card__name { font-size: 0.95rem; }
}

/* ================================================
   FEATURED PRODUCTS / PRODUCT CARDS
   ================================================ */
.featured-products {
  padding: 4rem 0;
  text-align: center;
}

.featured-products__subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  opacity: 0.45;
  margin-bottom: 0.5rem;
}

.featured-products__title {
  font-family: var(--font-heading--family);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.featured-products__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-foreground);
  transition: transform 0.2s ease;
}

.product-card:hover {
  color: var(--color-foreground);
  transform: translateY(-4px);
}

.product-card__image-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  border: 2.5px solid var(--color-foreground);
  background-color: var(--color-card-bg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

.product-card:hover .product-card__image-wrap {
  box-shadow: var(--shadow-card-hover);
}

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

.product-card__info {
  padding: 0.75rem 0.25rem;
  text-align: left;
}

.product-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.product-card__price {
  font-size: 0.82rem;
  opacity: 0.55;
  margin-top: 0.15rem;
  font-weight: 600;
}

.featured-products__view-all {
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .featured-products { padding: 5rem 0; }
  .featured-products__title { font-size: 2.25rem; margin-bottom: 3rem; }
  .featured-products__grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .product-card__title { font-size: 1rem; }
  .product-card__price { font-size: 0.88rem; }
}

/* ================================================
   COLLECTION / SHOP ARCHIVE
   ================================================ */
.collection-page { padding: 2rem 0 4rem; }
.collection-page__header { text-align: center; margin-bottom: 2rem; }
.collection-page__title { font-family: var(--font-heading--family); font-size: 2rem; font-weight: 400; }
.collection-page__description { margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.6; max-width: 50ch; margin-left: auto; margin-right: auto; line-height: 1.6; }

.collection-page__toolbar {
  display: flex; flex-direction: column; gap: 0.75rem; align-items: center;
  padding-bottom: 1.5rem; border-bottom: 2px dashed var(--color-border); margin-bottom: 2rem;
}

.collection-page__count { font-size: 0.8rem; opacity: 0.45; }
.collection-page__sort { display: flex; align-items: center; gap: 0.5rem; }
.collection-page__sort-label { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }

.collection-page__sort-select {
  padding: 0.5rem 0.75rem; border: 2px solid var(--color-foreground);
  border-radius: var(--style-border-radius); font-size: 0.8rem;
  background-color: var(--color-card-bg); color: var(--color-foreground); cursor: pointer;
}

.collection-page__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

.collection-card {
  display: flex; flex-direction: column; text-decoration: none;
  color: var(--color-foreground); transition: transform 0.3s ease;
}

.collection-card:hover { color: var(--color-foreground); transform: translateY(-4px); }
.collection-card:hover .collection-card__image-wrap { box-shadow: var(--shadow-card-hover); }

.collection-card__image-wrap {
  aspect-ratio: 1; overflow: hidden; border-radius: 16px;
  border: 2.5px solid var(--color-foreground); box-shadow: var(--shadow-card);
  background-color: var(--color-card-bg);
}

.collection-card__image-wrap img,
.collection-card__image-wrap svg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.collection-card:hover .collection-card__image-wrap img { transform: scale(1.04); }
.collection-card__info { padding: 0.85rem 0.25rem; }
.collection-card__title { font-size: 0.9rem; font-weight: 500; line-height: 1.4; }
.collection-card__price { display: flex; align-items: baseline; gap: 0.4rem; font-size: 0.8rem; opacity: 0.55; margin-top: 0.2rem; }
.collection-card__compare-price { text-decoration: line-through; opacity: 0.6; }
.collection-page__empty { grid-column: 1 / -1; text-align: center; padding: 3rem; opacity: 0.5; }

/* WooCommerce pagination override */
.woocommerce-pagination,
.collection-page__pagination {
  display: flex; justify-content: center; gap: 0.4rem;
  margin-top: 3rem; padding-top: 2rem; border-top: 2px dashed var(--color-border);
}

.woocommerce-pagination ul { list-style: none; display: flex; gap: 0.4rem; padding: 0; margin: 0; }

.woocommerce-pagination a,
.woocommerce-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0.25rem 0.5rem;
  border-radius: 10px; text-decoration: none; font-size: 0.8rem; font-weight: 700;
  color: var(--color-foreground); border: 2px solid var(--color-foreground);
  box-shadow: 2px 2px 0 var(--color-foreground); transition: all 0.15s ease;
}

.woocommerce-pagination span.current {
  background-color: var(--color-button); color: var(--color-button-text); border-color: var(--color-button);
}

.woocommerce-pagination a:hover {
  background-color: var(--color-foreground); color: var(--color-background); border-color: var(--color-foreground);
}

@media (min-width: 768px) {
  .collection-page { padding: 3rem 0 5rem; }
  .collection-page__title { font-size: 2.5rem; }
  .collection-page__toolbar { flex-direction: row; justify-content: space-between; }
  .collection-page__grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .collection-card__title { font-size: 1rem; }
}

/* ================================================
   SINGLE PRODUCT
   ================================================ */
.cowyreads-section:has(.product-page) { flex: 1; display: flex; flex-direction: column; }

.product-page {
  display: flex; align-items: center; justify-content: center; flex: 1; overflow: hidden;
}

.product-page__inner {
  display: flex; flex-direction: row; align-items: flex-start;
  gap: 1.5rem; max-width: 900px; width: 100%; padding: 0.75rem 0;
}

.product-page__gallery { display: flex; flex-direction: column; gap: 0.4rem; width: 400px; flex-shrink: 0; }

.product-page__main-image {
  position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px;
  border: 2.5px solid var(--color-foreground); box-shadow: var(--shadow-card);
  background-color: var(--color-card-bg);
}

.product-page__main-image img,
.product-page__main-image svg { width: 100%; height: 100%; object-fit: contain; }

.product-page__badge {
  position: absolute; top: 12px; left: 12px; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 0.3em 0.8em; border-radius: 8px;
  border: 2px solid var(--color-foreground); box-shadow: 2px 2px 0 var(--color-foreground); z-index: 2;
}

.product-page__badge--in { background-color: #d4edda; color: #2d5f3e; }
.product-page__badge--out { background-color: #f8d7da; color: #842029; }

.product-page__thumbnails { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.2rem; }

.product-page__thumb {
  flex-shrink: 0; width: 42px; height: 42px; border: 2.5px solid transparent;
  border-radius: 10px; overflow: hidden; cursor: pointer; padding: 0; background: none;
  opacity: 0.5; transition: opacity 0.2s ease, border-color 0.2s ease;
}

.product-page__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-page__thumb--active,
.product-page__thumb:hover { opacity: 1; border-color: var(--color-accent); }

.product-page__info {
  display: flex; flex-direction: column; gap: 0.7rem; overflow-y: auto;
  overflow-x: visible; max-height: 100%; min-height: 0; flex: 1; padding: 0 6px 6px 0;
}

.product-page__vendor { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.45; font-weight: 700; }
.product-page__title { font-family: var(--font-heading--family); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }

.product-page__price { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.product-page__current-price { font-size: 1.05rem; font-weight: 700; }
.product-page__compare-price { text-decoration: line-through; opacity: 0.4; font-size: 0.85rem; }

.product-page__save {
  font-size: 0.75rem; font-weight: 700; color: var(--color-button-text);
  background-color: var(--color-link); padding: 0.15em 0.6em; border-radius: 9999px;
  border: 2px solid var(--color-foreground);
}

.product-page__description {
  font-size: 0.82rem; line-height: 1.6; opacity: 0.75; padding: 0.75rem;
  background-color: var(--color-card-bg); border: 2px dashed var(--color-border); border-radius: 12px;
}

.product-page__description p + p { margin-top: 0.5rem; }
.product-page__description ul,
.product-page__description ol { padding-left: 1.25rem; margin-top: 0.5rem; }
.product-page__description li { margin-bottom: 0.35rem; }

.product-page__details {
  display: flex; flex-direction: column; gap: 0;
  border: 2.5px solid var(--color-foreground); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-card);
}

.product-page__detail {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.4rem 0.75rem; background-color: var(--color-card-bg);
}

.product-page__detail:nth-child(even) { background-color: var(--color-background); }
.product-page__detail + .product-page__detail { border-top: 1.5px solid var(--color-border); }
.product-page__detail-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.55; flex-shrink: 0; }
.product-page__detail-value { font-size: 0.78rem; font-weight: 600; text-align: right; }

.product-page__option { display: flex; flex-direction: column; }
.product-page__label { display: block; font-size: 0.72rem; font-weight: 700; margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }

.product-page__select,
.product-page__quantity-input {
  width: 100%; padding: 0.45rem 0.75rem; border: 2px solid var(--color-foreground);
  border-radius: var(--style-border-radius); font-size: 0.8rem; font-weight: 600;
  background-color: var(--color-card-bg); color: var(--color-foreground);
  box-shadow: 2px 2px 0 var(--color-foreground);
}

.product-page__quantity-input { max-width: 80px; }

.product-page__actions {
  display: grid; grid-template-columns: 1fr;
  gap: 1rem; margin-top: 1.25rem; padding-bottom: 6px;
}

.product-page__add-to-cart { width: 100%; }

@media (min-width: 768px) {
  .product-page__inner { max-width: 960px; gap: 2rem; }
  .product-page__gallery { width: 450px; }
  .product-page__thumb { width: 48px; height: 48px; }
  .product-page__title { font-size: 1.4rem; }
  .product-page__current-price { font-size: 1.15rem; }
  .product-page__description { font-size: 0.85rem; }
}

/* Lightbox */
.product-lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background-color: rgba(32, 2, 1, 0.85); align-items: center;
  justify-content: center; padding: 2rem;
}

.product-lightbox.is-open { display: flex; }

.product-lightbox__img {
  max-width: 90vw; max-height: 90vh; object-fit: contain;
  border-radius: 16px; border: 3px solid var(--color-card-bg);
  box-shadow: 0 8px 40px rgba(32, 2, 1, 0.5);
}

.product-lightbox__close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 2.5px solid var(--color-card-bg); background-color: rgba(32, 2, 1, 0.6);
  color: var(--color-card-bg); cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.product-lightbox__close:hover { background-color: rgba(32, 2, 1, 0.9); transform: scale(1.1); }
.product-lightbox__close svg { width: 1.25rem; height: 1.25rem; }

/* ================================================
   CART
   ================================================ */
.cowyreads-section:has(.cart-empty) { flex: 1; display: flex; flex-direction: column; }
.cowyreads-section:has(.cart-empty) > .cart-page { flex: 1; display: flex; flex-direction: column; }

.cart-empty {
  position: relative; display: flex; align-items: center;
  justify-content: center; flex: 1; overflow: hidden;
}

.cart-empty__wind { position: absolute; opacity: 0; pointer-events: none; }
.cart-empty__wind--1 { width: 130px; top: 10%; left: 3%; animation: ce-wind-blow 4.5s ease-in-out infinite; }
.cart-empty__wind--2 { width: 120px; top: 35%; right: 5%; animation: ce-wind-blow 4s ease-in-out infinite; animation-delay: 1s; }
.cart-empty__wind--3 { width: 100px; top: 60%; left: 8%; animation: ce-wind-blow 3.5s ease-in-out infinite; animation-delay: 2.2s; }
.cart-empty__wind--4 { width: 115px; top: 80%; right: 10%; animation: ce-wind-blow 4.2s ease-in-out infinite; animation-delay: 3.3s; }
.cart-empty__wind--5 { width: 95px; top: 90%; left: 15%; animation: ce-wind-blow 3.8s ease-in-out infinite; animation-delay: 0.5s; }

.wind-line { stroke-dasharray: 200; stroke-dashoffset: 200; }
.cart-empty__wind--1 .wind-line { animation: ce-wind-draw 4.5s ease-in-out infinite; }
.cart-empty__wind--2 .wind-line { animation: ce-wind-draw 4s ease-in-out infinite; animation-delay: 1s; }
.cart-empty__wind--3 .wind-line { animation: ce-wind-draw 3.5s ease-in-out infinite; animation-delay: 2.2s; }
.cart-empty__wind--4 .wind-line { animation: ce-wind-draw 4.2s ease-in-out infinite; animation-delay: 3.3s; }
.cart-empty__wind--5 .wind-line { animation: ce-wind-draw 3.8s ease-in-out infinite; animation-delay: 0.5s; }

@keyframes ce-wind-blow {
  0% { opacity: 0; transform: translateX(-20px) scaleX(0.8); }
  12% { opacity: 0.55; transform: translateX(0px) scaleX(1); }
  50% { opacity: 0.4; transform: translateX(15px) scaleX(1); }
  85% { opacity: 0.5; transform: translateX(30px) scaleX(1.05); }
  100% { opacity: 0; transform: translateX(45px) scaleX(0.9); }
}

@keyframes ce-wind-draw {
  0% { stroke-dashoffset: 200; }
  20% { stroke-dashoffset: 50; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.cart-empty__center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cart-empty__hanger { display: flex; flex-direction: column; align-items: center; }
.cart-empty__nail { width: 28px; height: 32px; margin-bottom: -2px; z-index: 2; position: relative; }

.cart-empty__sign-wrap {
  display: flex; flex-direction: column; align-items: center;
  transform-origin: top center; animation: ce-pendulum 4s ease-in-out infinite;
}

.cart-empty__string { width: 56px; height: 42px; margin-bottom: -3px; }

@keyframes ce-pendulum {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(6deg); }
  30% { transform: rotate(-5deg); }
  45% { transform: rotate(4deg); }
  60% { transform: rotate(-3deg); }
  75% { transform: rotate(2deg); }
  90% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.cart-empty__sign { position: relative; width: 340px; max-width: 80vw; height: 170px; }
.cart-empty__sign-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cart-empty__sign-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; }
.cart-empty__message { font-family: var(--font-heading--family); font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: var(--color-foreground); }
.cart-empty__submessage { font-size: 0.85rem; margin-top: 0.4rem; opacity: 0.5; }
.cart-empty__btn { margin-top: 1.5rem; }

.cart-page { padding: 2rem 0 4rem; }
.cart-page__title { font-family: var(--font-heading--family); font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 2rem; }
.cart-page__items { display: flex; flex-direction: column; gap: 1rem; }

.cart-item {
  display: flex; gap: 1rem; padding: 1rem;
  background-color: var(--color-card-bg); border: 2.5px solid var(--color-foreground);
  border-radius: 16px; box-shadow: var(--shadow-card);
}

.cart-item__image-wrap {
  flex-shrink: 0; width: 80px; height: 80px; border-radius: 10px;
  overflow: hidden; border: 2px solid var(--color-border); background-color: var(--color-background);
}

.cart-item__image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__details { flex: 1; min-width: 0; }
.cart-item__title { font-weight: 700; font-size: 0.95rem; text-decoration: none; color: var(--color-foreground); line-height: 1.3; }
.cart-item__title:hover { color: var(--color-link); }
.cart-item__variant { font-size: 0.78rem; opacity: 0.5; margin-top: 0.15rem; }
.cart-item__price { font-size: 0.9rem; font-weight: 700; margin-top: 0.35rem; }
.cart-item__actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex-shrink: 0; }

.cart-item__qty,
.cart-item .quantity input {
  width: 50px; text-align: center; padding: 0.35rem;
  border: 2px solid var(--color-foreground); border-radius: 10px;
  font-weight: 700; font-size: 0.85rem; background-color: var(--color-background);
}

.cart-item__remove { font-size: 0.72rem; color: var(--color-link); text-decoration: none; font-weight: 600; opacity: 0.7; transition: opacity 0.2s ease; }
.cart-item__remove:hover { opacity: 1; color: var(--color-link); }

.cart-page__footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px dashed var(--color-border); }
.cart-page__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.25rem; }
.cart-page__total-label { font-family: var(--font-heading--family); font-size: 1.15rem; font-weight: 700; }
.cart-page__total-price { font-size: 1.35rem; font-weight: 700; }
.cart-page__buttons { display: flex; flex-direction: column; gap: 0.75rem; }
.cart-page__update,
.cart-page__checkout { width: 100%; text-align: center; cursor: pointer; }

@media (min-width: 768px) {
  .cart-page__title { font-size: 2.5rem; }
  .cart-empty__wind--1 { width: 150px; } .cart-empty__wind--2 { width: 140px; }
  .cart-empty__wind--3 { width: 120px; } .cart-empty__wind--4 { width: 130px; }
  .cart-empty__wind--5 { width: 110px; }
  .cart-empty__sign { width: 380px; height: 190px; }
  .cart-empty__message { font-size: 1.75rem; }
  .cart-empty__submessage { font-size: 0.9rem; }
  .cart-item { padding: 1.25rem; }
  .cart-item__image-wrap { width: 100px; height: 100px; }
  .cart-page__buttons { flex-direction: row; justify-content: flex-end; }
  .cart-page__update,
  .cart-page__checkout { width: auto; }
}

/* ================================================
   404 PAGE
   ================================================ */
.cowyreads-section:has(.not-found),
body:has(.not-found) main {
  flex: 1; display: flex; flex-direction: column;
}

.not-found {
  position: relative; display: flex; align-items: center;
  justify-content: center; flex: 1; overflow: hidden;
}

.not-found__wind { position: absolute; opacity: 0; pointer-events: none; }
.not-found__wind--1 { width: 130px; top: 10%; left: 3%; animation: nf-wind-blow 4.5s ease-in-out infinite; }
.not-found__wind--2 { width: 120px; top: 35%; right: 5%; animation: nf-wind-blow 4s ease-in-out infinite; animation-delay: 1s; }
.not-found__wind--3 { width: 100px; top: 60%; left: 8%; animation: nf-wind-blow 3.5s ease-in-out infinite; animation-delay: 2.2s; }
.not-found__wind--4 { width: 115px; top: 80%; right: 10%; animation: nf-wind-blow 4.2s ease-in-out infinite; animation-delay: 3.3s; }
.not-found__wind--5 { width: 95px; top: 90%; left: 15%; animation: nf-wind-blow 3.8s ease-in-out infinite; animation-delay: 0.5s; }

.nf-wind-line { stroke-dasharray: 200; stroke-dashoffset: 200; }
.not-found__wind--1 .nf-wind-line { animation: nf-wind-draw 4.5s ease-in-out infinite; }
.not-found__wind--2 .nf-wind-line { animation: nf-wind-draw 4s ease-in-out infinite; animation-delay: 1s; }
.not-found__wind--3 .nf-wind-line { animation: nf-wind-draw 3.5s ease-in-out infinite; animation-delay: 2.2s; }
.not-found__wind--4 .nf-wind-line { animation: nf-wind-draw 4.2s ease-in-out infinite; animation-delay: 3.3s; }
.not-found__wind--5 .nf-wind-line { animation: nf-wind-draw 3.8s ease-in-out infinite; animation-delay: 0.5s; }

@keyframes nf-wind-blow {
  0% { opacity: 0; transform: translateX(-20px) scaleX(0.8); }
  12% { opacity: 0.55; transform: translateX(0px) scaleX(1); }
  50% { opacity: 0.4; transform: translateX(15px) scaleX(1); }
  85% { opacity: 0.5; transform: translateX(30px) scaleX(1.05); }
  100% { opacity: 0; transform: translateX(45px) scaleX(0.9); }
}

@keyframes nf-wind-draw {
  0% { stroke-dashoffset: 200; }
  20% { stroke-dashoffset: 50; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.not-found__center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.not-found__hanger { display: flex; flex-direction: column; align-items: center; }
.not-found__nail { width: 28px; height: 32px; margin-bottom: -2px; z-index: 2; position: relative; }

.not-found__sign-wrap {
  display: flex; flex-direction: column; align-items: center;
  transform-origin: top center; animation: nf-pendulum 4s ease-in-out infinite;
}

.not-found__string { width: 56px; height: 42px; margin-bottom: -3px; }

@keyframes nf-pendulum {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(6deg); }
  30% { transform: rotate(-5deg); }
  45% { transform: rotate(4deg); }
  60% { transform: rotate(-3deg); }
  75% { transform: rotate(2deg); }
  90% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.not-found__sign { position: relative; width: 340px; max-width: 80vw; height: 170px; }
.not-found__sign-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.not-found__sign-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; }
.not-found__code { font-family: var(--font-heading--family); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--color-border); opacity: 0.5; }
.not-found__message { font-family: var(--font-heading--family); font-size: 1.3rem; font-weight: 700; line-height: 1.2; color: var(--color-foreground); margin-top: 0.25rem; }
.not-found__submessage { font-size: 0.82rem; margin-top: 0.3rem; opacity: 0.5; }
.not-found__btn { margin-top: 1.5rem; }

@media (min-width: 768px) {
  .not-found__wind--1 { width: 150px; } .not-found__wind--2 { width: 140px; }
  .not-found__wind--3 { width: 120px; } .not-found__wind--4 { width: 130px; }
  .not-found__wind--5 { width: 110px; }
  .not-found__sign { width: 380px; height: 190px; }
  .not-found__code { font-size: 2.5rem; }
  .not-found__message { font-size: 1.6rem; }
  .not-found__submessage { font-size: 0.9rem; }
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: auto;
  border-top: 2.5px solid var(--color-foreground);
}

.footer__inner {
  max-width: var(--page-width, 90rem);
  margin: 0 auto;
  padding: 3rem var(--page-margin, 20px) 2rem;
}

.footer__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer__brand { max-width: 320px; }
.footer__logo { font-family: var(--font-heading--family); font-size: 1.4rem; font-weight: 700; color: var(--color-footer-text); margin-bottom: 0.75rem; }
.footer__about { font-size: 0.85rem; line-height: 1.7; opacity: 0.55; }
.footer__heading { font-family: var(--font-body--family); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; margin-bottom: 0.85rem; opacity: 0.65; }
.footer__links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__link { color: var(--color-footer-text); text-decoration: none; font-size: 0.88rem; font-weight: 600; opacity: 0.55; transition: opacity 0.2s ease; }
.footer__link:hover { opacity: 1; color: var(--color-footer-text); }
.footer__address { font-size: 0.88rem; opacity: 0.55; line-height: 1.6; }

.footer__bottom {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px dashed var(--color-border);
}

.footer__payment { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.footer__payment svg { width: 2.25rem; height: auto; opacity: 0.45; }
.footer__copyright { font-size: 0.72rem; opacity: 0.3; text-align: center; }
.footer__copyright a { color: var(--color-footer-text); text-decoration: none; }

@media (min-width: 768px) {
  .footer__inner { padding: 4rem var(--page-margin, 20px) 2.5rem; }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ================================================
   SEARCH RESULTS
   ================================================ */
.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ================================================
   IMAGE COMPONENT
   ================================================ */
.image {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
}

.image > img {
  width: 100%;
  height: auto;
}
