/*
Theme Name: Expensive Design
Theme URI: https://expensivedesign.com
Author: Expensive Design
Author URI: https://expensivedesign.com
Description: A premium WordPress theme by Expensive Design. Fully compatible with WooCommerce and Tutor LMS. Features a modern floating pill header, customizable colors and typography, hero sections, post grids, and a full block library.
Requires at least: 6.2
Tested up to: 6.9.4
Requires PHP: 8.0
Version: 1.0.54
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: expensive-design
Tags: custom-colors, custom-logo, custom-menu, featured-images, full-width-template, theme-options, footer-widgets, blog, e-commerce, education
*/

/* =============================================================================
   EXPENSIVE DESIGN — CUSTOM OVERRIDES
   Color scheme and floating header
   ============================================================================= */

/* --- Color palette --------------------------------------------------------- */
:root {
  --s-accent:          #1a1a2e;
  --s-accent-hover:    #c9a84c;
  --s-bg:              #faf8f5;
  --s-light:           #f0ece4;
  --s-text:            #1a1a2e;
  --s-line:            #e2ddd5;
  --s-noti:            #c9a84c;
  --s-border:          #b8b0a0;
  --s-shadow:          0 4px 24px rgba(26,26,46,0.08);
  --s-border-radius:   8px;
  --s-header-height:   64px;
  /* floating geometry */
  --s-hf-mx:           20px;
  --s-hf-top:          14px;
  --s-hf-radius:       50px;
  /* hero default background */
  --ed-hero-bg:        #f0ece4;
}

@media (min-width: 992px) {
  :root {
    --s-header-height: 72px;
    --s-hf-mx:         32px;
    --s-hf-top:        20px;
  }
}

/* Accent button & links */
.s-button,
button[type="submit"],
input[type="submit"],
.wc-proceed-to-checkout .checkout-button {
  background-color: var(--s-accent) !important;
  color: #faf8f5 !important;
  border-radius: var(--s-hf-radius) !important;
}
.s-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background-color: var(--s-accent-hover) !important;
}

a { color: var(--s-accent); }
a:hover { color: var(--s-accent-hover); }

/* Footer section colours */
.site-footer {
  --s-bg: #1a1a2e;
  --s-text: #b8b0a0;
  --s-accent-hover: #c9a84c;
  background-color: var(--s-bg);
  color: var(--s-text);
}
.footer-bar {
  --s-bg: #0f0f1a;
  --s-text: #b8b0a0;
  background-color: var(--s-bg);
  color: var(--s-text);
}

/* Mobile nav dark */
.site-nav-m {
  --s-bg: #1a1a2e;
  --s-text: #faf8f5;
  --s-line: #2e2e4e;
  background-color: var(--s-bg);
  color: var(--s-text);
}

/* --- Floating pill header -------------------------------------------------- */

/* Remove the full-width space-taker and reset header to fixed overlay */
.site-header-space {
  min-height: 0 !important;
  height: calc(var(--s-header-height) + var(--s-hf-top) * 2) !important;
}

.site-header {
  /* Detach from edges — become a floating pill */
  position: fixed !important;
  top: var(--s-hf-top) !important;
  left: var(--s-hf-mx) !important;
  right: var(--s-hf-mx) !important;
  width: auto !important;

  /* Pill shape */
  border-radius: var(--s-hf-radius) !important;

  /* Frosted glass */
  background: rgba(250, 248, 245, 0.88) !important;
  backdrop-filter: blur(16px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.6) !important;

  /* Refined border + shadow */
  border: 1px solid rgba(201, 168, 76, 0.18) !important;
  box-shadow: 0 4px 32px rgba(26, 26, 46, 0.10),
              0 1px 0 rgba(255,255,255,0.6) inset !important;

  /* Smooth entrance */
  transition: top 0.3s ease, box-shadow 0.3s ease, background 0.3s ease !important;
  z-index: 9999 !important;
}

/* Tighter container inside the pill */
.site-header > .s-container {
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Scrolled state — slightly more opaque, deeper shadow */
.site-header.is-scrolled,
.site-header.scrolled {
  background: rgba(250, 248, 245, 0.97) !important;
  box-shadow: 0 8px 40px rgba(26, 26, 46, 0.14),
              0 1px 0 rgba(255,255,255,0.8) inset !important;
}

/* Admin bar adjustment */
body.admin-bar .site-header {
  top: calc(var(--s-hf-top) + 32px) !important;
}
@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: calc(var(--s-hf-top) + 46px) !important;
  }
}

