/* WebShop - Custom CSS */

/* CSS Custom Properties */
:root {
    --primary-color: #972A9F;       /* mauveine (magician default) */
    --secondary-color: #7A8EFF;     /* cornflower-blue (magician default) */
    --accent-color: #F6A6FF;        /* mauve (magician default) */
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --text-color: #2c3e50;
    --text-muted: #6c757d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --secondary-background: #f6a6ff14;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
    --border-radius: 0.375rem;
    --transition: all 0.3s ease;
    /* Palette colors for reference */
    --alice-blue: #dcedff;
    --mauve: #F6A6FF;
    --argentinian-blue: #2FA5FF;
    --cornflower-blue: #7A8EFF;
    --mauveine: #972A9F;
}

/* Themes */

[data-theme="magician"] {
    --primary-color: #972A9F;      /* mauveine */
    --secondary-color: #7A8EFF;    /* cornflower-blue */
    --accent-color: #F6A6FF;       /* mauve */
    --brand-tint: #dcedff;         /* alice-blue */
}

/* Prevent initial flash of panels controlled by Alpine (x-cloak) */
[x-cloak] { display: none !important; }

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--secondary-background);
}

/* Global scrollbar styling - Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

/* Global scrollbar styling - Webkit browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-color);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* Hide scrollbar buttons (arrows) */
*::-webkit-scrollbar-button {
    display: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Layout */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

 .static-page {
     max-width: 920px;
     margin: 0 auto;
     padding: 1.5rem 1.5rem;
     background: var(--white);
     border: 1px solid var(--border-color);
     border-radius: 16px;
     box-shadow: var(--shadow);
 }

 .static-page__title {
     margin: 0 0 1rem 0;
     font-size: 2rem;
     line-height: 1.2;
     color: var(--text-color);
 }

 .static-page__body {
     white-space: normal;
     word-break: break-word;
     overflow-wrap: anywhere;
     line-height: 1.7;
     font-size: 1rem;
     color: var(--text-color);
 }

 .static-page__body h2 {
     margin: 1.5rem 0 0.75rem 0;
     font-size: 1.4rem;
     color: var(--primary-color);
 }

 .static-page__body h2:first-child {
     margin-top: 0;
 }

 .static-page__body p {
     margin: 0 0 1rem 0;
 }

 .static-page__body ul,
 .static-page__body ol {
     margin: 0 0 1rem 0;
     padding-left: 1.5rem;
 }

 .static-page__body li {
     margin-bottom: 0.4rem;
 }

 .static-page__body hr {
     border: none;
     border-top: 1px solid var(--border-color);
     margin: 1.5rem 0;
 }

 .static-page__note {
     background: rgba(151, 42, 159, 0.08);
     border-left: 3px solid var(--primary-color);
     padding: 0.75rem 1rem;
     border-radius: 0 8px 8px 0;
     margin: 1rem 0;
 }

 @media (max-width: 768px) {
     .static-page {
         padding: 1.25rem 1rem;
         border-radius: 14px;
     }

     .static-page__title {
         font-size: 1.6rem;
     }
 }

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.navbar-logo-badge {
    width: 140px;
    height: 140px;
    border-radius: 9999px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -22px;
    margin-bottom: -22px;
}

.navbar-logo-img {
    padding-left: 20px;
    width: 90%;
    height: 90%;
    display: block;
}

.navbar-brand {
    color: var(--white) !important;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

/* Theme selector (navbar) */
.theme-switcher { display: inline-flex; align-items: center; gap: 0.4rem; margin-right: 0.5rem; }
.theme-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-color);
}

.nav-link {
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
}

/* Navbar auth area */
.nav-auth-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.greeting {
    color: var(--white);
    opacity: 0.9;
    margin-right: 0.25rem;
}

.login-panel {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: min(320px, 90vw);
    margin-top: 0.5rem;
    padding: 0.75rem;
    z-index: 1000;
    display: none; /* hidden by default */
}

.login-panel.open { display: block; }

.login-form .form-label, .register-form .form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.login-form .form-input, .register-form .form-input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color .2s ease, box-shadow .2s ease;
}

#search-input { transition: border-color .2s ease, box-shadow .2s ease; }
#search-input:not(:placeholder-shown) {
    border-color: var(--accent-color);
    /* Visual emphasis without layout shift */
    box-shadow: 0 0 0 2px var(--accent-color);
}

.login-form-grid .col-12 + .col-12 { margin-top: 0.5rem; }
.login-title { margin-bottom: 0.5rem; }
.login-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; }

.login-form .form-error, .register-form .form-error {
    background: #fff3f3;
    color: var(--danger-color);
    border: 1px solid #f6c2c2;
    padding: 0.5rem 0.6rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

/* Auth pages (login/register) */
.auth-card {
    max-width: 560px;
    margin: 2rem auto;
    box-shadow: var(--shadow-lg);
}

.auth-card .card-body { padding: 1.25rem 1.25rem; }

.auth-title { margin-bottom: 1rem; text-align: center; }

.btn-primary-small {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.45rem 0.8rem;
    cursor: pointer;
}

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

.btn-link-small {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

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

.logout-form { display: inline; }
.logout-link { background: none; border: none; color: var(--white); cursor: pointer; }
.hide-sm { display: inline; }

@media (max-width: 576px) {
    .hide-sm { display: none; }
    .navbar-logo-badge {
        width: 74px;
        height: 74px;
        margin-top: -16px;
        margin-bottom: -16px;
    }
}

.navbar-toggler {
    background: none;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: none;
}

/* right-align auth container without Bootstrap utilities */
.nav-auth-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Search Bar */
.search-form {
    display: flex;
    gap: 0;
    max-width: 300px;
}

.search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
}

.search-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Forms (generic) */
.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.form-error {
    background: #fff3f3;
    color: var(--danger-color);
    border: 1px solid #f6c2c2;
    padding: 0.5rem 0.6rem;
    border-radius: var(--border-radius);
    margin-top: 0.25rem;
}

/* Accessible visually-hidden utility */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap; /* added to avoid line break */
    border: 0;
}

/* Toggle (switch) control */
.toggle-row {
    /* sizing variables */
    --toggle-width: 34px;
    --toggle-height: 18px;
    --toggle-knob: 14px;
    --toggle-padding: 2px;

    /* colors bound to theme; override --toggle-on per variant */
    --toggle-off: #cfd4da; /* neutral off */
    --toggle-on: var(--secondary-color);

    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    user-select: none;
}

