/* CJ Deals Hub - Frontend Styles */
.cjdh-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Grid Layout */
.cjdh-grid {
    display: grid;
    gap: 20px;
}

@media (max-width: 768px) {
    .cjdh-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .cjdh-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Deal Card */
.cjdh-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.cjdh-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.cjdh-card-advertiser {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.cjdh-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.cjdh-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: #111827;
}

.cjdh-card-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
    line-height: 1.5;
    flex-grow: 1;
}

/* Coupon Code */
.cjdh-card-coupon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cjdh-coupon-code {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 2px dashed #6366f1;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #4338ca;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    user-select: all;
}

.cjdh-copy-btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.cjdh-copy-btn:hover {
    background: #f3f4f6;
}

.cjdh-copy-btn.copied {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

/* Commission */
.cjdh-card-commission {
    font-size: 13px;
    color: #059669;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Expiry */
.cjdh-card-expiry {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.cjdh-card-expiry.cjdh-expired {
    color: #ef4444;
    font-weight: 600;
}

.cjdh-card-expiry.cjdh-expires-soon {
    color: #f59e0b;
    font-weight: 600;
}

/* Button */
.cjdh-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}

.cjdh-btn-primary {
    color: #fff;
    background: #10b981;
}

.cjdh-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cjdh-card-btn {
    margin-top: auto;
    padding: 12px 20px;
    font-size: 15px;
}

/* Load More */
.cjdh-load-more-wrap {
    text-align: center;
    padding: 30px 0;
}

.cjdh-load-more-btn {
    padding: 12px 40px;
    font-size: 16px;
}

/* Empty State */
.cjdh-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 18px;
}

/* Search */
.cjdh-search-wrap {
    max-width: 600px;
    margin: 20px auto;
}

.cjdh-search-input-wrap {
    display: flex;
    gap: 0;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.cjdh-search-input-wrap:focus-within {
    border-color: #6366f1;
}

.cjdh-search-input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.cjdh-search-btn {
    padding: 14px 20px;
    font-size: 18px;
    border: none;
    background: #6366f1;
    color: #fff;
    cursor: pointer;
    border-radius: 0;
    margin: 0;
}

.cjdh-search-btn:hover {
    background: #4f46e5;
}

/* List Style */
.cjdh-list .cjdh-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.cjdh-list .cjdh-card-title {
    margin: 0;
    font-size: 16px;
}

.cjdh-list .cjdh-card-desc {
    margin: 4px 0 0 0;
    font-size: 13px;
}

.cjdh-list .cjdh-card-badge {
    position: static;
    flex-shrink: 0;
}

.cjdh-list .cjdh-card-coupon,
.cjdh-list .cjdh-card-expiry,
.cjdh-list .cjdh-card-commission {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .cjdh-list .cjdh-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