/* Nav link hover — gold underline */
.site-nav-d a:not(.s-button):hover {
  color: var(--s-accent-hover) !important;
}
.site-nav-d ul li a {
  position: relative;
}
.site-nav-d ul > li > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--s-accent-hover);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
  border-radius: 2px;
}
.site-nav-d ul > li:hover > a::after,
.site-nav-d ul > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Mobile: reduce side margin so it still floats but fits small screens */
@media (max-width: 600px) {
  :root {
    --s-hf-mx: 10px;
    --s-hf-top: 10px;
    --s-hf-radius: 20px;
  }
}

/* =============================================================================
   FOOTER REDESIGN
   Single row, inset separator line, generous vertical padding
   ============================================================================= */

/* Remove old footer-bar entirely */
.footer-bar { display: none !important; }

/* Footer wrapper */
.site-footer {
  background-color: var(--s-accent) !important;
  color: var(--s-footer-text, #b8b0a0) !important;
  padding-top: 72px;
}

/* Widget columns area */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px 32px;
  padding-bottom: 64px;
}

/* Bottom bar: inset line + single row */
.footer-bottom {
  padding: 28px 0 32px;
  position: relative;
}

/* The separator — inset, doesn't touch the edges */
.footer-bottom::before {
  content: '';
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
  margin: 0 auto 28px;
  width: calc(100% - 80px); /* inset from both sides */
  max-width: calc(var(--s-container, 1170px) - 80px);
}

.footer-bottom .s-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy,
.footer-credit {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.01em;
  font-family: var(--s-body);
  line-height: 1.4;
  white-space: nowrap;
}

/* Heart: inherits text colour, no special colour */
.footer-heart {
  font-style: normal;
}

/* Widget titles inside footer */
.site-footer .widget-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.30);
  margin-bottom: 18px;
}

/* Footer links */
.site-footer .widget ul li a,
.site-footer .menu li a {
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 2.2;
  transition: color 0.18s;
}

.site-footer .widget ul li a:hover,
.site-footer .menu li a:hover {
  color: var(--s-accent-hover) !important;
}

/* Mobile */
@media (max-width: 600px) {
  .site-footer {
    padding-top: 48px;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
    padding-bottom: 48px;
  }

  .footer-bottom::before {
    width: calc(100% - 40px);
    margin-bottom: 20px;
  }

  .footer-bottom {
    padding: 20px 0 28px;
  }

  .footer-bottom .s-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* =============================================================================
   CONTENT — BODY TO FOOTER SPACING
   ============================================================================= */

/* Posts and pages */
body:not(.home) .main-body {
  padding-bottom: 80px !important;
}

/* Single posts */
.single-area .content-area {
  padding-bottom: 80px;
}

/* Home page when it has content */
body.home .main-body {
  padding-bottom: 80px;
}

@media (min-width: 992px) {
  body:not(.home) .main-body {
    padding-bottom: 120px !important;
  }

  .single-area .content-area {
    padding-bottom: 0; /* already covered by main-body */
  }

  body.home .main-body {
    padding-bottom: 120px;
  }
}

/* =============================================================================
   LAYOUT FIX — Footer position
   The compiled CSS uses position:absolute on .site-footer which causes it to
   overlap content on pages taller than 100vh. Switch to flex column layout
   so the footer always flows naturally below the content.
   ============================================================================= */

.site {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  overflow: visible !important; /* was overflow:hidden which clipped content */
}

#content {
  flex: 1 0 auto;
}

.site-footer {
  position: relative !important; /* override position:absolute from compiled CSS */
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  flex-shrink: 0;
}

/* Remove the spacer div that was compensating for the old absolute footer */
.site-footer-space {
  display: none !important;
}

/* Remove previous padding-based workaround — layout fix makes it unnecessary */
body:not(.home) .main-body,
body.home .main-body {
  padding-bottom: 80px !important;
}

@media (min-width: 992px) {
  body:not(.home) .main-body,
  body.home .main-body {
    padding-bottom: 120px !important;
  }
}

/* =============================================================================
   HERO BANNER — Full-viewport, flush to top
   Pulls up behind the floating pill header so the hero fills from the very
   top edge of the screen, matching the WellThrive reference design.
   ============================================================================= */

