/*
Theme Name: Shop Theme
Author: Jernej Krajnc
Description: Custom Shop Theme
Version: 1.0
License: JK Private License v1 or later
Text Domain: shop-theme
*/

:root {
    color-scheme: light;
    --brand-bg: #FBF8F5;
    --brand-bg-rgb: 251, 248, 245;
    --brand-ink: #373635;
    --brand-ink-rgb: 55, 54, 53;
    --brand-cta: #CC6349;
    --brand-cta-rgb: 204, 99, 73;
    --brand-primary: #3D4C3D;
    --brand-primary-rgb: 61, 76, 61;
    --brand-surface: #F1E4D7;
    --brand-surface-rgb: 241, 228, 215;
    --footer-bottom-bg: #F1E4D7;
    --footer-bottom-bg-rgb: 241, 228, 215;
    --brand-accent: #C3B793;
    --brand-accent-rgb: 195, 183, 147;
    --font-family-base: 'Manrope', 'Segoe UI', sans-serif;
    --font-family-heading: 'Manrope', 'Segoe UI', sans-serif;
    --font-family: var(--font-family-base);
    --primary: var(--brand-primary);
    --secondary: var(--brand-cta);
    --tertiary: color-mix(in srgb, var(--brand-cta) 82%, var(--brand-ink));
    --quaternary: color-mix(in srgb, var(--brand-primary) 68%, var(--brand-ink));
    --cta: var(--brand-cta);
    --cta-rgb: var(--brand-cta-rgb);
    --cta-hover: color-mix(in srgb, var(--brand-cta) 84%, var(--brand-ink));
    --cta-2: var(--cta-hover);
    --cta-3: var(--brand-primary);
    --black: var(--brand-ink);
    --white: #FFFFFF;
    --link: var(--brand-primary);
    --grey: color-mix(in srgb, var(--brand-ink) 38%, var(--brand-bg));
    --muted: var(--grey);
    --background-dark: var(--brand-primary);
    --background-dark-light: color-mix(in srgb, var(--brand-primary) 74%, var(--brand-bg));
    --background-grey: var(--brand-surface);
    --text-grey: color-mix(in srgb, var(--brand-ink) 40%, var(--brand-bg));
    --border: var(--white);
    --border-dark: 1px solid rgba(var(--brand-primary-rgb), 0.14);
    --textdark: var(--brand-ink);
    --titledark: var(--brand-ink);
    --text-body: var(--brand-ink);
    --text-muted: color-mix(in srgb, var(--brand-ink) 64%, var(--brand-bg));
    --green: var(--brand-primary);
    --orange: var(--brand-cta);
    --darkgrey: var(--brand-primary);
    --main: var(--brand-cta);
    --filter-white: invert(99%) sepia(10%) saturate(365%) hue-rotate(314deg) brightness(104%) contrast(97%);
    --box-shadow: 0 12px 28px rgba(var(--brand-primary-rgb), 0.06);
    --box-shadow-hover: 0 18px 36px rgba(var(--brand-primary-rgb), 0.09);
    --card-shadow: 0 10px 24px rgba(var(--brand-primary-rgb), 0.05);
    --card-shadow-hover: 0 16px 32px rgba(var(--brand-primary-rgb), 0.08);
    --text-shadow: 0 2px 10px rgba(var(--brand-ink-rgb), 0.22);
    --border-radius: 16px;
    --pill-radius: 999px;
    --card-w: clamp(220px, 24vw, 320px);
    --surface-1: var(--white);
    --surface-2: color-mix(in srgb, var(--brand-surface) 52%, var(--brand-bg));
    --surface-3: var(--brand-surface);
    --surface-4: color-mix(in srgb, var(--brand-surface) 70%, var(--brand-accent));
    --surface-muted: color-mix(in srgb, var(--brand-surface) 82%, var(--brand-bg));
    --surface-hover: color-mix(in srgb, var(--brand-surface) 70%, var(--brand-bg));
    --scrollbar-track: rgba(var(--brand-ink-rgb), 0.10);
    --scrollbar-thumb: rgba(var(--brand-ink-rgb), 0.68);
    --scrollbar-thumb-hover: rgba(var(--brand-ink-rgb), 0.82);
    --overlay-scrim: rgba(var(--brand-ink-rgb), 0.65);
    --panel-hover: rgba(var(--brand-primary-rgb), 0.06);
    --panel-overlay: rgba(var(--brand-bg-rgb), 0.74);
    --panel-overlay-strong: rgba(var(--brand-bg-rgb), 0.92);
    --focus-outline-color: rgba(var(--brand-cta-rgb), 0.26);
    --focus-outline-width: 1px;
    --focus-outline-offset: 2px;
    --focus-border-color: color-mix(in srgb, var(--brand-cta) 58%, var(--white));
    --focus-ring: 0 0 0 3px rgba(var(--brand-cta-rgb), 0.10);
    --focus-ring-soft: 0 0 0 2px rgba(var(--brand-primary-rgb), 0.10);
    --field-shadow: 0 10px 22px rgba(var(--brand-primary-rgb), 0.04);
    --field-shadow-focus: 0 0 0 3px rgba(var(--brand-cta-rgb), 0.10), 0 12px 24px rgba(var(--brand-primary-rgb), 0.06);
    --nav-shadow: 0 10px 24px rgba(var(--brand-primary-rgb), 0.08);
    --dropdown-shadow: 0 20px 48px rgba(var(--brand-primary-rgb), 0.12), 0 4px 16px rgba(var(--brand-primary-rgb), 0.08);
}
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    background-color: var(--brand-bg);
    color: var(--text-body);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.1s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.1s !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-family-base);
    font-weight: 400;
    margin: 0;
    scroll-behavior: smooth;
    background-color: var(--brand-bg);
    color: var(--text-body);
}

