/* SitePack theme skeleton */

* {
    box-sizing: border-box;
}

body {
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
}

h1 {
    font-size: 2rem;
    font-weight: 500;
}

img {
    max-width: 100%;
}

a {
    color: var(--link-color);
}

a:hover, a:active, a:focus {
    text-decoration: var(--link-text-decoration);
    color: var(--link-active-color);
}

.btn:hover, .btn:active, .btn:focus {
    text-decoration: none !important;
}

header {
    background: var(--header-background-color);
    padding: 1rem 0;
    width: 100%;
    position: relative;
    z-index: 1000;
}

header nav {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

nav ul li a.btn-primary:hover, nav ul li a.btn-primary:focus, nav ul li a.btn-primary:active {
    filter: brightness(90%);
    color: var(--main-color-text);
    background-color: var(--main-color);
    border-color: var(--main-color);
}

.brand {
    flex-shrink: 0;
    margin-right: auto;
}

.brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
}

.brand img {
    height: 40px;
    width: auto;
}

.brand .site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--header-text-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 24px;
    margin: 2px 0;
    background-color: var(--header-text-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-link {
    position: relative;
}

.nav-link a {
    text-decoration: none;
    color: var(--header-text-color);
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
}

.nav-link a:hover {
    color: var(--main-color);
    background-color: var(--surface-color);
}

.nav-icon .sitepack-shopping-cart-trigger svg {
    color: var(--header-text-color);
}

header .nav-search-icon {
    width: 50px;

    @media (max-width: 768px) {
        width: 30px;
    }
}

header .nav-shopping-cart {
    width: 50px;
}

/* Dropdown Styles */
/* The menu is absolutely positioned inside its (narrow) parent li, so a shrink-to-fit
   width would be capped at that li's width and long labels would run out of the box.
   max-content sizes it to its widest item instead; very long labels wrap at max-width. */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: 20rem;
    background: var(--header-background-color);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--shadow-color) 8%, transparent);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu li a {
    padding: 0.5rem 1rem;
    color: var(--header-text-color);
    display: block;
    white-space: normal;
    font-weight: 400;
    border-radius: 0;
}

.dropdown-menu li a:hover {
    background-color: color-mix(in srgb, var(--header-text-color) 12%, transparent);
    color: var(--header-text-color);
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

main {
    padding: 0;
    margin: 0 auto;
    background-color: var(--content-background-color);
}

/* Shared content wrapper: keeps text/blocks aligned to the same width and
   gutter as the header and grids, on every template. */
.container-element {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* The footer is composed of site-configured elements (sitepack_footer()); its background,
   spacing and colours come from those elements, so the theme intentionally adds no footer
   styling here (avoids duplicate/conflicting rules such as a double border-top). */

#copyright {
    margin-top: 0;
    padding: 1.5rem;
    font-size: 0.85rem;
    color: var(--copyright-text-color);
    background-color: var(--copyright-background-color);
}

#copyright p {
    margin: 0;
    line-height: 1.6;
}

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

#copyright a:hover {
    color: var(--main-color);
    text-decoration: underline;
}

.sitemap section {
    max-width: var(--container-width);
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.sitemap h1 {
    max-width: var(--container-width);
    margin: 0 auto 1rem;
    padding: 0 1.5rem;
}

.sitemap h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.sitemap ul {
    list-style: none;
    padding-left: 0;
}

.sitemap li {
    margin-bottom: 0.5rem;
}

.sitemap a {
    text-decoration: none;
    color: var(--link-color);
}

.sitemap a:hover {
    text-decoration: var(--link-text-decoration);
    color: var(--link-active-color);
}

.product-grid, .products-wrapper, .category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: var(--container-width);
    margin: 1rem auto;
    padding: 0 1.5rem;
}

/* Category Layout Sidebar + Grid (width and gutter come from .container-element) */
.category-main-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin: 1.5rem auto 2rem;
}

.category-sidebar {
    flex: 0 0 280px;
}

.category-products-content {
    flex: 1;
    min-width: 0;
}

/* Ensure product grid inside content doesn't double margin/max-width */
.category-products-content .products-wrapper {
    margin: 0;
    max-width: none;
    padding: 0;
}

