/* =================================
   SHOP LAYOUT — FlexiPets V3 style
   ================================= */

body.fp-shop-page {
    background:
        radial-gradient(circle at 8% 10%, rgba(255, 224, 236, 0.75), transparent 28%),
        radial-gradient(circle at 83% 7%, rgba(238, 222, 255, 0.72), transparent 33%),
        linear-gradient(180deg, #fff7ef 0%, #fff3f4 56%, #fff9f1 100%);
    overflow-x: clip;
}

body.fp-shop-page .fp-main-content.fp-shop-main-wrap,
body.fp-shop-page .fp-page-wrap.fp-shop-page-wrap {
    max-width: var(--fp-page-max-width, 1320px);
    width: var(--fp-page-width, min(100%, 1320px));
    margin: 0 auto;
    padding: 24px var(--fp-page-gutter, 20px) 56px;
    box-sizing: border-box;
    overflow-x: clip;
}

body.fp-shop-page .woocommerce-products-header {
    display: none;
}

/* Intro hero */
.fp-shop-intro {
    position: relative;
    margin: 8px 0 28px;
    padding: 32px 36px 30px;
    border-radius: 30px;
    background: rgba(255, 250, 245, 0.76);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 10px 25px rgba(93, 55, 125, 0.09);
    overflow: hidden;
}

.fp-shop-intro::before {
    content: "✨";
    position: absolute;
    top: 22px;
    right: 28px;
    font-size: 28px;
    opacity: 0.85;
    pointer-events: none;
}

.fp-shop-intro::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 24px;
    border: 1px solid rgba(139, 92, 246, 0.08);
    pointer-events: none;
}

.fp-shop-intro__title {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: clamp(32px, 3.6vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--fp-violet, #8b5cf6);
    max-width: 900px;
}

.fp-shop-intro__text {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 760px;
    font-size: 17px;
    line-height: 1.62;
    color: #374154;
}

/* Two-column layout */
.fp-shop-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.fp-shop-sidebar {
    min-width: 0;
    max-width: 100%;
}

.fp-shop-sidebar__panel {
    display: block;
    min-width: 0;
}

.fp-shop-sidebar__summary {
    display: none;
    list-style: none;
    cursor: pointer;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: 0 8px 18px rgba(91, 53, 138, 0.06);
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #342952;
}

.fp-shop-sidebar__summary::-webkit-details-marker {
    display: none;
}

.fp-shop-sidebar__summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.1);
    color: #6d4bd1;
    flex-shrink: 0;
}

.fp-shop-sidebar__summary-label {
    flex: 1 1 auto;
    min-width: 0;
}

.fp-shop-sidebar__summary-chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.fp-shop-sidebar__panel[open] > .fp-shop-sidebar__summary .fp-shop-sidebar__summary-chevron {
    transform: rotate(-135deg);
    margin-top: 2px;
}

/* Sidebar */
.fp-shop-sidebar__box {
    position: sticky;
    top: 110px;
    padding: 22px 18px;
    border-radius: 26px;
    background: rgba(255, 250, 245, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 25px rgba(93, 55, 125, 0.09);
}

.fp-shop-sidebar__title {
    margin: 0 0 14px;
    padding: 0 8px 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--fp-violet, #8b5cf6);
}

.fp-shop-sidebar__nav {
    min-width: 0;
    max-width: 100%;
}

.fp-shop-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fp-shop-sidebar__item + .fp-shop-sidebar__item {
    margin-top: 6px;
}

.fp-shop-sidebar__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none !important;
    color: #333846 !important;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 800;
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fp-shop-sidebar__link:hover {
    background: rgba(155, 124, 255, 0.1);
    color: #5b35b8 !important;
    transform: translateX(2px);
}

.fp-shop-sidebar__link.is-active {
    background: linear-gradient(180deg, #a66cff, #7f42f3);
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(125, 60, 242, 0.22);
}

.fp-shop-sidebar__count {
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.12);
    color: #6d4bd1;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.fp-shop-sidebar__link.is-active .fp-shop-sidebar__count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Main content panel — like fp-v3-offers section */
.fp-shop-content {
    min-width: 0;
    padding: 24px;
    border-radius: 30px;
    background: rgba(255, 250, 245, 0.68);
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: 0 10px 25px rgba(93, 55, 125, 0.09);
}

.fp-shop-content__header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.fp-shop-content__title {
    margin: 0 0 8px;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--fp-violet, #8b5cf6);
}

.fp-shop-content__description {
    color: #5a5f72;
    font-size: 16px;
    line-height: 1.6;
}

.fp-shop-content__description p:last-child {
    margin-bottom: 0;
}

@media (min-width: 961px) {
    .fp-shop-sidebar__summary {
        display: none !important;
    }

    .fp-shop-sidebar__panel > .fp-shop-sidebar__box {
        display: block !important;
    }
}

@media (max-width: 960px) {
    .fp-shop-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .fp-shop-sidebar {
        order: 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .fp-shop-content {
        order: 1;
        width: 100%;
        max-width: 100%;
    }

    .fp-shop-sidebar__summary {
        display: flex;
    }

    .fp-shop-sidebar__box {
        position: static;
        padding: 14px 12px 16px;
        overflow: hidden;
    }

    .fp-shop-sidebar__title {
        display: none;
    }

    .fp-shop-sidebar__list {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 2px 2px 6px;
        margin: 0 -2px;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .fp-shop-sidebar__item {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .fp-shop-sidebar__item + .fp-shop-sidebar__item {
        margin-top: 0;
    }

    .fp-shop-sidebar__link {
        justify-content: flex-start;
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 14px;
        transform: none;
    }

    .fp-shop-sidebar__link:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    body.fp-shop-page .fp-main-content.fp-shop-main-wrap,
    body.fp-shop-page .fp-page-wrap.fp-shop-page-wrap {
        padding: 16px var(--fp-page-gutter, 14px) 40px;
    }

    .fp-shop-intro {
        padding: 22px 18px;
        border-radius: 22px;
        margin-bottom: 20px;
    }

    .fp-shop-intro__title {
        font-size: clamp(28px, 8vw, 36px);
    }

    .fp-shop-intro__text {
        font-size: 16px;
        line-height: 1.55;
    }

    .fp-shop-intro::before {
        display: none;
    }

    .fp-shop-content {
        padding: 16px 14px 20px;
        border-radius: 22px;
    }

    .fp-shop-content__header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .fp-shop-content__title {
        font-size: clamp(22px, 6vw, 28px);
    }
}