ol,
ul {
    padding-left: 15px;
}

p {
    color: var(--text-body);
}

h1,
h2,
h3 {
    font-family: var(--font-family-heading);
    color: var(--titledark);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cta);
}

button,
input,
select,
textarea {
    font: inherit;
    color: var(--text-body);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}
/* BASE STYLES - END */

/* TYPOGRAPHY - START */
h1 {
    font-size: calc(28px + (32 - 28) * ((100vw - 320px) / (1400 - 320)));
}

h2 {
    font-size: calc(26px + (30 - 26) * ((100vw - 320px) / (1400 - 320)));
}

h3 {
    font-size: calc(22px + (26 - 22) * ((100vw - 320px) / (1400 - 320)));
}

html, h4, a, p, li, ul {
    font-size: calc(14px + (16 - 14) * ((100vw - 320px) / (1400 - 320)));
}

h4, a, p, li, ul {
    line-height: 150%;
}
/* TYPOGRAPHY - END */

/* CONTAINERS - START */
.container {
    max-width: 1900px;
    padding-right: 2%;
    padding-left: 2%;
    margin-right: auto;
    margin-left: auto;
}

.container-fluid {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
}

.element-margin-top {
    margin-top: calc(25px + (50 - 25) * ((100vw - 320px) / (1400 - 320)));
}

.element-margin-bottom {
    margin-bottom: calc(25px + (50 - 25) * ((100vw - 320px) / (1400 - 320)));
}

.container-margin-top {
    margin-top: calc(50px + (100 - 50) * ((100vw - 320px) / (1400 - 320)));
}

.container-margin-bottom {
    margin-bottom: calc(50px + (100 - 50) * ((100vw - 320px) / (1400 - 320)));
}
/* CONTAINERS - END */

/* UTILITIES - START */
.center {
    text-align: center;
    justify-items: center;
    justify-content: center;
}

.container-mb {
    margin-bottom: 50px;
}

@media (min-width: 992px) {
    .container-mb {
        margin-bottom: 100px;
    }
}

.container-mt {
    margin-top: 50px;
}

@media (min-width: 992px) {
    .container-mt {
        margin-top: 100px;
    }
}

