/*
Theme Name: Floréa
Theme URI: https://florea.mu/
Author: Exera Ltd
Author URI: https://exera.mu/
Description: A sleek, minimalist WooCommerce block theme for Floréa: eternal roses that last a year or more. Built on the Floréa brand: Cormorant Garamond display type, Lato UI type, and a burgundy, blush, cream, taupe and charcoal palette. Full-site editing, bundled self-hosted fonts and a complete set of WooCommerce templates.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: florea
Tags: e-commerce, full-site-editing, block-patterns, blog, one-column, custom-colors, custom-logo, custom-menu, editor-style, featured-images, template-editing, translation-ready, wide-blocks
*/

/* =========================================================
   Floréa supplementary styles
   Tokens come from theme.json; this file holds what
   theme.json cannot express (motion, pseudo-elements,
   WooCommerce internals).
   ========================================================= */

:root {
  --florea-ease: cubic-bezier(.22,.61,.36,1);
  --florea-hairline: var(--wp--preset--color--hairline, #e6e1d7);
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body { overflow-x: hidden; }

::selection { background: var(--wp--preset--color--blush); color: var(--wp--preset--color--burgundy); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--wp--preset--color--burgundy);
  outline-offset: 3px;
}

/* ---------- Micro label ---------- */
.florea-eyebrow {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .26em;
  color: var(--wp--preset--color--taupe);
  margin-bottom: 0;
}

/* ---------- Brand mark ---------- */
.florea-mark { display: inline-block; line-height: 0; color: var(--wp--preset--color--burgundy); }
.florea-mark svg { display: block; width: 100%; height: auto; }

.wp-block-site-logo img { transition: opacity .4s var(--florea-ease); }
.wp-block-site-logo a:hover img { opacity: .72; }

/* ---------- Header ---------- */
.florea-header {
  border-bottom: 1px solid var(--florea-hairline);
  background: var(--wp--preset--color--cream);
}
.florea-header .wp-block-navigation__responsive-container-open,
.florea-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--charcoal); }

/* Underline sweep on nav links */
.florea-header .wp-block-navigation-item__content {
  position: relative;
  padding-bottom: .25em;
  text-decoration: none !important;
}
.florea-header .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--florea-ease);
}
.florea-header .wp-block-navigation-item__content:hover::after,
.florea-header .current-menu-item > .wp-block-navigation-item__content::after {
  transform: scaleX(1);
  transform-origin: left;
}
.florea-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after { display: none; }

.wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--cream) !important;
  padding-top: var(--wp--preset--spacing--40);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.1rem; }

/* ---------- Buttons: outline variant ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--burgundy);
  border: 1px solid var(--wp--preset--color--burgundy);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: var(--wp--preset--color--burgundy);
  color: var(--wp--preset--color--cream);
}
.wp-block-button__link { transition: background-color .35s var(--florea-ease), color .35s var(--florea-ease), border-color .35s var(--florea-ease); }

/* Quiet link-style button */
.wp-block-button.is-style-florea-link > .wp-block-button__link {
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--wp--preset--color--burgundy);
  padding: 0 0 .45em;
}
.wp-block-button.is-style-florea-link > .wp-block-button__link:hover { color: var(--wp--preset--color--charcoal); }

/* ---------- Separator: thin brand rule ---------- */
.wp-block-separator.is-style-florea-rule {
  border: 0;
  height: 1px;
  background: var(--florea-hairline);
  opacity: 1;
  max-width: 100%;
}
.wp-block-separator.is-style-florea-diamond {
  border: 0; height: auto; opacity: 1;
  text-align: center; max-width: 100%;
  background: none;
}
.wp-block-separator.is-style-florea-diamond::before {
  content: "◆";
  display: block;
  font-size: .5rem;
  letter-spacing: .5em;
  color: var(--wp--preset--color--taupe);
}

/* ---------- Images: slow zoom ---------- */
.florea-zoom { overflow: hidden; }
.florea-zoom img { transition: transform 1.1s var(--florea-ease); will-change: transform; }
.florea-zoom:hover img { transform: scale(1.045); }

