/**
 * ScooterDiscounter Theme CSS
 * Category Page Styles
 * Performance optimized - minimal, no heavy effects
 */

/* ===== CSS Variables ===== */
:root {
    --sd-green: #3aaa35;
    --sd-green-hover: #2d8a2a;
    --sd-orange: #FF6B00;
    --sd-dark: #1a1a1a;
    --sd-text: #333;
    --sd-text-light: #666;
    --sd-text-muted: #999;
    --sd-border: #e0e0e0;
    --sd-bg: #f5f5f5;
    --sd-white: #fff;
    --sd-red: #d32f2f;
    --sd-radius: 8px;
    --sd-max-width: 1200px;
    --sd-sidebar-width: 240px;
    --sd-gap: 24px;
}

/* ===== Base Reset for Theme ===== */
.sd-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sd-text);
    -webkit-font-smoothing: antialiased;
}

.sd-wrapper * {
    box-sizing: border-box;
}

/* ===== Container ===== */
.sd-container {
    max-width: var(--sd-max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== Layout Wrappers ===== */
.sd-header-wrapper {
    width: 100%;
    background: var(--sd-white);
    border-bottom: 1px solid var(--sd-border);
}

.sd-breadcrumbs-wrapper {
    width: 100%;
    background: var(--sd-bg);
    border-bottom: 1px solid var(--sd-border);
}

.sd-main-wrapper {
    width: 100%;
    background: var(--sd-white);
    padding: 24px 0 60px;
}

.sd-footer-wrapper {
    width: 100%;
    background: var(--sd-dark);
}

/* ===== Two Column Layout ===== */
.sd-columns {
    display: grid;
    grid-template-columns: var(--sd-sidebar-width) 1fr;
    gap: var(--sd-gap);
}

.sd-sidebar {
    min-width: 0;
}

.sd-content {
    min-width: 0;
}

/* ===== Breadcrumbs ===== */
.sd-breadcrumbs {
    padding: 12px 0;
}

.sd-breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sd-breadcrumbs li {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--sd-text-light);
}

.sd-breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 6px;
    color: var(--sd-text-muted);
}

.sd-breadcrumbs a {
    color: var(--sd-text-light);
    text-decoration: none;
}

.sd-breadcrumbs a:hover {
    color: var(--sd-orange);
}

.sd-breadcrumbs .current {
    color: var(--sd-text);
}

/* ===== Category Header ===== */
.sd-category-header {
    margin-bottom: 20px;
}

.sd-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--sd-dark);
    margin: 0 0 8px;
}

.sd-category-icon {
    width: 40px;
    height: 40px;
    background: var(--sd-orange);
    border-radius: var(--sd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sd-category-icon img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

.sd-category-desc {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--sd-bg);
    border-radius: var(--sd-radius);
    font-size: 13px;
    color: var(--sd-text-light);
    line-height: 1.6;
}

/* ===== Filters Sidebar ===== */
.sd-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sd-filter-block {
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    overflow: hidden;
}

.sd-filter-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    background: var(--sd-bg);
    border-bottom: 1px solid var(--sd-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.sd-filter-toggle {
    color: var(--sd-text-muted);
    font-size: 12px;
}

.sd-filter-content {
    padding: 12px 16px;
}

.sd-filter-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sd-filter-option {
    display: block;
}

.sd-filter-option a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--sd-text-light);
    text-decoration: none;
    line-height: 1.4;
}

.sd-filter-option a:hover {
    color: var(--sd-text);
}

.sd-filter-option.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.sd-filter-option.disabled {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--sd-text-muted);
}

.sd-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid var(--sd-border);
    border-radius: 3px;
    flex-shrink: 0;
}

.sd-filter-option a:hover .sd-checkbox {
    border-color: var(--sd-orange);
}

.sd-option-label {
    flex: 1;
    min-width: 0;
}

.sd-option-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--sd-text-muted);
    flex-shrink: 0;
}

/* Price filter specific - if HTML prices slip through */
.sd-filter-option .price {
    font-weight: inherit;
    color: inherit;
}

/* ===== Active Filters ===== */
.sd-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.sd-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: 20px;
    font-size: 12px;
}

.sd-filter-label {
    color: var(--sd-text-light);
}

.sd-filter-value {
    color: var(--sd-orange);
    font-weight: 500;
}

.sd-filter-remove {
    width: 16px;
    height: 16px;
    background: var(--sd-orange);
    color: var(--sd-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
    line-height: 1;
}

.sd-filter-remove:hover {
    background: var(--sd-red);
}

.sd-clear-all {
    font-size: 12px;
    color: var(--sd-text-muted);
    text-decoration: none;
    padding: 6px 0;
}

.sd-clear-all:hover {
    color: var(--sd-red);
}

/* ===== Toolbar ===== */
.sd-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.sd-toolbar-left,
.sd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sd-view-btns {
    display: flex;
    gap: 4px;
}

.sd-view-btn {
    width: 32px;
    height: 32px;
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sd-text-muted);
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}

