/* Enhanced Affiliate Links Grid */
.uam-affiliate-links {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Enhanced Pros/Cons */
.uam-pros-cons { 
    margin: 20px 0; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    background: #fff; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}
.uam-pc-title { 
    margin: 0; 
    padding: 16px 20px; 
    border-bottom: 1px solid #e2e8f0; 
    color: #1f2937;
    font-weight: 600;
    font-size: 1.1rem;
}
.uam-pc-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 0; 
}
.uam-pc-col { 
    padding: 16px 20px; 
}
.uam-pc-header { 
    font-weight: 600; 
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.uam-pc-pros .uam-pc-header { 
    color: #059669; 
}
.uam-pc-cons .uam-pc-header { 
    color: #dc2626; 
}
.uam-pc-col ul { 
    margin: 0; 
    padding-left: 1.5em; 
}
.uam-pc-col li { 
    margin: 8px 0; 
    color: #374151;
    line-height: 1.5;
}
.uam-pc-icon { 
    display: inline-block; 
    width: 20px; 
    text-align: center; 
    margin-right: 6px; 
    color: #059669; 
    font-weight: bold;
}
.uam-pc-cons .uam-pc-icon { 
    color: #dc2626; 
}

/* Enhanced Specs */
.uam-specs { 
    margin: 20px 0; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}
.uam-specs-title { 
    margin: 0; 
    padding: 16px 20px; 
    border-bottom: 1px solid #e2e8f0; 
    color: #1f2937;
    font-weight: 600;
    font-size: 1.1rem;
}
.uam-specs-table { 
    width: 100%; 
    border-collapse: collapse; 
}
.uam-specs-table th, 
.uam-specs-table td { 
    padding: 14px 20px; 
    border-bottom: 1px solid #f1f5f9; 
    text-align: left; 
}
.uam-specs-table th { 
    width: 35%; 
    color: #334155; 
    background: #f8fafc; 
    font-weight: 600; 
}
.uam-specs-table td { 
    color: #374151; 
}
.uam-specs-table tr:last-child th,
.uam-specs-table tr:last-child td {
    border-bottom: none;
}

/* Enhanced Comparison Table */
.uam-compare { 
    margin: 24px 0; 
}
.uam-compare-wrapper { 
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.uam-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.uam-compare-table thead th {
    background: #f8fafc;
    color: #334155;
    text-align: left;
    padding: 16px 20px;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}
.uam-compare-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.uam-compare-row:last-child td { 
    border-bottom: none; 
}
.uam-compare-product-flex {
    display: flex;
    align-items: center;
    gap: 16px;
}
.uam-compare-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    flex-shrink: 0;
}
.uam-compare-title { 
    font-weight: 600; 
    color: #1f2937;
    margin: 0 0 4px 0;
}
.uam-compare-meta {
    color: #64748b;
    font-size: 0.9rem;
}
.uam-compare-price { 
    font-weight: 700; 
    color: #0f766e;
    font-size: 1.1rem;
    margin: 0 0 8px 0;
}
.uam-compare-rating { 
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}
.uam-compare-action .button {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.uam-compare-action .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.uam-compare-disclosure {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Enhanced Share Bar */
.uam-share-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #edf2f7;
    background: #f8fafc;
    flex-wrap: wrap;
}

.uam-share-pos-above { 
    order: -1; 
    border-top: none;
    border-bottom: 1px solid #edf2f7;
}

.uam-share-pos-below { 
    order: 1; 
}

.uam-share-pos-hover { 
    opacity: 0; 
    transition: opacity 0.3s ease;
    position: absolute;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 12px;
    z-index: 10;
    top: -50px;
}
.uam-link-card:hover .uam-share-pos-hover { 
    opacity: 1; 
}

.uam-share-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
    margin-right: 8px;
}

.uam-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #2d3748;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.uam-share-btn:hover { 
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.uam-share-btn:focus { 
    outline: 2px solid #94a3b8; 
    outline-offset: 2px; 
}

/* Brand accents with modern colors */
.uam-share-facebook:hover { 
    border-color: #1877f2; 
    color: #1877f2;
    background: #eff6ff;
}
.uam-share-x:hover { 
    border-color: #000; 
    color: #000;
    background: #f5f5f5;
}
.uam-share-tumblr:hover { 
    border-color: #36465D; 
    color: #36465D;
    background: #f0f2f5;
}
.uam-share-copy:hover { 
    border-color: #10b981; 
    color: #059669;
    background: #ecfdf5;
}
.uam-share-instagram:hover { 
    border-color: #d62976; 
    color: #d62976;
    background: #fdf2f8;
}

.uam-share-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    background: currentColor;
    mask: none;
    border-radius: 4px;
}

/* Enhanced Toast */
.uam-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(17, 24, 39, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
    max-width: 90vw;
    text-align: center;
}

.uam-toast.show { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
}

/* Enhanced Grid Layout */
.uam-grid {
    display: grid;
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Responsive grid columns */
.uam-grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.uam-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.uam-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.uam-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Enhanced Link Card */
.uam-link-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
}

.uam-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Link Content */
.uam-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

.uam-link-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Link Image */
.uam-link-image {
    overflow: hidden;
    max-height: 220px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}

.uam-link-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* Price badge */
.uam-price-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    z-index: 2;
}