/* ---------- Editorial section frame ---------- */
.florea-framed { border: 1px solid var(--florea-hairline); }

/* ---------- Posts ---------- */
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-date, .wp-block-post-terms {
  font-size: var(--wp--preset--font-size--x-small);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--wp--preset--color--ink-soft);
}

/* =========================================================
   WooCommerce
   ========================================================= */

.woocommerce .florea-shop, .woocommerce-page { background: var(--wp--preset--color--cream); }

/* Product grid */
.wc-block-grid__products, ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
  margin: 0; padding: 0; list-style: none;
}
ul.products::before, ul.products::after { content: none; }
ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  text-align: center;
}

ul.products li.product a img,
.wc-block-grid__product-image img {
  margin-bottom: var(--wp--preset--spacing--20);
  transition: transform 1.1s var(--florea-ease), opacity .4s var(--florea-ease);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}
ul.products li.product:hover a img { transform: scale(1.04); }
ul.products li.product > a:first-of-type { display: block; overflow: hidden; }

ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title {
  font-family: var(--wp--preset--font-family--display) !important;
  font-size: var(--wp--preset--font-size--large) !important;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.25;
  padding: 0;
  margin: 0 0 .35rem;
}
ul.products li.product .price,
.wc-block-grid__product-price {
  display: block;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 400;
  color: var(--wp--preset--color--ink-soft);
  letter-spacing: .06em;
}
ul.products li.product .price del { opacity: .5; margin-right: .5em; }
ul.products li.product .price ins { text-decoration: none; color: var(--wp--preset--color--burgundy); }

/* Loop add-to-cart as a quiet underline link */
ul.products li.product .button,
ul.products li.product .added_to_cart {
  display: inline-block;
  margin-top: .9rem;
  background: transparent;
  color: var(--wp--preset--color--burgundy);
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  padding: 0 0 .4em;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  line-height: 1;
  transition: color .35s var(--florea-ease), border-color .35s var(--florea-ease);
}
ul.products li.product .button:hover { background: transparent; color: var(--wp--preset--color--charcoal); }

/* Badges */
.woocommerce span.onsale, .wc-block-grid__product-onsale {
  background: var(--wp--preset--color--burgundy);
  color: var(--wp--preset--color--cream);
  border-radius: 0;
  font-family: var(--wp--preset--font-family--body);
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  min-height: 0; min-width: 0;
  line-height: 1;
  padding: .55em .9em;
  top: .75rem; left: .75rem; right: auto;
  margin: 0;
}

/* Single product */
.woocommerce div.product .product_title {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 400;
  line-height: 1.1;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--wp--preset--color--charcoal);
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--large);
  font-weight: 300;
  letter-spacing: .02em;
}
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--wp--preset--color--ink-soft); }

.woocommerce div.product form.cart { margin-top: var(--wp--preset--spacing--30); }
.woocommerce .quantity .qty {
  border: 1px solid var(--florea-hairline);
  background: transparent;
  border-radius: 0;
  padding: .95em .6em;
  width: 5rem;
  text-align: center;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--small);
}

/* Primary Woo buttons */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
  background: var(--wp--preset--color--burgundy);
  color: var(--wp--preset--color--cream);
  border: 1px solid var(--wp--preset--color--burgundy);
  border-radius: 0;
  padding: 1.05em 2.4em;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .2em;
  transition: background-color .35s var(--florea-ease), border-color .35s var(--florea-ease);
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
  background: var(--wp--preset--color--burgundy-deep);
  border-color: var(--wp--preset--color--burgundy-deep);
  color: var(--wp--preset--color--cream);
}
.woocommerce a.button.disabled, .woocommerce button.button:disabled { opacity: .45; }

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
  padding: 0;
  margin: 0 0 var(--wp--preset--spacing--30);
  border-bottom: 1px solid var(--florea-hairline);
  display: flex;
  flex-wrap: wrap;
  gap: var(--wp--preset--spacing--30);
}
.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  padding: 0 0 1rem;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--wp--preset--color--ink-soft);
  border-bottom: 1px solid transparent;
  display: block;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--wp--preset--color--burgundy);
  border-bottom-color: var(--wp--preset--color--burgundy);
}
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { display: none; }

