﻿:root {
    --primary-color: #f97316;
    --primary-hover: #ea580c;
    --text-dark: #1c1917;
    --text-muted: #78716c;
    --bg-light: #fafaf9;
    --border-color: #e7e5e4;
}

body {    
    color: var(--text-dark);
    background-color: #fff;
}

/* Header */
.shop-header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
}

.brand-logo {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-link-custom {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    padding: 0.5rem 0;
}

    .nav-link-custom:hover,
    .nav-link-custom.active {
        color: var(--primary-color);
    }

        .nav-link-custom.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--primary-color);
        }

.icon-btn {
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
    color: var(--text-dark);
    border: none;
    background: transparent;
}

    .icon-btn:hover {
        background-color: var(--bg-light);
    }

    .icon-btn.active {
        color: var(--primary-color);
    }

/* Banner */
.shop-banner {
    background-color: var(--bg-light);
    padding: 3rem 0;
}

    .shop-banner h1 {
        font-size: 1.875rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

.breadcrumb-custom {
    font-size: 0.875rem;
}

    .breadcrumb-custom a {
        color: var(--text-dark);
        text-decoration: none;
        transition: color 0.2s;
    }

        .breadcrumb-custom a:hover {
            color: var(--primary-color);
        }

    .breadcrumb-custom span {
        color: var(--text-muted);
    }

/* Sidebar */
.search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

    .search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    }

.search-wrapper {
    position: relative;
}

    .search-wrapper i {
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
    }

.category-title {
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
}

.category-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 0.25rem 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

    .category-link:hover,
    .category-link.active {
        color: var(--primary-color);
        background-color: var(--kn-bg-soft, #fff7f3);
        border-radius: 5px;
    }

    .category-link.active {
        font-weight: 500;
        background-color: var(--kn-bg-soft, #fff7f3);
        border-radius: 5px;
    }

/* Product Grid */
.results-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Original <select> is hidden by the nice-select plugin; .nice-select below is what renders */
.sort-select {
    min-width: 160px;
}

.sort-select.nice-select {
    display: flex;
    align-items: center;
    height: auto;
    line-height: 1.25;
    padding: 0.5rem 2.25rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    background-color: #fff;
}

.sort-select.nice-select:hover,
.sort-select.nice-select.open,
.sort-select.nice-select:focus {
    border-color: var(--primary-color);
}

.sort-select.nice-select::after {
    border-bottom: 2px solid var(--text-muted);
    border-right: 2px solid var(--text-muted);
    right: 1rem;
    margin-top: -5px;
}

.sort-select.nice-select .current {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sort-select.nice-select .list {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sort-select.nice-select .option {
    font-size: 0.875rem;
    color: var(--text-dark);
}

.sort-select.nice-select .option:hover,
.sort-select.nice-select .option.focus,
.sort-select.nice-select .option.selected {
    background-color: var(--primary-color);
    color: #fff;
}

.sort-select::-ms-expand {
    display: none;
}

    .sort-select:focus {
        outline: none;
        border-color: var(--primary-color);
    }

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 10;
}

.badge-new {
    background-color: var(--primary-color);
    color: #fff;
}

.badge-sale {
    background-color: #b91c1c;
    color: #fff;
}

.product-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
    z-index: 10;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

    .action-btn:hover {
        background-color: var(--primary-color);
        color: #fff;
    }

.add-to-cart-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s;
    cursor: pointer;
}

    .add-to-cart-btn:hover {
        background: var(--primary-hover);
    }

.product-card:hover .add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

.product-info {
    padding: 1rem;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-title {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

    .product-title:hover {
        color: var(--primary-color);
    }

    .product-title a {
        color: inherit;
        text-decoration: none;
    }

        .product-title a:hover {
            color: var(--primary-color);
        }

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-current {
    font-weight: 600;
    color: var(--kn-primary-text, #b4470a);
}

.price-original {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.star-filled {
    color: #fbbf24;
}

.star-empty {
    color: #d1d5db;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.col-lg-4 {
    margin-top: 1.5rem;
}

.me-2 {
    margin-right: .5rem !important;
}

.pagination .page-link {
    color: var(--text-dark);
    border-color: var(--border-color);
    padding: 0.5rem 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

    .pagination .page-link:hover {
        color: var(--primary-color);
        background-color: var(--bg-light);
        border-color: var(--border-color);
    }

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: var(--bg-light);
}

/* Make the product image a clickable link to the details page */
.product-image-link { display: block; width: 100%; height: 100%; }

/* Responsive */
@media (hover: none), (max-width: 991.98px) {
    /* .product-actions and .add-to-cart-btn are only revealed on :hover elsewhere in
       this file — touch devices have no hover state, so without this they're
       permanently invisible and Add to Cart becomes unreachable from the grid. */
    .product-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .add-to-cart-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .shop-toolbar,
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .sort-select.nice-select {
        width: 100%;
    }
}
