/* ==========================================================================
   PISTON TRIBE: MERCH STORE COMPLETE STYLES
   Context: /shop/merch/ (Category Archive)
   Scope: .merch-store-wrapper
   ========================================================================== */

/* --- 1. FULL WIDTH RESET --- */
body:has(.merch-store-wrapper) .site.grid-container,
body:has(.merch-store-wrapper) #content,
body:has(.merch-store-wrapper) .site-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.merch-store-wrapper {
    width: 100%;
    background-color: #fff;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- 2. LAYOUT CONTAINERS --- */
.merch-store-wrapper .merch-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.merch-store-wrapper .merch-section {
    margin-bottom: 80px;
}

/* Header Styles */
.merch-store-wrapper .merch-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000000;
    padding-bottom: 15px;
}

.merch-store-wrapper .merch-section-title {
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    color: #111;
    margin: 0;
    letter-spacing: -0.5px;
}

.merch-store-wrapper .merch-link-simple {
    text-decoration: none;
    color: #000000;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}
.merch-store-wrapper .merch-link-simple:hover { color: #555; }


/* --- 3. HERO SECTION (Original Dark Style) --- */
.merch-store-wrapper .merch-hero-section {
    position: relative;
    height: 70vh; 
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    margin-bottom: 60px;
}

/* Dark Overlay */
.merch-store-wrapper .merch-hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.merch-store-wrapper .merch-hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    color: #fff;
    padding: 40px 0;
}

.merch-store-wrapper .merch-hero-tag {
    display: inline-block;
    background: #d00;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 12px;
    margin-bottom: 15px;
    border-radius: 2px;
}

.merch-store-wrapper .merch-hero-title {
    font-size: 64px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 20px;
    color: #fff;
}

.merch-store-wrapper .merch-hero-subtitle {
    font-size: 20px;
    color: #ddd;
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.5;
}

.merch-store-wrapper .merch-btn-primary {
    display: inline-block;
    background-color: transparent;
    color: #fff;
    padding: 18px 40px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid #fff;
}

.merch-store-wrapper .merch-btn-primary:hover {
    background-color: #fff;
    color: #000;
}

/* --- 4. CAROUSEL STYLES (Trending Merch) --- */
.merch-store-wrapper .native-carousel { position: relative; padding-bottom: 20px; }
.merch-store-wrapper .carousel-inner { overflow: hidden; }

/* Flex track ensures equal height for children */
.merch-store-wrapper .carousel-track { 
    display: flex; 
    gap: 15px; 
    align-items: stretch; /* vital for equal height */
}

/* Sizing: 5.5 Items visible on Desktop (18.18%) */
.merch-store-wrapper .carousel-item { 
    flex: 0 0 18.18%; 
    min-width: 0; 
    display: flex; /* Makes the card inside stretch */
    height: auto;
} 

/* Card Container */
.merch-store-wrapper .merch-carousel-section .custom-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 0;
    width: 100%;
    height: 100%; /* Fills the flex item */
    display: flex; 
    flex-direction: column;
    text-align: center;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.merch-store-wrapper .merch-carousel-section .custom-product-card:hover {
    border-color: #ccc;
}

/* Image Wrapper: Full fill, no padding */
.merch-store-wrapper .merch-carousel-section .product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: #f9f9f9;
    margin-bottom: 15px;
    overflow: hidden;
    border-bottom: 1px solid #000000;
}

.merch-store-wrapper .merch-carousel-section .product-image-wrapper img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Forces image to fill the square completely */
    padding: 0; /* Removed padding as requested */
    mix-blend-mode: normal; /* Changed to normal so photos look correct */
}

/* Typography Updates */
.merch-store-wrapper .merch-carousel-section .product-details {
    padding: 0 10px 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1; /* Pushes content to fill space */
}