@media (max-width: 992px) {
    .category-main-layout {
        flex-direction: column;
    }

    .category-sidebar {
        flex: none;
        width: 100%;
    }

    .product-grid, .products-wrapper, .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .product-grid, .products-wrapper, .category-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    text-align: left;
    height: 100%;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 10px 20px color-mix(in srgb, var(--shadow-color) 8%, transparent);
    transform: translateY(-2px);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image {
    margin-bottom: 1rem;
    /* Fixed-ratio container so every card's image occupies the same height,
       keeping the grid visually aligned regardless of the source image size. */
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-top: 0;
}

.product-information {
    padding: 10px;
}

.product-title .product-brand {
    text-transform: uppercase;
    font-size: 12px;
    color: var(--main-color);
    line-height: 18px;
    height: 18px;
    display: block;
    width: 100%;
}

.product-title h3 {
    margin: 7px 0 0 0;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin: 0.5rem 0 1rem;
    font-weight: 400;
}

.product-price .old-price {
    text-decoration: line-through;
    color: var(--subtle-text-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.product-rating {
    margin: 10px 0;
}

.product-rating svg {
    height: 16px;
    width: 16px;
    margin-right: -4px;
    fill: var(--rating-color);
}

.product-rating span.review-count {
    font-size: 12px;
    margin-top: -5px;
}

.product-stock-info {
    font-size: 0.9rem;
    color: var(--text-color);
    margin: 0.5rem 0;
}

.product-stock-info.in-stock {
    color: var(--secondary-color);
}

.product-stock-info.backorder {
    color: var(--stock-warning-color);
}

.product-stock-info.out-of-stock {
    color: var(--stock-error-color);
}

.product-cta {
    margin-top: auto;
}

.btn-primary {
    display: inline-block;
    background-color: var(--main-color);
    color: var(--main-color-text);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    filter: brightness(90%);
}

.btn-primary:disabled, .btn-primary.disabled {
    background-color: var(--disabled-color);
    cursor: not-allowed;
    filter: none;
}

.blog-posts, .blog-post-summary, .blog-post {
    background-color: var(--blog-background-color);
}

/* Quick filters (sub-category links) */
.category-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem auto 0;
}

.category-quick-filters .btn-default {
    color: var(--link-color);
    background-color: var(--surface-color);
    border-color: transparent;
}

.category-quick-filters .btn-default:hover {
    color: var(--link-active-color);
    filter: brightness(96%);
}

/* Toolbar: product count, clear link and sort select above the grid */
.category-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}

.category-toolbar__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted-text-color);
    font-size: 0.9rem;
}

.category-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-weight: 400;
    font-size: 0.9rem;
}

.category-sort select {
    width: auto;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
}

/* Pagination */
.category-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.category-pagination .btn-primary {
    width: auto;
    padding: 0.5rem 0.75rem;
    cursor: default;
}

.category-pagination__gap {
    color: var(--subtle-text-color);
}

.category-sub-categories {
    margin-bottom: 2rem;
}

.category-sub-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .category-sub-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .category-sub-categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Category Card - Shopify Style */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: var(--category-background-color);
    transition: box-shadow 0.3s ease;
    height: 100%;
    max-height: 350px;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    box-shadow: 0 10px 20px color-mix(in srgb, var(--shadow-color) 8%, transparent);
}

.category-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.category-card__link:hover, .category-card__link:focus {
    text-decoration: none !important;
}

.category-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--image-background-color);
    flex: 1;
    max-height: 250px; /* Limit the image section height to leave room for the footer */
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card__image {
    width: 100%;
    height: 100%;
}

.category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure the full image fits within the section */
    padding: 10px; /* Add some padding to see the full image clearly */
    transition: transform 0.5s ease;
}

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

.category-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
    var(--image-background-color) 25%,
    var(--surface-color) 50%,
    var(--image-background-color) 75%);
    background-size: 200% 200%;
    animation: placeholder-shimmer 2s infinite linear;
}

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

.category-card__info {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-background-color);
    flex: 0 0 auto; /* Ensure info area has a consistent height and doesn't shrink or grow disproportionately */
    margin-top: 0;
}

.category-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    flex-grow: 1;
}

.category-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--image-background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.category-card__arrow svg {
    height: 20px;
}

.category-card:hover .category-card__arrow {
    background-color: var(--main-color);
    color: var(--main-color-text);
    transform: translateX(4px);
    text-decoration: none !important;
}