/* Step 1 — Cancel the header-space gap so the banner starts at y=0 */
.main-header.-banner {
  margin-top: calc(-1 * (var(--s-header-height) + var(--s-hf-top) * 2)) !important;
  /* Compensate so the banner text isn't hidden behind the pill header */
  padding-top: calc(var(--s-header-height) + var(--s-hf-top) * 2 + 40px) !important;
  padding-bottom: 80px !important;
  /* Taller hero */
  min-height: 60vh !important;
  /* Full viewport width — break out of any parent container */
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  /* Keep content centred and aligned */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Step 2 — Ensure the pill header is visually on top */
.site-header {
  z-index: 9999 !important;
}

/* Step 3 — On desktop, taller hero */
@media (min-width: 992px) {
  .main-header.-banner {
    min-height: 70vh !important;
    padding-top: calc(var(--s-header-height) + var(--s-hf-top) * 2 + 60px) !important;
    padding-bottom: 100px !important;
  }
}

/* Step 4 — On mobile, ensure pill offset is correct */
@media (max-width: 600px) {
  .main-header.-banner {
    padding-top: calc(var(--s-header-height) + var(--s-hf-top) * 2 + 28px) !important;
    padding-bottom: 60px !important;
    min-height: 50vh !important;
  }
}

/* Step 5 — Hero title sizing */
.main-header.-banner .title {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
}

/* =============================================================================
   BLOCKS — Hero Section & Post Feature Section
   ============================================================================= */

/* ── Hero Section ──────────────────────────────────────────────────────────── */
.ed-hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* Fill full viewport height so it ends at the bottom of the screen */
  min-height: 100vh;

  /* Pull up to cancel the header-space gap — starts flush behind the pill header */
  margin-top: calc(-1 * (var(--s-header-height) + var(--s-hf-top) * 2)) !important;

  /* Compensate so content sits below the pill header */
  padding-top: calc(var(--s-header-height) + var(--s-hf-top) * 2 + 60px) !important;
  padding-bottom: 80px;
  padding-left: var(--s-space);
  padding-right: var(--s-space);

  background-color: var(--ed-hero-bg, var(--s-light));
  box-sizing: border-box;

  /* Full viewport width breakout — escapes any parent container */
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
}

.ed-hero-section__inner {
  max-width: 760px;
  margin: 0 auto;
}

.ed-hero-section__heading {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 20px;
  color: inherit;
}

.ed-hero-section__sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  opacity: 0.85;
  margin: 0 auto 36px;
  max-width: 560px;
  color: inherit;
}

