/* ==========================================================================
   Shop Page - Production Design (Dillon Reference)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* =========== Modern Filter Bar =========== */
.spr-shop-header {
    max-width: 1200px;
    margin: 0 auto 32px;
}

.spr-shop-header__title {
    font-family: 'Inter', sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: #0f172a;
    margin: 0 0 20px;
    line-height: 1;
}

/* Single row filter bar: pills + sorting */
.spr-shop-header__nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.spr-shop-header__nav::-webkit-scrollbar { display: none; }

/* Category pills */
.spr-shop-header__tabs {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.spr-shop-header__tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #64748b;
    background: #f8f8f8;
    border: 1.5px solid #e5e5e5;
    border-radius: 50px;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.spr-shop-header__tab:hover {
    color: #0f172a;
    border-color: #0f172a;
    background: #fff;
}

.spr-shop-header__tab--active {
    color: #ffffff;
    background: #0f172a;
    border-color: #0f172a;
}

/* Sorting — pushed to right */
.spr-shop-header__sorting {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.spr-shop-header__sorting-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.spr-shop-header__sorting .woocommerce-ordering {
    margin: 0;
}

.spr-shop-header__sorting .woocommerce-ordering select {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #0f172a;
    border: 1.5px solid #e5e5e5;
    border-radius: 50px;
    padding: 7px 32px 7px 14px;
    background: #f8f8f8;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%230f172a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s ease;
}

.spr-shop-header__sorting .woocommerce-ordering select:hover,
.spr-shop-header__sorting .woocommerce-ordering select:focus {
    border-color: #0f172a;
    outline: none;
    background-color: #fff;
}

/* =========== Product Grid =========== */
.spr-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========== Product Card =========== */
.spr-product-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.spr-product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Image */
.spr-product-card__image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #e8e5e0;
    border-radius: 10px 10px 0 0;
}

.spr-product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.4s ease;
}

/* OUT OF STOCK */
.spr-product-card__oos-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: rgba(15, 23, 42, 0.85);
    padding: 10px 28px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.spr-product-card__oos-text {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
}

.spr-product-card--oos .spr-product-card__image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    z-index: 3;
    pointer-events: none;
}
.spr-product-card--oos .spr-product-card__oos-overlay { z-index: 6; }

/* Card Info — centered like Dagne Dover */
.spr-product-card__info {
    padding: 16px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.spr-product-card__title-link {
    text-decoration: none;
    color: inherit;
}

.spr-product-card__title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0f172a;
    margin: 0 0 2px;
    line-height: 1.3;
}

.spr-product-card__title-link:hover .spr-product-card__title {
    color: #475569;
}

.spr-product-card__category {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    margin-bottom: 6px;
    display: block;
}