.label, .badge {
    background-color: var(--label-background-color);
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--secondary-color-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.topbar {
    background-color: var(--header-topbar-color);
    color: var(--header-topbar-text-color);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.topbar a {
    color: var(--header-topbar-text-color);
    text-decoration: none;
}


.product-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: var(--container-width);
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.product-image-item img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    object-fit: cover;
}

.product-info-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.product-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
    flex: 1;
}

.product-price-section {
    text-align: right;
    white-space: nowrap;
}

.product-price-section .price,
.product-price-section .promo-price {
    font-size: 1.25rem;
    font-weight: 400;
    display: block;
}

.product-price-section .advised-price {
    font-size: 0.9rem;
    color: var(--subtle-text-color);
    text-decoration: line-through;
    font-weight: normal;
    display: block;
}

.product-price-section .promo-price {
    color: var(--promo-price-color);
}

.product-meta {
    font-size: 0.9rem;
    color: var(--muted-text-color);
}

.product-short-description {
    color: var(--muted-text-color);
}

.product-actions {
    margin-top: 0.5rem;
}

.product-add-to-cart {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
}

/* Quantity + add-to-cart on one aligned row, beneath the variant options. Both
   stretch to the same height so the input and button line up. */
.product-buy {
    display: flex;
    align-items: stretch;
    gap: 1rem;
}

.product-add-to-cart .btn-primary {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
}

.product-accordions {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-accordion {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-icon::before {
    content: "+";
    font-size: 1.25rem;
}

.product-accordion[open] .accordion-icon::before {
    content: "−";
}

.accordion-content {
    padding: 0 0 1.5rem 0;
    line-height: 1.6;
}

.product-facets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.facet-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.facet-label {
    font-weight: 600;
    color: var(--muted-text-color);
}

.product-recommendations {
    margin-top: 4rem;
}

.product-recommendations h2 {
    margin-bottom: 2rem;
    text-align: center;
}

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

@media (max-width: 1024px) {
    .product-recommendations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-image-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        width: 100%;
        cursor: grab;
        user-select: none;
    }

    .product-image-grid.dragging {
        scroll-snap-type: none;
        scroll-behavior: auto;
        cursor: grabbing;
    }

    .product-image-grid::-webkit-scrollbar {
        display: none;
    }

    .product-image-item {
        flex: 0 0 100%;
        width: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .product-image-item img {
        border-radius: 0;
        border: none;
    }

    .product-header {
        flex-direction: column;
    }

    .product-price-section {
        text-align: left;
    }

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

@media (max-width: 480px) {
    .product-recommendations-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Controls */
label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    color: var(--text-color);
    background-color: var(--input-background-color);
    border: 1px solid var(--input-border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--main-color) 25%, transparent);
}

textarea {
    resize: vertical;
}

.form-group {
    margin-bottom: 1rem;
}

.product-quantity {
    display: flex;
    width: 90px;
}

.product-quantity input[type="number"] {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid var(--input-border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Cart Styles */
.cart-form table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.cart-form th, .cart-form td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--input-border-color);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-info img {
    max-width: 50px;
    height: auto;
}

.cart-summary {
    text-align: right;
    margin-top: 2rem;
}

.cart-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.checkout-button {
    background: var(--main-color);
    color: var(--main-color-text);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    display: inline-block;
}

.checkout-button:hover {
    background-color: var(--link-active-color);
}

/* Breadcrumbs */
#breadcrumbs {
    max-width: var(--container-width);
    margin: 1rem auto;
    padding: 0 1.5rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 0.5rem;
    color: var(--subtle-text-color);
}

.breadcrumb li a {
    color: var(--link-color);
    text-decoration: none;
}

.breadcrumb li a:hover {
    text-decoration: var(--link-text-decoration);
    color: var(--link-active-color);
}

.breadcrumb li span {
    color: var(--muted-text-color);
}

.breadcrumb li a span {
    color: inherit;
}

/* Translations Modal */
#translationsModal .modal-body-translations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
}

#translationsModal .modal-body-translations a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--header-text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: background-color 0.2s, border-color 0.2s;
}

#translationsModal .modal-body-translations a:hover {
    background-color: var(--surface-color);
    border-color: var(--main-color);
    color: var(--main-color);
}

#translationsModal .navigation-flag {
    width: 24px;
    height: auto;
    margin-right: 1rem;
    border-radius: 2px;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--shadow-color) 10%, transparent);
}

#translationsModal .language-text {
    font-weight: 500;
}

