/* =========================================
   Power Modding Product Listings
   ========================================= */

.pm-page-section {
    padding: 60px 0 100px;
    background-color: var(--bg-dark);
    min-height: 100vh; /* Ensures fullpage feel */
}

/* --- Header & Filters --- */
.pm-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pm-page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 5px;
    line-height: 1.1;
}

.pm-page-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
}

/* Custom Select Dropdown */
.pm-select-wrapper {
    position: relative;
    width: 200px;
}

.pm-select {
    width: 100%;
    background-color: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 10px 15px;
    border-radius: 6px;
    appearance: none; /* Remove default arrow */
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.pm-select:focus {
    border-color: var(--primary);
}

.pm-select-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
    font-size: 0.8rem;
}

/* --- Product Grid --- */
.pm-products-grid {
    display: grid;
    /* Responsive Grid: Cards are min 300px, but stretch to fill space */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* --- Product Card Styling --- */
.pm-product-card {
    background-color: #141414; /* Card background */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pm-product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Image Area */
.pm-card-media {
    position: relative;
    width: 100%;
    /* 16:9 Aspect Ratio trick */
    padding-top: 56.25%; 
    overflow: hidden;
    background-color: #000;
}

.pm-card-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.pm-product-card:hover .pm-card-media img {
    transform: scale(1.1);
}

/* Badges (Sale/New) */
.pm-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
}

.pm-badge-new {
    background-color: var(--primary);
    color: white;
}

.pm-badge-sale {
    background-color: #fbbf24; /* Gold */
    color: black;
}

/* Overlay Actions (Hidden by default) */
.pm-card-overlay {
    position: absolute;
    inset: 0; /* Top/Left/Right/Bottom 0 */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.pm-btn-quick {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.pm-product-card:hover .pm-btn-quick {
    transform: translateY(0);
}

/* Content Area */
.pm-card-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pm-card-meta {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.pm-card-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.pm-card-title a {
    text-decoration: none;
    color: var(--text-white);
    transition: color 0.2s ease;
}

.pm-card-title a:hover {
    color: var(--primary);
}

/* Footer (Price + Cart) */
.pm-card-footer {
    margin-top: auto; /* Pushes to bottom */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.pm-price-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pm-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-white);
}

.pm-price-old {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #666;
}

.pm-text-red {
    color: var(--primary);
}

/* Add to Cart Button (Small) */
.pm-btn-cart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #222;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-btn-cart:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: rotate(15deg); /* Playful rotation */
}

/* --- Pagination --- */
.pm-pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pm-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 6px;
    background-color: #141414;
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
    padding: 0 15px;
}

.pm-page-link:hover,
.pm-page-link.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pm-page-dots {
    color: var(--text-gray);
    display: flex;
    align-items: flex-end;
    padding: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .pm-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .pm-select-wrapper {
        width: 100%;
    }

    .pm-page-title {
        font-size: 2rem;
    }
}

.pm-btn-disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--primary-red) !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

.pm-price-final { font-size: 2.5rem; font-weight: 800; color: #fff; letter-spacing: -1px; }
.text-red { color: var(--primary-red); }
.pm-price-original { text-decoration: line-through; color: #666; font-size: 1.2rem; margin-right: 10px; }
.pm-sale-timer { color: #fbbf24; font-size: 0.85rem; font-weight: 600; margin-top: 8px; }

.pm-btn-disabled:hover {
    transform: none !important;
}