/*
Theme Name: Atelier
Theme URI: https://example.com/atelier
Author: Arena Agent
Author URI: https://example.com
Description: Atelier is an elegant fashion & beauty e-commerce theme for WordPress and WooCommerce. It features a hero banner, category tiles, featured products, a promo banner, testimonials, a newsletter section and a rich footer — all customizable via the WordPress Customizer. Fully responsive from large desktops to small phones.
Version: 1.9.1
Requires at least: 5.2
Tested up to: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atelier
Tags: e-commerce, fashion, one-column, custom-logo, custom-menu, featured-images, translation-ready, responsive-layout
*/

/* =========================================================
   1. Design tokens
   ========================================================= */
:root {
  --ink: #1c1b1a;
  --ink-soft: #2e2c29;
  --cream: #faf6f0;
  --sand: #f0e8dd;
  --sand-deep: #e4d8c8;
  --terracotta: #c05f3c;
  --terracotta-dark: #a34e30;
  --muted: #7a736b;
  --line: #e8e0d4;
  --white: #ffffff;
  --gold: #b98a45;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 24px 48px -20px rgba(28, 27, 26, 0.18);
  --font-display: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-body: "Jost", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* legacy fallback */
  overflow-x: clip;   /* modern: forbids horizontal scrolling without breaking sticky */
}

body {
  overflow-x: clip;
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--terracotta); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--terracotta-dark); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.2em; }

input, textarea, select, button { font-family: inherit; font-size: inherit; }

:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

.container { width: min(1180px, 92%); margin: 0 auto; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal !important;
}

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 18px; z-index: 999; }
.skip-link:focus { left: 0; color: #fff; }

/* Buttons */
.btn,
button.alt,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.checkout-button {
  display: inline-block;
  background: var(--ink);
  color: var(--white) !important;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 14px 34px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s ease;
}
.btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white) !important;
  transform: translateY(-2px);
}

.btn--accent { background: var(--terracotta); border-color: var(--terracotta); }
.btn--accent:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }

.btn--ghost { background: transparent; color: var(--ink) !important; }
.btn--ghost:hover { background: var(--ink); color: var(--white) !important; }

/* =========================================================
   3. Announcement bar + Header
   ========================================================= */
.announce {
  background: var(--ink);
  color: var(--sand);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 11px 16px;
}
.announce a { color: var(--gold); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 246, 240, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.site-header.is-stuck { box-shadow: 0 10px 30px -18px rgba(28, 27, 26, 0.35); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }
.custom-logo { max-height: 56px; width: auto; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}
.site-title a { color: var(--ink); }
.site-description { margin: 0; font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); }

.main-nav ul { list-style: none; display: flex; gap: 34px; margin: 0; padding: 0; }
.main-nav a {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  display: inline-block;
}
.main-nav a:hover { color: var(--terracotta); border-color: var(--terracotta); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--terracotta); border-color: var(--terracotta); }

.header-actions { display: flex; align-items: center; gap: 20px; flex: none; }
.icon-btn {
  position: relative;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.icon-btn:hover { color: var(--terracotta); }
.icon-btn svg { width: 22px; height: 22px; }

.cart-count {
  position: absolute;
  top: -4px;
  right: -7px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.nav-toggle { display: none; }
.nav-toggle svg { width: 26px; height: 26px; }
.nav-close { display: none; }

/* Mobile drawer styles live in the responsive system (section 16). */

/* =========================================================
   4. Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--sand) 0%, var(--cream) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding: clamp(48px, 8vw, 84px) 0 clamp(56px, 9vw, 90px);
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--terracotta);
  border: 1px solid var(--terracotta);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 26px;
}
.hero h1 em { font-style: italic; color: var(--terracotta); }
.hero-text { font-size: 1.08rem; color: var(--muted); max-width: 46ch; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 44px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.hero-meta strong { font-family: var(--font-display); font-size: 1.5rem; display: block; color: var(--ink); }
.hero-meta span { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  left: -26px;
  bottom: 34px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-badge svg { width: 30px; height: 30px; color: var(--terracotta); flex: none; }
.hero-badge b { display: block; font-size: 0.95rem; }
.hero-badge span { font-size: 0.75rem; color: var(--muted); }

/* =========================================================
   5. USP strip
   ========================================================= */
.usp { background: var(--white); border-bottom: 1px solid var(--line); }
.usp-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 30px 0;
}
.usp-item { display: flex; align-items: center; gap: 14px; justify-content: center; }
.usp-item svg { width: 34px; height: 34px; color: var(--terracotta); flex: none; }
.usp-item b { display: block; font-size: 0.9rem; letter-spacing: 0.06em; }
.usp-item span { font-size: 0.78rem; color: var(--muted); }

/* =========================================================
   6. Section shell
   ========================================================= */
.section { padding: clamp(56px, 9vw, 90px) 0; }
.section--white { background: var(--white); }
.section--sand { background: var(--sand); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(34px, 5vw, 54px); }
.section-head p { color: var(--muted); }

/* =========================================================
   7. Categories
   ========================================================= */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}
