/* =========================================================
   SAVVY LEATHER CRAFT
   SHOP PAGE
   ========================================================= */


/* =========================================================
   SHOP HERO
   ========================================================= */

.shop-hero {

    position: relative;

    background:
        linear-gradient(
            135deg,
            var(--color-cream) 0%,
            var(--color-beige) 100%
        );

    padding: 100px 0 90px;

    text-align: center;

    border-bottom: 1px solid var(--color-border);

    overflow: hidden;
}


/* ---------------------------------------------------------
   HERO DECORATIVE LINE
   --------------------------------------------------------- */

.shop-hero::before {

    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 1px;
    height: 100%;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(74, 56, 47, .08),
            transparent
        );

    transform: translateX(-50%);

    pointer-events: none;
}


.shop-hero .container {

    position: relative;

    z-index: 1;

    max-width: 760px;
}


.shop-hero .section-eyebrow {

    display: inline-block;

    margin-bottom: 18px;

    color: var(--color-brown);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .2em;

    text-transform: uppercase;
}


.shop-hero h1 {

    margin: 0 0 20px;

    color: var(--color-black);

    font-family: var(--font-display);

    font-size: clamp(
        44px,
        5vw,
        68px
    );

    font-weight: 400;

    line-height: 1.04;

    letter-spacing: -.035em;
}


.shop-hero p {

    max-width: 620px;

    margin: 0 auto;

    color: var(--color-text-light);

    font-size: 15px;

    line-height: 1.85;
}


/* =========================================================
   SHOP PAGE
   ========================================================= */

.shop-page {

    padding: 75px 0 110px;

    background: var(--color-white);
}


/* =========================================================
   SHOP TOOLBAR
   ========================================================= */

.shop-toolbar {

    display: grid;

    grid-template-columns:
        minmax(280px, 1fr)
        210px
        210px;

    gap: 12px;

    margin-bottom: 32px;

    padding: 12px;

    background: #f7f3ee;

    border: 1px solid var(--color-border);

    border-radius: 0;

    box-shadow:
        0 10px 35px rgba(35, 27, 22, .035);
}


/* =========================================================
   SEARCH
   ========================================================= */

.shop-search {

    position: relative;
}


.shop-search::before {

    content: "⌕";

    position: absolute;

    top: 50%;

    left: 17px;

    transform: translateY(-52%);

    color: #8e8178;

    font-size: 21px;

    line-height: 1;

    pointer-events: none;

    z-index: 2;
}


.shop-search input {

    width: 100%;

    height: 54px;

    padding: 0 18px 0 47px;

    background: var(--color-white);

    border: 1px solid transparent;

    border-radius: 0;

    color: var(--color-text);

    font-family: var(--font-primary);

    font-size: 13px;

    outline: none;

    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}


.shop-search input::placeholder {

    color: #9a928a;
}


.shop-search input:hover {

    border-color: #ddd4cb;
}


.shop-search input:focus {

    background: #fff;

    border-color: var(--color-brown);

    box-shadow:
        0 0 0 3px rgba(74, 56, 47, .06);
}


/* =========================================================
   FILTER + SORT
   ========================================================= */

.shop-filter,
.shop-sort {

    position: relative;
}


.shop-filter select,
.shop-sort select {

    width: 100%;

    height: 54px;

    padding: 0 42px 0 16px;

    appearance: none;

    background-color: var(--color-white);

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            var(--color-brown) 50%
        ),
        linear-gradient(
            135deg,
            var(--color-brown) 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 19px) 23px,
        calc(100% - 14px) 23px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;

    border: 1px solid transparent;

    border-radius: 0;

    color: var(--color-text);

    font-family: var(--font-primary);

    font-size: 13px;

    cursor: pointer;

    outline: none;

    transition:
        border-color .25s ease,
        box-shadow .25s ease;
}


.shop-filter select:hover,
.shop-sort select:hover {

    border-color: #ddd4cb;
}


.shop-filter select:focus,
.shop-sort select:focus {

    border-color: var(--color-brown);

    box-shadow:
        0 0 0 3px rgba(74, 56, 47, .06);
}


/* =========================================================
   RESULTS BAR
   ========================================================= */

.shop-results-bar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 30px;

    padding-bottom: 15px;

    border-bottom: 1px solid var(--color-border);
}


.shop-results-bar p {

    margin: 0;

    color: var(--color-text-light);

    font-size: 12px;

    letter-spacing: .02em;
}


.shop-results-bar p strong {

    color: var(--color-text);

    font-weight: 700;
}


/* =========================================================
   SHOP PRODUCT GRID
   ---------------------------------------------------------
   Layout only.
   Product card styling is handled separately.
   ========================================================= */

.shop-product-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 42px 24px;

    min-height: 300px;
}


/* =========================================================
   LOADING STATE
   ========================================================= */

.shop-loading {

    grid-column: 1 / -1;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 360px;

    color: var(--color-text-light);

    text-align: center;
}


.shop-loading p {

    margin: 18px 0 0;

    font-size: 13px;
}


.loading-spinner {

    width: 38px;

    height: 38px;

    border: 2px solid var(--color-border);

    border-top-color: var(--color-brown);

    border-radius: 50%;

    animation:
        shopSpinner .8s linear infinite;
}