.shadow-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.shadow-box {
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-secondary {
    background-color: var(--secondary);
}

.bg-tertiary {
    background-color: var(--tertiary);
}

.bg-cta {
    background-color: var(--cta);
}

.bg-black {
    background-color: var(--black);
}

.bg-white {
    background-color: var(--white);
}

.border-primary {
    border-color: var(--primary);
}

.border-secondary {
    border-color: var(--secondary);
}

.border-tertiary {
    border-color: var(--tertiary);
}

.border-cta {
    border-color: var(--cta);
}

.border-black {
    border-color: var(--black);
}

.border-white {
    border-color: var(--white);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-tertiary {
    color: var(--tertiary);
}

.text-cta {
    color: var(--cta);
}

.text-black {
    color: var(--black);
}

.text-white {
    color: var(--white);
}
/* UTILITIES - END */

/* BUTTONS - START */
.button {
    display: inline-block; 
    padding: 12px 22px;
    border-radius: var(--pill-radius);
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--cta);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--cta);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(var(--brand-cta-rgb), 0.18);
}

.button:hover {
    background-color: var(--cta-hover);
    border-color: var(--cta-hover);
    color: var(--white);
    transform: translateY(-1px);
}

.button:focus-visible {
    color: var(--white);
}

.btn-transition {
    transition: all 0.6s ease;
}

.btn-hover-brighten:hover {
    filter: brightness(110%);
}

.btn-hover-bg-primary:hover {
    background-color: var(--primary);
}

.btn-hover-bg-secondary:hover {
    background-color: var(--secondary);
}

.btn-hover-bg-tertiary:hover {
    background-color: var(--tertiary);
}

.btn-hover-bg-cta:hover {
    background-color: var(--cta);
}

.btn-hover-bg-white:hover {
    background-color: var(--white);
}

.btn-hover-bg-black:hover {
    background-color: var(--black);
}

.btn-hover-text-primary:hover {
    color: var(--primary);
}

.btn-hover-text-secondary:hover {
    color: var(--secondary);
}

.btn-hover-text-tertiary:hover {
    color: var(--tertiary);
}

.btn-hover-text-cta:hover {
    color: var(--cta);
}

.btn-hover-text-white:hover {
    color: var(--white);
}

.btn-hover-text-black:hover {
    color: var(--black);
}
/* BUTTONS - END */

/* FOOTER - START */
.site-footer {
    background: var(--darkgrey);
    color: var(--white);
    margin-top: 5rem;
}

.site-footer .container-footer {
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-footer .footer-row {
    width: 100%;
    padding: 10px 0;
}

.site-footer .footer-row a,
.site-footer .footer-row p {
    color: var(--white);
    text-decoration: none;
    padding: 0 10px;
    font-size: 12px;
}

.site-footer .footer-row a:hover {
    color: var(--main);
}

.site-footer .logo-footer img {
    height: 30px;
    width: auto;
    object-fit: contain;
}
/* FOOTER - END */

/* ACCESSIBILITY - START */
/* Global focus styles - FIXED to not break positioned elements */
:focus {
    outline: none; /* Reset to avoid double borders */
}

/* Base focus styles for interactive elements - BUT preserve positioning */
:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible,
[role="button"]:focus-visible {
    outline: var(--focus-outline-width) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    border-radius: var(--border-radius) !important;
    z-index: 9;
    box-shadow: var(--focus-ring);
}

/* CRITICAL: Do NOT override position/transform for elements that need specific positioning */
/* This was breaking the sliders! */

/* Only apply keyboard focus to truly interactive elements - EXCLUDING subcategory items */
body.using-keyboard a:focus:not(.subcategory-content .category-item a),
body.using-keyboard button:focus,
body.using-keyboard input:focus,
body.using-keyboard select:focus,
body.using-keyboard textarea:focus,
body.using-keyboard [tabindex="0"]:focus:not(.subcategory-content .category-item a),
body.using-keyboard [role="button"]:focus:not(.subcategory-content .category-item a) {
    outline: var(--focus-outline-width) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    border-radius: var(--border-radius) !important;
    z-index: 9;
    box-shadow: var(--focus-ring);
    /* REMOVED: position: relative; and transform: none; as these break sliders */
}

/* Style for keyboard users - EXCLUDING subcategory items */
.keyboard-active:not(.subcategory-content .category-item a) {
    outline: var(--focus-outline-width) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    border-radius: var(--border-radius) !important;
    z-index: 5;
    box-shadow: var(--focus-ring);
}

/* Screen reader only content - Defined in navigation-general.css */

/* SKIP LINK - START */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--cta);
    color: var(--white);
    padding: 10px;
    z-index: 9999;
    transition: top 0.3s ease;
    border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
    top: 0;
    outline: var(--focus-outline-width) solid var(--black);
}
/* SKIP LINK - END */