.ed-hero-section__cta {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.ed-hero-btn {
  min-height: 48px;
  padding: 10px 28px;
  font-size: 1rem;
  border-radius: var(--s-hf-radius);
}

.ed-hero-btn--secondary {
  background-color: transparent !important;
  border: 2px solid currentColor !important;
  color: inherit !important;
}
.ed-hero-btn--secondary:hover {
  background-color: currentColor !important;
}

@media (max-width: 600px) {
  .ed-hero-section {
    min-height: 100vh !important;
    padding-top: calc(var(--s-header-height) + var(--s-hf-top) * 2 + 36px) !important;
    padding-bottom: 60px !important;
  }
  .ed-hero-section__cta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .ed-hero-btn {
    text-align: center;
    justify-content: center;
    width: auto;
    align-self: center;
  }
}

/* ── Post Feature Section ───────────────────────────────────────────────────── */
.ed-post-feature {
  padding: calc(var(--s-space) * 2) 0;
}

.ed-post-feature__head {
  margin-bottom: var(--s-space);
}

.ed-post-feature__title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.ed-post-feature__footer {
  margin-top: calc(var(--s-space) * 1.5);
  text-align: center;
}

/* ── Block editor placeholder ───────────────────────────────────────────────── */
.ed-block-placeholder {
  padding: 32px;
  text-align: center;
  background: #f6f7f7;
  border: 1px dashed #c3c4c7;
  border-radius: 4px;
}
.ed-block-placeholder strong {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #50575e;
}

/* =============================================================================
   TUTOR LMS COMPATIBILITY
   Ensures Tutor LMS course pages, lesson templates and quiz pages
   inherit the theme's typography, colors, and spacing correctly.
   ============================================================================= */

/* Course archive & single course */
.tutor-course-list .tutor-card,
.tutor-loop-header,
.tutor-course-detail-widget {
  font-family: var(--s-body);
  color: var(--s-text);
}

/* Tutor buttons inherit theme accent */
.tutor-btn-primary,
.tutor-btn.tutor-btn-primary {
  background-color: var(--s-accent) !important;
  color: var(--s-bg) !important;
  border-radius: var(--s-border-radius) !important;
  transition: background-color 0.3s ease !important;
}
.tutor-btn-primary:hover,
.tutor-btn.tutor-btn-primary:hover {
  background-color: var(--s-accent-hover) !important;
}

/* Tutor course cards */
.tutor-course-card {
  border-radius: var(--s-border-radius);
  box-shadow: var(--s-shadow);
  overflow: hidden;
}

/* Tutor course price */
.tutor-course-price .tutor-price {
  color: var(--s-accent);
  font-family: var(--s-heading);
  font-weight: 700;
}

/* Lesson sidebar */
.tutor-course-content-list {
  background: var(--s-light);
  border-radius: var(--s-border-radius);
}

/* Tutor quiz / lesson heading */
.tutor-lesson-content h1,
.tutor-lesson-content h2,
.tutor-lesson-content h3 {
  font-family: var(--s-heading);
  font-weight: var(--s-heading-weight);
  color: var(--s-text);
}

/* =============================================================================
   WOOCOMMERCE COMPATIBILITY
   Supplements the compiled woo.min.css with theme-specific overrides.
   ============================================================================= */

/* WooCommerce products grid — fix spacing on shop, home, and block grids */

/* On desktop, .products already resets to width:100% with no negative margin.
   On mobile the negative margin breakout must match the container padding exactly. */
body.woocommerce .products,
body.woocommerce-page .products,
.ed-block-section .products {
  /* Let the compiled woo.min.css handle the grid — just ensure no double-padding */
  box-sizing: border-box;
}

/* Remove the extra box around product cards from our WooCommerce compat CSS */
.woocommerce ul.products li.product {
  border-radius: var(--s-border-radius);
}
.woocommerce ul.products li.product a img {
  border-radius: var(--s-border-radius) var(--s-border-radius) 0 0;
}

/* Tighten product card spacing — remove excess gap between cards */
@media (max-width: 991px) {
  body.woocommerce .products,
  body.woocommerce-page .products,
  .ed-block-section .products,
  .ed-block-wrap .products {
    margin-left: calc(var(--s-space) * -1);
    margin-right: calc(var(--s-space) * -1);
    width: calc(100% + var(--s-space) * 2);
  }
}

@media (min-width: 992px) {
  body.woocommerce .products,
  body.woocommerce-page .products,
  .ed-block-section .products,
  .ed-block-wrap .products {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

/* Add-to-cart button */
.woocommerce ul.products li.product .button,
.woocommerce .single_add_to_cart_button.button {
  background-color: var(--s-accent) !important;
  color: var(--s-bg) !important;
  border-radius: var(--s-hf-radius) !important;
  font-family: var(--s-heading) !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce .single_add_to_cart_button.button:hover {
  background-color: var(--s-accent-hover) !important;
}

/* Product price */
.woocommerce .price,
.woocommerce .woocommerce-Price-amount {
  color: var(--s-accent);
  font-weight: 700;
}

/* Sale badge */
.woocommerce span.onsale {
  background-color: var(--s-accent-hover);
  border-radius: 50px;
  font-family: var(--s-heading);
  min-height: unset;
  min-width: unset;
  padding: 4px 10px;
  line-height: 1.4;
}

/* =============================================================================
   BLOCK SECTION TITLE — Consistent header for all Expensive Design blocks
   ============================================================================= */

.ed-block-section {
  margin-bottom: calc(var(--s-space) * 2);
}

.ed-block-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: var(--s-space);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--s-accent);
}

.ed-block-section__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--s-text);
  font-family: var(--s-heading);
}

.ed-block-section__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--s-accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.ed-block-section__link:hover {
  color: var(--s-accent-hover);
}

/* Post Feature Section uses same styles via .ed-post-feature__head — unify */
.ed-post-feature__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: var(--s-space);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--s-accent);
}

.ed-post-feature__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--s-text);
  font-family: var(--s-heading);
}

