/**
 * Products Modern Listing Page CSS
 * Level-based organization with modern card design
 * Bootstrap 3.3.4 Compatible
 */

/* === Base Styles === */
.products-modern-page {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 18px !important;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.products-modern-page * {
    box-sizing: border-box;
}

/* Override parent theme Roboto Condensed on all text elements */
.products-modern-page p,
.products-modern-page li,
.products-modern-page span,
.products-modern-page a,
.products-modern-page strong,
.products-modern-page em,
.products-modern-page b,
.products-modern-page blockquote,
.products-modern-page label {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Header spacer to prevent overlap with fixed headers */
.header-spacer {
    height: 20px;
}

/* Fix for WordPress theme header height conflict */
.top-header {
    height: auto !important;
    /* min-height: 60px !important;
    max-height: 60px !important; */
}

/* Ensure products page doesn't inherit height issues */
.products-modern-page {
    clear: both;
    display: block;
}

.products-modern-page h1,
.products-modern-page h2,
.products-modern-page h3,
.products-modern-page h4 {
    font-family: 'Soliden', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 600;
}

/* === Hero Section === */
.products-hero {
    background: linear-gradient(135deg, #1d4160 0%, #3468B1 100%);
    color: #fff;
    padding: 2.5rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.products-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: rgba(255,255,255,0.05);
    transform: rotate(15deg);
}

.products-hero h1 {
    font-size: 36px !important;
    font-weight: 700;
    color: #fff !important;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 18px !important;
    color: rgba(255,255,255,0.95) !important;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.level-filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.filter-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-size: 15px !important;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.filter-btn.active {
    background: #fff;
    color: #1d4160;
    border-color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.filter-btn i {
    font-size: 16px !important;
}

/* === Products Section === */
.products-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.products-grid {
    display: flex;
    flex-wrap: wrap;
}

.product-col {
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

/* === Product Cards === */
.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

/* Ensure equal heights within rows */
.products-grid > .product-col {
    display: flex;
    flex-direction: column;
}

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

.product-card.featured {
    border: 3px solid #3468B1;
}

.product-card.on-sale {
    border-top: 5px solid #EB7D32;
}

/* === Badges === */
.featured-badge,
.sale-badge {
    position: absolute;
    top: 0.75rem;
    padding: 0.4rem 0.85rem;
    font-size: 11px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    z-index: 10;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.featured-badge {
    right: 1rem;
    background: linear-gradient(135deg, #3468B1 0%, #2a5490 100%);
}

.sale-badge {
    left: 1rem;
    background: linear-gradient(135deg, #EB7D32 0%, #d66a25 100%);
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.featured-badge i,
.sale-badge i {
    margin-right: 0.25rem;
}

/* === Product Image === */
.product-image {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.product-image img {
    max-width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* === Product Content === */
.product-content {
    padding: 1rem 1.25rem;
    flex-grow: 1;
}

.product-content h3 {
    font-size: 22px !important;
    font-weight: 700;
    color: #000;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.product-subtitle {
    font-size: 14px !important;
    color: #3468B1;
    font-weight: 600;
    margin: 0 0 0.65rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-description {
    font-size: 15px !important;
    color: #495057;
    line-height: 1.5;
    margin: 0;
}

/* === Product Pricing === */
.product-pricing {
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-label {
    font-size: 15px !important;
    color: #666;
    font-weight: 500;
}

.price-value {
    font-size: 19px !important;
    font-weight: 700;
    color: #000;
}

.price-value.strikethrough {
    text-decoration: line-through;
    color: #999;
    font-weight: 500;
}

.price-value.highlight {
    color: #24D366;
    font-size: 24px !important;
}

.retail-price .price-label {
    color: #999;
}

.member-price .price-label {
    color: #3468B1;
}

.member-price .price-value {
    color: #3468B1;
}

.sale-price .price-label {
    color: #EB7D32;
    font-weight: 700;
}

/* === Product Actions === */
.product-actions {
    padding: 0 1.25rem 1.25rem;
}

.product-actions .btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 16px !important;
    font-weight: 600;
    border-radius: 6px;
    background: linear-gradient(135deg, #3468B1 0%, #2a5490 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.product-actions .btn:hover {
    background: linear-gradient(135deg, #2a5490 0%, #1d426e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 104, 177, 0.4);
    text-decoration: none;
    color: #fff;
}

.product-actions .btn i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.product-actions .btn:hover i {
    transform: translateX(4px);
}

/* === Guarantee Section === */
.guarantee-section {
    padding: 2.5rem 0;
    background: linear-gradient(135deg, #1d4160 0%, #3468B1 100%);
    color: #fff;
}

.guarantee-box {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: rgba(255,255,255,0.1);
    padding: 3rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.guarantee-icon {
    flex-shrink: 0;
}

.guarantee-icon img {
    width: 150px;
    height: auto;
}

.guarantee-content h3 {
    font-size: 32px !important;
    font-weight: 700;
    color: #fff !important;
    margin: 0 0 1rem 0;
}

.guarantee-content p {
    font-size: 17px !important;
    color: rgba(255,255,255,0.95) !important;
    margin: 0;
    line-height: 1.7;
}

/* === Member CTA Section === */
.member-cta-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #24D366 0%, #1db857 100%);
    color: #fff;
    text-align: center;
}

.member-cta-section h2 {
    font-size: 42px !important;
    font-weight: 700;
    color: #fff !important;
    margin: 0 0 1rem 0;
}

.member-cta-section p {
    font-size: 20px !important;
    color: rgba(255,255,255,0.95) !important;
    margin: 0 0 2rem 0;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 1rem 2.5rem;
    font-size: 18px !important;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-buttons .btn-primary {
    background: #fff;
    color: #24D366;
    border: none;
}

.cta-buttons .btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #24D366;
}

.cta-buttons .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.cta-buttons .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

/* === Responsive Styles === */
@media (max-width: 991px) {
    .products-hero h1 {
        font-size: 38px !important;
    }

    .hero-subtitle {
        font-size: 19px !important;
    }

    .level-info h2 {
        font-size: 36px !important;
    }

    .level-info p {
        font-size: 18px !important;
    }

    .level-header {
        gap: 1.5rem;
    }

    .level-icon {
        width: 70px;
        height: 70px;
    }

    .level-icon i {
        font-size: 35px !important;
    }

    .guarantee-box {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2rem;
    }

    .guarantee-content h3 {
        font-size: 28px !important;
    }

    .guarantee-content p {
        font-size: 16px !important;
    }

    .member-cta-section h2 {
        font-size: 36px !important;
    }

    .member-cta-section p {
        font-size: 18px !important;
    }
}

@media (max-width: 767px) {
    .products-hero {
        padding: 3rem 0 2rem;
    }

    .products-hero h1 {
        font-size: 32px !important;
    }

    .hero-subtitle {
        font-size: 17px !important;
        margin-bottom: 2rem;
    }

    .level-badges {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .level-badge {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .products-level {
        padding: 3rem 0;
    }

    .level-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding-bottom: 1.5rem;
    }

    .level-info {
        text-align: center;
    }

    .level-info h2 {
        font-size: 30px !important;
    }

    .level-info p {
        font-size: 16px !important;
    }

    .level-icon {
        width: 60px;
        height: 60px;
    }

    .level-icon i {
        font-size: 30px !important;
    }

    .product-content h3 {
        font-size: 22px !important;
    }

    .product-subtitle {
        font-size: 14px !important;
    }

    .product-description {
        font-size: 15px !important;
    }

    .guarantee-icon img {
        width: 100px;
    }

    .guarantee-content h3 {
        font-size: 24px !important;
    }

    .guarantee-content p {
        font-size: 15px !important;
    }

    .member-cta-section {
        padding: 3rem 0;
    }

    .member-cta-section h2 {
        font-size: 28px !important;
    }

    .member-cta-section p {
        font-size: 16px !important;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* === Print Styles === */
@media print {
    .products-hero,
    .member-cta-section,
    .product-actions {
        display: none;
    }

    .product-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