.cat-card { text-align: center; }
.cat-card a { color: inherit; display: block; }
.cat-card .cat-img {
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease;
  aspect-ratio: 1;
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.cat-card:hover img { transform: scale(1.07); }
.cat-card h3 {
  font-size: 1.15rem;
  margin: 20px 0 4px;
}
.cat-card span { font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* =========================================================
   8. Products
   ========================================================= */
ul.products,
.atelier-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; list-style: none; margin: 0; padding: 0; }

/* Related/upsell wrappers carry the .products class too — keep them as blocks,
   only their inner UL is a grid (fixes broken related-products layout) */
.woocommerce .related.products,
.woocommerce .upsells.products,
.related.products,
.upsells.products { display: block; }
.woocommerce ul.products { gap: 28px; }

/* Neutralize WooCommerce float/width sizing — the grid handles layout */
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

.product-card { position: relative; background: var(--cream); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card .product-img { position: relative; overflow: hidden; aspect-ratio: 3 / 4; }
.product-card .product-img img { width: 100%; height: 240px; object-fit: scale-down; margin: auto; display: inline-block; box-shadow: none; flex: 0 0 auto; background: var(--cream); transition: transform 0.6s ease; }
.product-card:hover .product-img img { transform: scale(1.06); }
.product-flag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--terracotta);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.product-info { padding: 18px 20px 22px; text-align: center; }
.product-info h3 { font-size: 1.05rem; margin-bottom: 6px; }
.product-info h3 a { color: var(--ink); }
.product-info h3 a:hover { color: var(--terracotta); }
.price { font-size: 1rem; color: var(--terracotta); font-weight: 600; margin-bottom: 12px; }
.price del { color: var(--muted); font-weight: 400; margin-right: 8px; opacity: 0.7; }
.product-card .btn { padding: 10px 26px; font-size: 0.72rem; }

/* WooCommerce product loop alignment */
.woocommerce ul.products li.product { background: var(--cream); border-radius: var(--radius); overflow: hidden; text-align: center; padding-bottom: 18px !important; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.woocommerce ul.products li.product:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.woocommerce ul.products li.product img { transition: transform 0.6s ease; margin: 0 auto; }
.woocommerce ul.products li.product:hover img { transform: scale(1.05); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--font-display); font-size: 1.05rem; padding: 14px 12px 0; }
.woocommerce ul.products li.product .price { color: var(--terracotta); font-weight: 600; }
.woocommerce ul.products li.product .star-rating { margin: 0 auto 10px; color: var(--gold); }
.woocommerce ul.products li.product .button { margin: 10px 12px 0; padding: 10px 26px; font-size: 0.72rem; }

/* =========================================================
   9. Promo banner
   ========================================================= */
.promo { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px; display: flex; align-items: center; }
.promo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28,27,26,0.78) 0%, rgba(28,27,26,0.25) 65%, transparent 100%); }
.promo-content { position: relative; z-index: 2; max-width: 560px; padding: 70px 60px; color: var(--white); }
.promo-content .hero-eyebrow { color: var(--sand); border-color: var(--sand); }
.promo-content h2 { color: var(--white); font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.promo-content h2 em { font-style: italic; color: var(--sand-deep); }
.promo-content p { color: rgba(250, 246, 240, 0.85); }

/* =========================================================
   10. Testimonials
   ========================================================= */
.testi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.testi-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: 0 14px 30px -22px rgba(28, 27, 26, 0.25);
}
.stars { color: var(--gold); letter-spacing: 4px; font-size: 1rem; margin-bottom: 14px; }
.testi-card blockquote { margin: 0 0 20px; font-size: 0.98rem; color: var(--ink-soft); font-style: italic; }
.testi-who { display: flex; align-items: center; gap: 12px; }
.testi-who .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--sand-deep); color: var(--terracotta);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-display); font-size: 1.05rem;
  flex: none;
}
.testi-who b { display: block; font-size: 0.92rem; }
.testi-who span { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.08em; }

