/* ==========================================================================
   PREMIUM WOOCOMMERCE PRODUCT GRID — STYLESHEET
   Prefix: pwp-
   ========================================================================== */

.pwp-product-grid-widget {
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* ================================
   CATEGORY FILTER BAR
================================ */

.pwp-category-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    width: 100%;
}

.pwp-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.7);
    color: #6b543e;
    border: 1px solid rgba(154, 109, 54, 0.25);
    border-radius: 20px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.pwp-filter-button:hover {
    background: #ffffff;
    color: #a8793d;
    border-color: #a8793d;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(168, 121, 61, 0.15);
}

.pwp-filter-button.is-active {
    background: #a8793d;
    color: #ffffff;
    border-color: #a8793d;
    box-shadow: 0 4px 12px rgba(168, 121, 61, 0.3);
}

/* ================================
   GRID CONTAINER
================================ */

.pwp-product-grid {
    display: grid;
    grid-template-columns: repeat(var(--pwp-columns, 4), minmax(0, 1fr));
    column-gap: var(--pwp-column-gap, 16px);
    row-gap: var(--pwp-row-gap, 16px);
    width: 100%;
    box-sizing: border-box;
}

/* ================================
   PRODUCT CARD
================================ */

.pwp-product-card {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    border: 1px solid rgba(140, 103, 60, 0.18);
    border-radius: 11px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Card Hover Animations */
.pwp-product-card.pwp-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.pwp-product-card.pwp-hover-scale:hover {
    transform: scale(1.02);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.pwp-product-card.pwp-hover-glow:hover {
    box-shadow: 0 14px 30px rgba(168, 121, 61, 0.25);
}

/* ================================
   IMAGE CONTAINER & ZOOM
================================ */

.pwp-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1.55 / 1;
    overflow: hidden;
    background: #eae3d7;
    display: block;
    text-decoration: none;
}

.pwp-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.pwp-product-card:hover .pwp-product-image img {
    transform: scale(1.06);
}

/* ================================
   BADGES (SALE / OUT OF STOCK)
================================ */

.pwp-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 4px;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.pwp-sale-badge {
    background: #a8793d;
    color: #ffffff;
}

.pwp-stock-badge {
    background: #4a4a4a;
    color: #ffffff;
}

/* ================================
   PRODUCT INFO
================================ */

.pwp-product-info {
    padding: 13px 10px 11px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

/* Category */
.pwp-product-category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #8c673c;
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* Title */
.pwp-product-title {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #2c2523;
    margin: 0 0 7px;
}

.pwp-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pwp-product-title a:hover {
    color: #a8793d;
}

/* ================================
   PRICE
================================ */

.pwp-product-price {
    margin-bottom: 13px;
    color: #9a6d36;
    font-family: Georgia, 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.pwp-regular-price {
    font-size: 14px;
    color: #999999;
    font-weight: normal;
    margin-right: 6px;
}

.pwp-regular-price del {
    opacity: 0.75;
}

.pwp-sale-price {
    color: #a8793d;
    font-weight: 700;
}

/* ================================
   BUY BUTTON
================================ */

.pwp-product-action {
    width: 100%;
}

.pwp-buy-button {
    width: 100%;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background: transparent;
    border: 1px solid rgba(154, 109, 54, 0.35);
    border-radius: 6px;
    color: #956833;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    line-height: 1;
}

.pwp-buy-button:hover {
    background: #a8793d;
    color: #ffffff;
    border-color: #a8793d;
    box-shadow: 0 4px 12px rgba(168, 121, 61, 0.25);
}

.pwp-buy-button:active {
    transform: scale(0.98);
}

/* Loading & Added States */
.pwp-buy-button.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.pwp-buy-button.is-added {
    background: #488b49 !important;
    border-color: #488b49 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(72, 139, 73, 0.3) !important;
}

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

.pwp-empty-state {
    padding: 36px 20px;
    text-align: center;
    color: #8c673c;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px dashed rgba(140, 103, 60, 0.25);
    margin: 16px 0;
}

.pwp-empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: #a8793d;
}

.pwp-empty-message {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* ================================
   RESPONSIVE MEDIA QUERIES
================================ */

/* Tablet (<= 1024px) */
@media (max-width: 1024px) {
    .pwp-product-grid {
        grid-template-columns: repeat(var(--pwp-columns-tablet, 3), minmax(0, 1fr));
        column-gap: var(--pwp-column-gap-tablet, 14px);
        row-gap: var(--pwp-row-gap-tablet, 14px);
    }
}

/* Small Tablet / Large Mobile (<= 767px) */
@media (max-width: 767px) {
    .pwp-product-grid {
        grid-template-columns: repeat(var(--pwp-columns-mobile, 2), minmax(0, 1fr));
        column-gap: var(--pwp-column-gap-mobile, 12px);
        row-gap: var(--pwp-row-gap-mobile, 12px);
    }

    .pwp-product-info {
        padding: 11px 8px;
    }

    .pwp-product-price {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .pwp-category-filter {
        gap: 8px;
        margin-bottom: 18px;
    }

    .pwp-filter-button {
        padding: 5px 14px;
        font-size: 10px;
    }
}

/* Mobile (<= 480px) */
@media (max-width: 480px) {
    .pwp-product-grid {
        grid-template-columns: 1fr;
    }

    .pwp-product-image {
        aspect-ratio: 1.7 / 1;
    }
}
