/*
Theme Name: House of Sole
Theme URI: https://houseofsole.com
Author: Antigravity
Author URI: https://google.com
Description: A lightweight, secure, and fully responsive WordPress theme for House of Sole, replicating a clean, editorial luxury aesthetic.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: houseofsole
*/

@theme {
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Poppins", sans-serif;
  --font-signature: "Monsieur La Doulaise", cursive;

  --color-brand-cream: #fafcf4;
  --color-brand-green: #f9fdee;
  --color-brand-emerald: #183E40;
  --color-brand-gold: #B79974;

  --animate-marquee: marquee 40s linear infinite;
  --animate-fade-in: fadeIn 0.3s ease-out;

  @keyframes marquee {
    0% {
      transform: translateX(0%)
    }

    100% {
      transform: translateX(-100%)
    }
  }

  @keyframes fadeIn {
    0% {
      opacity: 0
    }

    100% {
      opacity: 1
    }
  }
}

/* Custom Global Styles */
a {
  text-decoration: none !important;
}

/* ── Sharp Theme: Zero Border Radius Globally ──────────────────────────────
   Enforces the editorial, sharp aesthetic across all elements, WooCommerce
   components, plugin UI, and future additions. No exceptions. */
*,
*::before,
*::after {
  border-radius: 0 !important;
}

/* ── Remove Browser Default Focus Outlines ─────────────────────────────────
   Kills the sky-blue browser focus ring on buttons, links, swatches, etc.
   Brand-consistent focus states are handled via ring-brand-gold in JS. */
*:focus,
*:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ── Rounded Exception: Header Count Badges ────────────────────────────────
   Cart and wishlist count badges are the ONLY elements allowed full rounding. */
.hos-cart-count,
.hos-wishlist-count {
  border-radius: 9999px !important;
}

img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.markdown-body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  .markdown-body {
    padding-left: 60px;
    padding-right: 60px;
  }
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

/* Fix for Sticky Header overlapping with WP Admin Bar */
.admin-bar #site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar #site-header {
    top: 46px;
  }
}

/* Remove default browser search 'X' icon */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

/* Enforce 18px Product Titles globally across all sections */
.product-card-inner h3 {
  font-size: 18px !important;
}

/* Ensure WooCommerce classes do not override our grid widths */
.product.w-full {
  width: 100% !important;
  margin: 0 !important;
}

/* Let Swiper control the width and spacing for sliders */
.product.swiper-slide {
  /* margin intentionally left to Swiper */
}

