/* Shop Page Styles */
:root {
    --primary: #ff6b47;
    --primary-hover: #e55a38;
    --text-primary: #0f1111;
    --text-secondary: #565959;
    --text-light: #767676;
    --border: #d5d9d9;
    --border-light: #e7e7e7;
    --bg-page: #faf8f5;
    --bg-white: #ffffff;
    --success: #067d62;
    --error: #c40000;
}

.shop-page {
    background: var(--bg-page);
    min-height: 100vh;
}

body.shop-filters-open {
    overflow: hidden;
}

/* Breadcrumb */
.breadcrumb {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
}

.breadcrumb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

.breadcrumb a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-primary);
}

/* Shop Header */
.shop-header {
    background: var(--bg-white);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.shop-header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.shop-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.shop-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Shop Content Layout */
.shop-content {
    padding: 32px 0;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

/* Sidebar */
.shop-sidebar {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 24px;
}

.shop-sidebar-backdrop,
.shop-sidebar-header,
.mobile-filter-btn {
    display: none;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-sidebar-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 6px;
}

.shop-sidebar-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: #fff;
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-sidebar-close:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.shop-sidebar-close svg {
    width: 18px;
    height: 18px;
}

.filter-section {
    margin-bottom: 28px;
}

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

.filter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 4px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.category-list a:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

.category-list a.active {
    background: #fff5f3;
    color: var(--primary);
    font-weight: 500;
}

.category-list .count {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-page);
    padding: 2px 8px;
    border-radius: 10px;
}

.category-list a.active .count {
    background: var(--primary);
    color: white;
}

/* Price Filter */
.price-filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

.price-separator {
    color: var(--text-light);
}

.filter-btn {
    padding: 10px 16px;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: #232f3e;
}

/* Checkbox Filters */
.checkbox-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.checkbox-label span {
    flex: 1;
}

/* Clear Filters */
.clear-filters {
    display: block;
    text-align: center;
    padding: 12px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--primary);
    border-radius: 6px;
    margin-top: 20px;
    transition: all 0.2s;
}

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

/* Shop Main */
.shop-main {
    min-height: 500px;
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-white);
    border-radius: 8px;
}

.results-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-wrapper label {
    font-size: 14px;
    color: var(--text-secondary);
}

.sort-wrapper select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23565959' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
}

.sort-wrapper select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Product Card - inherits from homepage.css but some overrides */
.shop-page .product-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.shop-page .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Price Wrapper */
.price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-price-old {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper nav {
    display: flex;
    gap: 4px;
}

.pagination-wrapper .relative {
    display: flex;
    gap: 4px;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--bg-white);
    transition: all 0.2s;
}

.pagination-wrapper a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-wrapper span[aria-current="page"] span,
.pagination-wrapper .bg-blue-50 {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-wrapper span[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-white);
    border-radius: 12px;
}