/* =============================================================================
   WOOCOMMERCE CART & CHECKOUT — Constrain to content width
   The alignfull/alignwide CSS breakout causes cart, checkout and account pages
   to stretch beyond the container. Restrict full-width blocks to non-WC pages.
   ============================================================================= */

body.woocommerce-cart .alignfull,
body.woocommerce-cart .alignwide,
body.woocommerce-checkout .alignfull,
body.woocommerce-checkout .alignwide,
body.woocommerce-account .alignfull,
body.woocommerce-account .alignwide,
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-checkout .wp-block-woocommerce-checkout {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: var(--s-container) !important;
  width: 100% !important;
  left: auto !important;
  right: auto !important;
}

/* Ensure the WooCommerce page content itself is constrained */
body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main {
  max-width: var(--s-container);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  width: 100%;
}

/* The s-container already provides padding — don't double it */
body.woocommerce-cart .s-container.main-body,
body.woocommerce-checkout .s-container.main-body {
  padding-left: var(--s-space);
  padding-right: var(--s-space);
}

/* Main-header banner on cart/checkout — constrain the dark section */
body.woocommerce-cart .main-header.-banner,
body.woocommerce-checkout .main-header.-banner {
  width: 100% !important;
  left: auto !important;
  right: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* =============================================================================
   CHECKOUT ORDER SUMMARY — Clean price display, hide product description
   ============================================================================= */

/* Hide product short description in order summary only — keep product name */
.wc-block-components-order-summary-item__description p,
.wc-block-components-order-summary-item .wc-block-components-product-details {
  display: none !important;
}

/* Fix stacked prices in order summary — show inline */
.wc-block-components-order-summary-item__individual-prices {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

/* Strikethrough original price — small and inline */
.wc-block-components-order-summary-item__individual-prices del,
.wc-block-components-order-summary-item__individual-prices
.wc-block-components-product-price__regular {
  font-size: 0.8em !important;
  opacity: 0.55 !important;
  text-decoration: line-through !important;
  margin: 0 !important;
}

/* Legacy shortcode checkout */
.woocommerce-checkout-review-order-table .product-name del,
.order-review .product-name del {
  display: inline !important;
  font-size: 0.8em;
  opacity: 0.55;
  margin-left: 6px;
}

/* =============================================================================
   HEADER ICONS — Cart & User (enabled via Customizer → Header)
   ============================================================================= */

/* Ensure site-action is visible on desktop when icons are present */
@media (min-width: 992px) {
  .site-action:not(:empty) {
    display: flex !important;
  }
}

/* =============================================================================
   CART COUNT BADGE — Fix positioning in desktop header action area
   ============================================================================= */

.site-action .site-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  min-width: 40px;
  cursor: pointer;
}

/* Badge: top-right corner of the cart icon */
.site-action .cart-count,
.site-action #cart-count-d {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 16px;
  min-width: 16px;
  font-size: 10px;
  line-height: 12px;
  padding: 2px 4px;
  border-radius: 50px;
  background-color: var(--s-noti);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-family: Arial, sans-serif;
}

/* User / my-account icon in desktop header */
.site-action .site-member {
  display: flex;
  align-items: center;
}
.site-action .site-member a {
  padding: 0 8px;
  display: flex;
  align-items: center;
}

/* =============================================================================
   PRODUCT GRID — Consistent gap matching article/post card grid
   ============================================================================= */

/* Override flex layout with CSS grid for consistent gap matching s-grid
   — exclude .s-slider (product slider) which needs flex for keen-slider */
body.woocommerce .products:not(.s-slider),
body.woocommerce-page .products:not(.s-slider),
.ed-block-section .products:not(.s-slider),
.ed-block-wrap .products:not(.s-slider) {
  display: grid !important;
  grid-gap: var(--s-space) !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
}

/* Each product fills its grid cell fully */
body.woocommerce .products:not(.s-slider) .product,
body.woocommerce-page .products:not(.s-slider) .product,
.ed-block-section .products:not(.s-slider) .product,
.ed-block-wrap .products:not(.s-slider) .product {
  width: 100% !important;
  margin: 0 !important;
}

