/* Halloween color layer for milyunCOSITAS.
   Load after style.css; enable with body.halloween-theme.
   Color-only overrides: existing typography, layout, controls, logo,
   product information and navigation behavior remain in their own layers. */

body.halloween-theme {
  --ink: #3f2847;
  --muted: #685c63;
  --pink: #a64820;
  --pink-dark: #873719;
  --soft: #fff1e7;
  --cream: #fffdfa;
  --line: #e8ded7;
  --white: #fff;
  --halloween-plum: #3f2847;
  --halloween-plum-hover: #52365b;
  --halloween-orange: #a64820;
  --halloween-peach: #fff1e7;
  background-color: var(--cream);
  color: var(--ink);
}

body.halloween-theme ::selection {
  background: #f6dcc4;
  color: var(--ink);
}

/* Quiet, readable framing around the original colorful brand artwork. */
body.halloween-theme .preview-bar {
  background: #f6efe7;
  color: #644631;
}

body.halloween-theme .site-header,
body.halloween-theme .site-footer {
  background: #fff;
}

body.halloween-theme .nav-border,
body.halloween-theme .footer-bottom {
  border-top-color: var(--line);
}

body.halloween-theme .search {
  background: #fffcf8;
  border-color: #d9c9bd;
}

body.halloween-theme .search:focus-within {
  border-color: var(--halloween-orange);
  box-shadow: 0 0 0 2px #a648201a;
}

body.halloween-theme .search input::placeholder {
  color: var(--muted);
}

body.halloween-theme .button-dark {
  background: var(--halloween-plum);
  color: #fff;
}

body.halloween-theme .button-dark:hover {
  background: var(--halloween-plum-hover);
}

body.halloween-theme .button-light {
  background: #fff;
  border-color: #d4bcaa;
  color: var(--pink-dark);
}

body.halloween-theme .button-light:hover {
  background: var(--halloween-peach);
}

body.halloween-theme .benefit-strip svg {
  color: var(--halloween-orange);
}

/* The warm accent is concentrated in selected and actionable elements. */
body.halloween-theme .category-tile:hover,
body.halloween-theme .category-tile[aria-pressed=true] {
  border-color: #b8754d;
  background: #fff7ef;
}

body.halloween-theme .category-mark,
body.halloween-theme .demo-category-icon {
  background: #f8eadc;
  color: #91401f;
}

body.halloween-theme .mark-jugueteria {
  background: #f7efda;
  color: #7b591c;
}

body.halloween-theme .mark-plasticos {
  background: #edf2e7;
  color: #4e654a;
}

body.halloween-theme .mark-cosmeticos {
  background: #f1eaf3;
  color: #72517d;
}

body.halloween-theme .mark-mas {
  background: #f4ede6;
  color: #755744;
}

body.halloween-theme .filter-chip {
  border-color: #c99b79;
  background: #fff4e9;
  color: #803b1c;
}

body.halloween-theme .filter-chip:hover {
  background: #f8e7d7;
}

/* Retain conspicuous demo/reference distinctions, with full text contrast. */
body.halloween-theme .demo-catalog-notice {
  background: #fff5eb;
  border-color: #e6cfb8;
  color: #66574d;
}

body.halloween-theme .demo-catalog-notice strong {
  color: #81431f;
}

body.halloween-theme .product-image {
  background: #faf7f2;
}

body.halloween-theme .demo-placeholder {
  background: #f6f1eb;
}

body.halloween-theme .demo-category-name,
body.halloween-theme .demo-image-caption {
  color: var(--muted);
}

body.halloween-theme .product-tag {
  background: #fff0e1;
  color: #803b1c;
}

body.halloween-theme .product-tag-demo {
  background: #f3edf4;
  color: #61456c;
}

body.halloween-theme .product-tag-reference {
  background: #edf2e7;
  color: #4e654a;
}

body.halloween-theme .product-card-demo .price-note {
  color: #61456c;
}

body.halloween-theme .product-contact {
  border-top-color: var(--line);
}

body.halloween-theme .demo-only,
body.halloween-theme .demo-only:hover {
  color: var(--muted);
  border-top-color: var(--line);
}

body.halloween-theme .catalog-note {
  background: #f5f1ec;
  color: var(--muted);
}

body.halloween-theme .empty-state {
  border-color: #ccb5a8;
}

body.halloween-theme .empty-symbol {
  color: var(--halloween-orange);
}

/* Lower-page panels keep the same bright, calm storefront character. */
body.halloween-theme .help-section {
  background: #faf0e5;
}

body.halloween-theme .help-symbol {
  color: #a64820;
}

body.halloween-theme .help-section p:last-child {
  color: #66574d;
}

body.halloween-theme .store-list article > span:last-child {
  color: var(--muted);
}

/* Halloween hero only. Append after the existing stylesheet.
   Content determines height: no fixed height, max-height, or text clipping. */