/* --- WooCommerce Mini Cart Strict Resets --- */
.widget_shopping_cart_content {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

ul.woocommerce-mini-cart.cart_list.product_list_widget {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

ul.woocommerce-mini-cart.cart_list.product_list_widget li.woocommerce-mini-cart-item {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  float: none !important;
  min-height: auto !important;
  background: transparent !important;
}

ul.woocommerce-mini-cart.cart_list.product_list_widget li.woocommerce-mini-cart-item img {
  float: none !important;
  width: 5rem !important; /* w-20 */
  height: 5rem !important; /* h-20 */
  margin: 0 !important;
  box-shadow: none !important;
}

ul.woocommerce-mini-cart.cart_list.product_list_widget li a.remove,
ul.woocommerce-mini-cart.cart_list.product_list_widget li a.remove_from_cart_button {
  background: transparent !important;
  border-radius: 0 !important;
  color: currentColor !important;
  width: auto !important;
  height: auto !important;
  line-height: inherit !important;
  font-size: inherit !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  margin: 0 !important;
  border: none !important;
}
ul.woocommerce-mini-cart.cart_list.product_list_widget li a.remove:hover,
ul.woocommerce-mini-cart.cart_list.product_list_widget li a.remove_from_cart_button:hover {
  background: transparent !important;
  color: currentColor !important;
}

ul.woocommerce-mini-cart.cart_list.product_list_widget dl {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  display: flex !important;
  gap: 0.25rem !important;
  align-items: center !important;
}

ul.woocommerce-mini-cart.cart_list.product_list_widget dl dt,
ul.woocommerce-mini-cart.cart_list.product_list_widget dl dd {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  font-weight: inherit !important;
}

ul.woocommerce-mini-cart.cart_list.product_list_widget dl dd p {
  margin: 0 !important;
}

/* --- Toast Notifications --- */
.hos-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #183E40; /* brand-emerald */
  color: #fafcf4; /* brand-cream */
  padding: 1rem 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(100%) scale(0.9);
  opacity: 0;
  pointer-events: none;
}

.hos-toast.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.hos-toast.is-removed {
    background: #183E40;
    color: #fafcf4;
    border-left: 5px solid #183E40; /* keep it subtle but distinctive */
}

/* ──────────────────────────────────────────────────────────────────────────
   WOOCOMMERCE TWEAKS
   ────────────────────────────────────────────────────────────────────────── */
/* Hide the dynamically injected "View cart" link next to Add to Cart buttons */
a.added_to_cart.wc-forward {
    display: none !important;
}

/* --- Global WooCommerce Notices --- */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    padding: 1.25rem 1.5rem !important;
    margin: 0 0 1.5rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    list-style: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    clear: both !important;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    margin-bottom: 5px !important;
    padding: 0 !important;
    list-style: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.woocommerce-error li:last-child,
.woocommerce-message li:last-child,
.woocommerce-info li:last-child {
    margin-bottom: 0 !important;
}

/* ERROR: Cream bg, Gold border, Emerald text */
.woocommerce-error {
    background-color: var(--color-brand-cream, #fafcf4) !important;
    color: var(--color-brand-emerald, #183E40) !important;
    border: 1px solid var(--color-brand-gold, #B79974) !important;
    border-left: 4px solid var(--color-brand-gold, #B79974) !important;
}

/* INFO/MESSAGE: Emerald bg, Gold border, Cream Text */
.woocommerce-message,
.woocommerce-info {
    background-color: var(--color-brand-emerald, #183E40) !important;
    color: var(--color-brand-cream, #fafcf4) !important;
    border: 1px solid var(--color-brand-gold, #B79974) !important;
    border-left: 4px solid var(--color-brand-gold, #B79974) !important;
}

/* Inline buttons (e.g. "View Cart") */
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
    background: transparent !important;
    color: var(--color-brand-gold, #B79974) !important;
    border: 1px solid var(--color-brand-gold, #B79974) !important;
    float: none !important;
    padding: 8px 18px !important;
    margin-left: 15px !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    transition: all 0.3s ease !important;
}

.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover,
.woocommerce-error a.button:hover {
    background: var(--color-brand-gold, #B79974) !important;
    color: var(--color-brand-emerald, #183E40) !important;
}

/* Inline links (e.g. "Undo") */
.woocommerce-error a:not(.button),
.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button) {
    color: var(--color-brand-gold, #B79974) !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

/* Hide native WooCommerce icons */
.woocommerce-error::before,
.woocommerce-message::before,
.woocommerce-info::before {
    display: none !important;
}

/* --- Unified Price Styling (Simple & Variable & Product Cards) --- */
/* Sale price (ins) — shown first after our filter swap */
#hos-price-wrapper ins,
.product-card-inner ins,
.hos-price-main {
    text-decoration: none !important;
    font-weight: 700 !important;
    color: var(--color-brand-gold, #B79974) !important;
    display: inline-block;
}

/* Original price (del) — shown second, faded strikethrough */
#hos-price-wrapper del,
.product-card-inner del,
.hos-price-old {
    font-size: 0.85em !important;
    color: var(--color-brand-gold, #B79974) !important;
    opacity: 0.4;
    text-decoration: line-through !important;
    margin-left: 0.5rem;
    margin-right: 0;
    font-weight: 400 !important;
    display: inline-block;
}

/* All price amounts on product cards — always brand-gold, bold */
.product-card-inner .woocommerce-Price-amount,
.product-card-inner .price {
    color: var(--color-brand-gold, #B79974) !important;
    font-weight: 700 !important;
}

/* Specific fix for variation price container structure */
.hos-variation-price-display {
    display: flex;
    align-items: baseline;
}


/* --- Out of Stock / Disabled Interactions --- */
.hos-size-btn:disabled {
    opacity: 0.4 !important;
    background-color: transparent !important;
    cursor: not-allowed !important;
}

.hos-color-swatch.is-out-of-stock {
    opacity: 0.3 !important;
    pointer-events: none;
}