/* =========================================================
   11. Newsletter
   ========================================================= */
.newsletter { text-align: center; }
.newsletter h2 em { font-style: italic; color: var(--terracotta); }
.newsletter p { color: var(--muted); max-width: 52ch; margin: 0 auto 30px; }
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s ease;
}
.newsletter-form input[type="email"]:focus { border-color: var(--terracotta); }

/* =========================================================
   12. Footer
   ========================================================= */
.site-footer { background: var(--ink); color: #b9b2a8; margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 44px;
  padding: clamp(48px, 7vw, 74px) 0 clamp(36px, 5vw, 50px);
}
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 12px; }
.site-footer a { color: #b9b2a8; }
.site-footer a:hover { color: var(--terracotta); }
.footer-brand .site-title a { color: var(--white); }
.footer-brand p { font-size: 0.92rem; max-width: 34ch; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #3a3733;
  display: inline-flex; align-items: center; justify-content: center;
  color: #b9b2a8;
}
.socials a:hover { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.socials svg { width: 17px; height: 17px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.footer-contact svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--terracotta); }
.footer-bottom {
  border-top: 1px solid #3a3733;
  padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  font-size: 0.8rem;
}
.payments { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.payments span {
  border: 1px solid #4a463f; border-radius: 6px;
  padding: 4px 10px; font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #cfc8bd;
}

/* =========================================================
   13. Blog / archives / singular / widgets
   ========================================================= */
.page-hero {
  background: var(--sand);
  text-align: center;
  padding: clamp(44px, 6vw, 70px) 0 clamp(38px, 5vw, 60px);
  margin-bottom: clamp(36px, 5vw, 60px);
}
.page-hero h1 { margin-bottom: 0.2em; }
.page-hero p { color: var(--muted); margin: 0; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-bottom: 70px; }
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-body { padding: 24px 26px 28px; }
.post-card h2, .post-card h3 { font-size: 1.25rem; }
.post-card .meta { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 10px; }
.more-link { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }

.content-area { padding-bottom: 80px; }
.entry-content img { border-radius: var(--radius-sm); height: auto; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content blockquote {
  border-left: 3px solid var(--terracotta);
  margin: 1.4em 0; padding: 0.4em 1.4em;
  font-style: italic; color: var(--muted);
}
.entry-content table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.entry-content table td, .entry-content table th { border: 1px solid var(--line); padding: 10px 14px; }

.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }

/* Widgets */
.widget { margin-bottom: 28px; }
.widget:last-child { margin-bottom: 0; }
.widget-title { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { margin-bottom: 10px; }
.widget ul li a { color: var(--ink-soft); }
.widget ul li a:hover { color: var(--terracotta); }
.widget select { max-width: 100%; }

/* Pagination */
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0 60px; }
.nav-links a, .nav-links span {
  border: 1px solid var(--line); border-radius: 50%;
  min-width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--ink); background: var(--white); padding: 0 10px;
}
.nav-links .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Comments */
.comments-area { margin-top: 50px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); padding: 20px 24px; margin-bottom: 18px; }
.comment-list .children { list-style: none; }
.comment-form p { margin-bottom: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; background: var(--white); outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--terracotta); }

