/* ==========================================================================
   PISTON TRIBE: GIFTS PAGE COMPLETE STYLES
   Strategy: Full Width Page -> Centered Inner Containers
   Scoped Strictness: 100% (Restricted to .tax-product_cat.term-gifts)
   ========================================================================== */

/* --- 1. UNLOCK PAGE WIDTH (Make Theme Container 100%) --- */
.tax-product_cat.term-gifts .site.grid-container,
.tax-product_cat.term-gifts #content,
.tax-product_cat.term-gifts .site-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.tax-product_cat.term-gifts .gifts-archive {
    /* Clean White Background for the main page */
    background: #ffffff !important;
    width: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- 2. CENTERED CONTAINER (Restricts content to 1400px) --- */
.tax-product_cat.term-gifts .pt-container {
    max-width: 1400px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.tax-product_cat.term-gifts .pt-section {
    margin-bottom: 50px;
    width: 100%; 
}

/* --- 3. TRADES SECTION: BACKGROUND ONLY --- */
/* The background is now the signature Pink Gradient */
.tax-product_cat.term-gifts .trades-section-breakout {
    width: 100%;
    background: linear-gradient(135deg, #ffc3d9 0%, #ffe3ed 50%, #fff5f8 100%);
    padding-top: 60px;
    padding-bottom: 60px;
    margin-bottom: 80px;
    box-sizing: border-box;
}

.tax-product_cat.term-gifts .trades-section-breakout .pt-container {
    margin: 0 auto !important;
}

/* --- 4. SECTION HEADERS (MERCH STYLE: Flexbox + Line) --- */
.tax-product_cat.term-gifts .gift-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically center items */
    margin-bottom: 30px;
    border-bottom: 2px solid #000000; /* The Line */
    padding-bottom: 15px;
    width: 100%;
}

/* The Title (Left) */
.tax-product_cat.term-gifts .section-title {
    font-size: 28px !important;
    font-weight: 800 !important; /* Extra Bold */
    text-transform: uppercase !important;
    color: #111 !important;
    margin: 0 !important;
    letter-spacing: -0.5px;
    text-align: left !important;
    line-height: 1.1;
}

/* The Subtitle (Left, under title) */
.tax-product_cat.term-gifts .section-subtitle {
    text-align: left !important;
    color: #000000;
    margin-top: 5px;
    margin-bottom: 0 !important;
    font-size: 15px;
    display: block;
}

/* The Link (Right) */
.tax-product_cat.term-gifts .gift-link-simple {
    text-decoration: none;
    color: #000000;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
    white-space: nowrap; /* Prevents wrapping */
}

.tax-product_cat.term-gifts .gift-link-simple:hover {
    color: #555;
}


/* --- 5. HERO SECTION (Pink Gradient + Button) --- */
.tax-product_cat.term-gifts .gifts-hero {
    position: relative;
    height: 50vh; 
    min-height: 300px;
    display: flex;
    align-items: center;
    background-size: cover; 
    background-position: center;
    margin-bottom: 60px;
    text-align: left;
    padding: 0;
}

/* Pink Gradient Overlay */
.tax-product_cat.term-gifts .gifts-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255, 195, 217, 0.95) 0%, rgba(255, 227, 237, 0.9) 50%, rgba(255, 255, 255, 0.85) 100%);
    z-index: 1;
}

.tax-product_cat.term-gifts .gifts-hero .pt-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.tax-product_cat.term-gifts .gifts-hero .hero-content {
    max-width: 700px;
    padding: 40px 0;
}

.tax-product_cat.term-gifts .gifts-hero h1 {
    font-size: 64px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    margin-bottom: 20px !important;
    color: #111 !important; /* Dark text */
}

.tax-product_cat.term-gifts .gifts-hero p {
    font-size: 20px !important;
    color: #333 !important;
    font-weight: 400 !important;
    max-width: 600px;
    margin: 0 !important;
    line-height: 1.5;
}

/* Hero Button (Black Outline) */
.tax-product_cat.term-gifts .gifts-hero-btn {
    display: inline-block;
    background-color: transparent;
    color: #111;
    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 #111;
    margin-top: 30px;
}

.tax-product_cat.term-gifts .gifts-hero-btn:hover {
    background-color: #111;
    color: #fff;
    border-color: #111;
}


/* --- 6. CAROUSEL MECHANICS --- */
.tax-product_cat.term-gifts .native-carousel { position: relative; display: flex; align-items: center; width: 100%; padding-bottom: 20px; }
.tax-product_cat.term-gifts .carousel-inner { position: relative; flex: 1; overflow: hidden; }