.sd-view-btn:hover,
.sd-view-btn.active {
    border-color: var(--sd-orange);
    color: var(--sd-orange);
}

.sd-sorter,
.sd-limiter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-toolbar select {
    padding: 8px 28px 8px 10px;
    border: 1px solid var(--sd-border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: var(--sd-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 8px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.sd-sort-dir {
    padding: 4px 8px;
    color: var(--sd-text-muted);
    text-decoration: none;
    font-size: 14px;
}

.sd-sort-dir:hover {
    color: var(--sd-orange);
}

.sd-amount {
    font-size: 13px;
    color: var(--sd-text-muted);
}

/* ===== Products Grid ===== */
.sd-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.sd-no-products {
    padding: 40px;
    text-align: center;
    color: var(--sd-text-light);
}

/* ===== Product Card ===== */
.sd-product-card {
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s;
}

.sd-product-card:hover {
    border-color: var(--sd-text-muted);
}

.sd-product-img {
    position: relative;
    height: 180px;
    background: var(--sd-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: var(--sd-radius) var(--sd-radius) 0 0;
}

.sd-product-img img {
    max-height: 156px;
    max-width: 100%;
    object-fit: contain;
}

.sd-product-img a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.sd-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.sd-badge-sale {
    background: var(--sd-red);
    color: var(--sd-white);
}

.sd-badge-new {
    background: var(--sd-green);
    color: var(--sd-white);
}

.sd-wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: var(--sd-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--sd-text-muted);
    cursor: pointer;
    z-index: 1;
}

.sd-wishlist-btn:hover {
    color: var(--sd-red);
}

.sd-product-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sd-product-brand {
    font-size: 10px;
    color: var(--sd-orange);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.sd-product-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--sd-dark);
    text-decoration: none;
    margin-bottom: 6px;
    line-height: 1.4;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sd-product-name:hover {
    color: var(--sd-orange);
}

.sd-product-sku {
    font-size: 11px;
    color: var(--sd-text-muted);
    margin-bottom: 8px;
}

.sd-product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
}

.sd-price-now {
    font-size: 16px;
    font-weight: 700;
    color: var(--sd-dark);
}

.sd-price-was {
    font-size: 12px;
    color: var(--sd-text-muted);
    text-decoration: line-through;
}

.sd-product-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    margin-top: 6px;
}

.sd-stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.sd-product-stock.in-stock .sd-stock-dot {
    background: var(--sd-green);
}

.sd-product-stock.in-stock {
    color: var(--sd-green);
}

.sd-product-stock.out-of-stock .sd-stock-dot {
    background: var(--sd-red);
}

.sd-product-stock.out-of-stock {
    color: var(--sd-red);
}

.sd-product-action {
    padding: 12px;
    padding-top: 0;
}

/* ===== Green Add to Cart Button ===== */
.sd-btn-add {
    width: 100%;
    padding: 10px;
    background: var(--sd-green);
    color: var(--sd-white);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.sd-btn-add:hover {
    background: var(--sd-green-hover);
}

.sd-btn-add:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sd-cart-icon {
    font-size: 14px;
}

/* ===== Pagination ===== */
.sd-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--sd-border);
}

.sd-page-link {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    background: var(--sd-bg);
    color: var(--sd-text);
}

.sd-page-link:hover {
    background: var(--sd-border);
}

.sd-page-current {
    background: var(--sd-orange);
    color: var(--sd-white);
}

.sd-page-prev,
.sd-page-next {
    background: transparent;
}

.sd-toolbar-bottom {
    margin-top: 24px;
}

.sd-toolbar-bottom .sd-toolbar {
    margin-bottom: 0;
}

.sd-toolbar-bottom .sd-pagination {
    margin-top: 16px;
    padding-top: 0;
    border-top: none;
}