/* Search form */
.search-form { display: flex; gap: 10px; max-width: 480px; }
.search-form input[type="search"] { flex: 1; min-width: 0; border: 2px solid var(--line); border-radius: 999px; padding: 12px 24px; background: var(--white); outline: none; }
.search-form button { border: 0; background: var(--ink); color: #fff; border-radius: 999px; padding: 12px 26px; cursor: pointer; }

/* WooCommerce generic */
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--terracotta); }
.woocommerce div.product p.price { color: var(--terracotta); font-family: var(--font-display); font-size: 1.5rem; }
.woocommerce span.onsale { background: var(--terracotta); border-radius: 999px; line-height: 2; }
.woocommerce div.product form.cart .button { border-radius: 999px; }
.woocommerce #reviews #comments ol.commentlist li img.avatar { border-radius: 50%; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* =========================================================
   14b. AJAX search overlay
   ========================================================= */
.atelier-search {
  position: fixed;
  inset: 0;
  z-index: 130;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.atelier-search.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.atelier-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 27, 26, 0.55);
  backdrop-filter: blur(2px);
}
.atelier-search__panel {
  position: relative;
  width: min(680px, 92vw);
  margin: 11vh auto 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.25s ease;
}
.atelier-search.is-open .atelier-search__panel { transform: translateY(0); }

.atelier-search__form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}
.atelier-search__form > svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.atelier-search__form input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 16px 0;
  font-size: 1.02rem;
  outline: none;
  font-family: inherit;
  color: var(--ink);
}
.atelier-search__form input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.atelier-search__close {
  border: 0;
  background: var(--white);
  color: var(--ink);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.atelier-search__close:hover { background: var(--sand); color: var(--terracotta); }

.atelier-search__results { max-height: 58vh; overflow-y: auto; }
.atelier-search__hint, .atelier-search__empty {
  margin: 0;
  padding: 26px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.atelier-search__list { list-style: none; margin: 0; padding: 8px 0; }
.atelier-search__list li a {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 22px;
  color: var(--ink);
}
.atelier-search__list li a:hover { background: var(--sand); }
.atelier-search__thumb .atelier-search__thumb-img,
.atelier-search__thumb img {
  width: 56px; height: 56px;
  object-fit: scale-down;
  background: var(--cream);
  border-radius: 10px;
  display: block;
}
.atelier-search__thumb-img--empty { background: var(--sand-deep); }
.atelier-search__txt { min-width: 0; }
.atelier-search__txt b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.atelier-search__txt .atelier-search__meta, .atelier-search__txt .price {
  display: block;
  font-size: 0.82rem;
  color: var(--terracotta);
  font-weight: 600;
}
.atelier-search__txt .atelier-search__meta { color: var(--muted); font-weight: 500; }
.atelier-search__txt del { color: var(--muted); opacity: 0.7; font-weight: 400; }
.atelier-search__txt ins { text-decoration: none; }
.atelier-search__go { color: var(--muted); font-size: 1rem; }
.atelier-search__list li a:hover .atelier-search__go { color: var(--terracotta); }
.atelier-search__all {
  display: block;
  text-align: center;
  padding: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream);
}
.atelier-search__all:hover { background: var(--sand); color: var(--terracotta); }

@media (max-width: 600px) {
  .atelier-search__panel { margin: 7vh auto 0; width: 94vw; }
  .atelier-search__results { max-height: 62vh; }
  .atelier-search__list li a { padding: 10px 16px; gap: 12px; }
}

/* =========================================================
   16. Responsive system
   Desktop → laptop → tablet → phone, all breakpoints below.
   ========================================================= */

/* ---------- ≤1080: laptops — products 3-up ---------- */
@media (max-width: 1080px) {
  ul.products, .atelier-products, .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-nav ul { gap: 24px; }
}

/* ---------- ≤980: small laptops — singular layout stacks ---------- */
@media (max-width: 980px) {
  .single-layout { grid-template-columns: minmax(0, 1fr); }
  .single-layout .widget-area { margin-top: 20px; }
}

/* ---------- ≤960: tablets — drawer nav, stacked hero ---------- */
@media (max-width: 960px) {
  /* Mobile drawer navigation */
  .nav-toggle { display: inline-flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(84vw, 340px);
    height: 100dvh;
    background: var(--cream);
    z-index: 98;
    display: none; /* closed drawer must never add page width */
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    padding: 90px 38px 44px;
    box-shadow: -24px 0 60px rgba(28, 27, 26, 0.18);
    overflow-y: auto;
  }
  .main-nav.is-open {
    display: flex;
    animation: atelierDrawerIn 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .main-nav.is-closing {
    display: flex;
    animation: atelierDrawerOut 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  @keyframes atelierDrawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
  @keyframes atelierDrawerOut { from { transform: translateX(0); } to { transform: translateX(100%); } }
  .main-nav.is-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(28, 27, 26, 0.45);
    z-index: -1;
  }
  body.nav-open { overflow: hidden; }

  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 22px; margin: 0; padding: 0; }
  .main-nav ul li { width: 100%; }
  .main-nav a { font-size: 1.05rem; letter-spacing: 0.14em; padding: 10px 0; width: 100%; }

  .nav-close {
    display: block;
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Hero stacks */
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-media { width: 100%; max-width: 560px; margin: 0 auto; }
  .hero-media img { aspect-ratio: 1 / 1; }
  .hero-badge { left: 14px; bottom: 18px; }
  .hero-meta { gap: 18px 30px; }
  .hero-cta .btn { flex: 1 1 auto; }

  /* Category tiles 2-up */
  .cats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

  /* Testimonials stack, centered */
  .testi-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-left: auto; margin-right: auto; }

  /* Footer 2-up */
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px 28px; }

  /* Blog grid 2-up */
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

/* ---------- ≤820: portrait tablets / large phones ---------- */
@media (max-width: 820px) {
  .product-card .product-img img { height: 200px; }
  .usp-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .usp-item { justify-content: flex-start; }
  ul.products, .atelier-products, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .main-nav ul { gap: 20px; }
}

/* ---------- ≤768: WooCommerce pages on mobile ---------- */
@media (max-width: 768px) {
  .woocommerce ul.products[class*="columns-"] li.product,
  .woocommerce-page ul.products[class*="columns-"] li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
  }

  /* Single product: gallery above summary */
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    float: none !important;
    width: 100% !important;
    clear: both;
  }

  /* Checkout / account two-column sets stack */
  .woocommerce .col2-set .col-1,
  .woocommerce .col2-set .col-2,
  .woocommerce-page .col2-set .col-1,
  .woocommerce-page .col2-set .col-2,
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last,
  .woocommerce-page form .form-row-first,
  .woocommerce-page form .form-row-last {
    float: none;
    width: 100%;
  }

  /* Cart & account tables scroll horizontally instead of breaking */
  .woocommerce table.shop_table,
  .woocommerce-page table.shop_table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .woocommerce-MyAccount-navigation { float: none; width: 100%; margin-bottom: 24px; }
  .woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 10px; }
  .woocommerce-MyAccount-navigation li { margin: 0; }
}