.toggle-row .toggle {
    position: relative;
    width: var(--toggle-width);
    height: var(--toggle-height);
    background: var(--toggle-off);
    border-radius: calc(var(--toggle-height) / 2);
    transition: background-color .25s ease, box-shadow .25s ease;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.toggle-row .toggle::after {
    content: '';
    position: absolute;
    top: var(--toggle-padding);
    left: var(--toggle-padding);
    width: var(--toggle-knob);
    height: var(--toggle-knob);
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: transform .25s ease;
}

/* move knob and set on color when checked */
.toggle-input:focus-visible + .toggle-row .toggle {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary-color) 35%, white);
}

.toggle-input:checked + .toggle-row .toggle {
    background: var(--toggle-on);
}

.toggle-input:checked + .toggle-row .toggle::after {
    transform: translateX(calc(var(--toggle-width) - var(--toggle-knob) - (var(--toggle-padding) * 2)));
}

/* Generic toggle uses theme secondary as ON color; can be overridden if needed */

/* Size modifiers */
.toggle-row.toggle-sm {
    --toggle-width: 28px;
    --toggle-height: 16px;
    --toggle-knob: 12px;
    --toggle-padding: 2px;
    gap: 0.3rem;
}

.toggle-row.toggle-xs {
    --toggle-width: 24px;
    --toggle-height: 14px;
    --toggle-knob: 10px;
    --toggle-padding: 2px;
    gap: 0.25rem;
}

/* spacing for label text */
.toggle-row .toggle-text { color: var(--text-color); font-size: 0.875rem; }

/* Custom round checkboxes (non-toggle) */
input[type="checkbox"]:not(.toggle-input) {
    -webkit-appearance: none;
    appearance: none;
    inline-size: 18px;
    block-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 999px; /* make circular */
    background: var(--white);
    display: inline-grid;
    place-content: center;
    vertical-align: middle;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input[type="checkbox"]:not(.toggle-input)::before {
    content: "";
    inline-size: 10px;
    block-size: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform .12s ease-in-out;
    background: var(--secondary-color);
}

input[type="checkbox"]:not(.toggle-input):checked {
    border-color: var(--secondary-color);
}

input[type="checkbox"]:not(.toggle-input):checked::before {
    transform: scale(1);
}

input[type="checkbox"]:not(.toggle-input):focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary-color) 35%, white);
}

input[type="checkbox"]:not(.toggle-input):disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Lists */
.list-plain { list-style: none; padding-left: 0; margin: 0; }