/* ===== Mobile Filter Button (hidden on desktop) ===== */
.sd-mobile-filter-btn {
    display: none;
    width: 100%;
    padding: 12px;
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    margin-bottom: 16px;
    cursor: pointer;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
    .sd-columns {
        grid-template-columns: 1fr;
    }
    
    .sd-sidebar {
        display: none;
    }
    
    .sd-mobile-filter-btn {
        display: block;
    }
    
    .sd-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
    :root {
        --sd-gap: 16px;
    }
    
    .sd-main-wrapper {
        padding: 16px 0 40px;
    }
    
    .sd-category-title {
        font-size: 20px;
    }
    
    .sd-category-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .sd-toolbar {
        padding: 10px 12px;
    }
    
    .sd-toolbar-left {
        flex: 1;
    }
    
    .sd-toolbar select {
        font-size: 12px;
        padding: 6px 24px 6px 8px;
    }
    
    /* 2 columns on mobile */
    .sd-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .sd-product-img {
        height: 140px;
        padding: 8px;
    }
    
    .sd-product-img img {
        max-height: 124px;
    }
    
    .sd-product-details {
        padding: 10px;
    }
    
    .sd-product-brand {
        font-size: 9px;
    }
    
    .sd-product-name {
        font-size: 12px;
        height: 32px;
    }
    
    .sd-product-sku {
        display: none;
    }
    
    .sd-price-now {
        font-size: 14px;
    }
    
    .sd-product-action {
        padding: 10px;
        padding-top: 0;
    }
    
    .sd-btn-add {
        padding: 8px;
        font-size: 12px;
    }
    
    .sd-cart-text {
        display: none;
    }
    
    .sd-pagination {
        gap: 4px;
    }
    
    .sd-page-link {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 480px) {
    .sd-container {
        padding: 0 12px;
    }
    
    .sd-product-img {
        height: 120px;
    }
    
    .sd-product-img img {
        max-height: 104px;
    }
    
    .sd-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .sd-wishlist-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .sd-sidebar,
    .sd-toolbar,
    .sd-pagination,
    .sd-product-action,
    .sd-wishlist-btn {
        display: none !important;
    }
    
    .sd-columns {
        grid-template-columns: 1fr;
    }
    
    .sd-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   HOMEPAGE STYLES
   ============================================ */

/* Hero Slider */
.sd-hero-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}

.sd-hero-slider__track {
    display: flex;
    transition: transform 0.5s ease;
}

.sd-hero-slider__slide {
    flex: 0 0 100%;
    min-height: 300px;
}

.sd-hero-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-hero-slider__nav--prev { left: 16px; }
.sd-hero-slider__nav--next { right: 16px; }

.sd-hero-slider__nav:hover {
    background: var(--sd-white);
}

.sd-hero-slider__dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.sd-hero-slider__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.sd-hero-slider__dot.is-active {
    background: var(--sd-white);
}

/* Slide Content */
.sd-slide {
    min-height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 40px;
}

.sd-slide__content {
    max-width: 500px;
}

.sd-slide__title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--sd-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sd-slide__text {
    font-size: 16px;
    margin: 0 0 20px;
    color: var(--sd-white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.sd-slide__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--sd-green);
    color: var(--sd-white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.sd-slide__btn:hover {
    background: var(--sd-green-hover);
}

/* USP Bar */
.sd-usp-bar {
    background: var(--sd-bg);
    padding: 20px 0;
    margin-bottom: 32px;
}

.sd-usp-bar__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.sd-usp-bar__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sd-usp-bar__icon {
    font-size: 24px;
}

.sd-usp-bar__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sd-dark);
}

.sd-usp-bar__subtitle {
    display: block;
    font-size: 12px;
    color: var(--sd-text-muted);
}

/* Section Headers */
.sd-section {
    margin-bottom: 40px;
}

.sd-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sd-section__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--sd-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-section__title--center {
    justify-content: center;
    text-align: center;
    width: 100%;
}

.sd-section__title-icon {
    font-size: 24px;
}

.sd-section__link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--sd-orange);
    text-decoration: none;
    font-weight: 500;
}

.sd-section__link:hover {
    text-decoration: underline;
}

/* Categories Grid */
.sd-categories__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.sd-category-card {
    display: block;
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s;
}

.sd-category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sd-category-card__image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--sd-bg);
}

.sd-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-category-card__content {
    padding: 12px;
}

.sd-category-card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sd-dark);
    margin: 0;
}

/* Homepage Products Grid */
.sd-sale-products .sd-products-grid,
.sd-new-products .sd-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.sd-product-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: var(--sd-red);
    color: var(--sd-white);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 5;
}

.sd-product-card__badge--new {
    background: var(--sd-green);
}

/* Brands Grid */
.sd-brands__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.sd-brands__item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    text-decoration: none;
    min-height: 80px;
}

.sd-brands__item:hover {
    border-color: var(--sd-orange);
}

.sd-brands__item img {
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
}

.sd-brands__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sd-dark);
}

/* Homepage Responsive */
@media (max-width: 1024px) {
    .sd-usp-bar__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sd-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sd-sale-products .sd-products-grid,
    .sd-new-products .sd-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sd-brands__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .sd-slide__title {
        font-size: 24px;
    }
    
    .sd-usp-bar__grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .sd-categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sd-sale-products .sd-products-grid,
    .sd-new-products .sd-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sd-brands__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sd-hero-slider__nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .sd-usp-bar__grid {
        grid-template-columns: 1fr;
    }
    
    .sd-slide {
        min-height: 200px;
        padding: 20px;
    }
    
    .sd-slide__title {
        font-size: 20px;
    }
}