/* Desktop: respect the columns-N classes */
@media (min-width: 992px) {
  body.woocommerce .products.columns-1:not(.s-slider),
  body.woocommerce-page .products.columns-1:not(.s-slider) {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
  body.woocommerce .products.columns-2:not(.s-slider),
  body.woocommerce-page .products.columns-2:not(.s-slider) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.woocommerce .products.columns-3:not(.s-slider),
  body.woocommerce-page .products.columns-3:not(.s-slider) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body.woocommerce .products.columns-4:not(.s-slider),
  body.woocommerce-page .products.columns-4:not(.s-slider) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  body.woocommerce .products.columns-5:not(.s-slider),
  body.woocommerce-page .products.columns-5:not(.s-slider) {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
  /* Block product grid default 3 columns */
  .ed-block-section .products:not(.s-slider),
  .ed-block-wrap .products:not(.s-slider) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Restore slider products to original flex layout for keen-slider */
.products.s-slider {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.products.s-slider .product {
  width: 100% !important;
  flex: none !important;
  margin: 0 !important;
}


/* =============================================================================
   FOOTER — Show footer on cart and checkout pages
   The compiled woo.min.css hides the footer on these pages; restore it.
   ============================================================================= */

body.woocommerce-checkout .site-footer,
body.woocommerce-checkout .site-footer-space,
body.woocommerce-cart .site-footer,
body.woocommerce-cart .site-footer-space {
  display: block !important;
}

/* Also restore the normal footer height (was overridden to 70px for fixed checkout button) */
body.woocommerce-checkout .site-footer-space,
body.woocommerce-cart .site-footer-space {
  height: var(--s-footer-height) !important;
}

/* On mobile, the place-order and checkout buttons were fixed to the bottom —
   since we're showing the footer, use normal flow instead */
@media (max-width: 991px) {
  body.woocommerce-checkout .place-order .button,
  body.woocommerce-cart .checkout-button {
    position: static !important;
    width: 100% !important;
    border-radius: var(--s-border-radius) !important;
    height: auto !important;
    padding: 14px 20px !important;
    margin-top: var(--s-space) !important;
  }
  body.woocommerce-cart .order-total {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    justify-content: flex-end !important;
    padding: 12px 0 !important;
  }
}

/* =============================================================================
   MOBILE HEADER — Cart icon in action-right area
   ============================================================================= */

/* Show cart in action-right on mobile (._mobile class) */
@media (max-width: 991px) {
  .action-right .site-cart._mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px 14px;
    min-width: 44px;
  }
  .action-right .site-cart._mobile .cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
  }
}


/* =============================================================================
   SINGLE PRODUCT — Layout, related products, footer, add-to-cart
   ============================================================================= */

/* -- Footer: always show on single product pages -- */
body.single-product .site-footer,
body.single-product .site-footer-space { display: block !important; }
body.single-product .site-footer-space { height: var(--s-footer-height) !important; }

/* -- Mobile: add-to-cart flows normally (not fixed to bottom) -- */
@media (max-width: 991px) {
  body.single-product .single_add_to_cart_button {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    border-radius: var(--s-hf-radius) !important;
    padding: 14px 20px !important;
    margin-top: var(--s-space) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* -- All screen sizes: product container block + related products full width -- */
.woocommerce .product,
.woocommerce-page .product {
  display: block !important;
}

.woocommerce .product .related.products {
  clear: both !important;
  float: none !important;
  width: 100% !important;
  display: block !important;
  margin: var(--s-space) 0 calc(var(--s-space) * 2) !important;
}

/* -- Desktop: two-column product layout using floats, related products full width -- */
@media (min-width: 992px) {

  /* Gallery: float left */
  .woocommerce .product .woocommerce-product-gallery {
    float: left !important;
    width: 50% !important;
    clear: left !important;
  }

  /* Summary: float right */
  .woocommerce .product div.summary {
    float: right !important;
    width: 48% !important;
    margin-left: 2% !important;
  }

  /* Tabs: clear both floats → full width */
  .woocommerce .product .wc-tabs-wrapper {
    clear: both !important;
    float: none !important;
    width: 100% !important;
    display: block !important;
  }
}

/* -- Related products section styling (all screen sizes) -- */
.related.products {
  padding: 0 !important;
  border-radius: 0 !important;
}

.related.products > h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem) !important;
  font-weight: 700 !important;
  padding: 0 0 12px !important;
  margin-bottom: var(--s-space) !important;
  border-bottom: 2px solid var(--s-accent) !important;
  width: 100% !important;
}

/* -- Related products grid (override compiled horizontal scroll) -- */
.related.products .products {
  display: grid !important;
  grid-gap: var(--s-space) !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  flex-wrap: unset !important;
  scroll-snap-type: unset !important;
  -webkit-overflow-scrolling: unset !important;
}

.related.products .products .product {
  display: block !important;
  flex: unset !important;
  width: 100% !important;
  min-width: 0 !important;
  scroll-snap-align: unset !important;
  white-space: normal !important;
}

@media (min-width: 992px) {
  .related.products .products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}





/* =============================================================================
   PRODUCT CARD — Left-align, price, zoom, button
   ============================================================================= */

/* Equal height cards — price and button always at bottom */
.products .product {
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* Link wraps image+title — make it flex column so title pushes price down */
.products .product > a.woocommerce-LoopProduct-link {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  overflow: visible !important;
}

/* Title grows, pushing price-row to bottom of card */
.products .product .woocommerce-loop-product__title {
  flex: 1 1 auto !important;
  text-align: left !important;
  padding: 14px 16px 8px !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
}

/* Price row: flex row, price left, button right, always at bottom */
.products .product .ed-price-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 16px 16px !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

/* Price: stacked column on the left */
.products .product .price {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 2px !important;
}

.products .product .price ins {
  padding-bottom: 0 !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  order: 1 !important;
  display: block !important;
}

.products .product .price del {
  position: static !important;
  transform: none !important;
  left: auto !important;
  bottom: auto !important;
  font-size: 0.85em !important;
  opacity: 0.6 !important;
  order: 2 !important;
  display: block !important;
}

/* Button: right side, natural width */
.products .product .add_to_cart_button,
#main .products .product .add_to_cart_button,
.woocommerce .products .product .add_to_cart_button {
  display: inline-block !important;
  float: none !important;
  flex-shrink: 0 !important;
  width: auto !important;
  margin: 0 !important;
  position: static !important;
  height: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
}

.products .product::after {
  content: '' !important;
  display: table !important;
  clear: both !important;
}

/* Product grid — equal height rows */
body.woocommerce .products:not(.s-slider),
body.woocommerce-page .products:not(.s-slider),
.ed-block-section .products:not(.s-slider),
.ed-block-wrap .products:not(.s-slider) {
  align-items: stretch !important;
}


/* =============================================================================
   HIDE AUTHOR — also hide entry-author on single post page
   ============================================================================= */

.hide-author .entry-author {
  display: none !important;
}

/* =============================================================================
   PRODUCT CARD MOBILE — Stack price above button on narrow screens
   ============================================================================= */

@media (max-width: 600px) {
  .products .product .ed-price-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
}

@media (min-width: 601px) and (max-width: 767px) {
  .products .product .ed-price-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
}

/* =============================================================================
   PRODUCT IMAGE — Zoom on hover (matching post card behaviour)
   ============================================================================= */

/* Clip zoom at the image wrapper */
.products .product .ed-product-img {
  overflow: hidden !important;
  line-height: 0 !important;
  border-radius: var(--s-border-radius) var(--s-border-radius) 0 0 !important;
  flex-shrink: 0 !important;
}

/* Smooth transition */
.products .product .ed-product-img img {
  transition: transform 0.5s ease !important;
  width: 100% !important;
  display: block !important;
  transform: scale(1) !important;
}

/* Zoom on hover */
.products .product:hover .ed-product-img img {
  transform: scale(1.12) !important;
}

/* =============================================================================
   LOGIN PAGE — Split layout: form left, visual right
   ============================================================================= */

/* Full-viewport wrapper */
.ed-login-wrap {
  display: flex;
  min-height: 100vh;
  background: var(--s-bg);
}

/* ── Form side ── */
.ed-login-card {
  flex: 0 0 480px;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 2px 0 40px rgba(26,26,46,0.06);
  position: relative;
  z-index: 1;
}

/* Brand */
.ed-login-brand {
  margin-bottom: 40px;
}
.ed-login-logo img {
  max-height: 48px;
  width: auto;
}
.ed-login-site-name {
  font-family: var(--s-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--s-accent);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.ed-login-tagline {
  font-size: 1rem;
  color: var(--s-border);
  margin: 0;
}

/* WooCommerce / WP login form overrides */
.ed-login-card .woocommerce-form-login,
.ed-login-card #loginform {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.ed-login-card .woocommerce-form__label,
.ed-login-card label {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--s-border) !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.ed-login-card .woocommerce-Input,
.ed-login-card input[type="text"],
.ed-login-card input[type="email"],
.ed-login-card input[type="password"] {
  width: 100% !important;
  padding: 14px 16px !important;
  border: 1.5px solid var(--s-line) !important;
  border-radius: var(--s-border-radius) !important;
  font-size: 1rem !important;
  background: var(--s-bg) !important;
  color: var(--s-text) !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none !important;
}
.ed-login-card input[type="text"]:focus,
.ed-login-card input[type="email"]:focus,
.ed-login-card input[type="password"]:focus {
  border-color: var(--s-accent) !important;
  box-shadow: 0 0 0 3px rgba(26,26,46,0.08) !important;
}

.ed-login-card .woocommerce-form-group,
.ed-login-card .form-row,
.ed-login-card p {
  margin-bottom: 20px !important;
}

/* Remember me checkbox */
.ed-login-card .woocommerce-form__label-for-checkbox,
.ed-login-card .woocommerce-form-login__rememberme {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.875rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--s-text) !important;
  font-weight: 400 !important;
}

/* Submit button */
.ed-login-card .woocommerce-button,
.ed-login-card button[type="submit"],
.ed-login-card input[type="submit"] {
  width: 100% !important;
  padding: 16px !important;
  background: var(--s-accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--s-hf-radius) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  font-family: var(--s-heading) !important;
  cursor: pointer !important;
  transition: background 0.2s, transform 0.15s !important;
  letter-spacing: 0.02em !important;
}
.ed-login-card .woocommerce-button:hover,
.ed-login-card button[type="submit"]:hover,
.ed-login-card input[type="submit"]:hover {
  background: var(--s-accent-hover) !important;
  transform: translateY(-1px) !important;
}

/* Footer links */
.ed-login-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--s-line);
}
.ed-login-footer p {
  margin: 0 0 8px !important;
  font-size: 0.875rem !important;
  color: var(--s-border) !important;
}
.ed-login-footer a {
  color: var(--s-accent) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.ed-login-footer a:hover {
  color: var(--s-accent-hover) !important;
}

/* ── Visual side ── */
.ed-login-visual {
  flex: 1;
  background: var(--s-accent);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ed-login-visual__inner {
  position: relative;
  z-index: 1;
  padding: 60px;
  max-width: 480px;
}

/* Decorative shapes */
.ed-login-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  background: #fff;
}
.ed-login-shape--1 {
  width: 500px; height: 500px;
  top: -150px; right: -150px;
}
.ed-login-shape--2 {
  width: 300px; height: 300px;
  bottom: -80px; left: -80px;
  opacity: 0.08;
}
.ed-login-shape--3 {
  width: 200px; height: 200px;
  top: 50%; left: 30%;
  transform: translateY(-50%);
  opacity: 0.06;
}

/* Quote */
.ed-login-quote__mark {
  display: block;
  font-family: var(--s-heading);
  font-size: 6rem;
  line-height: 1;
  color: var(--s-accent-hover);
  margin-bottom: -20px;
}
.ed-login-quote__text {
  display: block;
  font-family: var(--s-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

/* ── Mobile: stack vertically ── */
@media (max-width: 767px) {
  .ed-login-wrap {
    flex-direction: column;
  }
  .ed-login-card {
    flex: none;
    max-width: 100%;
    padding: 48px 28px;
    box-shadow: none;
  }
  .ed-login-visual {
    min-height: 220px;
    order: -1;
  }
  .ed-login-visual__inner {
    padding: 32px 28px;
  }
  .ed-login-quote__mark { font-size: 3rem; }
  .ed-login-quote__text { font-size: 1.1rem; }
}

/* =============================================================================
   LOGIN PAGE — Full viewport, hide banner, override woo wrapper
   ============================================================================= */

/* Remove the dark banner header on login page */
body.ed-login-page .main-header.-banner,
body.ed-login-page .main-header {
  display: none !important;
}

/* Remove default page padding and container */
body.ed-login-page .site-content,
body.ed-login-page .main-body,
body.ed-login-page .s-container.main-body {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* The woo account page wrapper — remove padding */
body.ed-login-page .woocommerce {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Push login wrap below the floating header pill */
body.ed-login-page .ed-login-wrap {
  margin-top: calc(-1 * (var(--s-header-height) + var(--s-hf-top) * 2)) !important;
  min-height: 100vh !important;
}