/* Modal Basic Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: color-mix(in srgb, var(--shadow-color) 50%, transparent);
    z-index: 2000;
}

.modal.fade.in, .modal.show {
    display: block;
}

.modal-dialog {
    margin: 2rem auto;
    max-width: 500px;
    background: var(--card-background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px color-mix(in srgb, var(--shadow-color) 30%, transparent);
}

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

.modal-header .close {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-title {
    margin: 0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.btn-default {
    background-color: var(--surface-color);
    border: 1px solid var(--input-border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* Cookie Bar */
#cookiebar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--card-background-color);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--shadow-color) 15%, transparent);
    z-index: 9999;
    max-width: 400px;
}

#cookiebar p {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    text-align: left;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--success-text-color);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-success:hover {
    filter: brightness(90%);
}


/* Icons next to hamburger on mobile; inline on desktop */
.nav-icon {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    /* Show hamburger; keep icons visible */
    .nav-toggle {
        display: flex;
        width: 34px;
        height: 34px;
        justify-content: center;
        align-items: center;
        margin-left: 0;
        padding: 6px;
    }

    .nav-toggle span {
        width: 22px;
        height: 2px;
        margin: 2px 0;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-icon {
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    /* Reorder on mobile: Brand (stays 0), Search, Cart, Toggle */
    #nav-search {
        margin-left: auto;
        order: 10;
    }

    #nav-cart {
        order: 11;
    }

    #nav-toggle {
        order: 12;
    }

    /* Hide menu links until toggled */
    .nav-link {
        display: none;
        order: 20; /* Ensure links appear after the top bar icons when opened */
    }

    nav ul.menu-open .nav-link {
        display: block;
        width: 100%;
    }

    nav ul.menu-open .nav-link a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    /* Dropdown behavior inside the list */
    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0 0 0 1.5rem;
        background: var(--surface-color);
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown.active:hover .dropdown-menu {
        display: block;
    }

    /* Visual grouping for stacked links */
    nav ul.menu-open .nav-link {
        border-bottom: 1px solid var(--border-color);
    }

    nav ul.menu-open .nav-link:last-child {
        border-bottom: none;
    }
}


/* =========================
   Category Filters
   ========================= */
.category-filters {
    margin: 0;
    padding: 0;
}

.category-filters-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Sidebar toggle button: mobile only */
#sidebar-filter-toggle {
    margin: 0 0 1rem 0;
    display: none;
}

@media (max-width: 992px) {
    .category-filters-title {
        display: none;
    }

    #sidebar-filter-toggle {
        display: block;
    }

    #sidebar-category-filters {
        display: none;
    }

    #sidebar-category-filters.show {
        display: block;
    }

    .category-toolbar {
        justify-content: flex-start;
    }
}

/* Basic .btn helpers to support provided markup */
.btn {
    display: inline-block;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
}

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

.btn-lg {
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
}

/* Filter card */
.products-filter {
    background: var(--card-background-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.products-filter h4 {
    margin: 0;
    padding: 0.5rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Collapsible header link */
.filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    color: inherit;
    text-decoration: none;
}

.filter-link:hover,
.filter-link:focus {
    text-decoration: none;
    color: var(--main-color);
}

.filter-icon {
    margin-left: .5rem;
    display: inline-flex;
    align-items: center;
}

/* Show correct icon depending on collapse state (Bootstrap-like) */
.filter-link .if-opened {
    display: none;
}

.filter-link .if-closed {
    display: inline-flex;
}

.filter-link:not(.collapsed) .if-opened {
    display: inline-flex;
}

.filter-link:not(.collapsed) .if-closed {
    display: none;
}

/* Collapse support (no JS library required for simple default state) */
.collapse {
    display: none;
}

.collapse.in, .collapse.show {
    display: block;
}

/* Filter options list */
.category-filter-options {
    list-style: none;
    padding: 0.25rem 0 0.75rem 0;
    margin: 0;
}

.category-filter-options li {
    margin: 0.25rem 0;
}

.category-filter-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .35rem;
    border-radius: var(--border-radius);
    color: inherit;
    text-decoration: none;
}

.category-filter-link:hover,
.category-filter-link:focus {
    background: var(--surface-color);
    color: var(--main-color);
    text-decoration: none;
}

/* Nesting levels */
.category-filter-options .nested-level-0 {
    padding-left: 0;
}

.category-filter-options .nested-level-1 {
    padding-left: 0.75rem;
}

.category-filter-options .nested-level-2 {
    padding-left: 1.5rem;
}

.category-filter-options .nested-level-3 {
    padding-left: 2.25rem;
}

/* Optional: compact icon in links */
.category-filter-link i {
    color: var(--subtle-text-color);
}

.category-filter-link:hover i {
    color: var(--main-color);
}

/* Attribute filter options (checkbox-style links rendered by the platform) */
.category-filter-options li a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .35rem;
    border-radius: var(--border-radius);
    color: inherit;
    text-decoration: none;
}