/* Category tree */
.cat-branch { padding-left: 0.25rem; }
.cat-children { margin-left: 1rem; border-left: 1px dashed var(--border-color); padding-left: 0.5rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

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

.btn-secondary {
    background-color: var(--text-muted);
    color: var(--white);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Icon-sized button (e.g., for tree toggles) */
.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
}
.btn-icon:hover { background: var(--light-bg); }

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Chip group for compact, wrapping action buttons (e.g., price ranges) */
.chip-group {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Animated gradient border (padding-box/border-box technique) */
@property --border-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes border-angle-rotate { to { --border-angle: 360deg; } }

.btn-animated-border {
    /* configuration */
    --anim-border-width: 3px; /* tweak thickness here */
    --anim-speed: 2s;
    --btn-fill: var(--secondary-color); /* default fill; can be overridden per variant */

    position: relative;
    border: var(--anim-border-width) solid transparent;
    background:
        linear-gradient(var(--btn-fill), var(--btn-fill)) padding-box,
        conic-gradient(
            from var(--border-angle),
            /* use palette variables with sensible fallbacks */
            var(--secondary-color),
            var(--accent-color),
            var(--primary-color),
            var(--brand-tint, var(--secondary-color)),
            var(--secondary-color)
        ) border-box;
    animation: border-angle-rotate var(--anim-speed) linear infinite;
}

/* Thickness and speed modifiers */
.btn-animated-border--hairline { --anim-border-width: 1px; }
.btn-animated-border--thin { --anim-border-width: 2px; }
.btn-animated-border--thick { --anim-border-width: 4px; }
.btn-animated-border--slow { --anim-speed: 3s; }
.btn-animated-border--fast { --anim-speed: 1.2s; }

/* Focus accessibility */
.btn-animated-border:focus-visible {
    outline: 3px solid rgba(0,0,0,0.25);
    outline-offset: 2px;
}

/* Hover fill change specifically for animated-border primary buttons */
.btn-primary.btn-animated-border:hover { --btn-fill: var(--primary-color); }

@media (prefers-reduced-motion: reduce) {
    .btn-animated-border { animation-duration: 4s; }
}

/* Slide-collapse utilities for Alpine transitions */
.collapse-slide { overflow: hidden; }
.collapse-enter { transition: max-height 250ms ease, opacity 200ms ease, transform 250ms ease; }
.collapse-enter-start { max-height: 0; opacity: 0; transform: translateY(-6px); }
.collapse-enter-end { max-height: 200px; opacity: 1; transform: translateY(0); }
.collapse-leave { transition: max-height 200ms ease, opacity 150ms ease, transform 200ms ease; }
.collapse-leave-start { max-height: 200px; opacity: 1; transform: translateY(0); }
.collapse-leave-end { max-height: 0; opacity: 0; transform: translateY(-6px); }

/* Cards */
.card {
    position: relative;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    color: inherit;
}

.add-to-cart-form {
    position: relative;
    z-index: 2;
}

.sticky-col {
    position: sticky;
    top: 1rem;
    align-self: flex-start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    /* Extra minimalistic for sidebar - transparent track */
    scrollbar-color: var(--primary-color) transparent;
}

.sticky-col::-webkit-scrollbar {
    width: 6px;
}

.sticky-col::-webkit-scrollbar-track {
    background: transparent;
}

.filter-sidebar {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 380px;
    border: 1px solid var(--border-color);
}

.filter-header {
    background: linear-gradient(135deg, #972A9F, #7A8EFF);
    padding: 20px 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.filter-header-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-header .cart-panel-close-btn {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    font-size: 24px;
}

.filter-header .cart-panel-close-btn:hover {
    opacity: 0.9;
}

.filter-search {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-search-wrapper {
    position: relative;
}

.filter-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.filter-search input:focus {
    border-color: #972A9F;
}

.filter-section {
    border-bottom: 1px solid #e5e7eb;
}

.filter-section-header {
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    font-family: inherit;
    transition: background 0.2s;
}

.filter-section-header:hover {
    background: #fafafa;
}

.filter-section-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.filter-section.expanded .filter-section-content {
    max-height: 2500px;
}

.filter-section.expanded .filter-section-icon {
    transform: rotate(180deg);
}

.filter-price-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 24px 0 24px;
}

.filter-price-inputs input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.filter-price-inputs input:focus {
    border-color: #972A9F;
}

.filter-price-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 20px 24px;
}

.filter-price-tag {
    padding: 6px 14px;
    border: 1px solid #972A9F;
    background: white;
    color: #972A9F;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-family: inherit;
}

.filter-price-tag:hover {
    background: #972A9F;
    color: white;
}

.filter-price-tag.is-active {
    background: #972A9F;
    color: white;
}

.filter-checkbox-list {
    padding: 0 24px 20px 24px;
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.filter-checkbox-item:last-child {
    margin-bottom: 0;
}

.filter-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #972A9F;
    cursor: pointer;
}

.filter-checkbox-item span {
    font-size: 14px;
    color: #4b5563;
}

.filter-category-list {
    padding: 0 24px 20px 24px;
}

.filter-category-list .cat-branch {
    margin-bottom: 4px;
}

.filter-category-list .cat-branch > .d-flex {
    padding: 8px 0;
    transition: background 0.2s;
    border-radius: 6px;
}

.filter-category-list .cat-branch > .d-flex:hover {
    background: #f9fafb;
}

.filter-category-list .btn-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: color 0.2s;
    min-width: 24px;
}

.filter-category-list .btn-icon:hover {
    color: #972A9F;
}

.filter-category-list input[type="checkbox"] {
    accent-color: #972A9F;
    cursor: pointer;
}

.filter-category-list .cat-name {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.filter-category-list .cat-children {
    margin-left: 28px;
    padding-left: 12px;
    border-left: 2px solid #e5e7eb;
}

.filter-actions {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
}

.filter-btn-apply {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #972A9F, #7A8EFF);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: inherit;
}

.filter-btn-apply:hover {
    transform: scale(1.02);
}

.filter-btn-clear {
    padding: 12px 20px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.filter-btn-clear:hover {
    background: #e5e7eb;
}

@media (max-width: 768px) {
    .filter-sidebar {
        max-width: 100%;
    }
}

.card-img {
    width: 100%;
    height: 260px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Product Card - Improved Design */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

/* Product Image Section */
.product-image-section {
    position: relative;
    background: var(--white);
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.05);
}

.product-placeholder-icon {
    font-size: 3rem;
    color: var(--text-muted);
}

/* Stock Badge */
.product-stock-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: var(--success-color);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    box-shadow: var(--shadow);
    z-index: 2;
    pointer-events: none;
}

.product-stock-badge.out-of-stock {
    background-color: var(--danger-color);
}

/* Card Body */
.product-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding: 20px;
}

/* Brand */
.product-card-brand {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Title */
.product-card-title {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 12px;
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    font-weight: 600;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.product-stars {
    display: flex;
    gap: 4px;
}

.product-stars i {
    font-size: 16px;
}

.star-empty {
    color: #d1d5db;
}

.star-filled {
    color: #fbbf24;
}

.product-review-count {
    font-size: 14px;
    color: var(--text-muted);
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.product-price-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.product-price-original {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-price-current {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.product-price-current.sale {
    color: var(--success-color);
}

/* Add to Cart Button */
.btn-add-to-cart {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.btn-add-to-cart:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.btn-add-to-cart:active {
    transform: scale(0.95);
}

.btn-add-to-cart:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-add-to-cart:disabled:hover {
    transform: none;
}

.btn-add-to-cart i {
    font-size: 18px;
}

/* Product badges & ribbons */
.product-badge-stack {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 3; /* above .stretched-link (z-index:1) */
    pointer-events: none; /* allow card link to be clickable */
}

.product-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1;
    border-radius: 0.25rem;
    color: var(--white);
    box-shadow: var(--shadow);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-badge.badge-top {
    background: var(--warning-color);
    color: #1f1c16; /* better contrast on orange */
}

.product-badge.badge-popular {
    background: var(--secondary-color);
    color: var(--white);
}

.product-ribbon {
    position: absolute;
    top: 0.85rem;
    left: -2.2rem; /* pull left so the band crosses the corner */
    transform: rotate(-45deg);
    padding: 0.25rem 2.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    background: var(--accent-color);
    box-shadow: var(--shadow-lg);
    z-index: 4; /* above other elements */
    pointer-events: none;
    letter-spacing: 0.03em;
}

.product-ribbon-sale { background: var(--accent-color); }
.product-ribbon-popular { background: var(--secondary-color); }
.product-ribbon-offset { top: 2.2rem; }

/* Right-corner variant */
.product-ribbon-right {
    left: auto;
    right: -2.2rem; /* mirror of left pull */
    transform: rotate(45deg);
}

/* When a ribbon is present, nudge the badge stack a bit lower */
.product-badge-stack.with-ribbon {
    top: 1.9rem;
}

.product-badge-stack.two-ribbons {
    top: 3.3rem;
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.hero h1 {
    margin-bottom: 1rem;
    font-size: 3rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Features */
.feature {
    text-align: center;
    padding: 2rem 1rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: var(--secondary-color);
}

.feature h5 {
    margin-bottom: 1rem;
}

.feature p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer h5, .footer h6 {
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
}

.footer-mali-czarodzieje {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 40px 60px 20px 60px;
}

.footer-main-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 60px;
    align-items: center;
    margin-bottom: 30px;
}

.footer-payment-methods {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 460px;
}

.footer-payment-methods img {
    width: 100%;
    height: auto;
    display: block;
}

.footer-navigation {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-nav-links {
    display: flex;
    gap: 40px;
    color: var(--white);
    flex-wrap: wrap;
}

.footer-nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, opacity 0.3s;
}

.footer-nav-links a:hover {
    border-bottom-color: var(--accent-color);
    opacity: 0.9;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--white);
    align-items: center;
}

.footer-social h3 {
    font-size: 18px;
    margin: 0 0 8px 0;
    font-weight: 600;
    color: var(--white);
}

.footer-social-icons {
    display: flex;
    gap: 12px;
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.footer-social-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.footer-social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--white);
    font-size: 13px;
}

.footer-credits {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 1024px) {
    .footer-mali-czarodzieje {
        padding: 30px 40px 20px 40px;
    }

    .footer-main-content {
        gap: 40px;
    }

    .footer-nav-links {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .footer-mali-czarodzieje {
        padding: 30px 20px 20px 20px;
    }

    .footer-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-payment-methods {
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-nav-links {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .footer-nav-links a {
        padding: 4px 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-credits {
        flex-direction: column;
        gap: 10px;
    }
}

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 0;
    margin-top: 1rem;
}

/* Footer Payments (Przelewy24) */
.footer-payments { margin-top: 1rem; }
.footer-payments-title { color: var(--white); margin-bottom: 0.75rem; font-weight: 600; }
/* Removed dynamic payment logo grid; using single banner image */

/* Single banner variant */
.payment-banner-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: inline-block;
    max-width: 100%;
}
.payment-banner {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain; /* ensures image scales nicely without cropping */
}
/* No responsive rules needed for removed .payment-logos grid */

.newsletter-input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
}

.newsletter-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-btn:hover {
    background-color: var(--accent-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--white); }
.text-strike { text-decoration: line-through; }

/* Images */
.img-fluid { max-width: 100%; height: auto; display: block; }

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

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-2-5 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }
.max-w-220 { max-width: 220px; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }
.flex-wrap { flex-wrap: wrap; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }

/* Plain button (unstyled, for collapsible headers) */
.btn-plain {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: inherit;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* Generic placeholder block and aspect ratios */
.placeholder {
    background: repeating-linear-gradient(45deg, #f3f3f3, #f3f3f3 10px, #ececec 10px, #ececec 20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}
.ratio-1x1 { aspect-ratio: 1 / 1; width: 100%; }
.gap-3 { gap: 1rem; }
.max-h-220 { max-height: 220px; overflow: auto; }
.scroll-box { border: 1px solid var(--border-color); border-radius: var(--border-radius); }

.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    color: var(--white);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--border-radius);
}

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

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

.badge-accent {
    background-color: var(--accent-color);
}

.badge-muted {
    background-color: var(--text-muted);
}

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

.badge-soft-success {
    background-color: #e8fff1;
    color: #137a2a;
    border: 1px solid #bfe7cd;
}

.badge-soft-danger {
    background-color: #fff5f5;
    color: #b42318;
    border: 1px solid #f3c0bc;
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
}

.dropdown-menu-end {
    left: auto;
    right: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--text-color);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
    border: none;
}

/* Search Components */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background-color: var(--light-bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Cart Components */
.cart-container {
    position: relative;
}

.cart-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 350px;
    z-index: 1000;
}

.cart-dropdown .cart-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-dropdown .cart-header h6 {
    margin: 0;
}

.cart-dropdown .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-dropdown .btn-close:hover {
    color: var(--text-color);
}

.cart-dropdown .cart-body {
    max-height: 300px;
    overflow-y: auto;
}

.cart-dropdown .cart-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-dropdown .cart-item:last-child {
    border-bottom: none;
}

.cart-dropdown .cart-item-info {
    flex: 1;
}

.cart-dropdown .cart-item-info span {
    display: block;
    font-weight: 500;
}

.cart-dropdown .cart-item-info small {
    color: var(--text-muted);
}

.cart-dropdown .cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-dropdown .cart-item-controls button {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.cart-dropdown .cart-item-controls button:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.cart-dropdown .cart-item-controls span {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.cart-dropdown .empty-cart {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.cart-dropdown .cart-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

.cart-dropdown .cart-total {
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

/* Mobile Navigation */
.mobile-nav {
    background-color: var(--primary-color);
    padding: 1rem;
    margin-top: 1rem;
}

.mobile-nav .navbar-nav {
    flex-direction: column;
    gap: 0;
}

.mobile-nav .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav .nav-link:last-child {
    border-bottom: none;
}

.mobile-nav hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 0.5rem 0;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-item i {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Newsletter */
.newsletter-section {
    max-width: 500px;
}

.newsletter-help {
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-message {
    font-size: 0.875rem;
}

/* Payment Methods */
.payment-methods {
    text-align: center;
}

.payment-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.payment-icons i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.payment-icons i:hover {
    color: var(--white);
}

/* Footer Legal */
.footer-legal {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--white);
}

.copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Border utilities */
.border-top {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* HTMX Indicators */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: block; }
.htmx-request.htmx-indicator { display: block; }

/* Infinite Scroll */
.infinite-scroll-loader {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
}

/* Skeleton placeholders for infinite scroll */
.infinite-scroll-indicator { padding: 0.5rem 0; }
.loader-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}
.loader-ring {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: loader-rotate 0.9s linear infinite;
}
.loader-text { color: var(--text-muted); }

@keyframes loader-rotate {
    to { transform: rotate(360deg); }
}
.skeleton {
    display: block;
    background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.12) 37%, rgba(0,0,0,0.06) 63%);
    background-size: 400% 100%;
    border-radius: var(--border-radius);
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.skeleton-line { height: 12px; margin: 10px 0; }
.skeleton-img { width: 100%; aspect-ratio: 1 / 1; }
.skeleton-w-90 { width: 90%; }
.skeleton-w-60 { width: 60%; }
.skeleton-w-50 { width: 50%; }

@keyframes skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; background: rgba(0,0,0,0.08); }
}

/* Notification System */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

/* Alpine.js Transitions */
.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-out {
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.ease-in {
    transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.duration-150 {
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-toggler {
        display: block;
    }
    
    .navbar-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    
    .navbar-nav.show {
        display: flex;
    }
    
    .search-form {
        max-width: 100%;
        margin-top: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input,
    .newsletter-btn {
        border-radius: var(--border-radius);
    }
    
    .cart-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .footer-legal {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .payment-methods {
        text-align: center;
        margin-top: 2rem;
    }
}

/* Carousel */
.hero-carousel {
    margin-bottom: 2rem;
}

.hero-carousel .carousel-viewport {
    position: relative;
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 0; /* remove inner padding so slides are full-width */
}

.carousel-track {
    display: flex;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 auto; /* width will be set inline per slide */
}

.carousel-image {
    width: 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
}

.carousel-content {
    padding: 1rem 1.5rem;
}

.carousel-title {
    margin-bottom: 0.75rem;
}

.carousel-text {
    color: var(--text-muted);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.96);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.hero-carousel .carousel-viewport:hover .carousel-btn,
.carousel-btn:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.carousel-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

@media (hover: none) {
    .hero-carousel .carousel-viewport .carousel-btn {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-50%) scale(1);
    }
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--secondary-color);
}

@media (max-width: 768px) {
    .carousel-image {
        min-height: 260px;
    }
    .carousel-content {
        padding: 1rem 0.5rem;
    }
}

.carousel-dot {
    width: 10px;
    height: 10px;
}

.container {
    width: 90%;
    /* Make margins (outer whitespace) much smaller by tying to viewport width (no fixed cap) */
    max-width: 98vw;
    padding-left: 0.5rem; /* was ~0.75rem */
    padding-right: 0.5rem;
}

/* Full-width hero container: remove default horizontal padding only here */
.hero-container {
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 1400px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Floating Cart Button */
.floating-cart {
    position: fixed;
    right: clamp(8px, 1.8vw, 18px);
    top: 70%;
    transform: translateY(-50%);
    z-index: 1040; /* above content, below modals if any */
    pointer-events: none; /* avoid blocking underlying content */
}

.floating-cart-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--secondary-color);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    pointer-events: auto; /* clickable while wrapper stays pass-through */
}

.floating-cart-btn:hover {
    background: var(--primary-color);
    transform: scale(1.03);
}

.floating-cart-btn:focus-visible {
    outline: 3px solid rgba(255,255,255,0.9);
    outline-offset: 2px;
}

.floating-cart-btn i {
    font-size: 1.25rem;
}

.floating-cart-badge {
    position: absolute;
    bottom: -2px;
    left: -2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

/* Animated spinner border when cart has items */
.floating-cart-btn.has-items::before {
    content: "";
    position: absolute;
    inset: -3px; /* ring extends slightly outside the button */
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--white), var(--accent-color), var(--white));
    /* show only a ring, not a filled circle */
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
    animation: floating-cart-spin 1s linear infinite;
    pointer-events: none; /* don't block clicks */
}

@keyframes floating-cart-spin {
    to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
    .floating-cart-btn.has-items::before { animation-duration: 2.5s; }
}

@media (max-width: 768px) {
    .floating-cart {
        top: auto;
        bottom: 16px;
        transform: none;
    }
    .floating-cart-btn:hover {
        transform: none;
    }
}

/* Cart panel overlay and drawer */
.cart-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
}

.cart-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: opacity 0.3s;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1110;
}

@keyframes cart-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-panel.opening {
    animation: cart-slide-in 200ms ease-out;
}

@keyframes cart-slide-out {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

.cart-panel.closing {
    animation: cart-slide-out 200ms ease-in forwards;
}

/* Fade backdrop when closing */
.cart-panel-overlay.closing .cart-backdrop {
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-panel-header,
.cart-panel-footer {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-panel-footer {
    border-bottom: 0;
    border-top: 1px solid var(--border-color);
}

.cart-panel-header h6 {
    margin: 0;
    font-size: 1rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
}

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

.cart-panel-body {
    padding: 0.5rem 1rem;
    overflow-y: auto;
    flex: 1;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-row:last-child { border-bottom: 0; }

.cart-item-main { min-width: 0; flex: 1; }
.cart-item-name { display: block; max-width: 100%; }
.text-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { color: var(--text-muted); }

.cart-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.icon-btn {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 28px; height: 28px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn:hover {
    background: #eef2f7;
}

.icon-btn.danger {
    color: var(--danger-color);
    border-color: #ffd1d1;
    background: #fff5f5;
}

.icon-btn.danger:hover {
    background: #ffe9e9;
}

.cart-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background 0.2s;
}

.cart-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cart-header-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    background: linear-gradient(135deg, #faf5fb, #f5f7ff);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.cart-item-content {
    display: flex;
    gap: 14px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #972A9F;
    margin-bottom: 12px;
}

.cart-item-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cart-item-quantity {
    display: flex;
    gap: 4px;
    align-items: center;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #972A9F;
    background: white;
    color: #972A9F;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background: #972A9F;
    color: white;
}

.cart-qty-display {
    width: 40px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.cart-remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #ef4444;
    background: white;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s;
}

.cart-remove-btn:hover {
    background: #ef4444;
    color: white;
}

.cart-footer {
    border-top: 2px solid #e5e7eb;
    padding: 24px;
    background: white;
}

.cart-total {
    background: linear-gradient(135deg, #faf5fb, #f5f7ff);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.cart-total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #972A9F;
}

.cart-checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #972A9F, #7A8EFF);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(151, 42, 159, 0.3);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    text-decoration: none;
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(151, 42, 159, 0.4);
}

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.cart-empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #faf5fb, #f5f7ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #972A9F;
}

.cart-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.cart-empty-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.cart-items::-webkit-scrollbar { width: 6px; }
.cart-items::-webkit-scrollbar-track { background: #f3f4f6; }
.cart-items::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.cart-items::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

@media (max-width: 480px) {
    .cart-panel {
        max-width: 100%;
    }
}

/* Site Search */
.site-search-container {
    /* Full-width band with an overlapped background element */
    position: relative;
    margin-bottom: 15px;
    width: 100%;
    /* Central content max width (responsive) */
    --search-max-width: clamp(540px, 60vw, 980px);
    /* Customizable side band colors + opacity */
    --search-band-left: var(--secondary-color);
    --search-band-right: var(--primary-color);
    --search-band-opacity: 0.12;
}

.site-search-band {
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    background: linear-gradient(90deg, var(--search-band-left), var(--search-band-right));
    opacity: var(--search-band-opacity);
}

/* Keep the center content constrained and centered */
.site-search-container > .row {
max-width: var(--search-max-width);
margin-left: auto !important;
margin-right: auto !important;
position: relative;
z-index: 1; /* sit above the background band */
/* remove gutters inside this row so the band meets search edges */
--bs-gutter-x: 0;
--bs-gutter-y: 0;
}

.site-search-container .col-12 { padding-left: 0; padding-right: 0; }
.site-search-form { width: 100%; }

/* Preset color themes for the colorful side bands (no inline styles) */
.site-search--brand {
--search-band-left: var(--secondary-color);
--search-band-right: var(--primary-color);
--search-band-opacity: 0.45;
    --search-band-left: var(--secondary-color);
    --search-band-right: var(--primary-color);
    --search-band-opacity: 0.45;
}

.site-search--accent {
    --search-band-left: var(--accent-color);
    --search-band-right: var(--accent-color);
    --search-band-opacity: 0.16;
}

.site-search {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 9999px; /* fully rounded pill */
    box-shadow: var(--shadow);
    transition: border-color .2s ease, box-shadow .2s ease;
    overflow: hidden;
}

/* Accent border when has content (not on focus) */
@supports selector(:has(*)) {
  .site-search:has(.site-search-input:not(:placeholder-shown)) { border-color: var(--accent-color); box-shadow: 0 0 0 2px var(--accent-color), var(--shadow); }
}

.site-search-input {
    flex: 1;
    border: 0;
    padding: 0.9rem 1.25rem;
    outline: none;
    font-size: 1rem;
}

.site-search-input:placeholder-shown { text-align: center; }
.site-search-input::placeholder { text-align: center; }

.site-search-input::placeholder { color: var(--text-muted); }

/* Checkout: Shipping options */
.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.shipping-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.shipping-option img { height: 24px; }
.shipping-option.is-disabled { opacity: 0.6; pointer-events: none; }
.shipping-pickup { margin-top: 0.5rem; }

.site-search-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: 0;
    padding: 0 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Category Tiles */
.home-categories { margin: 1rem 0 2rem; }
.category-tiles { align-items: stretch; gap: 0.75rem; }
.cat-col { display: flex; }
  
  /* When search is placed on the hero/sunburst, hide the decorative band */
  .sunburst .site-search-band { display: none; }
  .category-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: clamp(140px, 22vw, 220px);
    border-radius: var(--border-radius);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
}
/* Inward brand-tinted shadow overlay */
.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--secondary-color) 15%, transparent), transparent 60%),
      linear-gradient(-135deg, color-mix(in srgb, var(--primary-color) 15%, transparent), transparent 60%);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--primary-color) 30%, transparent),
      inset 0 18px 40px rgba(0,0,0,0.22),
      inset 0 -18px 40px rgba(0,0,0,0.18),
      inset 0 0 60px rgba(0,0,0,0.12);
    pointer-events: none;
}
.category-name {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-weight: 800;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    letter-spacing: 0.3px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.category-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.category-tile:focus-visible { outline: 3px solid color-mix(in srgb, var(--secondary-color) 60%, white); outline-offset: 3px; }
/* Demo background images (replace with real assets as needed) */
.tile-1 { background-image: url('../images/toys_demo1.jpg'); }
.tile-2 { background-image: url('../images/toys_demo2.jpg'); }
.tile-3 { background-image: url('../images/toys_demo3.jpg'); }
.tile-4 { background-image: url('../images/toys_demo2.jpg'); }
.tile-5 { background-image: url('../images/toys_demo1.jpg'); }

@media (max-width: 576px) {
    .site-search { max-width: 100%; }
    .site-search-input { padding: 0.75rem 1rem; }
}

/* Search Suggestions */
.suggestions-anchor {
    position: relative;
}

.suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 30;
    max-height: 420px;
    overflow-y: auto;
}

.suggestion-section { padding: 0.25rem 0; }
.suggestion-section + .suggestion-section { border-top: 1px solid var(--border-color); }
.suggestion-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.75rem;
}

.suggestions-list { list-style: none; margin: 0; padding: 0; }
.suggestion-item a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
}
.suggestion-item a:hover { background: #f7f9fc; }
.suggestion-item.is-active a,
.suggestion-item a:focus { background: #eef2f7; outline: none; }
.suggestion-primary { font-weight: 600; }
.suggestion-meta { color: var(--text-muted); font-size: 0.9rem; }
strong.match { font-weight: 800; }

.suggestions-footer { border-top: 1px solid var(--border-color); }
.suggestions-all {
    display: block;
    padding: 0.6rem 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}
.suggestions-all:hover { text-decoration: underline; }

/* Product Gallery */
.product-gallery { margin-bottom: 1rem; }
.product-gallery-main {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}
.product-gallery-image {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    border-radius: calc(var(--border-radius) - 1px);
    background: var(--white);
    cursor: zoom-in;
}
.product-gallery-thumbs { margin-top: 0.5rem; }
.thumbs-row { row-gap: 0.5rem; }
.thumb-btn {
    display: block;
    width: 100%;
    background: none;
    border: 2px solid transparent;
    padding: 4px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}
.thumb-btn:hover { border-color: var(--secondary-color); }
.thumb-btn.is-active { border-color: var(--primary-color); box-shadow: var(--shadow); }
.thumb-img {
    width: 100%;
    height: 72px;
    object-fit: cover;
}
.product-gallery.placeholder .product-gallery-main { background: repeating-linear-gradient(45deg, #f3f3f3, #f3f3f3 10px, #ececec 10px, #ececec 20px); }

/* Thumbnails Carousel */
.product-gallery-thumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* keep in sync with .thumbs-track */
}

.thumbs-viewport {
    flex: 1 1 auto;
    overflow-x: auto;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}
.thumbs-viewport::-webkit-scrollbar { display: none; }

.thumbs-track {
    display: flex;
    align-items: stretch;
    gap: 0.5rem; /* 8px; used in JS */
}

.thumb-item { flex: 0 0 auto; width: 96px;}
@media (max-width: 576px) { .thumb-item { width: 80px; } }
@media (min-width: 992px) { .thumb-item { width: 104px; } }

.thumbs-nav {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--white);
    color: var(--text-color);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 20px;
    user-select: none;
}
.thumbs-nav:hover { background: var(--light-bg); }

/* =====================================================
   Product Purchase Card - Sticky Panel
   ===================================================== */
.product-purchase-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    border: 1px solid #f3f4f6;
}

/* Gradient Header */
.purchase-card-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 24px;
    color: white;
}

.purchase-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.purchase-header-title {
    flex: 1;
}

.purchase-product-title {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
}

.purchase-product-sku {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.wishlist-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.wishlist-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wishlist-btn.active {
    background: rgba(255, 255, 255, 0.4);
}

.wishlist-icon {
    width: 24px;
    height: 24px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    transition: fill 0.3s ease;
}

.wishlist-btn.active .wishlist-icon {
    fill: white;
}

/* Purchase Card Body */
.purchase-card-body {
    padding: 32px;
}

/* Price Section */
.purchase-price-section {
    text-align: center;
    padding: 48px 0;
}

.purchase-price {
    font-size: 48px;
    color: #111827;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.purchase-price-old {
    font-size: 24px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 12px;
}

.purchase-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #059669;
}

.purchase-stock-status.out-of-stock {
    color: var(--danger-color);
}

.stock-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.stock-dot.out-of-stock {
    background: var(--danger-color);
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Quantity Section */
.purchase-quantity-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.purchase-quantity-label {
    color: #374151;
    font-size: 16px;
}

.purchase-quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.purchase-quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.purchase-quantity-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.purchase-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.purchase-quantity-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
}

.purchase-quantity-value {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    min-width: 32px;
    text-align: center;
}

/* Hidden quantity input for form submission */
.purchase-quantity-input {
    display: none;
}

/* Add to Cart Button */
.purchase-add-to-cart-btn {
    width: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.purchase-add-to-cart-btn:hover:not(:disabled) {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(1.02);
}

.purchase-add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.purchase-cart-icon {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
    fill: none;
    transition: transform 0.3s ease;
}

.purchase-add-to-cart-btn:hover:not(:disabled) .purchase-cart-icon {
    transform: scale(1.1);
}

/* Checkout Button */
.purchase-checkout-btn {
    width: 100%;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.purchase-checkout-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Trust Signals */
.purchase-trust-signals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.purchase-trust-item {
    text-align: center;
}

.purchase-trust-icon-wrapper {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-trust-icon-wrapper.delivery {
    background: rgba(122, 142, 255, 0.1);
}

.purchase-trust-icon-wrapper.returns {
    background: rgba(151, 42, 159, 0.1);
}

.purchase-trust-icon-wrapper.warranty {
    background: rgba(246, 166, 255, 0.2);
}

.purchase-trust-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    fill: none;
}

.purchase-trust-icon.delivery {
    stroke: var(--secondary-color);
}

.purchase-trust-icon.returns {
    stroke: var(--primary-color);
}

.purchase-trust-icon.warranty {
    stroke: var(--primary-color);
}

.purchase-trust-text {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 640px) {
    .purchase-product-title {
        font-size: 20px;
    }

    .purchase-price {
        font-size: 40px;
    }

    .purchase-card-body {
        padding: 24px;
    }

    .purchase-add-to-cart-btn {
        font-size: 16px;
        padding: 16px;
    }
}

@media (min-width: 1024px) {
    .purchase-product-title {
        font-size: 32px;
    }

    .purchase-card-body {
        padding: 48px 32px;
    }

    .purchase-price {
        font-size: 56px;
    }
}

/* Legacy Purchase Panel / Quantity control (kept for compatibility) */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--white);
}

.qty-input {
    width: 64px;
    text-align: center;
    border: none;
    padding: 0.25rem 0.5rem;
    outline: none;
}
.qty-input:disabled { background: #f5f5f5; color: var(--text-muted); }

.qty-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
}
.qty-btn:hover { background: #eef2f7; }
.qty-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.price-current { font-size: 1.25rem; color: var(--primary-color); font-weight: 700; }

/* Product Grid main image */
.card .card-img {
height: 180px;
display: flex;
align-items: center;
justify-content: center;
background: var(--white);
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
overflow: hidden;
}
.card .card-img > span {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
color: var(--muted-color);
}
.card .product-card-img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
object-position: center center;
background: transparent;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1050;
}
.lightbox[x-cloak=""], .lightbox[x-cloak] { display: none !important; }
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.lightbox-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox-image {
    max-width: min(96vw, 1400px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    background: var(--white);
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #000;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #000;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

  /* Profile Orders: compact items and interactions */
  .clickable { cursor: pointer; }
  .clickable:hover strong { text-decoration: underline; }
  .order-items-compact { font-size: 0.85rem; }
  .order-item-row { padding: 0.25rem 0.25rem; border-bottom: 1px solid var(--border-color); }
  .order-item-row:last-child { border-bottom: 0; }
  .order-item-img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; display: block; }
  .order-item-img-placeholder { width: 32px; height: 32px; background: var(--light-bg); border: 1px solid var(--border-color); border-radius: 4px; }
  .order-section-separator { border-top: 1px solid var(--border-color); margin-top: 0.5rem; padding-top: 0.5rem; }
  .order-list > li { padding: 0.5rem 0; border-top: 1px solid var(--border-color); }
  .order-list > li:first-child { border-top: 0; }

  /* Sunburst Animation (decorative background) */
  .sunburst {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden; /* mask rays to the band */
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    /* ray geometry */
    --ray-thickness: clamp(24px, 4vmin, 90px);
    --ray-length: 120vmax;
  }
  
  .sunburst .outer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vmax;
    height: 200vmax;
    transform-origin: center center;
    /* ensure centered even when animations are disabled */
    transform: translate(-50%, -50%);
    animation: sunburst-rotate 12s linear infinite;
    /* Option C: we now render rays via ::before; hide triangle markup */
    display: none;
  }

  /* Option C — repeating conic gradient rays */
  .sunburst::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 200vmax;
    height: 200vmax;
    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: center;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: repeating-conic-gradient(
      from 0deg at 50% 50%,
      var(--primary-color) 0 1.5deg,
      transparent 1.5deg 6deg
    );
    animation: sunburst-rotate 36s linear infinite;
  }
  /* Second rotating layer for richer motion */
  .sunburst::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 220vmax;
    height: 220vmax;
    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: center;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: repeating-conic-gradient(
      from 0.75deg at 50% 50%,
      var(--secondary-color) 0 1deg,
      transparent 1deg 5deg
    );
    opacity: 0.35;
    animation: sunburst-rotate 60s linear infinite reverse;
  }
  /* Center the search container above the sunburst */
  .sunburst .site-search-container {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0 1.25rem;
    z-index: 1;
  }
  
  .sunburst b {
    position: absolute;
    /* Apex of triangle is at (left, top + var(--ray-thickness)) */
    top: calc(50% - var(--ray-thickness));
    left: 50%;
    display: block;
    width: 0;
    height: 0;
    border-width: var(--ray-thickness) var(--ray-length) var(--ray-thickness) 0;
    margin: 0;
    border-color: transparent var(--primary-color);
    border-style: solid;
    /* rotate around the triangle apex */
    transform-origin: 0 var(--ray-thickness);
  }
  
  .sunburst b:nth-child(1)  { transform: rotate(20deg); }
  .sunburst b:nth-child(2)  { transform: rotate(40deg); }
  .sunburst b:nth-child(3)  { transform: rotate(60deg); }
  .sunburst b:nth-child(4)  { transform: rotate(80deg); }
  .sunburst b:nth-child(5)  { transform: rotate(100deg); }
  .sunburst b:nth-child(6)  { transform: rotate(120deg); }
  .sunburst b:nth-child(7)  { transform: rotate(140deg); }
  .sunburst b:nth-child(8)  { transform: rotate(160deg); }
  .sunburst b:nth-child(9)  { transform: rotate(180deg); }
  .sunburst b:nth-child(10) { transform: rotate(200deg); }
  
  @keyframes sunburst-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
  }
  
  @media (prefers-reduced-motion: reduce) {
    .sunburst .outer { animation: none; }
    .sunburst::before { animation: none; }
    .sunburst::after { animation: none; }
  }