/* Brand: 14px Bold */
.merch-store-wrapper .merch-carousel-section .product-brand {
    display: block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

/* Title: 16px Regular */
.merch-store-wrapper .merch-carousel-section .product-title { 
    font-size: 16px; 
    font-weight: 400; /* Regular weight */
    color: #111;
    line-height: 1.3;
    text-align: center;
}

/* Price: 14px Default */
.merch-store-wrapper .merch-carousel-section .product-price { 
    font-size: 14px; 
    color: #111; 
    font-weight: 500; 
    margin: auto auto 0 auto; /* Pushes price to bottom of card */
    text-align: center;
}

/* Price Logic: Red for the actual sale price */
.merch-store-wrapper .merch-carousel-section .product-price del {
    color: #999; /* Old price is grey */
    margin-right: 8px;
    font-weight: 400;
    text-decoration: line-through;
    opacity: 1;
}

/* The new price (ins) turns red */
.merch-store-wrapper .merch-carousel-section .product-price ins { 
    text-decoration: none; 
    color: #e63946; /* Red for the discounted price */
    font-weight: 700;
}

/* Hide Ribbons for Carousel */
.merch-store-wrapper .merch-carousel-section .sale-ribbon, 
.merch-store-wrapper .merch-carousel-section .new-ribbon { display: none; }


/* --- 5. CATEGORIES GRID (NAV STYLE) --- */
.merch-store-wrapper .merch-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
}

.merch-store-wrapper .merch-cat-card {
    position: relative;
    display: flex; /* Flex ensures content pushes to bottom */
    flex-direction: column;
    justify-content: flex-end; /* Aligns content to bottom */
    width: 100%;
    aspect-ratio: 1 / 1; /* Square */
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    background: #000;
    transition: transform 0.3s ease;
}

/* Background Image */
.merch-store-wrapper .merch-cat-card img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.85;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
}