/* UPDATED: Added align-items: stretch for equal height cards */
.tax-product_cat.term-gifts .carousel-track { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    scroll-behavior: smooth; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
    align-items: stretch; /* Vital for equal height */
}

.tax-product_cat.term-gifts .carousel-track::-webkit-scrollbar { display: none; }
.tax-product_cat.term-gifts .carousel-item { flex: 0 0 calc(100% / 6); min-width: 0; }

.tax-product_cat.term-gifts .carousel-nav {
    position: absolute; top: 40%; transform: translateY(-50%);
    background: #fff; border: 1px solid #eee; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 20; transition: all 0.2s ease;
}
.tax-product_cat.term-gifts .carousel-nav:hover { background: #f5f5f5; transform: translateY(-50%) scale(1.1); }
.tax-product_cat.term-gifts .carousel-nav.prev { left: -20px; }
.tax-product_cat.term-gifts .carousel-nav.next { right: -20px; }
.tax-product_cat.term-gifts .carousel-nav .arrow-icon { width: 16px; height: 16px; }


/* --- 7. STYLE VARIANT: BUNDLES (Stacked) --- */
.tax-product_cat.term-gifts .bundle-card { position: relative; padding: 10px; transition: transform 0.3s ease; }
.tax-product_cat.term-gifts .bundle-link-wrapper { text-decoration: none; color: inherit; display: block; }
.tax-product_cat.term-gifts .bundle-image-container { position: relative; width: 100%; aspect-ratio: 1/1.1; margin-bottom: 20px; z-index: 2; }
.tax-product_cat.term-gifts .bundle-image-container img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); background: #fff; position: relative; z-index: 10; }
.tax-product_cat.term-gifts .bundle-image-container::before, .tax-product_cat.term-gifts .bundle-image-container::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 8px; z-index: 1; transition: transform 0.3s ease; background: #f4f4f4; border: 1px solid #e0e0e0; }
.tax-product_cat.term-gifts .bundle-image-container::before { transform: rotate(-3deg) translate(-4px, 2px); }
.tax-product_cat.term-gifts .bundle-image-container::after { transform: rotate(3deg) translate(4px, 2px); background: #e8e8e8; }
.tax-product_cat.term-gifts .bundle-card:hover .bundle-image-container img { transform: translateY(-5px); }
.tax-product_cat.term-gifts .bundle-card:hover .bundle-image-container::before { transform: rotate(-6deg) translate(-8px, 4px); }
.tax-product_cat.term-gifts .bundle-card:hover .bundle-image-container::after { transform: rotate(6deg) translate(8px, 4px); }
.tax-product_cat.term-gifts .bundle-details { text-align: center; }
.tax-product_cat.term-gifts .bundle-title { font-size: 18px; font-weight: 700; margin: 10px 0 5px; }
.tax-product_cat.term-gifts .bundle-price { color: #e63946; font-weight: 700; }
.tax-product_cat.term-gifts .bundle-badge { position: absolute; top: 10px; left: 10px; z-index: 20; background: #000; color: #fff; padding: 4px 8px; font-size: 11px; font-weight: 700; border-radius: 4px; text-transform: uppercase; }


/* --- 8. STYLE VARIANT: BUDGET CAROUSELS (Matched to Merch Styles) --- */

/* 1. Sizing: 5.5 Items visible on Desktop (18.18%) */
.tax-product_cat.term-gifts .budget-carousel .carousel-item {
    flex: 0 0 18.18% !important; 
    min-width: 0;
    display: flex; /* Ensures card inside stretches */
    height: auto;
}

/* 2. The Card Container (Flat, White, Bordered) */
.tax-product_cat.term-gifts .budget-carousel .custom-product-card {
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 4px !important;
    padding: 0 !important;
    width: 100%;
    height: 100%; /* Fills the flex item */
    display: flex;
    flex-direction: column;
    text-align: center !important;
    box-shadow: none !important;    
    transition: border-color 0.2s ease !important;
}

/* Hover: Slight border darken */
.tax-product_cat.term-gifts .budget-carousel .custom-product-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #ccc !important;
}

/* 3. The Image Wrapper (Full Fill, No Padding) */
.tax-product_cat.term-gifts .budget-carousel .product-image-wrapper {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important; /* Force Square */
    border-radius: 0 !important;
    margin: 0 0 15px 0 !important;
    background: #f9f9f9 !important; 
    border-bottom: 1px solid #000000 !important;
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
}

.tax-product_cat.term-gifts .budget-carousel .product-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Fills container completely */
    padding: 0 !important; /* Removed padding */
    mix-blend-mode: normal !important; /* Normal for photos */
}

/* 4. Typography & Spacing */
.tax-product_cat.term-gifts .budget-carousel .product-details {
    padding: 0 10px 20px 10px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-grow: 1; /* Pushes content to fill space */
}

/* Brand Name: 14px Bold */
.tax-product_cat.term-gifts .budget-carousel .product-brand {
    display: block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

/* Product Title: 16px Regular */
.tax-product_cat.term-gifts .budget-carousel .product-title {
    font-size: 16px !important;
    font-weight: 400 !important; /* Regular */
    margin-bottom: 8px;
    color: #111;
    line-height: 1.3;
    text-align: center !important;
}

/* Product Price: 14px, Pushed to bottom */
.tax-product_cat.term-gifts .budget-carousel .product-price {
    font-size: 14px !important;
    color: #111;
    font-weight: 500 !important;
    margin: auto auto 0 auto !important; /* Pushes to bottom */
    text-align: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slashed Price (Red) - UPDATED */
.tax-product_cat.term-gifts .budget-carousel .product-price del {
    color: #e63946 !important; /* Red for slashed price */
    margin-right: 8px;
    font-weight: 400 !important;
    opacity: 1;
    text-decoration: line-through !important;
}

/* Ins (Current Sale Price) - Black - UPDATED */
.tax-product_cat.term-gifts .budget-carousel .product-price ins {
    text-decoration: none !important;
    color: #111 !important; /* Black for current price */
    font-weight: 700 !important;
}

/* Hide Ribbons/Badges */
.tax-product_cat.term-gifts .budget-carousel .sale-ribbon, 
.tax-product_cat.term-gifts .budget-carousel .new-ribbon { 
    display: none !important; 
}


/* --- 9. STYLE VARIANT: RECTANGLES (Trades/Standard) --- */
.tax-product_cat.term-gifts .native-carousel.product-carousel .custom-product-card {
    border: 1px solid #eee; border-radius: 8px; background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; display: flex; flex-direction: column;
}


/* --- 10. MOBILE RESPONSIVENESS --- */
@media (max-width: 1384px) {
    /* Hide Nav Arrows on Tablet/Mobile */
    .tax-product_cat.term-gifts .carousel-nav { display: none !important; }
    
    /* Tablet: 3.5 items */
    .tax-product_cat.term-gifts .budget-carousel .carousel-item { flex: 0 0 28% !important; }
}

@media (max-width: 768px) {
    .tax-product_cat.term-gifts .trades-section-breakout { padding-top: 40px; padding-bottom: 20px; }
    
    /* Headers on Mobile */
    .tax-product_cat.term-gifts .gift-section-header { align-items: center; }
    .tax-product_cat.term-gifts .section-title { font-size: 20px !important; }
    .tax-product_cat.term-gifts .gift-link-simple { font-size: 12px; }

    /* MOBILE CAROUSEL LOGIC: 2.5 items (40% width) */
    .tax-product_cat.term-gifts .carousel-item,
    .tax-product_cat.term-gifts .budget-carousel .carousel-item { 
        flex: 0 0 40% !important; 
        max-width: 40% !important; 
    }
    
    .tax-product_cat.term-gifts .carousel-track { 
        gap: 10px !important; 
        padding-left: 10px; 
        padding-right: 40px; /* Space to see the cut-off card */
    }
    
    /* Reset Image Sizing for Cards on Mobile */
    .tax-product_cat.term-gifts .budget-carousel .product-image-wrapper { 
        width: 100% !important; 
        max-width: none !important; 
        margin-bottom: 10px !important; 
    }

    .tax-product_cat.term-gifts .budget-carousel .product-title { font-size: 16px !important; }
    
    /* Hero Mobile */
    .tax-product_cat.term-gifts .gifts-hero h1 { font-size: 32px !important; }
    .tax-product_cat.term-gifts .gifts-hero p { font-size: 16px !important; padding: 0 10px; }
    .tax-product_cat.term-gifts .trade-row-title { font-size: 18px; padding-left: 0; }
}

/* --- 11. PAGINATION --- */
.tax-product_cat.term-gifts .pt-pagination-wrapper {
    margin-top: 40px; margin-bottom: 40px; text-align: center;
}
.tax-product_cat.term-gifts .pt-pagination-wrapper ul.page-numbers {
    display: inline-flex; gap: 5px; list-style: none; padding: 0; margin: 0;
}
.tax-product_cat.term-gifts .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;
}
.tax-product_cat.term-gifts .pt-pagination-wrapper .page-numbers.current {
    background-color: #000; color: #fff; border-color: #000;
}
.tax-product_cat.term-gifts .pt-pagination-wrapper a.page-numbers:hover {
    background-color: #f5f5f5; border-color: #ccc;
}


/* --- 12. COMPACT GRID STYLES (All Gifts Section) --- */
.tax-product_cat.term-gifts .all-gifts-grid .custom-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; 
    gap: 15px !important; 
}

.tax-product_cat.term-gifts .all-gifts-grid .custom-product-card {
    border: 1px solid #eee; border-radius: 4px;
}

.tax-product_cat.term-gifts .all-gifts-grid .product-image-wrapper {
    height: 150px !important; background: #fff !important;
}
.tax-product_cat.term-gifts .all-gifts-grid .product-image-wrapper img {
    object-fit: contain !important; padding: 5px;
}

.tax-product_cat.term-gifts .all-gifts-grid .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;
}

