/* Related Links Block Styles */
.amazon-related-links-block {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.related-links-header {
    text-align: center;
    margin-bottom: 30px;
}

.related-links-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    position: relative;
}

.related-links-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #e74c3c);
    border-radius: 2px;
}

.related-links-subtitle {
    color: #6c757d;
    font-size: 16px;
    font-style: italic;
}

.related-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.related-link-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.related-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #e74c3c, #f39c12, #27ae60);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-link-card:hover::before {
    transform: scaleX(1);
}

.related-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.related-link-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.related-link-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.related-link-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.related-link-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.related-link-button:hover::before {
    left: 100%;
}

.related-link-button:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    color: white;
    text-decoration: none;
}

/* Specific link type styles */
.related-link-card.top10-link {
    border-left: 4px solid #e74c3c;
}

.related-link-card.top10-link .related-link-icon {
    color: #e74c3c;
}

.related-link-card.related-products-link {
    border-left: 4px solid #f39c12;
}

.related-link-card.related-products-link .related-link-icon {
    color: #f39c12;
}

.related-link-card.brand-link {
    border-left: 4px solid #27ae60;
}

.related-link-card.brand-link .related-link-icon {
    color: #27ae60;
}

.related-link-card.category-link {
    border-left: 4px solid #9b59b6;
}

.related-link-card.category-link .related-link-icon {
    color: #9b59b6;
}

.related-link-card.custom-link {
    border-left: 4px solid #34495e;
}

.related-link-card.custom-link .related-link-icon {
    color: #34495e;
}

/* Custom links section */
.custom-links-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #dee2e6;
}

.custom-links-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.custom-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.custom-link-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.custom-link-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.custom-link-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.custom-link-button {
    display: inline-block;
    padding: 8px 16px;
    background: #34495e;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.custom-link-button:hover {
    background: #2c3e50;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Related Links Button Styles */
.related-link-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.related-link-button:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Related Products List Styles */
.related-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.related-product-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.related-product-link:hover {
    background: #e9ecef;
    transform: translateX(5px);
    color: #2c3e50;
    text-decoration: none;
    border-color: #3498db;
}

.related-product-image {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
}

/* Custom Links List Styles */
.custom-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.custom-link {
    display: inline-block;
    padding: 6px 12px;
    background: #34495e;
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.custom-link:hover {
    background: #2c3e50;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(52, 73, 94, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .related-links-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .related-link-card {
        padding: 20px;
    }
    
    .related-links-title {
        font-size: 24px;
    }
    
    .custom-links-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .amazon-related-links-block {
        padding: 20px;
        margin: 20px 0;
    }
    
    .related-link-card {
        padding: 15px;
    }
    
    .related-link-icon {
        font-size: 36px;
    }
    
    .related-link-title {
        font-size: 18px;
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.related-link-card {
    animation: fadeInUp 0.6s ease forwards;
}

.related-link-card:nth-child(1) { animation-delay: 0.1s; }
.related-link-card:nth-child(2) { animation-delay: 0.2s; }
.related-link-card:nth-child(3) { animation-delay: 0.3s; }
.related-link-card:nth-child(4) { animation-delay: 0.4s; }
.related-link-card:nth-child(5) { animation-delay: 0.5s; }
.related-link-card:nth-child(6) { animation-delay: 0.6s; }
