/**
 * Affiliate Squeeze Page - Mobile-First Responsive Styles
 */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles - Minimal for conversion */
.header {
    background-color: #fff;
    padding: 0.5rem 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    text-align: center;
}

.logo {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Main Content */
.content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
}

/* Squeeze Page Container - Mobile First (320px+) */
.squeeze-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Product Title */
.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    text-align: center;
    margin: 0;
}

/* Product Image */
.product-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.product-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* Product Description */
.product-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    text-align: left;
    margin: 0;
}

.product-description p {
    margin: 0 0 1rem 0;
}

.product-description p:last-child {
    margin-bottom: 0;
}

/* CTA Button - Minimum 44px height for touch */
.cta-button {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 0.875rem 2rem;
    background-color: #ff9900;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 0;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.cta-button:hover {
    background-color: #e68a00;
}

.cta-button:active {
    transform: scale(0.98);
    background-color: #cc7a00;
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    margin-top: 1rem;
}

.footer small {
    color: #777;
    font-size: 0.875rem;
}

/* Error Page Styles */
.error-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.error-container h1 {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.125rem;
    color: #555;
    margin-bottom: 1rem;
}

.error-help {
    font-size: 1rem;
    color: #777;
}

/* Responsive Breakpoints */

/* Small tablets and large phones - 576px+ */
@media (min-width: 576px) {
    .content {
        padding: 1.5rem;
    }
    
    .squeeze-container {
        padding: 2rem;
        gap: 2rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .cta-button {
        font-size: 1.25rem;
    }
}

/* Tablets - 768px+ */
@media (min-width: 768px) {
    .content {
        padding: 2rem;
    }
    
    .squeeze-container {
        padding: 2.5rem;
        max-width: 700px;
    }
    
    .product-title {
        font-size: 2.25rem;
    }
    
    .product-description {
        font-size: 1.125rem;
    }
    
    .logo {
        font-size: 1.75rem;
    }
}

/* Desktop - 1024px+ */
@media (min-width: 1024px) {
    .content {
        padding: 3rem;
    }
    
    .squeeze-container {
        padding: 3rem;
        max-width: 800px;
    }
    
    .product-title {
        font-size: 2.5rem;
    }
    
    .cta-button {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .cta-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
    }
}

/* Ensure no horizontal scrolling */
body, html {
    overflow-x: hidden;
    max-width: 100%;
}

/* Touch-friendly spacing */
.squeeze-container > * + * {
    margin-top: 0;
}

/* Performance optimizations */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* Author Byline - Condensed */
.author-byline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #7f8c8d;
    text-decoration: none;
}

.author-byline:hover {
    color: #555;
}

.author-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-thumb-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #bdc3c7;
    color: #fff;
}

.author-thumb-default svg {
    width: 22px;
    height: 22px;
}

.author-meta {
    color: #555;
}

/* Related Products Section */
.related-products {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #e0e0e0;
}

.related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-title {
    padding: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* Responsive adjustments for related products */
@media (min-width: 576px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .related-card-title {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 768px) {
    .related-title {
        font-size: 1.5rem;
    }
}


/* Influencer Landing Page */
.influencer-landing {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.influencer-header {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
}

.influencer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.influencer-avatar-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.influencer-avatar-default svg {
    width: 40px;
    height: 40px;
}

.influencer-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.25rem 0;
}

.influencer-tagline {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 0;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f0f0f0;
}

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

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

.product-card-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ff9900;
}

.no-products {
    text-align: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
    font-size: 1.125rem;
}

/* Responsive - Tablets */
@media (min-width: 576px) {
    .influencer-landing {
        padding: 1.5rem;
    }
    
    .influencer-header {
        padding: 2rem 1rem;
    }
    
    .influencer-avatar {
        width: 100px;
        height: 100px;
    }
    
    .influencer-name {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .product-card-content {
        padding: 1rem;
    }
    
    .product-card-title {
        font-size: 1rem;
    }
}

/* Responsive - Desktop */
@media (min-width: 768px) {
    .influencer-landing {
        padding: 2rem;
    }
    
    .influencer-avatar {
        width: 120px;
        height: 120px;
    }
    
    .influencer-avatar-default svg {
        width: 50px;
        height: 50px;
    }
    
    .influencer-name {
        font-size: 2.25rem;
    }
    
    .influencer-tagline {
        font-size: 1.125rem;
    }
    
    .products-grid {
        gap: 1.5rem;
    }
    
    .product-card-title {
        font-size: 1.0625rem;
    }
    
    .product-card-cta {
        font-size: 0.875rem;
    }
}

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