/**
 * Shop All / Product Archive Styles
 *
 * Mobile-first. Sidebar filters, product grid, sort, breadcrumbs.
 */

/* ==========================================================================
   BREADCRUMBS (shared across pages)
   ========================================================================== */

.breadcrumbs {
    background: var(--sky-pale);
    border-bottom: 1px solid var(--sky-light);
    padding: 12px 0;
}

.breadcrumbs__inner {
    font-size: 13px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumb__link {
    color: var(--ocean-deep);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb__link:hover {
    color: var(--ocean-mid);
    text-decoration: underline;
}

.breadcrumb__sep {
    color: var(--text-light);
    margin: 0 4px;
}

.breadcrumb__current {
    color: var(--text-dark);
    font-weight: 600;
}

/* ==========================================================================
   SHOP ARCHIVE WRAPPER
   ========================================================================== */

.shop-archive {
    padding: 24px 0 60px;
}

@media (min-width: 768px) {
    .shop-archive {
        padding: 32px 0 80px;
    }
}

/* ==========================================================================
   SHOP HEADER (title + sort)
   ========================================================================== */

.shop-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .shop-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.shop-header__title-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.shop-header__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
}

@media (min-width: 768px) {
    .shop-header__title {
        font-size: 30px;
    }
}

.shop-header__count {
    font-size: 14px;
    color: var(--text-medium);
    font-weight: 500;
}

.shop-sort {
    appearance: none;
    -webkit-appearance: none;
    background: var(--white);
    border: 1px solid var(--ocean-pale);
    border-radius: var(--radius-md);
    padding: 10px 36px 10px 14px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235A7A8A' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition-fast);
}

.shop-sort:focus {
    outline: none;
    border-color: var(--ocean-mid);
    box-shadow: 0 0 0 3px rgba(46, 151, 203, 0.15);
}

/* ==========================================================================
   MOBILE FILTER TOGGLE
   ========================================================================== */

.shop-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--sky-pale);
    border: 1px solid var(--sky-light);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    margin-bottom: 20px;
    transition: all var(--transition-fast);
}

.shop-filter-toggle:hover {
    background: var(--sky-light);
    border-color: var(--ocean-pale);
}

.shop-filter-toggle__badge {
    background: var(--ocean-deep);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@media (min-width: 1024px) {
    .shop-filter-toggle {
        display: none;
    }
}

/* ==========================================================================
   SHOP LAYOUT (sidebar + content)
   ========================================================================== */

.shop-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 1024px) {
    .shop-layout {
        flex-direction: row;
        gap: 40px;
    }
}

/* ==========================================================================
   SIDEBAR FILTERS
   ========================================================================== */

.shop-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--white);
    overflow-y: auto;
    padding: 20px;
    flex-direction: column;
}

.shop-sidebar.is-open {
    display: flex;
}

@media (min-width: 1024px) {
    .shop-sidebar {
        display: block;
        position: static;
        width: 260px;
        flex-shrink: 0;
        background: transparent;
        overflow: visible;
        padding: 0;
    }

    .shop-sidebar__header {
        display: none;
    }
}

.shop-sidebar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--sky-light);
}

.shop-sidebar__title {
    font-size: 18px;
    font-weight: 700;
}

.shop-header__title-wrap {
    display: none;
}
.shop-sidebar__close {
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--sky-pale);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
}

/* Filter Group */
.filter-group {
    border-bottom: 1px solid var(--sky-light);
    padding: 16px 0;
}

.filter-group:first-of-type {
    padding-top: 0;
}

.filter-group__toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    padding: 0 0 12px;
}

.filter-group__toggle svg {
    transition: transform var(--transition-fast);
}

.filter-group__toggle[aria-expanded="false"] svg {
    transform: rotate(-90deg);
}

.filter-group__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group__toggle[aria-expanded="false"] + .filter-group__options {
    display: none;
}

/* Filter Checkbox */
.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 0;
}

.filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-option__check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--ocean-pale);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.filter-option input:checked + .filter-option__check {
    background: var(--ocean-deep);
    border-color: var(--ocean-deep);
}

.filter-option input:checked + .filter-option__check::after {
    content: "";
    width: 6px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.filter-option__label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    flex: 1;
}

.filter-option__count {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

/* Clear Filters */
.shop-sidebar__clear {
    display: inline-block;
    margin-top: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--coral-accent);
    text-decoration: none;
}

.shop-sidebar__clear:hover {
    color: var(--coral-soft);
    text-decoration: underline;
}

/* ==========================================================================
   SHOP CONTENT (product grid area)
   ========================================================================== */

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

/* Override product grid for archive: 2-col mobile, 3-col desktop */
.shop-content .product-grid--3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .shop-content .product-grid--3 {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .shop-content .product-grid--3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* Series color stripes on product cards */
.wall-product--dryrun-waterproof .wall-product__placeholder::before {
    background: linear-gradient(90deg, var(--ocean-deep) 0%, var(--ocean-mid) 100%);
}

.wall-product--sunbrella-canvas .wall-product__placeholder::before {
    background: linear-gradient(90deg, #1E3A5F 0%, #3A5A7A 100%);
}

.wall-product--sunwashed-canvas .wall-product__placeholder::before {
    background: linear-gradient(90deg, #6A8AAA 0%, #8AAACA 100%);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.shop-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.shop-pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.shop-pagination li {
    margin: 0;
}

.shop-pagination a,
.shop-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.shop-pagination a {
    background: var(--white);
    border: 1px solid var(--ocean-pale);
    color: var(--text-dark);
}

.shop-pagination a:hover {
    background: var(--sky-light);
    border-color: var(--ocean-mid);
    color: var(--ocean-deep);
}

.shop-pagination .current {
    background: var(--ocean-deep);
    color: var(--white);
    border: 1px solid var(--ocean-deep);
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.shop-empty {
    text-align: center;
    padding: 60px 20px;
}

.shop-empty h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.shop-empty p {
    color: var(--text-medium);
    font-size: 16px;
}

.shop-empty a {
    color: var(--ocean-deep);
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .shop-sidebar__close { display: flex; }
    .breadcrumbs { display: none; }
}
.shop-header__sort { margin-left: auto; }
.shop-sidebar { margin-top: -20px; }
.shop-content .shop-header__sort { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.shop-header { display: none; }
.shop-sidebar { padding-top: 5px; }
