/* Shop page styles */

.lpg-shop {
    --lpg-green-900: #0a5a41;
    --lpg-green-700: #0b6a49;
    --lpg-green-600: #1fa55a;
    --lpg-green-200: #dff2e8;
    --lpg-green-100: #e9f7f0;
    --lpg-ink: #16212b;
    --lpg-muted: #66707a;
    --lpg-shadow: 0 18px 40px rgba(4, 60, 45, 0.16);
    --lpg-soft-shadow: 0 12px 22px rgba(4, 60, 45, 0.12);
    padding: 0;
    background: #fff;
    color: var(--lpg-ink);
}

body.page-template-page-shop-php .lpg-footer,
body.page-template-page-shop .lpg-footer {
    margin-top: 0;
}

body.lpg-shop-filter-open {
    overflow: hidden;
}

body.lpg-shop-filter-open .lpg-shop-filter-button {
    opacity: 0;
    pointer-events: none;
}

.lpg-shop-hero {
    background: var(--lpg-green-900);
    color: #fff;
    padding: 34px 0 40px;
}

.lpg-shop-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 34px);
}

.lpg-shop-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.lpg-shop-content {
    background: var(--lpg-green-100);
    padding: 26px 0 0;
}

.lpg-shop-layout {
    padding-bottom: 32px;
}

.lpg-shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.lpg-shop-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.lpg-shop-sidebar__header {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.lpg-shop-sidebar__header h2 {
    margin: 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--lpg-green-700);
}

.lpg-shop-sidebar__close {
    border: none;
    background: #fff;
    color: var(--lpg-muted);
    border-radius: 999px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--lpg-soft-shadow);
    cursor: pointer;
}

.lpg-shop-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--lpg-soft-shadow);
}

.lpg-shop-card--sidebar {
    margin-bottom: 18px;
}

.lpg-shop-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lpg-green-700);
}

.lpg-shop-cats,
.lpg-shop-filters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.lpg-shop-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--lpg-ink);
    background: #f3f8f5;
    font-weight: 600;
    transition: background 160ms ease, transform 160ms ease;
}

.lpg-shop-cat__count {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--lpg-green-200);
    color: var(--lpg-green-900);
    display: grid;
    place-items: center;
    font-size: 11px;
}

.lpg-shop-cat.is-active,
.lpg-shop-cat:hover {
    background: #e5f2ea;
    transform: translateY(-1px);
}

.lpg-shop-filters label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--lpg-muted);
}

.lpg-shop-filter-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--lpg-muted);
}

.lpg-shop-filter-apply {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    background: var(--lpg-green-700);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--lpg-soft-shadow);
}

.lpg-shop-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lpg-shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.lpg-shop-filter-button {
    display: none;
    align-items: center;
    gap: 8px;
    border: none;
    background: #fff;
    color: var(--lpg-ink);
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: var(--lpg-soft-shadow);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.lpg-shop-filter-icon {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-block;
    background: no-repeat center / contain;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5h14l-5.6 6.2v4.1l-2.8 1.5v-5.6L3 5z' fill='%230a5a41'/%3E%3C/svg%3E");
}

.lpg-shop-count {
    font-size: 13px;
    color: var(--lpg-muted);
}

.lpg-shop-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--lpg-muted);
}

.lpg-shop-sort form {
    margin: 0;
}

.lpg-shop-sort select {
    border-radius: 8px;
    padding: 6px 28px 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
}

.lpg-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lpg-shop-product {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--lpg-soft-shadow);
    display: flex;
    flex-direction: column;
}

.lpg-shop-product__image {
    position: relative;
    display: block;
    overflow: hidden;
}

.lpg-shop-product__image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.lpg-shop-product__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--lpg-green-200);
    color: var(--lpg-green-700);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.lpg-shop-product__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
}

.lpg-shop-product__cat {
    font-size: 11px;
    color: var(--lpg-muted);
}

.lpg-shop-product__body h3 {
    font-size: 15px;
}

.lpg-shop-product__body p {
    font-size: 12px;
    color: var(--lpg-muted);
    margin: 0;
}

.lpg-shop-product__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.lpg-shop-product__price {
    font-weight: 800;
    color: var(--lpg-green-700);
}

.lpg-shop-card__cta,
.lpg-shop-product__footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: #1fa55a;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--lpg-soft-shadow);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.lpg-shop-card__cta:hover,
.lpg-shop-product__footer a:hover {
    transform: translateY(-1px);
    box-shadow: var(--lpg-shadow);
    filter: brightness(1.02);
}

.lpg-shop-card__cta--details {
    padding: 6px 10px;
    font-size: 10px;
    line-height: 1;
    border-radius: 999px;
    font-weight: 700;
    min-width: 0;
    white-space: nowrap;
}

.lpg-shop .added_to_cart {
    display: none !important;
}

.lpg-shop .add_to_cart_button.added::after,
.lpg-shop .add_to_cart_button.added::before,
.lpg-shop .single_add_to_cart_button.added::after,
.lpg-shop .single_add_to_cart_button.added::before {
    content: none !important;
    display: none !important;
}

.lpg-shop-pagination ul {
    list-style: none;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.lpg-shop-pagination a,
.lpg-shop-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff;
    color: var(--lpg-ink);
    text-decoration: none;
    box-shadow: var(--lpg-soft-shadow);
}

.lpg-shop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, visibility 160ms ease;
    z-index: 40;
}

.lpg-shop-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 1024px) {
    .lpg-shop-layout {
        grid-template-columns: 1fr;
    }

    .lpg-shop-sidebar {
        position: fixed;
        top: 72px;
        left: 0;
        bottom: 0;
        width: min(320px, 88vw);
        height: calc(100% - 72px);
        background: var(--lpg-green-100);
        padding: 20px 16px;
        transform: translateX(-100%);
        transition: transform 180ms ease;
        overflow-y: auto;
        z-index: 1050;
        box-shadow: var(--lpg-shadow);
    }

    .lpg-shop-sidebar.is-open {
        transform: translateX(0);
    }

    .lpg-shop-sidebar__header {
        display: flex;
    }

    .lpg-shop-filter-button {
        display: inline-flex;
        width: 48px;
        height: 48px;
        border-radius: 999px;
        padding: 0;
        justify-content: center;
        position: fixed;
        top: 50%;
        left: 12px;
        transform: translateY(-50%);
        z-index: 1040;
    }

    .lpg-shop-filter-button span:last-child {
        display: none;
    }

    .lpg-shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .lpg-shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
