/**
 * Base Styles
 * Foundational CSS that loads on every page
 */

/* ============================================================================
   FONT DECLARATIONS
   ========================================================================== */

/* Neue Haas Grotesk - Regular (55) */
@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/NHaasGroteskDSPro-55Rg.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Neue Haas Grotesk - Medium (65) */
@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/NHaasGroteskDSPro-65Md.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Neue Haas Grotesk - Bold (75) */
@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/NHaasGroteskDSPro-75Bd.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
    /* Color Palette */
    --cream: #FAFAD7;
    --rust: #984829;
    --olive: #695F3E;
    --purple-grey: #5F586D;
    --dark-grey: #454540;
    --dark-green-grey: #464F45;
    --sage-green: #B2BB99;
    --dark-brown: #4F2723;
    --off-white: #FFFEF1;
    --medium-grey-green: #798075;
    --light-grey: #BDBDBB;
    --forest-green: #5D6E4F;
    --teal-grey: #506564;
    --nasc-gray: #454540;

    /* Typography - Using Neue Haas Grotesk family with different weights */
    --font-body: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-display: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: monaco, consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

/* ============================================================================
   NORMALIZE
   ========================================================================== */

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
}

body,
html {
    width: 100%;
}

main {
    display: block;
}

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}

pre {
    font-family: monospace, monospace;
    font-size: 1em;
}

a {
    background-color: transparent;
}

abbr[title] {
    border-bottom: none;
    text-decoration: underline dotted;
}

b,
strong {
    font-weight: bolder;
}

code,
kbd,
samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

img {
    border-style: none;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    padding: 0.35em 0.75em 0.625em;
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

textarea {
    overflow: auto;
}

[type="checkbox"],
[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

details {
    display: block;
}

summary {
    display: list-item;
}

template {
    display: none;
}

[hidden] {
    display: none;
}

/* ============================================================================
   TYPOGRAPHY
   ========================================================================== */

body,
button,
input,
select,
optgroup,
textarea {
    color: #000000;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    clear: both;
    font-family: var(--font-heading);
    font-weight: 700;
}

p {
    margin-bottom: 1.5em;
}

dfn,
cite,
em,
i {
    font-style: italic;
}

blockquote {
    margin: 0 1.5em;
}

address {
    margin: 0 0 1.5em;
}

pre {
    background: #eee;
    font-family: "Courier 10 Pitch", courier, monospace;
    line-height: 1.6;
    margin-bottom: 1.6em;
    max-width: 100%;
    overflow: auto;
    padding: 1.6em;
}

code,
kbd,
tt,
var {
    font-family: var(--font-mono);
}

abbr,
acronym {
    border-bottom: 1px dotted #666;
    cursor: help;
}

mark,
ins {
    background: #d4edda;
    text-decoration: none;
}

big {
    font-size: 125%;
}

/* ============================================================================
   ELEMENTS
   ========================================================================== */

body {
    background: #fff;
}

hr {
    background-color: #ccc;
    border: 0;
    height: 1px;
    margin-bottom: 1.5em;
}

ul,
ol {
    margin: 0 0 1.5em 3em;
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

li > ul,
li > ol {
    margin-bottom: 0;
    margin-left: 1.5em;
}

dt {
    font-weight: 700;
}

dd {
    margin: 0 1.5em 1.5em;
}

embed,
iframe,
object {
    max-width: 100%;
}

img {
    height: auto;
    max-width: 100%;
}

figure {
    margin: 1em 0;
}

table {
    margin: 0 0 1.5em;
    width: 100%;
}

/* ============================================================================
   LINKS
   ========================================================================== */

a {
    color: var(--forest-green);
    text-decoration: none;
}

a:visited {
    color: var(--forest-green);
}

a:hover,
a:focus,
a:active {
    color: var(--olive);
}

a:focus {
    outline: thin dotted;
}

a:hover,
a:active {
    outline: 0;
}

/* ============================================================================
   FORMS
   ========================================================================== */

/* Form Labels */
label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--dark-grey);
    margin-bottom: 0.5rem;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    border: 1px solid;
    border-color: #ccc #ccc #bbb;
    border-radius: 3px;
    background: #e6e6e6;
    color: rgba(0, 0, 0, 0.8);
    line-height: 1;
    padding: 0.6em 1em 0.4em;
    cursor: pointer;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    border-color: #ccc #bbb #aaa;
}

button:active,
button:focus,
input[type="button"]:active,
input[type="button"]:focus,
input[type="reset"]:active,
input[type="reset"]:focus,
input[type="submit"]:active,
input[type="submit"]:focus {
    border-color: #aaa #bbb #bbb;
}

/* Global form input styles - elegant, consistent */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--light-grey);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-grey);
    background: white;
    transition: all 0.3s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(105, 95, 62, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* WooCommerce input classes inherit global styles */
.woocommerce-Input,
.input-text {
    /* Inherits from input[type] above */
}

/* ============================================================================
   ACCESSIBILITY
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

#primary[tabindex="-1"]:focus {
    outline: 0;
}

/* ============================================================================
   UTILITIES
   ========================================================================== */

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

/* ============================================================================
   BREADCRUMBS - GLOBAL
   ========================================================================== */

.breadcrumb-wrapper {
    max-width: 1400px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
}

.woocommerce .woocommerce-breadcrumb {
    margin: 0.9em 0em;
    padding: 0;
    font-size: 0.875rem;
    color: var(--medium-grey-green);
    line-height: 1.8;
    letter-spacing: 0.01em;
}

.woocommerce-breadcrumb a {
    color: var(--forest-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.woocommerce-breadcrumb a:hover {
    color: var(--olive);
    text-decoration: underline;
}

/* Desktop breadcrumb alignment */
@media (min-width: 1024px) {
    .breadcrumb-wrapper {
        padding: 0 1rem;
    }
}

/* ============================================================================
   WOOCOMMERCE NOTICES - GLOBAL
   ========================================================================== */

/* Success messages - constrain width and center */
.woocommerce-notices-wrapper {
    max-width: 1400px;
    margin: 0 auto 0;
    padding: 0 1rem;
}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-message {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1.5rem 1.25rem 1.5rem 3.5rem;
    background: #d1fae5;
    color: #065f46;
    border: 1.5px solid #34d399;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    margin: 5px 0 0 0;
    position: relative;
}

.woocommerce-message::before {
    content: '✓';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.woocommerce-message a.button {
    padding: 0.625rem 1.25rem;
    background: white;
    color: #065f46;
    border: 1.5px solid #34d399;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    order: -1;
}

.woocommerce-message a.button:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Error Messages */
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-error {
    display: block !important;
    padding: 1.5rem 1.25rem 1.5rem 3.5rem;
    background: #fee2e2;
    color: #991b1b;
    border: 1.5px solid #f87171;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    margin: 5px 0 0 0;
    position: relative;
    list-style: none;
}

.woocommerce-error li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-error::before {
    content: '!';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.woocommerce-error a.button {
    padding: 0.625rem 1.25rem;
    background: white;
    color: #991b1b;
    border: 1.5px solid #f87171;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: auto;
}

.woocommerce-error a.button:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* ============================================================================
   WOOCOMMERCE LOYALTY REWARDS (CANNA COINS) - GLOBAL
   ========================================================================== */

/* Canna Coins message - applies to product cards, single products, etc. */
.wlr-product-message {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0;
    padding: 0.75rem 1rem !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    text-align: center;
    line-height: 1.5 !important;
    border: 1.5px solid #86efac !important;
    display: block !important;
    float: none !important;
}

.wlr-product-message::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f55f';
    margin-right: 0.5rem;
    color: #22c55e;
}