/* Breadcrumbs */
.breadcrumbs {
    margin: 0 0 1rem 0;
}
.breadcrumbs-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}
.breadcrumbs-item {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
}
.breadcrumbs-item:not(:last-child)::after {
    content: "›";
    color: var(--text-muted);
    margin: 0 0.5rem;
}
.breadcrumbs-link {
    color: var(--secondary-color);
    max-width: 220px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.breadcrumbs-link:hover { color: var(--primary-color); text-decoration: underline; }
.breadcrumbs-current {
    color: var(--text-color);
    font-weight: 600;
    max-width: 260px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product Description Styling */
.product-description {
    line-height: 1.6;
}

.product-description p {
    margin-bottom: 1rem;
}

.product-description ul,
.product-description ol {
    margin-left: 0;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.product-description li {
    margin-bottom: 0.5rem;
}

.product-description li p {
    margin-bottom: 0.25rem;
}

/* Override inline text-align for list containers to ensure proper list rendering */
.product-description ul[style*="text-align"],
.product-description ol[style*="text-align"] {
    text-align: left !important;
}

/* Hero Section - New Landing Page Design */
.hero-section {
    padding: 4rem 1.5rem;
}

.hero-container {
    max-width: 1024px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #972A9F 0%, #7A8EFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 2rem;
}

/* Hero Search Bar */
.search-wrapper {
    max-width: 768px;
    margin: 0 auto;
    position: relative;
}

.hero-search-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    transition: all 0.3s;
}

.hero-search-container:focus-within {
    animation: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    outline: 4px solid rgba(246, 166, 255, 0.5);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1), 0 0 0 8px rgba(246, 166, 255, 0.3);
    }
}