/* ---------- ≤600: phones — forms & banners stack ---------- */
@media (max-width: 600px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }

  .newsletter-form { flex-direction: column; }
  .newsletter-form input[type="email"] { width: 100%; }
  .newsletter-form .btn { width: 100%; }

  .promo { min-height: 0; }
  .promo::after { background: linear-gradient(0deg, rgba(28,27,26,0.85) 0%, rgba(28,27,26,0.45) 55%, rgba(28,27,26,0.12) 100%); }
  .promo-content { padding: 52px 24px; max-width: 100%; }
  .promo-content .hero-eyebrow { margin-bottom: 18px; }

  .footer-bottom { flex-direction: column; text-align: center; }
  .payments { justify-content: center; }

  .search-form { max-width: 100%; }
  .search-form button { padding: 12px 20px; }

  /* WooCommerce ordering dropdowns full width */
  .woocommerce .woocommerce-result-count,
  .woocommerce-page .woocommerce-result-count { float: none; width: 100%; margin: 0 0 10px; }
  .woocommerce .woocommerce-ordering,
  .woocommerce-page .woocommerce-ordering { float: none; width: 100%; margin-bottom: 20px; }
  .woocommerce .woocommerce-ordering select { width: 100%; }
  .woocommerce div.product form.cart .button { width: 100%; }
  .woocommerce div.product form.cart .quantity { display: inline-block; margin-bottom: 12px; }
}