@keyframes shopSpinner {

    from {

        transform: rotate(0deg);

    }

    to {

        transform: rotate(360deg);

    }

}


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

.shop-empty {

    max-width: 520px;

    margin: 60px auto 20px;

    padding: 60px 30px;

    background: var(--color-cream);

    border: 1px solid var(--color-border);

    border-radius: 0;

    text-align: center;
}


.shop-empty[hidden] {

    display: none;
}


.shop-empty-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 58px;

    height: 58px;

    margin: 0 auto 22px;

    background: var(--color-beige);

    border-radius: 50%;

    color: var(--color-brown);

    font-size: 22px;
}


.shop-empty h2 {

    margin: 0 0 10px;

    color: var(--color-black);

    font-family: var(--font-display);

    font-size: 30px;

    font-weight: 400;
}


.shop-empty p {

    max-width: 380px;

    margin: 0 auto 25px;

    color: var(--color-text-light);

    font-size: 14px;

    line-height: 1.7;
}


/* =========================================================
   ERROR / EMPTY MESSAGES
   ========================================================= */

.shop-product-grid .product-empty,
.shop-product-grid .product-error,
.shop-product-grid .category-empty,
.shop-product-grid .category-error {

    grid-column: 1 / -1;

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 300px;

    padding: 30px;

    color: var(--color-text-light);

    text-align: center;
}


.shop-product-grid .product-error {

    color: #9B4A42;
}


/* =========================================================
   SHOP CTA
   ========================================================= */

.shop-cta {

    position: relative;

    padding: 105px 20px;

    background:
        linear-gradient(
            135deg,
            var(--color-dark-brown),
            var(--color-brown)
        );

    color: var(--color-white);

    text-align: center;

    overflow: hidden;
}


.shop-cta::before {

    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 1px;
    height: 100%;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(255,255,255,.10),
            transparent
        );

    transform: translateX(-50%);
}


.shop-cta .container {

    position: relative;

    z-index: 1;

    max-width: 720px;
}


.shop-cta .section-eyebrow {

    display: inline-block;

    margin-bottom: 18px;

    color: #D8C9BB;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .2em;

    text-transform: uppercase;
}


.shop-cta h2 {

    margin: 0 0 18px;

    color: var(--color-white);

    font-family: var(--font-display);

    font-size: clamp(
        38px,
        5vw,
        56px
    );

    font-weight: 400;

    line-height: 1.08;
}


.shop-cta p {

    max-width: 580px;

    margin: 0 auto 30px;

    color: #E4DCD5;

    font-size: 15px;

    line-height: 1.8;
}


.shop-cta .btn-primary {

    background: var(--color-white);

    color: var(--color-black);

    border-color: var(--color-white);

    border-radius: 0;
}


.shop-cta .btn-primary:hover {

    background: var(--color-cream);

    border-color: var(--color-cream);
}


/* =========================================================
   SCREEN READER ONLY
   ========================================================= */

.sr-only {

    position: absolute;

    width: 1px;

    height: 1px;

    padding: 0;

    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1400px) {

    .shop-page {

        padding-top: 85px;

        padding-bottom: 120px;
    }


    .shop-product-grid {

        gap: 48px 28px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .shop-product-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    .shop-toolbar {

        grid-template-columns:
            minmax(220px, 1fr)
            200px
            200px;
    }

}


/* =========================================================
   TABLET / SMALL LAPTOP
   ========================================================= */

@media (max-width: 850px) {

    .shop-hero {

        padding: 75px 0 68px;
    }


    .shop-page {

        padding: 58px 0 80px;
    }


    .shop-toolbar {

        grid-template-columns:
            1fr
            1fr;
    }


    .shop-search {

        grid-column: 1 / -1;
    }


    .shop-product-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 30px 20px;
    }


    .shop-cta {

        padding: 80px 20px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .shop-hero {

        padding: 58px 0 52px;
    }


    .shop-hero h1 {

        font-size: 40px;

        letter-spacing: -.025em;
    }


    .shop-hero p {

        font-size: 14px;

        line-height: 1.75;
    }


    .shop-page {

        padding: 42px 0 65px;
    }


    .shop-toolbar {

        grid-template-columns: 1fr;

        gap: 10px;

        padding: 10px;

        margin-bottom: 25px;
    }


    .shop-search {

        grid-column: auto;
    }


    .shop-search input,
    .shop-filter select,
    .shop-sort select {

        height: 50px;
    }


    .shop-results-bar {

        margin-bottom: 22px;

        padding-bottom: 12px;
    }


    .shop-results-bar p {

        font-size: 12px;
    }


    .shop-product-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 30px 14px;
    }


    .shop-empty {

        margin-top: 40px;

        padding: 45px 22px;
    }


    .shop-empty h2 {

        font-size: 26px;
    }


    .shop-cta {

        padding: 68px 20px;
    }


    .shop-cta h2 {

        font-size: 38px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .shop-product-grid {

        gap: 26px 11px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .shop-search input,
    .shop-filter select,
    .shop-sort select {

        transition: none;
    }

}