/* Domain Grid */
.dsp-domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

/* Domain Card */
.dsp-domain-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Domain Image */
.dsp-domain-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

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

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

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

.dsp-domain-card.dsp-featured {
    border: 2px solid #ffc107;
}

/* Featured Badge */
.dsp-featured-badge {
    position: absolute;
    top: 12px;
    right: -30px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    padding: 4px 40px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Sold Overlay */
.dsp-sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.dsp-sold-badge {
    background: #dc3545;
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    transform: rotate(-10deg);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Domain Content (padding area) */
.dsp-domain-card > *:not(.dsp-domain-image):not(.dsp-featured-badge):not(.dsp-sold-overlay) {
    padding-left: 24px;
    padding-right: 24px;
}

.dsp-domain-card > .dsp-domain-header {
    padding-top: 24px;
}

.dsp-domain-card > .dsp-domain-actions {
    padding-bottom: 24px;
}

/* Domain Header */
.dsp-domain-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

/* Domain Metrics */
.dsp-domain-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dsp-metric-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #495057;
    padding: 4px 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.dsp-metric-icon {
    font-size: 14px;
}

.dsp-metric-value {
    font-weight: 600;
    color: #212529;
}

.dsp-domain-name {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
    word-break: break-all;
    line-height: 1.3;
}

.dsp-domain-category {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Description */
.dsp-domain-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Price */
.dsp-domain-price {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.dsp-price-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.dsp-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #28a745;
}

/* Actions */
.dsp-domain-actions {
    display: flex;
    gap: 12px;
}

.dsp-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dsp-btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.dsp-btn-primary:hover {
    background: linear-gradient(135deg, #218838, #1aa179);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.dsp-btn-secondary {
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
}

.dsp-btn-secondary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.dsp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal */
.dsp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dsp-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dsp-modal-close {
    color: #aaa;
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.dsp-modal-close:hover {
    color: #000;
}

.dsp-modal h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #1d2327;
    font-size: 24px;
}

/* Form */
.dsp-form-group {
    margin-bottom: 20px;
}

.dsp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.dsp-form-group input,
.dsp-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.dsp-form-group input:focus,
.dsp-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.dsp-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
}

.dsp-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* No domains message */
.dsp-no-domains {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .dsp-domain-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dsp-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 24px;
    }
    
    .dsp-domain-actions {
        flex-direction: column;
    }
    
    .dsp-btn {
        width: 100%;
    }
}

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

/* Divi compatibility */
.et_pb_section .dsp-domain-grid {
    padding: 0;
}

.et_pb_row .dsp-domain-card {
    width: 100%;
}