/* Link Title */
.uam-link-title {
    margin: 0 0 12px 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

/* Link Description */
.uam-link-description {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

/* Link URL */
.uam-link-url {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: auto;
    word-break: break-all;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

/* Enhanced Debug Info */
.uam-debug {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #4b5563;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.uam-debug-info {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 16px;
    font-size: 0.8rem;
    color: #6b7280;
    border-radius: 0 0 8px 8px;
}

.uam-debug h4 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-weight: 600;
}

/* Enhanced Coupon Box */
.uam-coupon-box {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
    position: relative;
    overflow: hidden;
}
.uam-coupon-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #059669);
}
.uam-coupon-merchant {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    font-size: 1.1rem;
}
.uam-coupon-content {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.uam-coupon-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 700;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1.1rem;
}
.uam-coupon-code-mask {
    letter-spacing: 2px;
    color: #94a3b8;
}
.uam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    background: #f8fafc;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}
.uam-btn:hover {
    background: #eef2f7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.uam-btn-primary {
    background: #0ea5e9;
    border-color: #0284c7;
    color: #ffffff;
}
.uam-btn-primary:hover {
    background: #0284c7;
    border-color: #0369a1;
}

/* Enhanced Responsive Adjustments */
@media (max-width: 1024px) {
    .uam-grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .uam-grid-cols-4,
    .uam-grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    
    .uam-coupon-content { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 12px;
    }
    .uam-coupon-code { 
        justify-content: center; 
        font-size: 1rem;
    }
    .uam-btn, 
    .uam-btn-primary { 
        width: 100%; 
        padding: 12px;
    }
    
    .uam-share-label { 
        display: none; 
    }
    .uam-share-btn { 
        padding: 10px; 
        font-size: 13px;
    }
    
    .uam-compare-product-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .uam-compare-action {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .uam-grid-cols-4,
    .uam-grid-cols-3,
    .uam-grid-cols-2 { grid-template-columns: 1fr; }
    
    .uam-link-card {
        padding: 16px;
    }
    
    .uam-link-content {
        padding: 16px;
    }
    
    .uam-link-title {
        font-size: 1.1rem;
    }
    
    .uam-compare-table thead th,
    .uam-compare-table tbody td {
        padding: 12px 16px;
    }
    
    .uam-specs-table th,
    .uam-specs-table td {
        padding: 12px 16px;
    }
    
    .uam-pc-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Link Card Styles */
.uam-link-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.uam-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.uam-link-title {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    color: #1f2937;
    line-height: 1.35;
    font-weight: 600;
}

.uam-link-description {
    color: #4b5563;
    margin: 0 0 16px 0;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.uam-link-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.uam-affiliate-link {
    display: inline-block;
    background: #3b82f6;
    color: white !important;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.uam-affiliate-link:hover {
    background: #2563eb;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.uam-commission-rate {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #059669;
    font-weight: 500;
    text-align: center;
    padding: 8px;
    background: #ecfdf5;
    border-radius: 6px;
    border: 1px solid #d1fae5;
}

/* Enhanced Debug styles */
.uam-debug {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    color: #4b5563;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.uam-debug h4 {
    margin: 15px 0 8px 0;
    color: #1f2937;
    font-weight: 600;
}

/* Enhanced Responsive adjustments */
@media (max-width: 1024px) {
    .uam-grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .uam-grid-cols-3,
    .uam-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .uam-grid-cols-2,
    .uam-grid-cols-3,
    .uam-grid-cols-4 { grid-template-columns: 1fr; }
    
    .uam-link-card {
        padding: 0;
    }

    /* Compact share buttons on mobile */
    .uam-share-label { display: none; }
    .uam-share-btn { 
        padding: 8px; 
        font-size: 12px;
    }
    
    .uam-link-title {
        font-size: 1.1rem;
    }
    
    .uam-affiliate-link {
        padding: 12px;
        font-size: 1rem;
    }
}