
:root {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: #e5e5e5;
    --accent-color: #000000;
    --bg-hover: #f5f5f5;
    --sidebar-width: 260px;

    --page-max-width: 1446px;
    --page-max-width: 1530px;
    --page-padding-y: 40px;
    --page-padding-x: 42px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    
}

body {
    background: var(--bg-color);
    min-height: 100vh;
    padding-top: var(--header-top-height) !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}


header.site-menu {

    border-bottom: 1px solid var(--line);
    .menu-trigger {
        display: flex !important;
        transition: 0.2s;
        &:hover {
            background: #d2d6ec36;
        }
    }

    .categories-bar {
        display: none;
    }
}


/* =========================================================
   SIDEBAR SCROLLBAR ONLY - Slim Light Style
   ========================================================= */

/* Modern Firefox Syntax for Sidebar */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

/* WebKit Engines (Chrome, Safari, Edge) for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 8px;              /* Slim profile */
  height: 8px;             /* For horizontal scrolling */
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;  /* Seamless integration */
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #d1d5db; /* Soft neutral gray */
  border-radius: 9999px;     /* Fully rounded pill shape */
  border: 2px solid #ffffff;  /* White border padding effect */
  transition: background-color 0.2s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: #9ca3af; /* Darker gray on hover */
}

.sidebar::-webkit-scrollbar-thumb:active {
  background-color: #6b7280; /* Deep gray while dragging */
}


.main-nav {
    display: flex;
    gap: 20px;
    min-width: 0;
}

.main-nav a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-main);
}


.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 0;
    background: none;
    cursor: pointer;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.btn-outline {
    border: 1px solid var(--border-color);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--text-main);
}

.btn-primary {
    border: 1px solid var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
}

body > .container {
    position: relative;
    display: flex;
    gap: 40px;
    padding: 0px var(--page-padding-x);
    margin: 0 auto;
    max-width: var(--page-max-width);
    


}

aside {
    position: sticky;
    /*height: calc( 100vh - (var(--header-top-height) + var(--header-bottom-height)) );*/
    height: calc( 100vh - var(--header-top-height) );
    top: calc( var(--header-top-height)  );
    width: var(--sidebar-width);
    flex-shrink: 0;
    overflow-y: auto;
    padding: var(--page-padding-y) 0px;
    padding-bottom: 10px;
    padding-right: 15px;
    transition: top 0.3s ease-in-out; /* Smooth slide effect */
    
    
}

.sidebar-section:not(:last-of-type) {
    margin-bottom: 30px;

    
}

.sidebar-title {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.category-tree ul {
    list-style: none;
}


.category-tree a {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 400;
}

.category-tree a.active {
    font-weight: 600;
    color: #111111;
}

.sub-categories {
    padding-left: 12px;
    margin: 3px 0px;
    border-left: 1px solid var(--border-color);
}

.sub-categories a {
    color: var(--text-muted);
    font-size: 13px;
}

.sub-categories a:hover {
    color: var(--text-main);
}

.filters-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #eeeeee;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #111111;
}

.filter-btn.active {
    background: #f8f8f8;
    border-color: #111111;
}

/* Update these styles to remove blur and make it darker */
.filter-drawer-overlay, 
.category-drawer-overlay {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.5); /* Darker background */
    backdrop-filter: none;          /* Removed blur */
    cursor: default;
}

.filter-drawer-overlay.visible, 
.category-drawer-overlay.visible {
    display: block;
}

/* Add this to prevent background scrolling */
body.drawer-open {
    overflow: hidden;
}

.filter-drawer {
    position: fixed;
    z-index: 1000;
    display: none;
    width: 330px;
    max-height: min(480px, calc(100vh - 32px));
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    box-shadow: 12px 16px 36px rgba(0, 0, 0, 0.12);
}

.filter-drawer.open {
    display: flex;
    flex-direction: column;
    animation: filterDrawerIn 0.15s ease-out;
}

@keyframes filterDrawerIn {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-header h4 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.drawer-close:hover {
    color: var(--text-main);
}

.drawer-content {
    min-height: 0;
    overflow-y: auto;
    padding: 16px 0;
}

.drawer-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.option-item {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 3px;
}

.option-item:hover,
.option-item.selected {
    border-color: #e5e5e5;
    background: #fafafa;
}

.size-options .option-item:hover {
    border-color: #111111;
    background: none;

}

.size-options .option-item.selected {
    border-color: #111111;
    background: #f4f4f4;
}

.option-item input[type='checkbox'] {
    margin-left: auto;
    order: 3;
}

.color-swatch {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #0000003d;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.size-options .option-item {
    justify-content: center;
    min-height: 38px;
    padding: 8px 5px;
    border-color: var(--border-color);
    text-align: center;
}

.size-options .option-item input[type='checkbox'] {
    display: none;
}


.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s, border-color 0.15s;
}

.option-item input[type='checkbox'] {
    width: 16px;
    height: 16px;
    accent-color: var(--text-main);
}

.drawer-empty {
    color: var(--text-muted);
    font-size: 13px;
}

.drawer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.drawer-footer button {
    flex: 1;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.drawer-reset {
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-main);
}

.drawer-reset:hover {
    border-color: var(--text-main);
}

.drawer-apply {
    border: 1px solid var(--text-main);
    background: var(--text-main);
    color: #fff;
}

.drawer-apply:hover {
    opacity: 0.88;
}

.price-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.price-inputs {
    display: flex;
    gap: 8px;
}