.tax-product_cat.term-gifts .all-gifts-grid .product-brand {
    font-size: 10px !important; margin-top: 8px !important; color: #999 !important;
}

.tax-product_cat.term-gifts .all-gifts-grid .product-price {
    font-size: 13px !important; margin-bottom: 10px !important;
}

.tax-product_cat.term-gifts .all-gifts-grid .sale-ribbon,
.tax-product_cat.term-gifts .all-gifts-grid .new-ribbon,
.tax-product_cat.term-gifts .all-gifts-grid .stock-ribbon {
    display: none !important; 
}

@media (max-width: 768px) {
    .tax-product_cat.term-gifts .all-gifts-grid .custom-product-grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important;
    }
}


/* --- 13. NAVIGATION GRID (Trade Tags) --- */
.trade-card {
    text-decoration: none; color: inherit; display: block;
}
.trade-card-image {
    position: relative; width: 100%; aspect-ratio: 4 / 3; 
    border-radius: 8px; overflow: hidden; margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); background: #fff;
}
.trade-card-image img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.trade-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.trade-overlay .btn-text {
    background: #fff; color: #000; padding: 8px 16px; border-radius: 4px;
    font-weight: 700; font-size: 13px; text-transform: uppercase;
    transform: translateY(10px); transition: transform 0.3s ease;
}
.trade-card:hover .trade-card-image img { transform: scale(1.05); }
.trade-card:hover .trade-overlay { opacity: 1; }
.trade-card:hover .trade-overlay .btn-text { transform: translateY(0); }
.trade-card-title {
    text-align: center; font-size: 16px; font-weight: 700; margin: 0; color: #333; text-transform: uppercase;
}