/* ---------- ≤480: small phones ---------- */
@media (max-width: 480px) {
  .product-card .product-img img { height: 170px; }
  .announce { font-size: 0.66rem; letter-spacing: 0.14em; padding: 9px 12px; }

  .header-inner { padding: 12px 0; gap: 8px; }
  .site-title { font-size: 1.22rem; letter-spacing: 0.2em; }
  .site-description { font-size: 0.6rem; letter-spacing: 0.2em; }
  .header-actions { gap: 8px; }
  .icon-btn { min-width: 42px; min-height: 42px; }

  .hero h1 { font-size: clamp(2rem, 9.5vw, 2.5rem); }
  .hero-text { font-size: 1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-meta { gap: 14px 24px; }
  .hero-badge { padding: 12px 16px; gap: 10px; }
  .hero-badge b { font-size: 0.85rem; }
  .hero-badge span { font-size: 0.68rem; }
  .hero-badge svg { width: 24px; height: 24px; }

  .usp-inner { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .usp-item { justify-content: flex-start; }
  .section-head p { font-size: 0.95rem; }

  .cats-grid { gap: 14px; }
  .cat-card .cat-img { border-width: 4px; }
  .cat-card h3 { font-size: 1rem; margin: 14px 0 2px; }
  .cat-card span { font-size: 0.68rem; }

  .product-info { padding: 14px 14px 18px; }
  .product-info h3 { font-size: 0.95rem; }
  .price { font-size: 0.9rem; }
  .product-card .btn, .woocommerce ul.products li.product .button { padding: 9px 18px; font-size: 0.66rem; }

  .testi-card { padding: 26px 22px; }

  .footer-grid { gap: 30px; }
}

/* ---------- ≤380: very small phones ---------- */
@media (max-width: 380px) {
  .container { width: 94%; }
  ul.products, .atelier-products, .woocommerce ul.products { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-media img { aspect-ratio: 4 / 5; }
  .main-nav { width: 100vw; padding: 90px 30px 40px; }
}


/* =========================================================
   14c. Elementor homepage styling (structural selectors)
   Targets widget types & heading sizes so styles apply even
   where custom per-widget classes are stripped on frontend.
   ========================================================= */
.atelier-elementor-page .elementor-widget-container,
.atelier-elementor-front .elementor-widget-container { max-width: 100%; }

/* Eyebrow pills (h4 headings) */
.atelier-elementor-front .elementor-widget-heading h4.elementor-heading-title,
.atelier-elementor-page .elementor-widget-heading h4.elementor-heading-title {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--terracotta);
  border: 1px solid var(--terracotta);
  border-radius: 999px;
  padding: 8px 18px;
  margin: 0 0 22px;
  line-height: 1.6;
}
/* Hero title */
.atelier-elementor-front .elementor-widget-heading h1.elementor-heading-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.4em;
}
/* Section titles (h2) */
.atelier-elementor-front .elementor-widget-heading h2.elementor-heading-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.35em;
}
.atelier-elementor-front h1.elementor-heading-title em,
.atelier-elementor-front h2.elementor-heading-title em { font-style: italic; color: var(--terracotta); }
/* Stat numbers & labels (hero h3/h6) */
.atelier-elementor-front .elementor-widget-heading h3.elementor-heading-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--ink); margin: 0; }
.atelier-elementor-front .elementor-widget-heading h6.elementor-heading-title { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; font-weight: 500; margin: 2px 0 0; }
/* Lead paragraphs */
.atelier-elementor-front .elementor-widget-text-editor { color: var(--muted); font-size: 1.05rem; }
.atelier-elementor-front .elementor-widget-text-editor p { max-width: 46ch; }
/* Hero photo */
.atelier-elementor-front .elementor-widget-image img { border-radius: var(--radius); box-shadow: var(--shadow); }
/* Buttons */
.atelier-elementor-page .elementor-button,
.atelier-elementor-front .elementor-button {
  display: inline-block;
  background: var(--ink);
  color: var(--white) !important;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 15px 36px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}