.price-inputs label {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.price-inputs input {
    width: 100%;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    outline: none;
    font-size: 13px;
}

main {
    min-width: 0;
    flex: 1;
    padding: var(--page-padding-y) 0px;
    padding-bottom: 155px;

    * {
        color: var(--text-main);
    }
}

.breadcrumb {
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 12px;
}

.breadcrumb-nav {
    width: 100%;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.breadcrumb-item,
.breadcrumb-link,
.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 12px;
}

.breadcrumb-item.current .breadcrumb-link {
    color: var(--text-main);
}

.category-header {
    margin-bottom: 22px;
}

.category-header h1 {
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.category-header p {
    max-width: 600px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.active-filters-container {
    margin-bottom: 20px;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 0;
    border-radius: 20px;
    background: #f1f1f1;
    cursor: pointer;
    font-size: 12px;
}

.filter-tag:hover {
    background: #e5e5e5;
}

.clear-all-link {
    margin-left: 8px;
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: underline;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.product-count {
    color: var(--text-muted);
    font-size: 13px;
}

.sort-container {
    position: relative;
}

.sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 154px;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.sort-trigger:hover,
.sort-container.open .sort-trigger {
    border-color: var(--text-main);
}

.sort-trigger svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.sort-trigger .sort-label {
    flex: 1;
}

.sort-trigger .sort-chevron {
    transition: transform 0.15s ease;
}

.sort-container.open .sort-chevron {
    transform: rotate(180deg);
}

.sort-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    display: none;
    min-width: 190px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.11);
}

.sort-container.open .sort-menu {
    display: block;
    animation: sortMenuIn 0.12s ease-out;
}

@keyframes sortMenuIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
}

.sort-option:hover,
.sort-option.selected {
    background: #f5f5f5;
}

.sort-option svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 20px;
}

.product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.03);
}

.like-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: 0.2s ease;

}
.like-btn svg {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.2s ease;
}

.like-btn.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
}
.like-btn:active {
    transform: scale(0.9);
}
.product-info {
    display: flex;
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
}

.product-title {
    display: block;
    width: 100%;
    margin-bottom: 4px;
    overflow: hidden;
    color: #222;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    margin-bottom: 9px;
    color: #111;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.product-props {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
    min-height: 22px;
}



.product-props span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 7px 8px;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    color: #777;
    font-size: 11.5px;
    line-height: 1;
    white-space: nowrap;
    cursor: default;
    user-select: none;
}

.product-props span:hover {
    color: #333;
    border-color: #cfcfcf;
}

.empty-state {
    color: var(--text-muted);
    font-size: 14px;
}








/* =========================================================
   MOBILKNAPPAR (Dolda på Desktop)
   ========================================================= */
.mobile-toggle-bar {
    display: none;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    justify-content: space-between;
}

.mobile-toggle-bar .toggle-btn {
    flex: 1;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.mobile-toggle-bar .toggle-btn:active {
    background: #f5f5f5;
}



.category-drawer {
    position: fixed;
    z-index: 95;
    inset: auto 12px 12px 12px;
    display: none;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
    bottom: calc(var(--bottom-nav-height) + 7px);

    .category-tree a {

        padding: 14px 0;
    }
}

.category-drawer.open {
    display: flex;
    flex-direction: column;
    animation: filterDrawerIn 0.15s ease-out;
}

/* =========================================================
   RESPONSIVA BRYTPUNKTER (Baserat på skärmar från 15 år tillbaka)
   ========================================================= */

/* Desktop Large (1440px+): Max 4 kolumner */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 20px;
}

/* Standard Desktop / Laptop (1200px till 1439px): 4 kolumner, tajtare gap */
@media (max-width: 1439px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px 16px;
    }
}

@media (max-width: 1300px) {


    .main-nav {
        display: none;
    }

  

    .container {
        padding: 0 24px;
        gap: 24px;
    }
    aside.sidebar {
        width: 220px;
    }
 
}


/* Mindre Laptops & Tablets liggande (992px till 1199px): 3 kolumner */
@media (max-width: 1200px) {
   
    .main-nav {
        display: none;
    }
}










/* Mobiler (768px och lägre) */
@media (max-width: 1030px) {
    .container {
        display: block;
        padding: 0 16px;
    }

    /* Visa knappar under H1 på mobil */
    .mobile-toggle-bar {
        display: flex;
    }

    /* Dölj desktop-sidebar helt */
    aside.sidebar {
        display: none !important;
    }

    /* Dölj product-count helt */
    .product-count {
        display: none !important;
    }

    /* Dölj desktop sorteringsknapp i verktygsraden */
    .toolbar .sort-container {
        display: none !important;
    }

    .toolbar {
        margin-bottom: 12px;
        padding-bottom: 0;
        border-bottom: none;
    }


    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        
    }

    .product-props span {
        font-size: 10px;
        padding: 4px 6px;
    }

    .filter-drawer {
        position: fixed;
        right: 12px;
        bottom: calc(var(--bottom-nav-height) + 5px);
        left: 12px;
        width: auto;
        max-height: calc(100vh - var(--bottom-nav-height) - 15px);
        overflow: auto;
    }
}

@media (max-width: 760px) {
    :root {

        --sidebar-width: 100%;
    }


    .container {
        display: block;
        padding: 24px 16px;
    }

    aside {
        position: static;
        width: 100%;
        height: auto;
        padding: 0;
    }

    .category-tree {
        margin-bottom: 24px;
    }

 

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px 12px;
    }

    .category-header h1 {
        font-size: 28px;
    }
}

/* Små mobiler (480px och lägre, t.ex. iPhone SE / äldre enheter) */
@media (max-width: 520px) {
    /* 2 kolumner fungerar ner till ~360px */
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 8px;
    }
}

@media (max-width: 400px) {
    .size-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Extremt smala skärmar (< 360px, t.ex. iPhone 4/5/SE 1:a gen) */
@media (max-width: 250px) {
    /* Växla till 1 kolumn så korten inte blir oläsliga */
    .product-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}