/* Mobile Overrides for Trades */
@media (max-width: 1384px) {
    .trade-card:hover .trade-card-image img { transform: none !important; }
    .trade-card:hover .trade-overlay { opacity: 0 !important; }
    .trade-card-image { box-shadow: none !important; }
}
@media (max-width: 768px) {
    .trade-card-image { aspect-ratio: 1 / 1; }
    .trade-card-title { font-size: 14px; }
}


/* =================================================
   NEW: BUDGET CAROUSEL FOOTER BUTTON (Refined Pill Shape)
   ================================================= */

/* Container for the button */
.tax-product_cat.term-gifts .pt-section-footer {
    width: 100%;
    text-align: center;
    /* UPDATED: Reduced spacing to pull button closer to carousel */
    margin-top: 15px; 
    display: flex;
    justify-content: center;
}

/* The Button Itself (Small, Pro, Pill) */
.tax-product_cat.term-gifts .pt-budget-btn {
    display: inline-block;
    background-color: #000; /* Solid Black */
    color: #fff;            /* White Text */
    padding: 12px 40px;     /* Smaller, professional padding */
    border-radius: 100px;   /* Full Pill Shape */
    font-size: 13px;        /* Clean, legible size */
    font-weight: 700;       /* Bold */
    text-decoration: none;
    text-transform: uppercase; 
    letter-spacing: 1px;        
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid #000;
}

/* Hover Effect: Reverted to Dark Grey Shade */
.tax-product_cat.term-gifts .pt-budget-btn:hover {
    background-color: #333; /* Dark Grey */
    border-color: #333;
    color: #fff;            /* Keep text white */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Mobile: Slightly wider for touch targets */
@media (max-width: 768px) {
    .tax-product_cat.term-gifts .pt-budget-btn {
        width: 80%;
        padding: 14px 0;
    }
}