.hero-search-form {
    display: flex;
    align-items: center;
    padding: 0.75rem;
}

.hero-search-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 0.75rem;
    color: #972A9F;
    flex-shrink: 0;
}

.hero-search-input {
    flex: 1;
    padding: 0.75rem 0.5rem;
    font-size: 1.125rem;
    border: none;
    outline: none;
    color: #111827;
}

.hero-search-input::placeholder {
    color: #9CA3AF;
}

.hero-search-btn {
    background: linear-gradient(to right, #972A9F, #7A8EFF);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.hero-search-btn:hover {
    opacity: 0.9;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

 /* Search suggestions dropdown for hero */
 .search-wrapper #home-suggestions {
     position: absolute;
     top: calc(100% + 6px);
     left: 0;
     right: 0;
     z-index: 2000;
     max-height: 420px;
     overflow-y: auto;
     background: var(--white);
     border: 1px solid var(--border-color);
     border-radius: 0 0 1rem 1rem;
     box-shadow: var(--shadow-lg);
 }
 
 /* Style the inner .suggestions div that HTMX injects */
 .search-wrapper #home-suggestions .suggestions {
     position: static;
     top: auto;
     left: auto;
     right: auto;
     background: transparent;
     border: 0;
     border-radius: 0;
     box-shadow: none;
     max-height: none;
     overflow: visible;
 }