body.halloween-theme .season-banner {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  min-height: 0;
  overflow: visible;
  border: 1px solid #e8cbb7;
  border-radius: 14px;
  background: linear-gradient(112deg, #fff8ec 0%, #ffefd9 58%, #ffe2bc 100%);
  box-shadow: inset 0 1px 0 #ffffffb3;
}

body.halloween-theme .season-copy {
  min-width: 0;
  padding: 24px 0 24px 32px;
}

body.halloween-theme .season-copy .eyebrow {
  margin-bottom: 7px;
  color: #884522;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 1px;
}

body.halloween-theme .season-copy #season-title {
  max-width: 480px;
  color: #482a40;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -.9px;
}

body.halloween-theme .season-copy #season-description {
  max-width: 410px;
  margin-top: 10px;
  color: #624b50;
  font-size: 14px;
  line-height: 1.5;
}

body.halloween-theme .season-copy .button {
  max-width: 100%;
  min-height: 44px;
  margin-top: 16px;
  padding: 10px 16px;
  gap: 16px;
  border-color: #482a40;
  border-radius: 7px;
  background: #482a40;
  color: #fffaf1;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
}

body.halloween-theme .season-copy .button:hover {
  border-color: #653c58;
  background: #653c58;
}

body.halloween-theme .season-copy .button:focus-visible {
  outline: 3px solid #884522;
  outline-offset: 4px;
}

body.halloween-theme .season-visual {
  min-width: 0;
  margin: 20px 28px 20px 16px;
}

body.halloween-theme .season-visual::before {
  width: clamp(160px, 18vw, 218px);
  height: auto;
  aspect-ratio: 1;
  right: 8%;
  background: #f7c692;
  opacity: .65;
}

body.halloween-theme .season-sticker {
  width: 100%;
  max-width: 306px;
  min-height: 150px;
  aspect-ratio: auto;
  padding: 20px 14px;
  gap: 8px;
  border-color: #d5ac90;
  border-radius: 10px;
  background: #fffcf3;
  box-shadow: 5px 7px 0 #b0683820;
  transform: rotate(-4deg);
}

body.halloween-theme .season-sticker > span:first-child {
  color: #884522;
  font-size: 14px;
  letter-spacing: .6px;
  text-align: center;
}

body.halloween-theme .season-sticker strong {
  color: #482a40;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -1.5px;
}

body.halloween-theme .season-sticker > span:last-child {
  color: #624b50;
  font-size: 14px;
  text-align: center;
}

body.halloween-theme .season-star {
  color: #a34d25;
}

body.halloween-theme .season-visual .star-one {
  top: 1px;
  right: 9%;
  font-size: 38px;
}

body.halloween-theme .season-visual .star-two {
  bottom: 9%;
  left: 1%;
  font-size: 24px;
}

body.halloween-theme .season-visual .mini-sticker {
  bottom: 0;
  right: 0;
  padding: 6px 10px;
  border-radius: 4px;
  background: #653c58;
  color: #fffaf1;
  font-size: 14px;
  letter-spacing: .2px;
  transform: rotate(3deg);
}

@media (max-width: 1050px) {
  body.halloween-theme .season-copy {
    padding-left: 26px;
  }

  body.halloween-theme .season-visual {
    margin-right: 20px;
    margin-left: 18px;
  }
}

@media (max-width: 760px) {
  body.halloween-theme .season-banner {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 11px;
    background: linear-gradient(115deg, #fff8ec 0%, #ffecd2 100%);
  }

  body.halloween-theme .season-copy {
    padding: 16px 20px;
  }

  body.halloween-theme .season-copy .eyebrow {
    margin-bottom: 6px;
    letter-spacing: .8px;
  }

  body.halloween-theme .season-copy #season-title {
    max-width: 100%;
    font-size: 26px;
    line-height: 1.16;
    letter-spacing: -.65px;
  }

  body.halloween-theme .season-copy #season-description {
    max-width: 410px;
    margin-top: 8px;
    line-height: 1.45;
  }

  body.halloween-theme .season-copy .button {
    margin-top: 12px;
    padding: 10px 14px;
    gap: 14px;
  }

  body.halloween-theme .season-visual {
    display: none;
  }
}

/* Original, static Halloween accents. Append after the store's theme styles.
   The existing aria-hidden star spans provide decoration without new markup. */
body.halloween-theme .season-visual .season-star {
  display: block;
  position: absolute;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  user-select: none;
  animation: none;
  transition: none;
}