/* Gradient Overlay - Created with CSS */
.merch-store-wrapper .merch-cat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 75%;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Content Wrapper */
.merch-store-wrapper .merch-cat-content {
    position: relative;
    z-index: 3;
    padding: 25px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Category Title */
.merch-store-wrapper .merch-cat-card .cat-title {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

/* "Shop Now" Button Style */
.merch-store-wrapper .merch-cat-card .cat-cta {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    transition: opacity 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
    border-bottom: 1px solid rgba(255,255,255,0.5); /* Underline style */
    padding-bottom: 3px;
}

/* Hover Effects */
.merch-store-wrapper .merch-cat-card:hover img {
    transform: scale(1.08); /* Smooth Zoom */
    opacity: 0.6;
}

.merch-store-wrapper .merch-cat-card:hover .cat-cta {
    opacity: 1;
    border-bottom-color: #fff;
    padding-left: 5px; /* Slight movement on hover */
}

/* --- 6. NEWSLETTER SECTION --- */
.merch-store-wrapper .merch-newsletter-section {
    background-color: #111; padding: 80px 0; margin-bottom: 80px; color: #fff;
}
.merch-store-wrapper .merch-newsletter-box {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 40px;
}
.merch-store-wrapper .merch-newsletter-content { flex: 1; min-width: 300px; }
.merch-store-wrapper .merch-newsletter-title { 
    font-size: 32px; font-weight: 800; text-transform: uppercase; margin-bottom: 15px; color: #fff; 
}
.merch-store-wrapper .merch-newsletter-content p { color: #aaa; font-size: 16px; margin: 0; }
.merch-store-wrapper .merch-newsletter-form-wrapper { flex: 1; min-width: 300px; }
.merch-store-wrapper .merch-newsletter-form { display: flex; gap: 10px; margin-bottom: 10px; }
.merch-store-wrapper .merch-newsletter-form input {
    flex: 1; padding: 15px 20px; border: 1px solid #333; background: #222; color: #fff; font-size: 14px;
}
.merch-store-wrapper .merch-newsletter-form button {
    background: #fff; color: #000; border: none; padding: 0 30px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: background 0.3s;
}
.merch-store-wrapper .merch-newsletter-form button:hover { background: #e0e0e0; }
.merch-store-wrapper .merch-disclaimer { font-size: 11px; color: #555; text-transform: uppercase; }


/* --- 7. MAIN GRID (Compact Style - Matches Gifts 'All Gifts' Grid) --- */
.merch-store-wrapper .merch-grid-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px;
}

/* Grid Container - Tight Spacing */
.merch-store-wrapper .merch-main-grid-section .custom-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; 
    gap: 15px !important;
}

/* Card - Small & Bordered */
.merch-store-wrapper .merch-main-grid-section .custom-product-card {
    border: 1px solid #eee; 
    border-radius: 4px;
    background: #fff;
    display: flex; flex-direction: column;
}

/* Image - Small & White BG */
.merch-store-wrapper .merch-main-grid-section .product-image-wrapper {
    height: 150px !important; 
    background: #fff !important;
    position: relative; width: 100%; overflow: hidden; margin-bottom: 0 !important;
    border-bottom: none !important;
}

.merch-store-wrapper .merch-main-grid-section .product-image-wrapper img {
    width: 100%; height: 100%; object-fit: contain !important; padding: 5px;
    mix-blend-mode: normal; /* Normal for this grid */
}

/* Compact Typography */
.merch-store-wrapper .merch-main-grid-section .product-details {
    padding: 10px; text-align: left;
}

.merch-store-wrapper .merch-main-grid-section .product-title {
    font-size: 13px !important; 
    line-height: 1.3 !important;
    margin: 8px 0 4px 0 !important; 
    padding: 0 5px !important;
    height: 34px; overflow: hidden;
}

.merch-store-wrapper .merch-main-grid-section .product-brand {
    font-size: 10px !important; 
    margin-top: 8px !important; 
    color: #999 !important;
}

.merch-store-wrapper .merch-main-grid-section .product-price {
    font-size: 13px !important; 
    margin-bottom: 10px !important;
}

/* Hide Ribbons for Compact Grid */
.merch-store-wrapper .merch-main-grid-section .sale-ribbon,
.merch-store-wrapper .merch-main-grid-section .new-ribbon,
.merch-store-wrapper .merch-main-grid-section .stock-ribbon {
    display: none !important; 
}

/* --- 8. PAGINATION --- */
.merch-store-wrapper .pt-pagination-wrapper {
    margin-top: 40px; margin-bottom: 60px; text-align: center; width: 100%;
}
.merch-store-wrapper .pt-pagination-wrapper ul.page-numbers {
    display: inline-flex; gap: 5px; list-style: none; padding: 0; margin: 0;
}
.merch-store-wrapper .pt-pagination-wrapper .page-numbers {
    display: flex; align-items: center; justify-content: center;
    min-width: 35px; height: 35px; padding: 0 10px;
    border: 1px solid #ddd; color: #333; text-decoration: none;
    font-size: 14px; font-weight: 600; transition: all 0.2s; background: #fff;
}
.merch-store-wrapper .pt-pagination-wrapper .page-numbers.current {
    background-color: #000; color: #fff; border-color: #000;
}
.merch-store-wrapper .pt-pagination-wrapper a.page-numbers:hover {
    background-color: #f5f5f5; border-color: #ccc;
}

/* --- 9. MOBILE RESPONSIVENESS (<= 768px) --- */
@media (max-width: 768px) {
    /* --- Hero Section --- */
    .merch-store-wrapper .merch-hero-section { 
        height: 500px; 
        text-align: center; 
    }
    .merch-store-wrapper .merch-hero-title { 
        font-size: 42px; 
    }
    .merch-store-wrapper .merch-hero-subtitle { 
        font-size: 16px; 
        padding: 0 10px; 
    }
    
    /* --- Carousel: 2.5 Items (40% width) --- */
    .merch-store-wrapper .carousel-item { 
        flex: 0 0 40%; 
        max-width: 40%; 
    }
    
    .merch-store-wrapper .carousel-track { 
        overflow-x: scroll; 
        gap: 10px; 
        padding-left: 10px; /* Slight offset for first item */
        padding-right: 40px; /* Space to see the "half" card at the end */
    }
    
    .merch-store-wrapper .merch-carousel-section .product-image-wrapper { 
        width: 100%; 
        max-width: none; 
        margin-bottom: 10px; 
    }

    /* --- Categories Grid (UPDATED FOR NEW STYLE) --- */
    .merch-store-wrapper .merch-cat-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    
    .merch-store-wrapper .merch-cat-card { 
        aspect-ratio: 1 / 1; 
    }

    /* Adjust padding for the text container on mobile so it fits */
    .merch-store-wrapper .merch-cat-content {
        padding: 12px; 
    }

    /* Smaller Title Font */
    .merch-store-wrapper .merch-cat-card .cat-title { 
        font-size: 15px; 
        margin-bottom: 4px;
    }
    
    /* Smaller CTA (Shop Now) Font */
    .merch-store-wrapper .merch-cat-card .cat-cta {
        font-size: 10px;
    }
    
    /* --- Newsletter --- */
    .merch-store-wrapper .merch-newsletter-box { 
        flex-direction: column; 
        text-align: center; 
        gap: 20px; 
    }
    .merch-store-wrapper .merch-newsletter-form { 
        flex-direction: column; 
    }
    .merch-store-wrapper .merch-newsletter-form button { 
        padding: 15px; 
        width: 100%; 
    }

    /* --- Main Grid - 2 Columns --- */
    .merch-store-wrapper .merch-main-grid-section .custom-product-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important; 
    }
}