.spr-product-card__price {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}
.spr-product-card__price .amount { color: #0f172a; }
.spr-product-card__price del { opacity: 0.4; margin-right: 6px; }
.spr-product-card__price ins { text-decoration: none; }

/* =========== Color Swatches (rectangular, below image) =========== */
.spr-product-card__swatches-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.spr-product-card__color-swatches {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.spr-product-card__color-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 20px;
    border-radius: 3px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    position: relative;
    outline: none;
}

.spr-product-card__color-swatch:hover {
    border-color: #000000;
}

.spr-product-card__color-swatch--active {
    border-color: #000000;
}

/* Checkmark icon inside swatch */
.spr-product-card__check-icon {
    width: 14px;
    height: 14px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.spr-product-card__color-swatch--active .spr-product-card__check-icon {
    opacity: 1;
}

/* =========== Style Buttons (Patterned / GOV) =========== */
.spr-product-card__style-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.spr-product-card__style-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spr-product-card__style-btn:hover {
    border-color: #000000;
    color: #000000;
}

.spr-product-card__style-btn--active {
    border-color: #000000;
    background: #000000;
    color: #ffffff;
}

/* =========== Add to Cart / Select Options =========== */
.spr-product-card__atc {
    margin-top: auto;
    padding-top: 4px;
}

.spr-product-card__atc-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spr-product-card__atc-btn:hover {
    background: #334155;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15,23,42,0.25);
}

/* =========== Pagination =========== */
.spr-shop-pagination {
    max-width: 1200px;
    margin: 40px auto 0;
    text-align: center;
}

.spr-shop-pagination nav.woocommerce-pagination ul {
    display: inline-flex; gap: 4px; border: none; list-style: none; padding: 0;
}
.spr-shop-pagination nav.woocommerce-pagination ul li { border: none; }
.spr-shop-pagination nav.woocommerce-pagination ul li a,
.spr-shop-pagination nav.woocommerce-pagination ul li span.current {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: #f1f5f9; color: #334155;
    text-decoration: none; border-radius: 8px;
    font-weight: 500; font-size: 13px;
    transition: all 0.2s ease;
}
.spr-shop-pagination nav.woocommerce-pagination ul li span.current,
.spr-shop-pagination nav.woocommerce-pagination ul li a:hover {
    background: #1e293b; color: #ffffff;
}

/* =========== Legacy WC shop wrapper =========== */
.spr-shop-wrapper { background: #ffffff; padding: 40px 20px; }
.spr-shop-wrapper ul.products {
    display: grid !important; grid-template-columns: repeat(3, 1fr);
    gap: 24px; max-width: 1200px; margin: 0 auto !important;
    padding: 0 !important; list-style: none;
}
.spr-shop-wrapper ul.products li.product { width: 100% !important; float: none !important; margin: 0 !important; }
.spr-shop-wrapper .woocommerce-result-count,
.spr-shop-wrapper .woocommerce-ordering { display: none; }

.spr-product-card .reset_variations { display: none !important; }

/* =========== Responsive =========== */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .spr-shop-grid,
    .spr-shop-wrapper ul.products { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .spr-shop-header { padding: 0 16px; }

    /* Filter bar stays one row, scrollable */
    .spr-shop-header__nav { gap: 8px; }
    .spr-shop-header__tab { padding: 7px 14px; font-size: 11px; }
    .spr-shop-header__sorting-label { display: none; }
}

/* Mobile: 1 column */
@media (max-width: 640px) {
    .spr-shop-wrapper { padding: 24px 12px; }

    .spr-shop-grid,
    .spr-shop-wrapper ul.products { grid-template-columns: 1fr; gap: 16px; max-width: 400px; }

    .spr-shop-header { margin: 0 auto 20px; }
    .spr-shop-header__title { font-size: 28px; letter-spacing: -0.5px; }
    .spr-shop-header__tab { padding: 6px 12px; font-size: 10px; }

    .spr-product-card { border-radius: 8px; }
    .spr-product-card__image-wrap { border-radius: 8px 8px 0 0; }
    .spr-product-card__info { padding: 16px; }
    .spr-product-card__title { font-size: 15px; }
    .spr-product-card__category { font-size: 12px; }
    .spr-product-card__price { font-size: 16px; margin-bottom: 12px; }

    .spr-product-card__swatches-wrap { gap: 8px; margin-bottom: 12px; }
    .spr-product-card__color-swatch { width: 32px; height: 32px; }
    .spr-product-card__check-icon { width: 14px; height: 14px; }
    .spr-product-card__style-btn { padding: 6px 14px; font-size: 12px; }
    .spr-product-card__atc-btn { padding: 10px 14px; font-size: 10px; letter-spacing: 2px; }

    .spr-product-card__oos-overlay { padding: 8px 20px; }
    .spr-product-card__oos-text { font-size: 10px; letter-spacing: 2px; }

    .spr-shop-pagination { margin-top: 24px; }
    .spr-shop-pagination nav.woocommerce-pagination ul li a,
    .spr-shop-pagination nav.woocommerce-pagination ul li span.current { width: 36px; height: 36px; font-size: 12px; }
}