/* SCROLLING ACCESSIBILITY - START */
.scroll-indicator {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--black);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    border: none;
    top: 50%;
    transform: translateY(-50%);
}

.scroll-indicator.left {
    left: 10px;
}

.scroll-indicator.right {
    right: 10px;
}

.scroll-container:focus-within .scroll-indicator,
body.using-keyboard .scroll-container:hover .scroll-indicator {
    display: flex;
}
/* SCROLLING ACCESSIBILITY - END */
/* ACCESSIBILITY - END */

/* SLIDER ARROWS - START */
body .category-scroll-btn,
body .tp-arrow,
body .thumbnail-nav,
body .product-scroll-btn {
    width: 50px;
    height: 50px;
    background: rgba(var(--brand-bg-rgb), 0.42);
    color: var(--primary);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 8px 20px rgba(var(--brand-primary-rgb), 0.10);
}

body .category-scroll-btn:hover,
body .tp-arrow:hover,
body .thumbnail-nav:hover,
body .product-scroll-btn:hover {
    background-color: rgba(var(--brand-bg-rgb), 0.60);
    box-shadow: 0 12px 24px rgba(var(--brand-primary-rgb), 0.12);
}

body .category-scroll-btn:focus-visible,
body .tp-arrow:focus-visible,
body .thumbnail-nav:focus-visible,
body .product-scroll-btn:focus-visible {
    outline: var(--focus-outline-width) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    border-radius: 50%;
    z-index: 20;
}

body .category-scroll-btn[disabled],
body .category-scroll-btn.disabled,
body .category-scroll-btn[aria-disabled="true"],
body .tp-arrow[disabled],
body .tp-arrow.disabled,
body .tp-arrow[aria-disabled="true"],
body .thumbnail-nav[disabled],
body .thumbnail-nav.disabled,
body .thumbnail-nav[aria-disabled="true"],
body .product-scroll-btn[disabled],
body .product-scroll-btn.disabled,
body .product-scroll-btn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
}

body .nav-arrow {
    width: 25px;
    height: 25px;
    fill: currentColor;
    display: block;
}
/* SLIDER ARROWS - END */

/* QUANTITY CONTROL - FLAT WHITE CTA HOVER */
.jk-qty-control .jk-qty-row {
    border-radius: var(--pill-radius);
    background: var(--surface-1);
    border: none;
    overflow: hidden;
}

.jk-qty-control .jk-qty-btn,
.jk-qty-control .jk-qty-add {
    font-size: 14px;
    background: var(--surface-1);
    color: var(--primary);
    border: none;
    border-radius: 0;
}

.jk-qty-control .jk-qty-btn:not(.jk-qty-add):hover,
.jk-qty-control .jk-qty-add:hover {
    background: var(--primary);
    color: var(--white);
    border: none;
}

.jk-qty-control .jk-qty-minus,
.jk-qty-control .jk-qty-plus,
.jk-qty-control .jk-qty-add {
    border-radius: 0;
}

.jk-qty-control .jk-qty-minus {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.jk-qty-control .jk-qty-plus {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.jk-qty-control .jk-qty-input {
    background: none;
    border: none;
}

.jk-qty-control .jk-qty-add {
    display: none;
}

.jk-qty-control.is-empty .jk-qty-add {
    display: inline-flex;
}

.jk-qty-control.is-empty .jk-qty-minus,
.jk-qty-control.is-empty .jk-qty-plus,
.jk-qty-control.is-empty .jk-qty-input {
    display: none;
}

.jk-qty-control .jk-qty-variation-select {
    background: var(--surface-1);
    border: none;
}

.jk-qty-control.has-external-variation .jk-qty-variation {
    display: none;
}

.single-product .jk-qty-control .jk-qty-row,
.single-product .jk-qty-control .jk-qty-btn,
.single-product .jk-qty-control .jk-qty-add,
.single-product .jk-qty-control .jk-qty-variation-select,
.single-product .jk-qty-control .jk-qty-input {
    background: var(--surface-1);
    border: none;
}
