/*
Theme Name: Crystal Treat
Theme URI: https://crystaltreat.store/
Author: Crystal Treat
Description: Lightweight WooCommerce theme rebuilt for Crystal Treat.
Version: 1.0.0
Text Domain: crystaltreat
*/

:root {
  --ct-cream: #fefae0;
  --ct-gold: #dda15e;
  --ct-brown: #bc6c25;
  --ct-coral: #e95144;
  --ct-rose: #c83d5d;
  --ct-rose-dark: #9f243f;
  --ct-ink: #232323;
  --ct-forest: #283618;
  --ct-white: #fff;
  --ct-muted: #606c38;
  --ct-line: #bc6c25;
  --ct-heading-font: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ct-body-font: "Inter", "Fira Sans", Arial, Helvetica, sans-serif;
  --ct-radius: 18px;
  --ct-shadow: 0 14px 32px rgba(35, 35, 35, .08);
  --ct-container: min(1170px, calc(100vw - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; color: var(--ct-ink); background: var(--ct-cream); font-family: var(--ct-body-font); font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, .woocommerce h1, .woocommerce h2, .woocommerce h3 { font-family: var(--ct-heading-font); }
.ct-container { width: var(--ct-container); margin-inline: auto; }
.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; }
.screen-reader-text:focus { position: fixed; z-index: 9999; top: 12px; left: 12px; width: auto; height: auto; padding: 12px 16px; clip: auto; background: #fff; }

.ct-announcement { overflow: hidden; color: var(--ct-forest); background: var(--ct-gold); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.ct-announcement__track { display: flex; align-items: center; gap: 12px; width: max-content; padding: 5px 0; animation: ct-marquee 18s linear infinite; white-space: nowrap; }
.ct-announcement__bolt { font-size: 12px; transform: rotate(45deg); }
@keyframes ct-marquee { to { transform: translateX(-50%); } }
.ct-header { background: var(--ct-cream); border-bottom: 0; position: relative; z-index: 50; }
.ct-header__main { min-height: 86px; display: grid; grid-template-columns: minmax(430px,1fr) auto minmax(260px,1fr); align-items: center; gap: 24px; padding: 15px 0 16px; }
.ct-brand { color: var(--ct-forest); font-family: var(--ct-heading-font); font-size: 48px; font-weight: 700; line-height: .9; letter-spacing: .015em; text-transform: none; }
.ct-brand span { display: block; }
.ct-tagline { max-width: none; margin: 0; color: var(--ct-forest); font-size: 15px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.ct-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ct-header-link { color: #323232; font-size: 14px; line-height: 1; }
.ct-header-link--cart { position: relative; padding-right: 16px; }
.ct-icon-link { min-width: 38px; min-height: 38px; display: inline-grid; place-items: center; border: 1px solid rgba(35,35,35,.2); border-radius: 0; color: var(--ct-ink); background: transparent; transition: .2s ease; position: relative; }
.ct-icon-link:hover, .ct-icon-link:focus-visible { color: #fff; background: var(--ct-ink); }
.ct-cart-count { position: absolute; top: -12px; right: -2px; min-width: 20px; height: 20px; display: grid; place-items: center; color: #323232; background: #ffe5e8; border-radius: 20px; font-size: 12px; font-weight: 700; }
.ct-nav { background: var(--ct-brown); color: #fff; }
.ct-nav__list { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: clamp(22px, 3vw, 42px); list-style: none; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .015em; text-transform: none; }
.ct-nav a { display: block; padding: 12px 0 13px; border-bottom: 1px solid transparent; text-shadow: 0 1px 0 rgba(0,0,0,.08); }
.ct-nav a:hover, .ct-nav a:focus-visible { color: #fff; border-color: #fff; }
.ct-menu-toggle { display: none; }

.ct-hero { position: relative; min-height: 0; aspect-ratio: 1264 / 556; color: #fff; overflow: hidden; background: var(--ct-cream); }
.ct-hero__slides, .ct-hero__slide { position: absolute; inset: 0; }
.ct-hero__slide { opacity: 0; background-size: cover; background-position: center; transition: opacity .9s ease; }
.ct-hero__slide.is-active { opacity: 1; }
.ct-hero::after { content: none; }
.ct-hero__content { position: relative; z-index: 2; min-height: inherit; }
.ct-kicker { color: var(--ct-coral); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ct-button, .button, button.button, input.button, .woocommerce a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 25px; border: 1px solid var(--ct-ink); border-radius: 1px; color: #fff; background: var(--ct-ink); font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: .2s ease; text-align: center; }
.ct-button:hover, .button:hover, .woocommerce a.button:hover { color: var(--ct-ink); background: #fff; box-shadow: var(--ct-shadow); }
.ct-button--light { color: var(--ct-forest); border-color: #fff; background: #fff; }

.ct-section { padding: 20px 0 50px; background: var(--ct-cream); }
.ct-section--cream { background: var(--ct-cream); }
.ct-section__head { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; margin-bottom: 28px; text-align: center; }
.ct-section__head::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--ct-brown); transform: translateY(-50%); }
.ct-section__head h2 { position: relative; z-index: 1; margin: 0; padding: 0 18px; color: var(--ct-brown); background: var(--ct-cream); font: 700 clamp(38px, 4.6vw, 56px)/.9 var(--ct-heading-font); letter-spacing: .01em; }
.ct-section__head p { max-width: 520px; margin: 0; color: var(--ct-muted); }
.ct-section__head > a { position: relative; z-index: 1; color: var(--ct-muted); background: var(--ct-cream); padding: 0 12px; font-weight: 500; }
.ct-category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ct-category-card { position: relative; overflow: hidden; border-radius: 0; background: #ddd; aspect-ratio: 100 / 156; }
.ct-category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.ct-category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.42)); }
.ct-category-card__label { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 22px; display: grid; justify-items: center; gap: 14px; color: #fff; text-align: center; }
.ct-category-card__label strong { display: block; font: 700 clamp(30px, 3.2vw, 48px)/.92 var(--ct-heading-font); letter-spacing: .015em; }
.ct-category-card__label em { display: inline-flex; min-width: 96px; justify-content: center; padding: 10px 18px; border: 1px solid #fff; color: #fff; background: var(--ct-brown); font-style: normal; font-weight: 700; }
.ct-category-card:hover img { transform: scale(1.06); }
.ct-crystal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ct-crystal-card { min-height: 220px; padding: 27px; border: 1px solid rgba(40,54,24,.13); border-radius: var(--ct-radius); background: rgba(255,255,255,.76); box-shadow: 0 9px 30px rgba(40,54,24,.06); }
.ct-crystal-card:nth-child(3n+1) { background: #f5eaff; }
.ct-crystal-card:nth-child(3n+2) { background: #fff1d5; }
.ct-crystal-card:nth-child(3n) { background: #e6f4ea; }
.ct-crystal-card h3 { margin: 0 0 10px; font: 700 28px/1 var(--ct-heading-font); }
.ct-crystal-card p { margin: 0; color: #5e6257; font-size: 14px; }
.ct-crystal-slider { overflow: hidden; padding: 0 0 12px; }
.ct-crystal-track { display: flex; gap: 18px; will-change: transform; transition: transform .68s cubic-bezier(.45,0,.2,1); }
.ct-crystal-track.is-jumping { transition: none; }
.ct-crystal-slide { position: relative; flex: 0 0 100%; overflow: hidden; border-radius: 20px; background: var(--ct-ink); aspect-ratio: 16 / 9; }
.ct-crystal-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.ct-crystal-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(35,35,35,.5), rgba(35,35,35,.08)); }
.ct-crystal-slide div { position: absolute; z-index: 2; left: clamp(28px, 8vw, 86px); top: 50%; max-width: 740px; transform: translateY(-50%); color: #fff; }
.ct-crystal-slide h3 { margin: 0 0 25px; color: #fff; font: 700 clamp(50px, 7vw, 102px)/.82 var(--ct-heading-font); letter-spacing: .02em; }
.ct-crystal-slide h3::before { content: ""; display: block; width: 52px; height: 2px; margin-bottom: 20px; background: #fff; }
.ct-crystal-slide p { margin: 0; color: #fff; font-size: clamp(18px, 3vw, 40px); line-height: 1.25; }
.ct-crystal-slide:hover img { transform: scale(1.04); }
.ct-slider-controls { position: relative; z-index: 1; display: flex; gap: 8px; background: var(--ct-cream); padding: 0 10px; }
.ct-slider-controls button { width: 36px; height: 36px; padding: 0; border: 1px solid var(--ct-brown); border-radius: 50%; color: var(--ct-brown); background: transparent; cursor: pointer; }
.ct-slider-controls button:hover, .ct-slider-controls button:focus-visible { color: #fff; background: var(--ct-brown); }

.ct-section--gift { background: var(--ct-cream); padding-top: 20px; padding-bottom: 10px; }
.ct-gift-head { align-items: center; margin-bottom: 15px; }
.ct-gift-head > div:first-child { max-width: 660px; }
.ct-gift-head .ct-kicker { color: var(--ct-brown); }
.ct-gift-head h2 { margin-top: 7px; }
.ct-gift-head--simple { margin-bottom: 24px; }
.ct-gift-head--simple::before { top: 50%; }
.ct-countdown { position: relative; z-index: 1; min-width: 235px; padding: 12px 18px; border: 1px solid var(--ct-brown); border-radius: 0; background: var(--ct-cream); box-shadow: 0 8px 22px rgba(188,108,37,.08); }
.ct-countdown span { display: block; color: var(--ct-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ct-countdown strong { display: block; margin-top: 4px; color: var(--ct-rose); font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ct-weekly-gifts .products { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
.ct-weekly-gifts.woocommerce ul.products li.product, .ct-weekly-gifts .woocommerce ul.products li.product, .ct-weekly-gifts ul.products li.product { padding: 15px !important; background: var(--ct-gold); border-radius: 18px; }
.ct-gift-note { margin: 18px 0 0; color: var(--ct-muted); font-size: 14px; text-align: center; }
.ct-gift-note a { color: var(--ct-brown); font-weight: 800; }
.ct-weekly-gifts--compact { clear: both; width: 100%; padding: 64px 0 20px; }
.ct-weekly-gifts--compact .ct-container { width: 100%; }
.ct-weekly-gifts--compact .ct-section__head h2 { font-size: clamp(28px, 3vw, 42px); }

.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 28px 18px; margin: 0; padding: 0; align-items: stretch; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; height: 100%; margin: 0 !important; list-style: none; display: flex; flex-direction: column; text-align: center; }
.woocommerce ul.products li.product .woocommerce-LoopProduct-link, .woocommerce ul.products li.product .woocommerce-loop-product__link { display: flex; flex: 1 1 auto; flex-direction: column; color: inherit; }
.woocommerce ul.products li.product a img { aspect-ratio: 1; width: 100%; object-fit: cover; margin: 0 0 14px; border-radius: 0; background: #fff; transition: transform .35s ease; }
.woocommerce ul.products li.product:hover a img { transform: translateY(-4px); box-shadow: var(--ct-shadow); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 54px; padding: 0; margin: 0 0 10px; color: var(--ct-ink); font: 700 22px/25px var(--ct-heading-font); letter-spacing: .01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.woocommerce ul.products li.product .price { min-height: 31px; margin-top: auto; margin-bottom: 12px; color: var(--ct-rose); font-size: 22px; font-weight: 800; line-height: 1.25; letter-spacing: .01em; }
.woocommerce ul.products li.product .price ins { color: var(--ct-rose); text-decoration: none; }
.woocommerce ul.products li.product .price del { margin-right: 6px; color: rgba(35,35,35,.48); font-size: .78em; font-weight: 600; }
.woocommerce ul.products li.product .price .amount { color: inherit; }
.woocommerce ul.products li.product .button { width: 100%; margin-top: auto; align-self: stretch; color: var(--ct-ink); background: #fff; border-color: var(--ct-ink); }
.woocommerce ul.products li.product .button:hover { color: #fff; background: var(--ct-ink); border-color: var(--ct-ink); }
.ct-hot-sale.woocommerce ul.products li.product .button,
.ct-hot-sale .woocommerce ul.products li.product .button,
.ct-hot-sale ul.products li.product .button { display: none !important; }
.woocommerce span.onsale { min-width: 48px; min-height: 48px; display: grid; place-items: center; background: var(--ct-coral); }
.ct-main { width: var(--ct-container); margin: 0 auto; padding: 50px 0 90px; background: var(--ct-cream); }
.woocommerce div.product { display: flow-root; }
.woocommerce div.product div.images img { border-radius: 0; }
.woocommerce div.product .product_title,
.woocommerce-products-header__title,
.entry-title,
.page-title { color: var(--ct-ink); font: 700 clamp(36px,4.8vw,62px)/.95 var(--ct-heading-font); letter-spacing: .01em; }
.woocommerce div.product p.price, .woocommerce div.product span.price { display: inline-flex; align-items: baseline; gap: 8px; margin: 12px 0 18px; color: var(--ct-rose); font-size: clamp(30px, 3.2vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: .01em; }
.woocommerce div.product p.price ins, .woocommerce div.product span.price ins { color: var(--ct-rose); text-decoration: none; }
.woocommerce div.product p.price del, .woocommerce div.product span.price del { color: rgba(35,35,35,.45); font-size: .65em; font-weight: 600; }
.woocommerce div.product p.price .amount, .woocommerce div.product span.price .amount { color: inherit; }
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart button.button,
.woocommerce div.product form.cart .single_add_to_cart_button { min-height: 44px; color: #fff; border-color: var(--ct-rose); background: var(--ct-rose); box-shadow: 0 8px 20px rgba(200,61,93,.16); }
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product form.cart button.button:hover,
.woocommerce div.product form.cart .single_add_to_cart_button:hover { color: #fff; border-color: var(--ct-rose-dark); background: var(--ct-rose-dark); }
.woocommerce-product-details__short-description { color: var(--ct-muted); }
.related.products > h2,
.upsells.products > h2,
.woocommerce-Tabs-panel h2,
.cart_totals h2,
.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading { color: var(--ct-ink); font: 700 clamp(30px,3vw,44px)/1 var(--ct-heading-font); letter-spacing: .01em; }
.ct-product-video { clear: both; width: 100%; margin: 32px 0; padding: 24px; border-radius: var(--ct-radius); background: var(--ct-cream); }
.ct-product-video h2 { margin-top: 0; font-family: var(--ct-heading-font); font-size: clamp(30px, 3vw, 42px); line-height: 1; }
.ct-product-video video { width: 100%; max-height: 680px; border-radius: 12px; background: #111; }
.ct-product-story h2 { margin: 32px 0 8px; font-family: var(--ct-heading-font); font-size: clamp(28px, 3vw, 40px); line-height: 1; }
.ct-product-story li { margin-bottom: 8px; }

.ct-footer { padding: 35px 0 0; color: #fff; background: var(--ct-ink); }
.ct-footer__grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 58px; padding-bottom: 40px; }
.ct-footer h2 { margin: 0 0 12px; color: #fff; font: 700 20px/22px var(--ct-heading-font); letter-spacing: .03em; text-transform: none; }
.ct-footer ul { list-style: none; padding: 0; margin: 0; }
.ct-footer li { margin: 0; }
.ct-footer a, .ct-footer p { color: #cfcfcf; font-size: 12px; line-height: 28px; letter-spacing: .02em; }
.ct-footer a:hover { color: #fff; }
.ct-newsletter { display: flex; gap: 8px; }
.ct-newsletter input { min-width: 0; flex: 1; min-height: 44px; padding: 0 15px; border: 1px solid #d3d3d3; border-radius: 0; color: #cfcfcf; background: var(--ct-ink); }
.ct-newsletter button { white-space: nowrap; color: var(--ct-ink); border: 1px solid #fff; background: #fff; }
.ct-newsletter button:hover { color: #fff; border-color: #000; background: #000; }
.ct-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.ct-form-message { margin: 10px 0 0; font-size: 13px; }
.ct-form-message--success { color: #bdf8ae; }
.ct-form-message--error { color: #ffd0c9; }
.ct-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0 40px; border-top: 1px solid #282828; color: #cfcfcf; font-size: 14px; }
.ct-payment-icons { display: flex; align-items: center; justify-content: flex-end; gap: 9px; list-style: none; margin: 0; padding: 0; }
.ct-payment-icons li { display: flex; width: 42px; height: 26px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); overflow: hidden; background: #fff; }
.ct-payment-icons svg { display: block; width: 100%; height: 100%; }

.ct-popup[hidden] { display: none; }
.ct-popup { position: fixed; z-index: 9999; inset: 0; display: grid; place-items: center; padding: 20px; }
.ct-popup__backdrop { position: absolute; inset: 0; background: rgba(20,24,17,.65); backdrop-filter: blur(5px); }
.ct-popup__dialog { position: relative; width: min(620px, 100%); padding: clamp(30px, 6vw, 58px); border-radius: 22px; background: linear-gradient(145deg, #d8ffd7, #fff4d7); box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.ct-popup__dialog h2 { max-width: 510px; margin: 8px 0 12px; color: var(--ct-forest); font: 700 clamp(38px, 5.3vw, 62px)/.92 var(--ct-heading-font); letter-spacing: -.015em; }
.ct-popup__dialog > p { margin: 0 0 24px; color: #5b6453; }
.ct-popup__dialog .ct-newsletter { margin-bottom: 12px; }
.ct-popup__dialog small { color: #6f7468; }
.ct-popup__close { position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; color: var(--ct-forest); background: rgba(255,255,255,.7); font-size: 27px; line-height: 1; cursor: pointer; }
.ct-popup-open { overflow: hidden; }

@media (max-width: 1000px) {
  .ct-header__main { grid-template-columns: 1fr auto; }
  .ct-tagline { display: none; }
  .ct-category-grid { grid-template-columns: repeat(3, 1fr); }
  .ct-crystal-grid, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .ct-footer__grid { grid-template-columns: 1fr 1fr; }
  .ct-footer__grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --ct-container: min(100% - 28px, 1240px); }
  .ct-header__main { min-height: 62px; grid-template-columns: auto 1fr auto; padding: 0; }
  .ct-brand { font-size: 24px; justify-self: center; text-transform: capitalize; }
  .ct-header-link--account { display: none; }
  .ct-header-link--cart { font-size: 0; min-width: 34px; min-height: 34px; border: 0; }
  .ct-header-link--cart::before { content: "Cart"; font-size: 12px; }
  .ct-menu-toggle { display: inline-grid; }
  .ct-nav { display: none; background: #000; }
  .ct-nav.is-open { display: block; }
  .ct-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px; }
  .ct-nav a { border-bottom: 1px solid rgba(255,255,255,.14); }
  .ct-hero { aspect-ratio: 1264 / 556; min-height: 0; }
  .ct-section { padding: 25px 0 50px; }
  .ct-category-grid { grid-template-columns: repeat(2, 1fr); }
  .ct-category-card { min-height: 0; }
  .ct-category-card__label strong { font-size: 26px; }
  .ct-category-card__label em { min-width: 80px; padding: 8px 14px; }
  .ct-crystal-grid { grid-template-columns: 1fr; }
  .ct-crystal-track { gap: 14px; }
  .ct-crystal-slide { aspect-ratio: 16 / 9; min-height: 0; }
  .ct-crystal-slide div { left: 24px; right: 24px; }
  .ct-crystal-slide h3 { margin-bottom: 12px; font-size: 44px; line-height: .88; }
  .ct-crystal-slide h3::before { width: 38px; margin-bottom: 10px; }
  .ct-crystal-slide p { font-size: 16px; line-height: 1.35; }
  .ct-weekly-gifts .products { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .ct-gift-head { align-items: stretch; }
  .ct-countdown { width: 100%; min-width: 0; }
  .ct-popup__dialog .ct-newsletter, .ct-newsletter { flex-wrap: wrap; }
  .ct-popup__dialog .ct-newsletter input[type="email"], .ct-popup__dialog .ct-newsletter button { flex: 1 1 100%; }
  .woocommerce ul.products { gap: 22px 12px; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 48px; font-size: 19px; line-height: 22px; }
  .woocommerce ul.products li.product .price { min-height: 29px; font-size: 19px; }
  .woocommerce div.product p.price, .woocommerce div.product span.price { font-size: 31px; }
  .woocommerce ul.products li.product .button { min-height: 42px; padding: 10px 12px; }
  .ct-footer__grid { grid-template-columns: 1fr; gap: 35px; }
  .ct-footer__grid > :last-child { grid-column: auto; }
  .ct-footer__bottom { flex-direction: column; }
  .ct-payment-icons { justify-content: flex-start; }
}
