/* =============================================================
   Shop page — matches Shop.html design reference
============================================================= */

.shop-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.shop-header {
    margin-bottom: 40px;
}

.shop-header h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: #fff;
}

.shop-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 2px;
    border: 1px solid #333;
    background: transparent;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    text-decoration: none;
}

.filter-tag:hover {
    border-color: #555;
    color: #fff;
}

.filter-tag.active {
    border-color: #4caf7d;
    color: #4caf7d;
    background: rgba(76, 175, 125, 0.08);
}

.sort-select {
    background: #1c1c1c;
    border: 1px solid #333;
    color: #aaa;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

.sort-select:focus,
.sort-select:hover {
    border-color: #555;
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    position: relative;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Stretched link: makes the whole card clickable to the product page */
.card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0a0a0a;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.img-placeholder {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        #222 0px, #222 10px,
        #1a1a1a 10px, #1a1a1a 20px
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 12px;
    font-family: monospace;
    text-align: center;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    /* sits above .card-link but lets clicks pass through to it;
       only the button itself is interactive */
    z-index: 2;
    pointer-events: none;
}

.product-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
}

.card-overlay .overlay-btn {
    pointer-events: auto;
}

.overlay-btn {
    padding: 10px 28px;
    background: #4caf7d;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    letter-spacing: 0.02em;
    font-family: inherit;
    transition: background 0.18s;
    text-decoration: none;
    display: inline-block;
}

.overlay-btn:hover {
    background: #3d9c6c;
    color: #fff;
}

.badge-free {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #4caf7d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 2px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 2;
}

.card-body {
    padding: 18px 20px 20px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #fff;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-tag {
    font-size: 13px;
    font-weight: 500;
    color: #4caf7d;
    text-transform: capitalize;
}

.card-price {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.card-price.free {
    color: #4caf7d;
}

.shop-empty {
    text-align: center;
    padding: 80px 0;
    color: #666;
}

.shop-more {
    text-align: center;
    margin-top: 48px;
}

.shop-more-btn {
    display: inline-block;
    padding: 14px 40px;
    background: transparent;
    border: 1px solid #4caf7d;
    color: #4caf7d;
    font-size: 15px;
    font-weight: 600;
    border-radius: 2px;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: background 0.2s, color 0.2s;
}

.shop-more-btn:hover {
    background: #4caf7d;
    color: #fff;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .shop-header h1 {
        font-size: 32px;
    }
}

@media (max-width: 500px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .sort-select {
        width: 100%;
    }
}

/* =============================================================
   Override WooCommerce default price color (was rendering gold)
============================================================= */
.shop-page .card-price,
.shop-page .card-price.free,
.shop-page .card-price .amount,
.shop-page .card-price bdi,
.shop-page .card-price span.woocommerce-Price-amount,
.shop-page .product-card .card-price,
.shop-page .product-card .card-price * {
    color: #ffffff !important;
}

.shop-page .card-price.free,
.shop-page .card-price.free .amount,
.shop-page .card-price.free bdi,
.shop-page .card-price.free .woocommerce-Price-amount {
    color: #4caf7d !important;
}

/* Category tag — ensure theme green */
.shop-page .card-tag {
    color: #4caf7d !important;
}

/* Free badge — ensure theme green */
.shop-page .badge-free {
    background: #4caf7d !important;
    color: #ffffff !important;
}

/* Filter tag active state */
.shop-page .filter-tag.active {
    border-color: #4caf7d !important;
    color: #4caf7d !important;
    background: rgba(76, 175, 125, 0.08) !important;
}

/* Add to Cart overlay button */
.shop-page .overlay-btn,
.shop-page .overlay-btn:hover,
.shop-page .overlay-btn:focus {
    background: #4caf7d !important;
    color: #ffffff !important;
}

.shop-page .overlay-btn:hover {
    background: #3d9c6c !important;
}

/* =============================================================
   Glassmorphism — shop product cards
============================================================= */
.product-card {
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 55%),
        rgba(15, 20, 16, 0.55);
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    backdrop-filter: blur(20px) saturate(135%);
    border: 1px solid rgba(79, 157, 69, 0.18);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.product-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(79, 157, 69, 0.2);
}

/* Frost the hover overlay instead of a flat dim */
.card-overlay {
    background: rgba(10, 10, 10, 0.35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