.atelier-elementor-page .elementor-button:hover,
.atelier-elementor-front .elementor-button:hover { background: var(--terracotta); border-color: var(--terracotta); color: var(--white) !important; transform: translateY(-2px); }
/* USP icon boxes */
.atelier-elementor-front .elementor-widget-icon-box .elementor-icon { color: var(--terracotta); }
.atelier-elementor-front .elementor-widget-icon-box .elementor-icon-box-title { font-size: 0.95rem; font-weight: 600; }
.atelier-elementor-front .elementor-widget-icon-box .elementor-icon-box-description { font-size: 0.8rem; color: var(--muted); }
/* Category image boxes */
.atelier-elementor-front .elementor-widget-image-box .elementor-image-box-img img {
  border-radius: 50% !important;
  border: 6px solid var(--white);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 1;
  transition: transform 0.5s ease;
}
.atelier-elementor-front .elementor-widget-image-box:hover .elementor-image-box-img img { transform: scale(1.06) translateY(-4px); }
.atelier-elementor-front .elementor-widget-image-box .elementor-image-box-title { font-family: var(--font-display); font-size: 1.12rem; }
.atelier-elementor-front .elementor-widget-image-box .elementor-image-box-description { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
/* Testimonials */
.atelier-elementor-front .elementor-widget-testimonial .elementor-testimonial-content { font-style: italic; color: var(--ink-soft); }
.atelier-elementor-front .elementor-widget-testimonial .elementor-testimonial-name { font-family: var(--font-display); color: var(--ink); }
.atelier-elementor-front .elementor-testimonial-wrapper .elementor-star-rating { color: var(--gold); }
/* Promo section (fixed id atlrprm) — light text on dark overlay */
.elementor-element-atlrprm .elementor-widget-heading h2.elementor-heading-title,
.elementor-element-atlrprm .elementor-widget-heading h4.elementor-heading-title { color: var(--white); }
.elementor-element-atlrprm h2.elementor-heading-title em { color: var(--sand-deep); }
.elementor-element-atlrprm .elementor-widget-heading h4.elementor-heading-title { color: var(--sand); border-color: var(--sand); }
.elementor-element-atlrprm .elementor-widget-text-editor { color: rgba(250, 246, 240, 0.85); }
.elementor-element-atlrprm .elementor-button { background: var(--terracotta); border-color: var(--terracotta); }
.elementor-element-atlrprm .elementor-button:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }
/* Newsletter (html widget) */
.atelier-el-newsletter { display: flex; gap: 12px; max-width: 520px; margin: 26px auto 0; }
.atelier-el-newsletter input[type="email"] {
  flex: 1; min-width: 0;
  border: 2px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}
.atelier-el-newsletter input[type="email"]:focus { border-color: var(--terracotta); }
.atelier-el-newsletter__btn {
  background: var(--terracotta);
  color: var(--white);
  border: 2px solid var(--terracotta);
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}
.atelier-el-newsletter__btn:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }
@media (max-width: 600px) {
  .atelier-el-newsletter { flex-direction: column; }
  .atelier-el-newsletter__btn { width: 100%; }
}

/* ---------- Phones: 16px form inputs stop iOS Safari auto-zoom ---------- */
@media (max-width: 768px) {
  input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
  input[type="password"], input[type="search"], input[type="number"], textarea, select {
    font-size: 16px !important;
  }
}

/* ---------- Touch devices: comfortable tap targets ---------- */
@media (hover: none) and (pointer: coarse) {
  .main-nav a, .site-footer a, .widget ul li a { padding-top: 8px; padding-bottom: 8px; }
  .nav-links a, .nav-links span { min-width: 48px; height: 48px; }
  .socials a { width: 46px; height: 46px; }
}

/* ---------- Print: bare-bones, ink-friendly ---------- */
@media print {
  .announce, .site-header, .header-actions, .site-footer, .newsletter, .usp, .hero-cta, .nav-links, .comments-area { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .hero, .section { padding: 0 0 12pt; }
  a { color: #000; text-decoration: underline; }
}