/* Gallery */
.woocommerce div.product div.images .flex-control-thumbs { margin-top: .75rem; gap: .6rem; display: flex; }
.woocommerce div.product div.images .flex-control-thumbs li { width: auto; flex: 0 0 5rem; padding: 0; margin: 0; }
.woocommerce div.product div.images img { border-radius: 0; }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, p.no-comments {
  background: var(--wp--preset--color--blush-soft);
  color: var(--wp--preset--color--charcoal);
  border: 0;
  border-top: 2px solid var(--wp--preset--color--burgundy);
  border-radius: 0;
  font-size: var(--wp--preset--font-size--small);
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--wp--preset--color--burgundy); }
.woocommerce-error { border-top-color: #9b1c2e; }

/* Result count / ordering */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering select {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--wp--preset--color--ink-soft);
}
.woocommerce .woocommerce-ordering select {
  border: 1px solid var(--florea-hairline);
  background: transparent;
  border-radius: 0;
  padding: .7em 2em .7em .8em;
}

/* Breadcrumb */
.woocommerce .woocommerce-breadcrumb {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--wp--preset--color--ink-soft);
  margin-bottom: var(--wp--preset--spacing--30);
}
.woocommerce .woocommerce-breadcrumb a { color: var(--wp--preset--color--ink-soft); }
.woocommerce .woocommerce-breadcrumb a:hover { color: var(--wp--preset--color--burgundy); }

/* Cart & checkout tables */
.woocommerce table.shop_table {
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  font-size: var(--wp--preset--font-size--small);
}
.woocommerce table.shop_table th {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--wp--preset--color--ink-soft);
  border-bottom: 1px solid var(--florea-hairline);
  padding: 1rem .75rem;
}
.woocommerce table.shop_table td {
  border-top: 0;
  border-bottom: 1px solid var(--florea-hairline);
  padding: 1.25rem .75rem;
}
.woocommerce-cart table.cart img { width: 5rem; }
.woocommerce .cart_totals h2, .woocommerce-checkout h3, .woocommerce-billing-fields h3 {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 400;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
  border: 1px solid var(--florea-hairline);
  background: var(--wp--preset--color--white);
  border-radius: 0;
  padding: .95em 1em;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--small);
  height: auto;
}
.woocommerce form .form-row label {
  font-size: var(--wp--preset--font-size--x-small);
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--wp--preset--color--ink-soft);
}
#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment {
  background: var(--wp--preset--color--blush-soft);
  border-radius: 0;
}

/* Woo blocks (Cart/Checkout blocks) */
.wc-block-components-button:not(.is-link) {
  background: var(--wp--preset--color--burgundy) !important;
  color: var(--wp--preset--color--cream) !important;
  border-radius: 0 !important;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  padding: 1.05em 2.4em !important;
}
.wc-block-components-button:not(.is-link):hover { background: var(--wp--preset--color--burgundy-deep) !important; }
.wc-block-components-title, .wc-block-components-product-name {
  font-family: var(--wp--preset--font-family--display) !important;
  font-weight: 400 !important;
}
.wc-block-components-text-input input, .wc-block-components-form .wc-block-components-text-input input {
  border-radius: 0 !important;
  border-color: var(--florea-hairline) !important;
}

/* Star ratings in brand colour */
.woocommerce .star-rating span::before,
.woocommerce p.stars a::before { color: var(--wp--preset--color--burgundy); }

/* Pagination */
.woocommerce nav.woocommerce-pagination ul { border: 0; display: flex; gap: .25rem; justify-content: center; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--x-small);
  letter-spacing: .12em;
  padding: .75em 1em;
  border: 1px solid transparent;
}
.woocommerce nav.woocommerce-pagination ul li span.current { border-color: var(--wp--preset--color--burgundy); background: transparent; color: var(--wp--preset--color--burgundy); }
.woocommerce nav.woocommerce-pagination ul li a:hover { background: transparent; color: var(--wp--preset--color--burgundy); }

