/*
Theme Name: Notice27 Demo Store
Theme URI: https://www.notice27.com/
Author: Notice27
Description: A purpose-built fictional WooCommerce storefront for demonstrating Notice27 1.2 compact placements.
Version: 1.2.0
Requires at least: 6.7
Requires PHP: 8.2
Text Domain: notice27-demo
*/

:root {
  --ink: #17211d;
  --muted: #5c6963;
  --paper: #f7f6f1;
  --panel: #fff;
  --line: #d9ddd7;
  --brand: #0c6b54;
  --brand-dark: #084c3d;
  --accent: #f3c761;
  --notice: #fff8df;
  --notice-border: #d9ad40;
  --radius: 18px;
  --shadow: 0 16px 44px rgb(20 42 32 / 9%);
  --page: min(1180px, calc(100% - 40px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a {
  color: var(--brand-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 16px;
}

.demo-ribbon {
  padding: 10px 20px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.demo-ribbon strong {
  color: var(--accent);
}

.site-header {
  background: rgb(247 246 241 / 94%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
}

.header-inner {
  width: var(--page);
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .cart-link {
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.site-main {
  min-height: 64vh;
}

.content-shell,
.woocommerce-page .site-main > .woocommerce,
.site-main > .woocommerce {
  width: var(--page);
  margin: 0 auto;
  padding: 58px 0 80px;
}

.hero {
  background:
    radial-gradient(circle at 84% 18%, rgb(243 199 97 / 35%), transparent 24rem),
    linear-gradient(135deg, #eef5ef 0%, #f7f6f1 58%, #f9edd3 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: var(--page);
  min-height: 520px;
  margin: 0 auto;
  padding: 76px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: 64px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1,
.content-shell h1,
.woocommerce h1 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 650px;
  color: #34423b;
  font-size: clamp(1.05rem, 1.8vw, 1.27rem);
  text-wrap: pretty;
}

.button-row {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
button,
input[type="submit"],
.wp-element-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--brand) !important;
  border-radius: 999px !important;
  background: var(--brand) !important;
  color: #fff !important;
  font-weight: 750 !important;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-element-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  border-color: var(--brand-dark) !important;
  background: var(--brand-dark) !important;
}

.button.secondary {
  background: transparent !important;
  color: var(--brand-dark) !important;
}

.hero-card {
  position: relative;
  padding: 34px;
  border: 1px solid rgb(12 107 84 / 18%);
  border-radius: 28px;
  background: rgb(255 255 255 / 80%);
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: "27";
  position: absolute;
  right: 26px;
  top: 8px;
  color: rgb(12 107 84 / 8%);
  font-family: Georgia, serif;
  font-size: 8rem;
  line-height: 1;
}

.hero-card h2 {
  position: relative;
  margin-top: 0;
  font-family: Georgia, serif;
  font-size: 1.8rem;
}

.feature-list {
  position: relative;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  margin: 13px 0;
}

.feature-list li::before {
  content: "✓";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcefe7;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
}

.home-products,
.scope-grid {
  width: var(--page);
  margin: 0 auto;
  padding: 76px 0;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 32px;
}

.section-heading h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.035em;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 0;
}

.scope-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.scope-card h3 {
  margin-top: 0;
}

.scope-card.unsupported {
  border-style: dashed;
  background: transparent;
}

.n27-scope-note,
.demo-disclosure {
  margin: 0 0 28px;
  padding: 17px 20px;
  border: 1px solid var(--notice-border);
  border-radius: 12px;
  background: var(--notice);
  color: #57420e;
  box-shadow: 0 8px 22px rgb(87 66 14 / 6%);
}

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none;
}

.woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  padding: 0 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgb(20 42 32 / 5%);
}

.woocommerce ul.products li.product a img {
  width: 100%;
  margin: 0 0 18px;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eef0eb;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button {
  margin-left: 20px;
  margin-right: 20px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--ink);
  font-size: 1.1rem;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
  color: var(--brand);
  font-weight: 800;
}

.woocommerce div.product {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.woocommerce div.product .woocommerce-product-gallery {
  /*
   * WooCommerce emits opacity:0 inline until its optional gallery JavaScript
   * initializes. This purpose-built theme uses the stable single-image
   * presentation, so the real attachment must be visible on first paint even
   * when that enhancement is delayed or unavailable.
   */
  opacity: 1 !important;
}

.woocommerce div.product div.images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
}

.woocommerce div.product .product_title {
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1;
  text-wrap: balance;
}

.notice27-eu-guarantee,
.notice27-guarantee {
  clear: both;
}

.notice27 {
  /*
   * Preserve the per-placement width emitted by Notice27 while keeping the
   * component inside the viewport. A plain viewport max-width here would
   * override --notice27-max-width and silently widen the product placement.
   */
  max-width: min(
    var(--notice27-max-width, 700px),
    calc(100vw - 28px)
  );
}

.notice27__source a {
  display: inline-block;
  padding: 0.2rem 0;
}

input,
select,
textarea {
  min-height: 44px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #aeb7b1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

table {
  border-collapse: collapse;
}

.woocommerce table.shop_table,
.wc-block-components-order-summary,
.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: #fff;
}

.content-shell article > h1 {
  margin-bottom: 30px;
}

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout,
.woocommerce-cart-form,
.woocommerce-checkout {
  min-width: 0;
}

.wc-block-components-main,
.wc-block-components-sidebar,
.wc-block-cart-items,
.wc-block-checkout {
  min-width: 0;
}

/*
 * WooCommerce fixes the mobile Cart Block submit container to the viewport.
 * In the demo's expanded legal-notice state that overlays the official source
 * link. Keep this single cart action in normal flow so neither component can
 * obstruct the other.
 */
@media (max-width: 782px) {
  body .wp-block-woocommerce-cart .wc-block-cart__submit-container--sticky {
    position: static;
    z-index: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 0;
    background: transparent;
  }

  body .wp-block-woocommerce-cart .wc-block-cart__submit-container--sticky::before {
    content: none;
  }
}

.n27-language-panel {
  padding: 24px max(20px, calc((100% - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: #eaf1ec;
  color: #33433b;
  text-align: center;
}

.n27-language-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.n27-language-panel a {
  display: inline-block;
  margin: 3px 2px;
  padding: 4px 9px;
  border-radius: 999px;
  text-decoration: none;
}

.n27-language-panel a[aria-current="page"] {
  background: var(--brand);
  color: #fff;
  font-weight: 850;
}

.site-footer {
  padding: 42px 20px;
  border-top: 4px solid var(--brand);
  background: var(--ink);
  color: #d7e0db;
}

.footer-inner {
  width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 30px;
}

.site-footer a {
  color: #fff;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer .limits {
  max-width: 690px;
  color: #aebbb5;
  font-size: 0.85rem;
}

@media (min-width: 900px) {
  .woocommerce div.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(32px, 4vw, 54px);
    align-items: start;
  }

  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
  }

  .woocommerce div.product .woocommerce-tabs,
  .woocommerce div.product .related {
    grid-column: 1 / -1;
  }

  .woocommerce div.product .woocommerce-tabs {
    margin-top: 42px;
  }
}

@media (max-width: 1080px) {
  .header-inner {
    gap: 20px;
  }

  .site-nav {
    gap: 13px;
    font-size: 0.9rem;
  }
}

@media (max-width: 820px) {
  :root {
    --page: min(100% - 28px, 680px);
  }

  .header-inner {
    min-height: auto;
    padding: 15px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-header {
    position: static;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 13px;
  }

  .hero-inner {
    min-height: auto;
    padding: 58px 0;
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .scope-grid,
  .woocommerce ul.products {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  body {
    font-size: 16px;
  }

  .demo-ribbon {
    padding: 9px 14px;
  }

  .site-nav {
    width: 100%;
    font-size: 0.88rem;
    gap: 9px 13px;
  }

  .hero h1,
  .content-shell h1,
  .woocommerce h1 {
    font-size: clamp(2.2rem, 12vw, 2.65rem);
  }

  .hero-card {
    padding: 24px;
  }

  .scope-grid,
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }

  .content-shell,
  .woocommerce-page .site-main > .woocommerce,
  .site-main > .woocommerce {
    padding: 38px 0 56px;
  }

  .woocommerce div.product {
    padding: 16px;
  }

  .n27-language-panel {
    padding: 20px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