.category-filter-options li a:hover,
.category-filter-options li a:focus {
    background: var(--surface-color);
    color: var(--main-color);
    text-decoration: none;
}

.category-filter-options li a i {
    color: var(--subtle-text-color);
}

/* Colour filters render as swatches; the colour itself arrives inline from the platform. */
.category-filter-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-filter-swatches li {
    margin: 0;
}

.category-filter-swatches .swatch-fallback {
    order: 1;
    flex-basis: 100%;
}

.category-filter-swatches .color-swatch-link {
    display: inline-flex;
    padding: 2px;
    border-radius: 50%;
}

.category-filter-swatches .color-swatch {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--text-color) 20%, transparent);
    background-size: cover;
    background-position: center;
}

.category-filter-swatches .color-swatch-link.is-active .color-swatch {
    box-shadow: 0 0 0 2px var(--card-background-color), 0 0 0 4px var(--main-color);
}

/* Price range filter: the platform renders two range inputs plus a track and fill span.
   Stacking both inputs on the same track turns them into a single two-handle slider. */
.filter-price .price-range {
    padding-top: 0.5rem;
}

.filter-price .price-range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-price .price-range-sliders {
    position: relative;
    height: 22px;
    margin-bottom: 0.75rem;
}

/* Inset by half a thumb: that is where a thumb's centre sits at min and max. */
.filter-price .price-range-track {
    display: block;
    position: absolute;
    top: 9px;
    left: 8px;
    right: 8px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
}

.filter-price .price-range-track-fill {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 2px;
    background: var(--main-color);
}

/* Only the thumbs take pointer events, otherwise the top input swallows every click
   meant for the one underneath. */
.filter-price input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.filter-price input[type="range"]:focus {
    outline: 0;
}

.filter-price input[type="range"]::-webkit-slider-runnable-track {
    height: 22px;
    border: 0;
    background: transparent;
}

.filter-price input[type="range"]::-moz-range-track {
    height: 22px;
    border: 0;
    background: transparent;
}

.filter-price input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: all;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    background: var(--card-background-color);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow-color) 30%, transparent);
    cursor: pointer;
}

.filter-price input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    background: var(--card-background-color);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow-color) 30%, transparent);
    cursor: pointer;
}

.filter-price input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--main-color) 25%, transparent);
}

.filter-price input[type="range"]:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--main-color) 25%, transparent);
}

/* The customer account page is rendered by {{ sitepack_account() }}, which ships its
   own base styling for the canonical .account* classes. Add overrides here only to
   depart from that default. */

/* =========================
   Landing Page Template
   ========================= */
.landing-hero {
    padding: 4rem 0;
}

.landing-hero__inner {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.landing-hero__content {
    flex: 1;
}

.landing-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.landing-hero__sub-head {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0 0 1rem;
    color: var(--main-color);
}

.landing-hero__text {
    color: var(--muted-text-color);
    margin: 0 0 1.5rem;
}

.landing-hero__content .btn-primary {
    width: auto;
}

.landing-hero__image {
    flex: 1;
}

.landing-hero__image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px color-mix(in srgb, var(--shadow-color) 10%, transparent);
}

.landing-usps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.landing-usps li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.landing-usps li::before {
    content: "\2713";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--secondary-color-text);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.landing-features {
    padding: 4rem 0;
    text-align: center;
}

.landing-features__title {
    margin: 0 0 2.5rem;
}

.landing-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: left;
}

.feature-card {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 10px 20px color-mix(in srgb, var(--shadow-color) 8%, transparent);
    transform: translateY(-2px);
}

.feature-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.feature-card__text {
    margin: 0;
    color: var(--muted-text-color);
}

@media (max-width: 768px) {
    .landing-hero__inner {
        flex-direction: column;
    }

    .landing-features__grid {
        grid-template-columns: 1fr;
    }
}

