/* ==========================================================================
   ROYAL-ONE — DESIGN SYSTEM (TSG Brands LLC)
   Palette: "Golden Hour" — warm comb-amber accents on a cream ground.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Figtree:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* Smooth in-page anchor scrolling (must sit after @import - CSS requires
   @import to precede every style rule, or the browser discards it). */
html {
  scroll-behavior: smooth;
}

:root {
  /* --- 1. Grounds: page, cards and soft panels --- */
  --bg: #FBF9F5;              /* Morning Cream: page background */
  --surface: #FFFFFF;         /* Wax White: cards, drawers, modals */
  --surface-2: #F4EFEA;       /* Oat Milk: pills, chips, quiet panels */
  --surface-hover: #ECE4DA;   /* Toasted Oat: hover on light controls */

  /* --- 2. Type --- */
  --font-heading: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --text: #181512;            /* Dark Roast: body copy and headings */
  --muted: #6E665D;           /* Driftwood: secondary copy */
  --muted-light: #9B9287;     /* Sandstone: captions, metadata */

  /* --- 3. Lines --- */
  --line: #E8E1D5;            /* Linen: dividers and card edges */
  --line-loud: #D1C4B2;       /* Burlap: emphasized / hovered edges */

  /* --- 4. Brand accent (a product can override it in its own settings) --- */
  --accent: #D97706;          /* Golden Hour Amber: buttons, badges, selected bundle */
  --accent-dark: #B45309;     /* Ember Comb: hover, pressed, accent text */
  --accent-light: #FEF3C7;    /* Pollen Cream: soft accent tint */
  --on-accent: #FFFFFF;       /* text on the accent */

  /* --- 5. Status --- */
  --save: #15803D;            /* Meadow: savings, in stock, checkmarks only */
  --save-bg: #DCFCE7;         /* Meadow Mist: savings badge fill */
  --save-border: #86EFAC;     /* Meadow Edge: savings badge border */
  --sale-badge-bg: #991B1B;   /* Cranberry: "Save X%" pill */
  --sale-badge-text: #FFFFFF;

  --warning-bg: #FEF3C7;      /* Pollen Cream: notice background */
  --warning-border: #FCD34D;  /* Sunflower: notice border */
  --warning-text: #92400E;    /* Burnt Honey: notice text */

  /* --- 6. Shadows & Elevations --- */
  --shadow-sm: 0 1px 3px rgba(24, 21, 18, 0.05);
  --shadow-md: 0 4px 14px rgba(24, 21, 18, 0.07);
  --shadow-lg: 0 10px 25px rgba(24, 21, 18, 0.10);
  
  /* --- 7. Layout & Radii --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  /* Full-bleed chrome, capped content. The <section> elements carry
     width:100% with their own backgrounds and borders, so colour bands and
     rules still run edge to edge on any monitor. --max-w caps only the
     content inside them: past 1600px the catalogue is six products, and
     stretching four cards across an ultrawide leaves each one mostly empty
     space around a 180px image. */
  --max-w: 1600px;
  /* Fluid side gutter: 16px on the smallest phones, 4vw through the middle,
     capped at 72px so an ultrawide does not gain a comically wide margin. */
  --gutter: clamp(16px, 4vw, 72px);
}

/* Base Styles */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Border-box for every Royal-One component, so padding never widens a box.
   Scoped to our own wrappers — WooCommerce and Bricks markup is untouched. */
.us-home-wrapper, .us-home-wrapper *, .us-home-wrapper *::before, .us-home-wrapper *::after,
.us-product-wrapper, .us-product-wrapper *, .us-product-wrapper *::before, .us-product-wrapper *::after,
.us-p-wrapper, .us-p-wrapper *,
.us-top-bar, .us-site-header, .us-site-header *,
.us-site-footer, .us-site-footer *,
.us-cart-overlay, .us-cart-drawer, .us-cart-drawer * {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Global Primary Button --- */
.us-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--on-accent) !important;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}
.us-btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
}

