/* ==========================================================================
   TopRankHarbor - Modern Design System
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ==========================================================================
   Header - Dark Modern Design
   ========================================================================== */

.site-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #2d2d2d;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    color: white;
}

.logo-text strong {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-tagline {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #ffffff;
}

.header-search {
    display: flex;
    align-items: center;
    background: #2d2d2d;
    border-radius: 24px;
    padding: 8px 16px;
    flex: 1;
    max-width: 500px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: white;
    font-size: 14px;
    outline: none;
    padding: 4px 8px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-button {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-button:hover {
    color: #ffffff;
}

/* ==========================================================================
   Hero Section - Bold & Engaging
   ========================================================================== */

.hero-section {
    background: #1a1a1a;
    color: white;
    padding: 80px 0 100px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.accent-dot {
    color: #f59e0b;
}

.hero-subtitle {
    font-size: 20px;
    color: #9ca3af;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto 32px;
    background: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 6px 6px 6px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    padding: 12px 16px;
    color: #1a202c;
    outline: none;
}

.hero-search-input::placeholder {
    color: #9ca3af;
}

.hero-search-button {
    background: #f59e0b;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    flex-shrink: 0;
}

.hero-search-button:hover {
    background: #d97706;
    transform: scale(1.05);
}

.quick-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-links-label {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

.quick-link-pill {
    background: #2d2d2d;
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #3d3d3d;
}

.quick-link-pill:hover {
    background: #3d3d3d;
    color: white;
    border-color: #4d4d4d;
}

/* ==========================================================================
   Categories Section - Visual Cards
   ========================================================================== */

.categories-section {
    padding: 80px 0;
    background: #f9fafb;
}

.section-header {
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.category-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.category-card-modern {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.category-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.category-card-image {
    height: 200px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-placeholder {
    color: #9ca3af;
}

.category-card-content {
    padding: 20px;
}

.category-card-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 12px;
}

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

.winner-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.harbor-score-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.harbor-score-display .score {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
}

.harbor-score-display .score-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* ==========================================================================
   Harbor Score Explainer
   ========================================================================== */

.harbor-score-explainer {
    background: linear-gradient(135deg, #1e40af 0%, #6366f1 100%);
    color: white;
    padding: 80px 0;
}

.explainer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.explainer-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.explainer-text p {
    font-size: 18px;
    line-height: 1.7;
    color: #e0e7ff;
    margin-bottom: 24px;
}

.learn-more-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s;
}

.learn-more-link:hover {
    gap: 12px;
}

.explainer-visual {
    display: flex;
    justify-content: center;
}

.score-example {
    text-align: center;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.score-number {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
}

.score-text {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

/* ==========================================================================
   Footer - Multi-column
   ========================================================================== */

.site-footer {
    background: #1a1a1a;
    color: #9ca3af;
    padding: 60px 0 24px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.7;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 14px;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid #2d2d2d;
    font-size: 14px;
}

/* ==========================================================================
   Responsive Design - Mobile First
   ========================================================================== */

@media (max-width: 1024px) {
    .explainer-content {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        padding: 12px 0;
    }
    
    .logo-text {
        display: none;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 12px;
        border-top: 1px solid #2d2d2d;
        gap: 24px;
    }
    
    .header-search {
        flex: 1;
        max-width: none;
    }
    
    .hero-section {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .quick-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quick-link-pill {
        text-align: center;
    }
    
    .category-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .categories-section,
    .harbor-score-explainer {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-search {
        padding: 4px 4px 4px 16px;
    }
    
    .hero-search-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .hero-search-button {
        width: 42px;
        height: 42px;
    }
}

.empty-message {
    text-align: center;
    padding: 60px 24px;
    color: #6b7280;
    font-size: 18px;
}

/* Category Page Styles */
.category-header-section {
    background: linear-gradient(135deg, #1a3a52 0%, #2c8c99 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.category-header-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-description-large {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.ranking-month {
    font-size: 0.9rem;
    opacity: 0.8;
    color: #4fc3f7;
}

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

/* Grid Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.rank-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #2c8c99;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-image-link {
    display: block;
}

.product-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-card-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.product-title a {
    color: #1a3a52;
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: #2c8c99;
}

.harbor-score-display {
    margin: 1rem 0;
}

.score-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #4fc3f7 0%, #2c8c99 100%);
    transition: width 0.5s ease;
}

.score-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.score-label {
    color: #666;
}

.score-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c8c99;
}

.product-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 1rem 0;
}

.product-price {
    color: #1a3a52;
    font-weight: 600;
    margin: 0.5rem 0;
}

.btn-view-product {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2c8c99;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-view-product:hover {
    background: #1a3a52;
}

/* List Layout */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-list-item {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.rank-badge-list {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: #2c8c99;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.product-list-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding-left: 60px;
}

.product-list-image {
    display: block;
}

.product-list-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.product-list-details {
    display: flex;
    flex-direction: column;
}

.product-list-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-list-title a {
    color: #1a3a52;
    text-decoration: none;
    transition: color 0.3s;
}

.product-list-title a:hover {
    color: #2c8c99;
}

.product-list-description {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.product-list-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 1rem 0;
}

.harbor-score-compact {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.score-value-large {
    font-size: 2rem;
    font-weight: 700;
    color: #2c8c99;
}

.score-max {
    color: #999;
}

.price-badge {
    padding: 0.5rem 1rem;
    background: #f0f9ff;
    border: 1px solid #4fc3f7;
    border-radius: 20px;
    color: #1a3a52;
    font-weight: 600;
}

.btn-view-product-list {
    align-self: flex-start;
    padding: 0.75rem 1.5rem;
    background: #2c8c99;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-view-product-list:hover {
    background: #1a3a52;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: #1a3a52;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #666;
    line-height: 1.8;
    margin: 0.5rem 0;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .product-list-layout {
        grid-template-columns: 1fr;
        padding-left: 0;
    }
    
    .rank-badge-list {
        top: 1rem;
        left: 1rem;
    }
    
    .category-header-section h1 {
        font-size: 1.8rem;
    }
}

/* Product Detail Page */
.product-header {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #2c8c99;
    text-decoration: none;
}

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

.product-detail-section {
    padding: 3rem 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.primary-product-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gallery-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.gallery-image:hover {
    opacity: 0.7;
}

.product-info-panel {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.current-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2c8c99 0%, #4fc3f7 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.rank-label {
    font-size: 0.9rem;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.rank-month {
    font-size: 0.85rem;
    opacity: 0.9;
}

.product-detail-title {
    font-size: 2rem;
    color: #1a3a52;
    margin-bottom: 1.5rem;
}

.harbor-score-large {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f0f9ff;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.score-circle {
    background: linear-gradient(135deg, #2c8c99 0%, #4fc3f7 100%);
    color: #fff;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-big {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-max-small {
    font-size: 0.9rem;
    opacity: 0.9;
}

.score-description strong {
    display: block;
    color: #1a3a52;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.score-description p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.price-display {
    padding: 1rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin: 1.5rem 0;
}

.price-label {
    color: #666;
    margin-right: 0.5rem;
}

.price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a3a52;
}

.product-summary {
    line-height: 1.8;
    color: #666;
    margin: 1.5rem 0;
}

.btn-affiliate {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #2c8c99;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0;
    transition: background 0.3s;
}

.btn-affiliate:hover {
    background: #1a3a52;
}

.affiliate-disclosure {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    line-height: 1.6;
}

.retailers-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.retailers-section h2 {
    color: #1a3a52;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.retailer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.retailer-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #1a3a52;
    transition: all 0.3s;
}

.retailer-link:hover {
    border-color: #2c8c99;
    background: #f0f9ff;
    transform: translateX(4px);
}

.retailer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.retailer-info strong {
    font-size: 1.1rem;
}

.retailer-price {
    color: #2c8c99;
    font-weight: 600;
    font-size: 1.2rem;
}

.retailer-arrow {
    font-size: 1.5rem;
    color: #2c8c99;
}

.product-description-section,
.product-features-section,
.product-specs-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.product-description-section h2,
.product-features-section h2,
.product-specs-section h2 {
    color: #1a3a52;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.description-content {
    line-height: 1.8;
    color: #666;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 1rem 0;
    padding-left: 2.5rem;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2c8c99;
    font-weight: 700;
    font-size: 1.3rem;
}

.features-list li:last-child {
    border-bottom: none;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.specs-table th,
.specs-table td {
    padding: 1rem;
    text-align: left;
}

.specs-table th {
    font-weight: 600;
    color: #1a3a52;
    width: 30%;
}

.specs-table td {
    color: #666;
}

@media (max-width: 968px) {
    .product-layout {
        grid-template-columns: 1fr;
    }
    
    .primary-product-image {
        height: 400px;
    }
}