/* Related / upsells headings */
.woocommerce .related > h2, .woocommerce .upsells > h2, .woocommerce .cross-sells > h2 {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 400;
  text-align: center;
  margin-bottom: var(--wp--preset--spacing--40);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Header search: icon only, no filled block ---------- */
/* Note: theme.json element styles land at (0,2,0) and print after this file,
   so these need (0,3,0) to win. */
.florea-header .wp-block-search__button.wp-element-button,
.florea-header button.wp-block-search__button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--wp--preset--color--charcoal);
  padding: 0;
  min-width: 0;
  transition: color .35s var(--florea-ease), opacity .35s var(--florea-ease);
}
.florea-header .wp-block-search__button.wp-element-button:hover,
.florea-header .wp-block-search__button.wp-element-button:focus,
.florea-header button.wp-block-search__button:hover,
.florea-header button.wp-block-search__button:focus {
  background: transparent;
  color: var(--wp--preset--color--burgundy);
}
.florea-header .wp-block-search__button svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }

/* Mini cart trigger sits quietly beside it */
.florea-header .wc-block-mini-cart__button.wp-element-button,
.florea-header button.wc-block-mini-cart__button {
  background: transparent;
  color: var(--wp--preset--color--charcoal);
  padding: 0;
  border: 0;
}
.florea-header .wc-block-mini-cart__button.wp-element-button:hover,
.florea-header button.wc-block-mini-cart__button:hover { background: transparent; color: var(--wp--preset--color--burgundy); }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
  .florea-header .wp-block-site-title {
    font-size: 1.05rem !important;
    letter-spacing: .16em !important;
  }
  .florea-header .wp-block-site-title,
  .florea-header .wp-block-site-title a { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
  .florea-header .wp-block-site-logo img { max-width: 36px; }
}

@media (max-width: 480px) {
  .florea-header .wp-block-site-title { font-size: .95rem !important; letter-spacing: .12em !important; }
}

/* Customer account icon sits level with the search and cart controls */
.florea-header .wc-block-customer-account {
  display: flex;
  align-items: center;
  color: var(--wp--preset--color--charcoal);
}
.florea-header .wc-block-customer-account a { color: inherit; text-decoration: none; }
.florea-header .wc-block-customer-account:hover { color: var(--wp--preset--color--burgundy); }
.florea-header .wc-block-customer-account__account-icon { width: 1.4rem; height: 1.4rem; }

/* WooCommerce appends its own account block to headers that lack one; ours
   declares it explicitly, so suppress any stray duplicate appended after the
   header's main row. */
.florea-header > .wc-block-customer-account { display: none; }

/* Keep search, account and cart on one baseline */
.florea-header .florea-header-actions {
  align-items: center;
  gap: 1.1rem;
}
.florea-header .florea-header-actions > * { display: flex; align-items: center; margin: 0; }
.florea-header .florea-header-actions .wp-block-search { margin: 0; }
.florea-header .florea-header-actions .wp-block-search__inside-wrapper { align-items: center; }

/* ---------- Back to top ---------- */
.florea-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2.25rem);
  bottom: clamp(1rem, 3vw, 2.25rem);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.875rem;
  height: 2.875rem;
  padding: 0;
  border: 1px solid var(--wp--preset--color--burgundy);
  border-radius: 0;
  background: var(--wp--preset--color--burgundy);
  color: var(--wp--preset--color--cream);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .4s var(--florea-ease), transform .4s var(--florea-ease),
              visibility .4s var(--florea-ease), background-color .35s var(--florea-ease);
}
.florea-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.florea-to-top:hover,
.florea-to-top:focus-visible {
  background: var(--wp--preset--color--burgundy-deep);
  border-color: var(--wp--preset--color--burgundy-deep);
  color: var(--wp--preset--color--cream);
}
.florea-to-top svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.florea-to-top[hidden] { display: none; }

@media (max-width: 480px) {
  .florea-to-top { width: 2.5rem; height: 2.5rem; }
}
