/* =====================================================================
   BASE: reset.css
   Removes browser default styles so every browser starts the same,
   plus a few tiny layout / accessibility helpers used on all pages.
   Load AFTER variables.css.
   ===================================================================== */

/* ------------------------- Box model ------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ------------------------- Remove default spacing ------------------------- */
* {
    margin: 0;
    padding: 0;
}

/* ------------------------- Document ------------------------- */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* anchor links (#new-arrivals ...) stop below the fixed header */
    scroll-padding-top: var(--header-height, 90px);
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    line-height: var(--lh-base, 1.6);
    background-color: var(--secondary-color, #fff);
    color: var(--text-color, #333);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ------------------------- Media ------------------------- */
img,
picture,
video,
canvas,
svg {
    max-width: 100%;
}

img,
video {
    height: auto;
}

img {
    border-style: none;
}

/* ------------------------- Lists ------------------------- */
/* Bullets stay by default (policy text, blog). Menus and footers remove
   them in their own component CSS with list-style: none. */
ul,
ol {
    padding-left: 1.25em;
}

nav ul,
nav ol {
    list-style: none;
    padding-left: 0;
}

/* ------------------------- Links ------------------------- */
a {
    color: inherit;
    text-decoration: none;
}

/* ------------------------- Form controls ------------------------- */
button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

/* number inputs: hide the spin arrows (quantity boxes have their own +/- buttons) */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

fieldset {
    border: 0;
    min-width: 0;
}

/* ------------------------- Tables ------------------------- */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ------------------------- Other elements ------------------------- */
hr {
    border: 0;
    border-top: 1px solid var(--color-border, #e6e6e6);
}

iframe {
    border: 0;
}

/* The HTML "hidden" attribute must ALWAYS win over component display rules */
[hidden] {
    display: none !important;
}

/* ------------------------- Layout helpers (used on every page) ------------------------- */
.container {
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding: 0 var(--container-pad, 15px);
}

.section-padding {
    padding: var(--section-pad, 100px) 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: var(--section-pad-mobile, 60px) 0;
    }
}

/* ------------------------- Accessibility helpers ------------------------- */
/* Visible only to screen readers and search engines */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keyboard focus ring (mouse clicks do not show it) */
:focus-visible {
    outline: 2px solid var(--color-focus, #1a73e8);
    outline-offset: 2px;
}

/* "Skip to content" link, if a page adds one */
.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: var(--z-toast, 3000);
    padding: 10px 16px;
    background: var(--primary-color, #000);
    color: var(--secondary-color, #fff);
    transition: top var(--transition-fast, 0.2s ease);
}

.skip-link:focus {
    top: 12px;
}

/* Added to <body> by JS while the cart / mobile menu / search is open */
body.no-scroll {
    overflow: hidden;
}

/* ------------------------- Reduced motion ------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
