/* ============================================
   PUZZLES PAGE STYLES v2 - Organized Layout
   ============================================ */

/* Breadcrumb Navigation */
.breadcrumb {
    background: #f5f1eb;
    padding: 15px 30px;
    border-bottom: 1px solid #e8e0d5;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: #999;
}

.breadcrumb-list a {
    color: #8b5a2b;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-list li[aria-current] {
    color: #666;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Hero Section */
.puzzles-hero {
    background: linear-gradient(135deg, #2a1a0f 0%, #3d2317 50%, #5d3a2a 100%);
    padding: 100px 30px 80px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.puzzles-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(255, 255, 255, 0.02) 3px,
            rgba(255, 255, 255, 0.02) 6px
        );
    pointer-events: none;
}

.puzzles-hero .container {
    position: relative;
    z-index: 2;
}

.puzzles-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.puzzles-hero .lead {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Keyword Tags */
.hero-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.9rem;
    color: #fff;
}

.keyword-tag i {
    color: #c9a227;
}

/* Category Navigation */
.category-nav {
    background: linear-gradient(180deg, #fff 0%, #f5f1eb 100%);
    padding: 40px 30px;
    border-bottom: 2px solid #e8e0d5;
}

.category-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.category-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 35px 25px;
    background: linear-gradient(145deg, #fff 0%, #f5f1eb 100%);
    border: 2px solid #d4c4a8;
    border-radius: 16px;
    text-decoration: none;
    color: #3d2317;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(42, 26, 15, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.category-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5a2b, #c9a227, #8b5a2b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-nav-item:hover {
    background: linear-gradient(145deg, #3d2317 0%, #5d3a2a 100%);
    color: #fff;
    border-color: #3d2317;
    transform: translateY(-6px);
    box-shadow: 
        0 12px 35px rgba(42, 26, 15, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.category-nav-item:hover::before {
    opacity: 1;
}

.category-nav-item i {
    font-size: 2.2rem;
    color: #8b5a2b;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(139, 90, 43, 0.2));
}

.category-nav-item:hover i {
    color: #c9a227;
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(201, 162, 39, 0.4));
}

.category-nav-item span {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.3;
}

/* Section Styles */
.category-section {
    padding: 80px 30px;
}

.category-section.section-alt {
    background: #f5f1eb;
}

.featured-section {
    padding: 80px 30px;
    background: linear-gradient(135deg, #f5f1eb 0%, #e8e0d5 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
}

.section-header h2 {
    text-align: center !important;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.badge-paint {
    background: #e8f4f8;
    color: #2c5f6f;
}

.badge-custom {
    background: #f0e8f8;
    color: #5f2c6f;
}

.badge-brain {
    background: #f8f0e8;
    color: #6f4c2c;
}

.badge-kids {
    background: #e8f8e8;
    color: #2c6f3d;
}

.section-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    color: #3d2317;
    margin-bottom: 15px;
    text-align: center !important;
}

.section-header p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(42, 26, 15, 0.08);
    border: 1px solid #e8e0d5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(42, 26, 15, 0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f1eb;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.featured {
    background: #c9a227;
    color: #fff;
}

.wood-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(61, 35, 23, 0.9);
    color: #fff;
}

.product-info {
    padding: 20px;
    flex: 1;
}

.product-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #3d2317;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #8b5a2b;
    margin: 0;
}

.add-to-cart-form {
    padding: 0 20px 20px;
}

.add-to-cart-form .btn {
    width: 100%;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 50px 0;
}

.benefit-item {
    text-align: center;
    padding: 30px;
    background: #f5f1eb;
    border-radius: 12px;
    border: 1px solid #e8e0d5;
}

.benefit-item i {
    font-size: 2.5rem;
    color: #8b5a2b;
    margin-bottom: 15px;
}

.benefit-item h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #3d2317;
    margin-bottom: 10px;
}

.benefit-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* SEO Content */
.seo-content {
    padding: 80px 30px;
    background: #fff;
}

.seo-article {
    max-width: 900px;
    margin: 0 auto;
}

.seo-article h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: #3d2317;
    text-align: center;
    margin-bottom: 40px;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #3d2317 0%, #5d3a2a 100%);
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    margin-top: 50px;
    color: #fff;
}

.cta-box h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: 25px;
}

