/*
Theme Name: The Busy Woman
Theme URI: https://thebusywoman.com/
Author: Tre' & Ken
Description: Warm, coffee-house block theme for The Busy Woman planner shop. Espresso, cream, sage and terracotta.
Version: 1.1.1
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: busy-woman
*/

/* ---------- Header ---------- */
.tbw-header { background: var(--wp--preset--color--espresso); color: var(--wp--preset--color--cream); }
.tbw-header a, .tbw-header .wp-block-site-title a { color: var(--wp--preset--color--cream); text-decoration: none; }
.tbw-header .wp-block-site-title a { font-family: var(--wp--preset--font-family--fraunces); font-weight: 600; font-size: 1.6rem; }
.tbw-header .wp-block-site-logo img { border-radius: 50%; background: #fff; padding: 4px; box-sizing: border-box; }
.tbw-header .wp-block-navigation { font-weight: 700; font-size: 0.95rem; gap: 1.5rem; }
.tbw-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 6px; }
.tbw-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--espresso); color: var(--wp--preset--color--cream); }

/* ---------- Footer ---------- */
.tbw-footer { background: var(--wp--preset--color--espresso); color: #E8DCCB; font-size: 0.9rem; }
.tbw-footer a { color: #E8DCCB; }
.tbw-footer .tbw-footer-brand { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.25rem; color: var(--wp--preset--color--cream); }

/* ---------- Bands and cards ---------- */
.tbw-band-latte { background: var(--wp--preset--color--latte); }
.tbw-card { background: var(--wp--preset--color--foam); border-radius: 16px; overflow: hidden; height: 100%; }
.tbw-card a { text-decoration: none; color: inherit; }
.tbw-card .tbw-card-img { display: flex; align-items: center; justify-content: center; height: 230px; padding: 20px; box-sizing: border-box; margin: 0; }
.tbw-card .tbw-card-img img { max-height: 190px; width: auto; max-width: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 6px 16px rgba(59, 42, 32, 0.18); }
.tbw-card .tbw-card-body { padding: 18px 20px 22px; }
.tbw-card h3 { margin: 0 0 6px; font-size: 1.3rem; line-height: 1.25; }
.tbw-card p { margin: 0 0 6px; }
.tbw-tint-1 { background: #D9C3A6; } .tbw-tint-2 { background: #C9D1BE; } .tbw-tint-3 { background: #E3C2AE; } .tbw-tint-4 { background: #D8CDBE; }
.tbw-price { font-weight: 700; font-size: 1.15rem; }
.tbw-pill { display: inline-block; background: var(--wp--preset--color--terracotta); color: #fff !important; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 0.875rem; text-decoration: none; }
.tbw-hero-img img { border-radius: 6px; box-shadow: 0 12px 28px rgba(59, 42, 32, 0.25); transform: rotate(-3deg); max-height: 400px; width: auto; }
.tbw-hero-frame { background: #E6D5BE; border-radius: 24px; padding: 32px; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.tbw-sage { background: var(--wp--preset--color--sage); color: #fff; border-radius: 24px; }
.tbw-sage h2, .tbw-sage p { color: #fff; }
.tbw-tier { background: var(--wp--preset--color--foam); border: 2px solid #E2D3BF; border-radius: 16px; padding: 28px; height: 100%; box-sizing: border-box; }
.tbw-tier.is-featured { border-color: var(--wp--preset--color--terracotta); }
.tbw-photo-placeholder { background: #D9C3A6; border-radius: 50% 50% 16px 16px; min-height: 340px; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #4A3A2E; }
.tbw-photo-placeholder img { border-radius: 50% 50% 16px 16px; width: 100%; height: 100%; object-fit: cover; }

.tbw-eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--wp--preset--color--sage); margin-bottom: 0; }
.tbw-sage { padding: 48px clamp(24px, 5vw, 56px); }
.tbw-sage .wp-block-columns { align-items: center; margin: 0; }
.tbw-sage .wp-block-buttons { justify-content: flex-end; }
.tbw-sage .wp-block-button__link { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--espresso); }
.tbw-card h3 a { color: inherit; text-decoration: none; }
.tbw-card h3 a:hover { color: var(--wp--preset--color--terracotta); }
.tbw-hero-frame .wp-block-image { margin: 0; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 2px solid var(--wp--preset--color--espresso); color: var(--wp--preset--color--espresso); background: transparent; }
@media (max-width: 781px) { .tbw-sage .wp-block-buttons { justify-content: flex-start; } }

/* ---------- Email signup ---------- */
.tbw-signup { text-align: center; padding: 64px 24px; }
.tbw-signup h2 { margin: 0 0 10px; }
.tbw-signup form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.tbw-signup input[type="email"] { flex: 1 1 280px; max-width: 400px; padding: 14px 18px; border: 2px solid #8C7660; border-radius: 999px; font-size: 1rem; background: #fff; color: var(--wp--preset--color--espresso); font-family: inherit; }
.tbw-signup button { background: var(--wp--preset--color--terracotta); color: #fff; border: 0; padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; font-family: inherit; min-height: 48px; }
.tbw-signup button:hover { background: #723819; }
.tbw-signup .tbw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tbw-signup .tbw-msg { font-weight: 700; color: var(--wp--preset--color--sage); margin-top: 16px; }
.tbw-signup .tbw-msg.is-error { color: var(--wp--preset--color--terracotta); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- WooCommerce ---------- */
.woocommerce ul.products li.product, .wc-block-product-template .wc-block-product, .wp-block-post-template .product { background: var(--wp--preset--color--foam); border-radius: 16px; padding: 16px; text-align: left; }
.woocommerce ul.products li.product img, .wc-block-components-product-image img { border-radius: 8px; background: #EFE3D2; object-fit: contain; aspect-ratio: 1 / 1; padding: 12px; box-sizing: border-box; }
.woocommerce .price, .wc-block-components-product-price { color: var(--wp--preset--color--espresso) !important; font-weight: 700; }
.woocommerce span.onsale { background: var(--wp--preset--color--terracotta); }
.woocommerce div.product div.images .woocommerce-product-gallery__image:first-child { background: #EFE3D2; border-radius: 20px; padding: 24px; box-sizing: border-box; }
.woocommerce div.product div.images .woocommerce-product-gallery__image:first-child img { max-height: 520px; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; border-radius: 6px; }
.woocommerce div.product div.images .flex-control-thumbs img { background: #EFE3D2; border-radius: 10px; padding: 6px; box-sizing: border-box; aspect-ratio: 1 / 1; object-fit: contain; }
.woocommerce-store-notice, p.demo_store { background: var(--wp--preset--color--sage) !important; font-weight: 600; }

/* Size choice as pill buttons (select stays in the page for WooCommerce) */
.tbw-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; }
.tbw-pills button { min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--wp--preset--color--espresso); background: transparent; color: var(--wp--preset--color--espresso); font-weight: 700; font-size: 0.95rem; cursor: pointer; font-family: inherit; }
.tbw-pills button[aria-pressed="true"] { background: var(--wp--preset--color--espresso); color: var(--wp--preset--color--cream); }
.tbw-pills button:disabled { opacity: 0.4; cursor: not-allowed; }
table.variations select.tbw-hidden-select { position: absolute; left: -9999px; }
.woocommerce div.product form.cart .reset_variations { display: none !important; }
.woocommerce button.button.alt, .woocommerce a.button.alt, .wc-block-components-button:not(.is-link) { background: var(--wp--preset--color--terracotta) !important; color: #fff !important; border-radius: 999px !important; font-weight: 700; padding: 0.9em 2em; }
.tbw-printed-note { background: var(--wp--preset--color--latte); border-radius: 14px; padding: 16px 18px; margin-top: 18px; }

@media (max-width: 781px) {
  .tbw-hero-frame { min-height: 300px; }
  .tbw-hero-img img { max-height: 260px; }
}

/* ---------- Deb's photo: smaller on the homepage ---------- */
.tbw-photo-placeholder.tbw-photo-small { max-width: 300px; min-height: 0; margin-left: auto; margin-right: auto; background: transparent; }
.tbw-photo-placeholder.tbw-photo-small img { aspect-ratio: 4 / 5; height: auto; }
.tbw-photo-placeholder .wp-block-image { margin: 0; width: 100%; }

/* ---------- Magic-link sign-in ---------- */
.tbw-ml-box { background: var(--wp--preset--color--latte); border-radius: 18px; padding: 28px; margin: 0 0 32px; }
.tbw-ml-box h2 { margin: 0 0 6px; font-size: 1.5rem; }
.tbw-ml-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.tbw-ml-form input[type="email"] { flex: 1 1 240px; padding: 13px 16px; border: 2px solid #8C7660; border-radius: 999px; font-size: 1rem; background: #fff; color: var(--wp--preset--color--espresso); font-family: inherit; min-height: 48px; box-sizing: border-box; }
.tbw-ml-form button { background: var(--wp--preset--color--terracotta); color: #fff; border: 0; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; cursor: pointer; font-family: inherit; min-height: 48px; }
.tbw-ml-form button:hover { background: #723819; }
.tbw-ml-optin { flex-basis: 100%; order: 3; font-size: 0.9rem; display: flex; gap: 8px; align-items: center; }
.tbw-ml-form button { order: 2; }
.tbw-ml-or { margin: 18px 0 0; font-size: 0.9rem; color: var(--wp--preset--color--cocoa); }
.tbw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tbw-ml-box .tbw-msg, .tbw-pop-msg.is-ok { font-weight: 700; color: var(--wp--preset--color--sage); }
.tbw-ml-box .tbw-msg.is-error, .tbw-pop-msg.is-error { font-weight: 700; color: var(--wp--preset--color--terracotta); }

/* ---------- Bottom-right pop-up ---------- */
.tbw-pop { position: fixed; right: 16px; bottom: 16px; z-index: 99990; width: 340px; max-width: calc(100vw - 32px); box-sizing: border-box; background: var(--wp--preset--color--foam); color: var(--wp--preset--color--espresso); border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 16px 40px rgba(59, 42, 32, 0.25); border-top: 5px solid var(--wp--preset--color--sage); opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease; }
.tbw-pop.is-open { opacity: 1; transform: none; }
.tbw-pop[hidden] { display: none; }
.tbw-pop h2 { font-size: 1.3rem; margin: 0 28px 4px 0; }
.tbw-pop-lead { margin: 0 0 8px; font-size: 0.95rem; }
.tbw-pop-list { margin: 0 0 6px; padding-left: 1.1em; font-size: 0.9rem; }
.tbw-pop-list li { margin: 2px 0; }
.tbw-pop-msg { font-size: 0.92rem; }
.tbw-pop .tbw-ml-form { margin-top: 8px; gap: 8px; }
.tbw-pop .tbw-ml-form input[type="email"], .tbw-pop .tbw-ml-form button { flex: 1 1 100%; }
.tbw-pop .tbw-ml-optin { order: 3; font-size: 0.85rem; }
.tbw-pop-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--wp--preset--color--cocoa); border-radius: 50%; }
.tbw-pop-close:hover { background: var(--wp--preset--color--latte); }
@media (max-width: 480px) { .tbw-pop { right: 8px; left: 8px; width: auto; max-width: none; bottom: 8px; } }
@media (prefers-reduced-motion: reduce) { .tbw-pop { transition: none; } }

/* Size pills with dimensions */
.tbw-pills button.has-dims { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 8px 20px; border-radius: 16px; }
.tbw-pills .tbw-pill-name { font-weight: 700; }
.tbw-pills .tbw-pill-dims { font-weight: 600; font-size: 0.8rem; opacity: 0.85; }