body.halloween-theme .season-visual .star-one {
  width: 44px;
  height: 44px;
  inset: 2px 12% auto auto;
  transform: rotate(8deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M31 18c-1-5 0-9 4-13l6 3c-5 3-7 6-7 11' fill='%23644258'/%3E%3Cpath d='M32 19C17 8 6 22 7 38c1 15 11 23 25 20 14 3 24-5 25-20 1-16-10-30-25-19Z' fill='%23e78b43' stroke='%23ad562c' stroke-width='2'/%3E%3Cpath d='M26 20c-9 11-10 26-2 35m14-35c9 11 10 26 2 35' fill='none' stroke='%23c96b31' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M32 20v35' stroke='%23f5b46d' stroke-width='2' stroke-linecap='round'/%3E%3Cellipse cx='23' cy='35' rx='2.5' ry='3' fill='%23593950'/%3E%3Cellipse cx='41' cy='35' rx='2.5' ry='3' fill='%23593950'/%3E%3Cpath d='M25 43c4 5 10 5 14 0' fill='none' stroke='%23593950' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.halloween-theme .season-visual .star-two {
  width: 46px;
  height: 28px;
  inset: auto auto 3px 5%;
  transform: rotate(-9deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 46'%3E%3Cpath d='M33 17 34 8l6 5 6-5 1 9C58 11 67 7 76 8c-3 7-2 13 2 19-10-2-16 1-19 8-7-3-12-2-19 7-7-9-12-10-19-7-3-7-9-10-19-8 4-6 5-12 2-19 9-1 18 3 29 9Z' fill='%23644258'/%3E%3Ccircle cx='36' cy='23' r='1.7' fill='%23fff6e9'/%3E%3Ccircle cx='44' cy='23' r='1.7' fill='%23fff6e9'/%3E%3Cpath d='M37 29q3 3 6 0' fill='none' stroke='%23e7b2a0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Mobile keeps the compact, text-first banner. No decoration can cover a CTA. */
@media (max-width: 760px) {
  body.halloween-theme .season-visual .season-star {
    display: none;
    background-image: none;
  }
}

/* Halloween's final, narrowly scoped readability and reflow guardrails.
   Load after theme.css, banner.css and decor.css. Header/logo geometry and the
   native dialog's visibility, positioning and lifecycle stay in the base CSS. */
body.halloween-theme .search input,
body.halloween-theme .sort-control select,
body.halloween-theme .product-body h3 {
  font-size: 16px;
}

body.halloween-theme :where(
  .preview-bar, .preview-bar b, .eyebrow, .section-aside,
  .benefit-strip strong, .benefit-strip small,
  .category-button, .category-tile strong, .category-tile small,
  .catalog-toolbar p, .filter-chip, .reset-filters,
  .product-tag, .product-details, .product-contact, .price-note,
  .product-price span, .demo-category-name, .demo-image-caption,
  .demo-catalog-notice, .catalog-note p, .catalog-pagination p,
  .store-list p, .footer-main > p, .footer-main > div, .footer-bottom
) {
  font-size: 14px;
}

body.halloween-theme :where(
  .button, .search button, .sort-control select, .category-button,
  .category-tile, .reset-filters, .filter-chip, .product-contact,
  .header-chat, .stores-shortcut, .text-link,
  .footer-main > div a, .footer-bottom a
) {
  min-width: 44px;
  min-height: 44px;
}

/* Permit flex/grid text children to shrink before their strings wrap. */
body.halloween-theme :where(
  .section-heading > div, .catalog-toolbar > *, .active-filters,
  .product-body, .help-section > div, .stores-copy, .store-list,
  .store-list article > div, .footer-main > p, .footer-main > div,
  .footer-bottom > *
) {
  min-width: 0;
}

body.halloween-theme :where(
  .section-heading h2, .eyebrow, .product-body h3, .product-tag,
  .product-details, .product-contact, .demo-image-caption,
  .catalog-toolbar p, .demo-catalog-notice, .catalog-note p,
  .filter-chip, .reset-filters, .text-link,
  .store-list h3, .store-list p, .footer-main > div a
) {
  overflow-wrap: anywhere;
}

/* Override the existing help CTA's nowrap only where text needs to reflow.
   Keep category navigation's intentional horizontal scroller untouched. */
body.halloween-theme :where(
  .button, .reset-filters, .filter-chip, .product-contact, .text-link
) {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.halloween-theme .help-section .button {
  white-space: normal;
}

body.halloween-theme .sort-control {
  max-width: 100%;
}

body.halloween-theme .sort-control select {
  max-width: min(190px, 100%);
}

@media (max-width: 760px) {
  body.halloween-theme .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.halloween-theme .category-tiles {
    overscroll-behavior-x: contain;
    scroll-padding-inline: 2px;
  }

  body.halloween-theme .footer-main > div a {
    align-self: flex-start;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  body.halloween-theme .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A body-only scroll override cannot disable the root's smooth anchors.
   This root selector is still conditional on the Halloween body class. */
@media (prefers-reduced-motion: reduce) {
  html:has(> body.halloween-theme),
  body.halloween-theme,
  body.halloween-theme *,
  body.halloween-theme *::before,
  body.halloween-theme *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
