/* Products Page Redesign v2 - Level 1 (All Products)
   All classes suffixed with -v2 to avoid conflicts with Level 2/3 styles
   ======================================================================= */

/* CSS Variables */
:root {
    --primary-50: rgba(23, 118, 200, 0.05);
    --primary-100: rgba(23, 118, 200, 0.1);
    --primary-600: #1776C8;
    --primary-700: #125A9C;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #1f2937;
}

/* Base Font - Open Sans (matches live site) */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Container */
.products-page-v2 {
    min-height: 100vh;
    background-color: var(--gray-50);
    padding-top: 80px; /* Account for fixed header */
}

/* Hero Banner */
.products-hero-v2 {
    background: linear-gradient(to right, #1776C8, #2B90E7);
    color: white;
    padding: 32px 0 40px 0;
}

.products-hero-content-v2 {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.products-hero-v2 h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.products-hero-v2 p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Breadcrumb */
.products-breadcrumb-v2 {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 0;
}

.breadcrumb-nav-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-nav-v2 a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-nav-v2 a:hover {
    color: var(--primary-600);
}

.breadcrumb-nav-v2 span {
    color: var(--gray-400);
}

.breadcrumb-nav-v2 .current {
    color: var(--gray-900);
    font-weight: 500;
}

/* Main Section */
.products-main-v2 {
    padding: 32px 0 48px 0;
}

.products-layout-v2 {
    display: flex;
    gap: 32px;
}

/* Sidebar */
.products-sidebar-v2 {
    width: 256px;
    flex-shrink: 0;
    display: none;
}

@media (min-width: 1024px) {
    .products-sidebar-v2 {
        display: block;
    }
}

.sidebar-sticky-v2 {
    position: sticky;
    top: 96px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    padding: 16px;
}

.sidebar-nav-v2 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link-v2 {
    display: block;
    padding: 10px 8px;
    font-weight: 500;
    color: var(--gray-900);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-link-v2:hover {
    background: var(--gray-50);
    color: var(--primary-600);
}

.sidebar-link-v2.active {
    color: var(--primary-600);
    background: var(--primary-100);
}

.sidebar-category-v2 {
    margin: 0;
}

.sidebar-toggle-v2 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    font-weight: 500;
    color: var(--gray-900);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.sidebar-toggle-v2:hover {
    background: var(--gray-50);
}

.sidebar-toggle-v2.expanded {
    color: var(--primary-600);
}

.sidebar-toggle-v2 .chevron-icon {
    transition: transform 0.2s;
}

.sidebar-toggle-v2.expanded .chevron-icon {
    transform: rotate(180deg);
}

.sidebar-subcategories-v2 {
    display: none;
    margin-left: 16px;
    margin-top: 4px;
    padding-left: 12px;
    border-left: 2px solid var(--gray-100);
}

.sidebar-subcategories-v2.show {
    display: block;
}

.sidebar-subcategories-v2 a {
    display: block;
    padding: 6px 0;
    font-size: 14px;
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-subcategories-v2 a:hover {
    color: var(--primary-600);
}

.sidebar-subcategories-v2 .view-all {
    color: var(--gray-500);
}

/* Products Content */
.products-content-v2 {
    flex: 1;
    min-width: 0;
}

.products-section-header-v2 {
    margin-bottom: 32px;
}

.products-section-header-v2 h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 8px 0;
}

.products-section-header-v2 p {
    color: var(--gray-600);
    margin: 0;
}

/* Category Grid */
.category-grid-v2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .category-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .category-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Category Card */
.category-card-v2 {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.5s;
    text-decoration: none;
    display: block;
}

.category-card-v2:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
    text-decoration: none;
}

.category-card-v2.featured {
    ring: 2px solid var(--primary-100);
}

/* Category Image */
.category-image-v2 {
    position: relative;
    height: 224px;
    background: linear-gradient(to bottom right, var(--gray-50), var(--gray-100));
    overflow: hidden;
}

@media (min-width: 768px) {
    .category-image-v2 {
        height: 256px;
    }
}

.category-image-v2 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transform: scale(1.2);
    transition: all 0.5s;
}

.category-image-v2 img.scale-125 {
    transform: scale(1.25);
}

.category-card-v2:hover .category-image-v2 img {
    transform: scale(1.32);
}

.category-card-v2:hover .category-image-v2 img.scale-125 {
    transform: scale(1.4);
}

/* Dual image hover effect */
.category-image-v2 .default-img {
    position: absolute;
    inset: 0;
    opacity: 1;
}

.category-image-v2 .hover-img {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.category-card-v2:hover .category-image-v2 .default-img {
    opacity: 0;
}

.category-card-v2:hover .category-image-v2 .hover-img {
    opacity: 1;
}

/* Category Overlay */
.category-overlay-v2 {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-v2:hover .category-overlay-v2 {
    opacity: 1;
}

.browse-btn-v2 {
    background: white;
    color: var(--gray-900);
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(16px);
    transition: transform 0.3s;
}

.category-card-v2:hover .browse-btn-v2 {
    transform: translateY(0);
}

/* Featured Badge */
.featured-badge-v2 {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary-600);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
}

/* Category Content */
.category-content-v2 {
    padding: 20px;
}

.category-content-v2 h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 8px 0;
    transition: color 0.2s;
}

.category-card-v2:hover .category-content-v2 h3 {
    color: var(--primary-600);
}

.category-content-v2 p {
    color: var(--gray-600);
    font-size: 14px;
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-footer-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-count-v2 {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.shop-now-v2 {
    color: var(--primary-600);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.category-card-v2:hover .shop-now-v2 {
    gap: 8px;
}

/* CTA Section */
.products-cta-v2 {
    background: linear-gradient(to right, #1776C8, #2B90E7);
    color: white;
    padding: 64px 0;
}

.cta-content-v2 {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-content-v2 h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.cta-content-v2 p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin: 0 0 32px 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

@media (min-width: 640px) {
    .cta-buttons-v2 {
        flex-direction: row;
    }
}

.btn-primary-v2,
.btn-secondary-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary-v2 {
    background: var(--primary-600);
    color: white;
}

.btn-primary-v2:hover {
    background: var(--primary-700);
    color: white;
}

.btn-secondary-v2 {
    background: white;
    color: var(--gray-900);
}

.btn-secondary-v2:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* Trust Badges Section */
.products-trust-v2 {
    background: white;
    padding: 48px 0;
    border-top: 1px solid var(--gray-200);
}

.trust-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (min-width: 768px) {
    .trust-grid-v2 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.trust-item-v2 {
    text-align: center;
}

.trust-icon-v2 {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.trust-icon-v2 img {
    width: 80px;
    height: 80px;
    filter: brightness(0);
    transition: transform 0.3s;
}

.trust-item-v2:hover .trust-icon-v2 img {
    transform: scale(1.1);
}

.trust-item-v2 h4 {
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 4px 0;
}

.trust-item-v2 p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .products-hero-v2 {
        padding: 24px 0;
    }

    .products-hero-v2 h1 {
        font-size: 1.75rem;
    }

    .products-hero-v2 p {
        font-size: 1rem;
    }

    .products-main-v2 {
        padding: 24px 0;
    }

    .products-section-header-v2 h2 {
        font-size: 1.5rem;
    }

    .category-image-v2 {
        height: 200px;
    }

    .category-content-v2 {
        padding: 16px;
    }

    .cta-content-v2 h2 {
        font-size: 1.5rem;
    }

    .cta-content-v2 p {
        font-size: 1rem;
    }
}