/* Carousel Styling */
.carousel-container {
    max-width: 1280px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.carousel-container .carousel {
    min-height: clamp(260px, 42vh, 520px);
}

.carousel {
    position: relative;
    border-radius: 1rem;
    padding: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    height: auto;
}

.carousel-slide {
    position: absolute;
    inset: 0;
}

.carousel-slide-1 {
    background: linear-gradient(135deg, #972A9F 0%, #7A8EFF 100%);
}

.carousel-slide-2 {
    background: linear-gradient(135deg, #7A8EFF 0%, #F6A6FF 100%);
}

.carousel-slide-3 {
    background: linear-gradient(135deg, #F6A6FF 0%, #972A9F 100%);
}

.carousel-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    height: 100%;
    padding: 2rem 3rem;
}

@media (min-width: 1024px) {
    .carousel-content {
        padding: 2rem 4rem;
    }
}

.carousel-text {
    color: white;
    z-index: 10;
}

.carousel-title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.carousel-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.carousel-button {
    background-color: white;
    color: #1f2937;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.carousel-button:hover {
    transform: scale(1.05);
}

.carousel-image-wrapper {
    display: block;
}

.carousel-image {
    border-radius: 0.75rem;
    width: 100%;
    height: 16rem;
    object-fit: cover;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 50%;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 20;
    transition: background-color 0.2s;
}

.carousel-arrow:hover {
    background-color: white;
}

.carousel-arrow-left {
    left: 1rem;
}

.carousel-arrow-right {
    right: 1rem;
}

.carousel-arrow svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    color: #972A9F;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dot.active {
    background-color: white;
    width: 2rem;
}

@media (max-width: 768px) {
    .carousel-content {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .carousel-image-wrapper {
        display: none;
    }

    .carousel-title {
        font-size: 1.875rem;
    }

    .carousel-subtitle {
        font-size: 1.125rem;
    }
}

/* Age Group Filters */
.age-filters {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    align-items: center;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

.age-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4B5563;
}

.age-icon {
    width: 1rem;
    height: 1rem;
}

.age-btn {
    background: white;
    border: 1px solid #E5E7EB;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.age-btn:hover {
    background: #F3F4F6;
    transform: scale(1.05);
    border-color: #D1D5DB;
    color: #374151;
}

/* Categories Section */
.categories-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.category-card {
    background: white;
    border: 1px solid #F3F4F6;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.category-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.category-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #F6A6FF 0%, #7A8EFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    transition: transform 0.3s;
}

.category-card:hover .category-icon-wrapper {
    transform: scale(1.1);
}

.category-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.category-title {
    font-size: 0.875rem;
    color: #374151;
    text-align: center;
}

/* Footer Gradient */
.footer-gradient {
    background: linear-gradient(135deg, #972A9F 0%, #7A8EFF 100%);
}

/* Responsive adjustments for hero */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-search-input {
        font-size: 1rem;
    }

    .hero-search-btn {
        padding: 0.75rem 1.5rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hero Search Wrapper (for wizard positioning) */
/* (uses existing .search-wrapper from hero section; wizard is positioned, not part of layout) */
.search-wrapper {
    overflow: visible;
}

/* Floating Wizard Mascot */
.wizard-floating {
    display: none;
    position: absolute;
    top: 50%;
    left: 65%;
    margin-left: 400px; /* 768px/2 + 16px gap */
    transform: translateY(-50%);
    width: 160px;
    z-index: 20;
    filter: drop-shadow(0 15px 30px rgba(151, 42, 159, 0.3));
    cursor: pointer;
}

.wizard-floating__inner {
    animation: floatRotate 4s ease-in-out infinite;
    transition: transform 0.3s ease;
    will-change: transform;
}

.wizard-floating:hover .wizard-floating__inner {
    animation-play-state: paused;
    transform: scale(1.1) translateY(-10px);
}

.wizard-floating img,
.wizard-floating svg {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes floatRotate {
    0%, 100% { 
        transform: translateY(0px) rotate(-5deg); 
    }
    50% { 
        transform: translateY(-15px) rotate(5deg); 
    }
}

/* Floating wizard responsive adjustments */
@media (min-width: 1350px) {
    .wizard-floating {
        display: block;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .wizard-floating__inner {
        animation: none;
    }
    
    .wizard-floating:hover .wizard-floating__inner {
        transform: scale(1.05);
    }
}