.no-products svg {
    width: 64px;
    height: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.no-products p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.btn-browse {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .shop-container {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .filter-section {
        margin-bottom: 0;
    }

    .clear-filters {
        grid-column: 1 / -1;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .breadcrumb-container {
        padding: 0 16px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .breadcrumb-container::-webkit-scrollbar {
        display: none;
    }

    .shop-header {
        padding: 26px 0 24px;
    }

    .shop-title {
        font-size: 26px;
    }

    .shop-description {
        font-size: 14px;
        line-height: 1.7;
    }

    .shop-toolbar {
        margin-bottom: 18px;
        padding: 14px;
        border-radius: 18px;
        gap: 14px;
        align-items: flex-start;
        flex-direction: column;
    }

    .results-count {
        font-size: 13px;
    }

    .toolbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        align-items: center;
    }

    .mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 46px;
        padding: 0 16px;
        border: 1px solid #f0d7cf;
        border-radius: 999px;
        background: #fff5f1;
        color: var(--primary);
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        cursor: pointer;
    }

    .mobile-filter-btn svg {
        width: 16px;
        height: 16px;
    }

    .sort-wrapper {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        min-width: 0;
    }

    .sort-wrapper label {
        display: none;
    }

    .sort-wrapper select {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        border-radius: 14px;
        padding-left: 14px;
    }

    .shop-container {
        padding: 0 14px;
        gap: 18px;
    }

    .shop-main {
        min-width: 0;
    }

    .shop-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 17, 17, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
        z-index: 999;
    }

    .shop-page.filters-open .shop-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .shop-sidebar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        max-height: 82vh;
        padding: 20px 16px 28px;
        border-radius: 24px 24px 0 0;
        overflow-y: auto;
        transform: translateY(calc(100% + 24px));
        transition: transform 0.32s ease;
        z-index: 1000;
        box-shadow: 0 -20px 48px rgba(15, 17, 17, 0.18);
    }

    .shop-page.filters-open .shop-sidebar {
        transform: translateY(0);
    }

    .shop-sidebar-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin: -2px 0 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--border-light);
        position: sticky;
        top: -20px;
        background: var(--bg-white);
        z-index: 2;
    }

    .shop-sidebar-header h2 {
        margin: 0;
        font-size: 24px;
        color: var(--text-primary);
    }

    .shop-sidebar-close {
        display: inline-flex;
        flex-shrink: 0;
    }

    .filter-section {
        margin-bottom: 14px;
        padding: 16px;
        background: #faf7f5;
        border: 1px solid #efe5df;
        border-radius: 18px;
    }

    .filter-title {
        margin-bottom: 12px;
        padding-bottom: 0;
        border-bottom: none;
        font-size: 15px;
    }

    .category-list li {
        margin-bottom: 8px;
    }

    .category-list a {
        padding: 12px 14px;
        background: #fff;
        border: 1px solid #ebe4de;
        border-radius: 14px;
    }

    .category-list .count {
        flex-shrink: 0;
    }

    .price-inputs {
        gap: 10px;
    }

    .filter-btn {
        width: 100%;
        min-height: 46px;
        border-radius: 999px;
    }

    .checkbox-filters {
        gap: 10px;
    }

    .checkbox-label {
        padding: 12px 14px;
        background: #fff;
        border: 1px solid #ebe4de;
        border-radius: 14px;
    }

    .clear-filters {
        margin-top: 8px;
        border-radius: 999px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .shop-page .product-card {
        border-radius: 20px;
        box-shadow: 0 10px 24px rgba(15, 17, 17, 0.06);
    }

    .shop-page .product-card:hover {
        transform: none;
        box-shadow: 0 10px 24px rgba(15, 17, 17, 0.06);
    }

    .shop-page .product-image {
        height: 168px;
        background: #fbf8f6;
    }

    .shop-page .product-badge {
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 10px;
        box-shadow: 0 8px 20px rgba(255, 107, 71, 0.22);
    }

    .shop-page .product-info {
        padding: 16px 14px 14px;
    }

    .shop-page .product-name {
        margin-bottom: 6px;
        font-size: 15px;
        line-height: 1.35;
        min-height: 40px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .shop-page .product-category {
        margin-bottom: 12px;
        font-size: 11px;
        letter-spacing: 0.08em;
    }

    .shop-page .product-footer {
        margin-top: 14px;
        padding-top: 14px;
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .shop-page .price-wrapper,
    .shop-page .product-price {
        align-self: flex-start;
    }

    .shop-page .product-price {
        font-size: 18px;
    }

    .shop-page .product-price-old {
        font-size: 11px;
    }

    .shop-page .product-btn,
    .shop-page .product-btn-quote {
        width: 100%;
        min-height: 42px;
        padding: 0 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        font-size: 11px;
    }

    .shop-page .product-btn:hover,
    .shop-page .product-btn-quote:hover {
        transform: none;
        box-shadow: none;
    }

    .no-products {
        padding: 48px 22px;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .shop-container {
        padding: 0 12px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .shop-page .product-image {
        height: 150px;
    }

    .shop-page .product-info {
        padding: 14px 12px 12px;
    }

    .shop-page .product-name {
        font-size: 14px;
        min-height: 38px;
    }

    .shop-page .product-price {
        font-size: 17px;
    }

    .shop-page .product-btn,
    .shop-page .product-btn-quote {
        min-height: 40px;
        font-size: 10px;
    }

    .price-inputs {
        flex-wrap: wrap;
    }

    .price-input {
        flex: 1 1 40%;
    }
}