/* --- Policy & Standard Document Styling --- */
.us-policy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  line-height: 1.7;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .us-policy-card {
    padding: 24px 18px;
  }
}
.us-policy-card h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}
.us-policy-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.us-policy-card h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 28px 0 10px;
  color: var(--text);
}
.us-policy-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--text);
}
.us-policy-card p {
  font-size: 14.5px;
  color: #4B5563;
  margin-bottom: 14px;
}
.us-policy-card ul {
  padding-left: 20px;
  margin-bottom: 18px;
}
.us-policy-card li {
  font-size: 14px;
  color: #4B5563;
  margin-bottom: 6px;
}
.us-policy-card a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
}
.us-policy-card strong {
  color: var(--text);
}
.us-policy-card a.us-btn-primary {
  text-decoration: none;
}
.us-policy-card .us-table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
}
.us-policy-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #4B5563;
}
.us-policy-card th,
.us-policy-card td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.us-policy-card th {
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

/* Contact form (SureForms) inside the Contact page card. The form's own
   colour settings point at a theme variable this site does not define, so
   the fields and button are styled here in the store palette. */
.us-contact-form {
  margin-top: 8px;
}
.us-contact-form .srfm-form-container,
.us-contact-form .srfm-form {
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  max-width: none !important;
}
.us-contact-form .srfm-block {
  margin: 0 0 14px !important;
  padding: 0 !important;
}
/* SureForms reserves room under every field for its error message; collapse
   it until the message is actually shown, so the fields sit evenly spaced. */
.us-contact-form .srfm-block-wrap {
  margin: 0 !important;
}
.us-contact-form .srfm-error-wrap {
  margin: 0 !important;
  min-height: 0 !important;
}
.us-contact-form .srfm-block:not(.srfm-error):not(.srfm-valid-email-error):not(:has(.srfm-error, .srfm-valid-email-error)) .srfm-error-wrap {
  display: none !important;
}
.us-contact-form .srfm-form {
  gap: 0 !important;
  row-gap: 0 !important;
}
.us-contact-form .srfm-error-wrap .srfm-error-message {
  margin: 4px 0 0 !important;
  font-size: 13px;
}
.us-contact-form .srfm-input-common {
  width: 100% !important;
  box-sizing: border-box;
  padding: 12px 14px !important;
  min-height: 46px;
  border: 1px solid var(--muted-light) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-family: var(--font-body);
  font-size: 15px !important;
  line-height: 1.5;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.us-contact-form .srfm-input-textarea {
  min-height: 140px;
  resize: vertical;
}
.us-contact-form .srfm-input-common::placeholder {
  color: var(--muted-light);
  opacity: 1;
}
.us-contact-form .srfm-input-common:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18) !important;
}
.us-contact-form .srfm-submit-container {
  margin-top: 4px;
}
.us-contact-form .srfm-submit-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 32px !important;
  border: 0 !important;
  border-radius: var(--radius-md) !important;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  font-family: var(--font-heading);
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.28) !important;
  transition: background 0.2s ease, transform 0.2s ease;
}
.us-contact-form .srfm-submit-button:hover,
.us-contact-form .srfm-submit-button:focus-visible {
  background: var(--accent-dark) !important;
  transform: translateY(-1px);
}
.us-contact-form .srfm-submit-button:focus-visible {
  outline: 3px solid var(--accent) !important;
  outline-offset: 3px;
}
.us-contact-form .srfm-submit-wrap {
  color: inherit !important;
}
@media (max-width: 768px) {
  .us-contact-form .srfm-submit-button {
    width: 100% !important;
    min-width: 0;
  }
}

/* Universal Mobile Cross-Browser Hardening */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent iOS Safari forced auto-zoom on input focus */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Ensure smooth touch scrolling */
.us-smooth-scroll {
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Inline UI Icons
   Emitted by royalone_icon() in functions.php. Defined here rather than in
   product.css because the header, shop archives and cart render them too.
   The 1em default is a safety net — every real use sets its own size below.
   ========================================================================== */
.us-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

/* ==========================================================================
   Site logo & shop banner
   In brand.css, not product.css: the header renders on every page, and
   product.css is only enqueued on single products.
   ========================================================================== */

/* --- Custom site logo (header + footer). Falls back to the wordmark when
       no image is set, so this only applies when one is. --- */
.us-logo-img {
  display: block;
  max-height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
@media (max-width: 600px) {
  .us-logo-img {
    max-height: 36px;
    max-width: 150px;
  }
}
/* Header logo sizing. The logo asset is trimmed to its artwork with a ~4%
   transparent margin, so about 90% of the box height is visible mark: 51px
   leaves ~46px of visible logo in the 68px desktop bar, and 38px leaves
   ~34px in the 58px mobile bar. */
.us-site-header .us-logo-img {
  max-height: 51px;
  max-width: 250px;
}
/* An SVG may carry only a viewBox and no width/height, and then has no
   natural size for max-height to scale down from. A definite height lets the
   width follow from the viewBox, so a vector logo renders at the same size. */
.us-logo-img[src$=".svg"] {
  height: 44px;
}
.us-site-header .us-logo-img[src$=".svg"] {
  height: 55px;
}
@media (max-width: 768px) {
  .us-site-header .us-logo-img {
    max-height: 38px;
    max-width: 190px;
  }
  .us-site-header .us-logo-img[src$=".svg"] {
    height: 45px;
  }
}
@media (max-width: 600px) {
  .us-logo-img[src$=".svg"] {
    height: 36px;
  }
  .us-site-header .us-logo-img[src$=".svg"] {
    height: 45px;
  }
}

/* --- Shop archive banner (archive-product.php) --- */
.us-shop-banner {
  background: radial-gradient(circle at 50% 30%, #FFFDF9 0%, var(--bg) 100%);
}
/* Background image set in Shop Settings. The wash on top is the page
   background colour (--bg, #FBF9F5) at 80%, so the dark title and muted
   subtitle stay readable over any photo without changing the palette. */
.us-shop-banner.has-bg-image {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(251, 249, 245, 0.8), rgba(251, 249, 245, 0.8)),
    var(--us-shop-banner-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