/* Remove default blue links - use wood colors instead */
.category-section a,
.featured-section a,
.seo-content a,
.cta-box a,
.no-products-section a {
    color: #8b5a2b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-section a:hover,
.featured-section a:hover,
.seo-content a:hover,
.cta-box a:hover,
.no-products-section a:hover {
    color: #c9a227;
    text-decoration: underline;
}

/* CTA Box specific link styling */
.cta-box a {
    color: #c9a227;
    font-weight: 600;
}

.cta-box a:hover {
    color: #e0c76a;
}

/* No Products Section */
.no-products-section {
    padding: 100px 30px;
    background: #f5f1eb;
}

.no-products {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.no-products i {
    font-size: 4rem;
    color: #8b5a2b;
    margin-bottom: 20px;
}

.no-products h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: #3d2317;
    margin-bottom: 15px;
}

.no-products p {
    color: #666;
    margin-bottom: 30px;
}

/* Responsive - Enhanced for Mobile */
@media (max-width: 1024px) {
    .category-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Breadcrumb */
    .breadcrumb {
        padding: 12px 20px;
    }
    
    .breadcrumb-list {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    /* Hero - More compact */
    .puzzles-hero {
        padding: 40px 15px 30px;
    }
    
    .puzzles-hero h1 {
        font-size: 1.6rem;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .puzzles-hero .lead {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .hero-keywords {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .keyword-tag {
        width: auto;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .keyword-tag i {
        font-size: 0.8rem;
    }
    
    /* Category Nav - Horizontal scroll, full width */
    .category-nav {
        padding: 15px 0;
        overflow: hidden;
    }
    
    .category-nav .container {
        max-width: 100%;
        padding: 0;
    }
    
    .category-nav-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding: 5px 15px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-nav-grid::-webkit-scrollbar {
        display: none;
    }
    
    .category-nav-item {
        flex-shrink: 0;
        width: 110px;
        min-width: 110px;
        padding: 20px 12px;
        border-radius: 12px;
        gap: 10px;
        background: linear-gradient(145deg, #fff 0%, #f5f1eb 100%);
        border: 2px solid #d4c4a8;
        box-shadow: 0 3px 10px rgba(42, 26, 15, 0.08);
    }
    
    .category-nav-item:active {
        transform: translateY(-2px);
        background: linear-gradient(145deg, #3d2317 0%, #5d3a2a 100%);
        color: #fff;
        border-color: #3d2317;
    }
    
    .category-nav-item i {
        font-size: 1.6rem;
        margin-bottom: 0;
    }
    
    .category-nav-item span {
        font-size: 0.75rem;
        line-height: 1.2;
        text-align: center;
        font-weight: 600;
    }
    
    /* Sections */
    .category-section,
    .featured-section,
    .seo-content {
        padding: 40px 20px;
    }
    
    .section-header {
        margin-bottom: 30px;
        text-align: center;
        width: 100%;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    .section-header p {
        font-size: 0.95rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Product Grid - 2 columns */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-info h3 {
        font-size: 0.95rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    /* Benefits */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin: 30px 0;
    }
    
    .benefit-item {
        padding: 20px 15px;
    }
    
    .benefit-item i {
        font-size: 1.8rem;
    }
    
    .benefit-item h3 {
        font-size: 1rem;
    }
    
    .benefit-item p {
        font-size: 0.85rem;
    }
    
    /* CTA */
    .cta-box {
        padding: 30px 20px;
        margin-top: 30px;
    }
    
    .cta-box h3 {
        font-size: 1.3rem;
    }
    
    /* No Products */
    .no-products-section {
        padding: 60px 20px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .puzzles-hero {
        padding: 30px 12px 25px;
    }
    
    .puzzles-hero h1 {
        font-size: 1.4rem;
    }
    
    .puzzles-hero .lead {
        font-size: 0.9rem;
    }
    
    .category-nav-item {
        width: 100px;
        min-width: 100px;
        padding: 18px 10px;
        gap: 8px;
    }
    
    .category-nav-item i {
        font-size: 1.4rem;
    }
    
    .category-nav-item span {
        font-size: 0.7rem;
    }
    
    /* Product grid single column on very small screens */
    .product-grid,
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .section-badge {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
        text-align: center !important;
    }
}