/*
 * ShopTheHood Business Directory - Frontend Styles
 */

/* Directory Grid */
.sth-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin: 30px 10;
}

@media (max-width: 768px) {
    .sth-directory-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Listing Card */
.sth-listing-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sth-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sth-listing-image {
    width: 100%;
    /*
    height: 200px;*/
    overflow: hidden;
    background: #ffffff;
}

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

.sth-listing-card:hover .sth-listing-image img {
    transform: scale(1.05);
}

.sth-listing-content {
       padding: 0px;
    text-align: center;
    margin-bottom: 30px;
}

.sth-listing-title {
    margin: 10px 0 10px;
    font-size: 14px;
    font-weight: 900;
    color: #333;
}

.sth-listing-categories {
    margin-bottom: 15px;
}

.sth-category-tag {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

.sth-listing-url {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.sth-listing-url:hover {
    opacity: 0.9;
    color: #fff;
}

/* Ad Block */
.sth-ad-block {
    grid-column: 1 / -1;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sth-ad-placeholder {
    color: #999;
    font-size: 16px;
}

/* Forms */
.sth-submit-form,
.sth-edit-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 20px 0;
}

.sth-form-field {
    margin-bottom: 20px;
}

.sth-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.sth-form-field input[type="text"],
.sth-form-field input[type="url"],
.sth-form-field input[type="file"],
.sth-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.sth-form-field input:focus,
.sth-form-field select:focus {
    outline: none;
    border-color: #667eea;
}

.sth-submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.sth-submit-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.sth-submit-button:active {
    transform: translateY(0);
}

/* Listing Status */
.sth-listing-status {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.status-publish {
    color: #28a745;
    font-weight: 600;
}

.status-pending {
    color: #ffc107;
    font-weight: 600;
}

.status-draft {
    color: #6c757d;
    font-weight: 600;
}

/* Current Image */
.sth-current-image {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sth-current-image label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.sth-current-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Success Messages */
.sth-success-message {
    padding: 15px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {

    .sth-submit-form,
    .sth-edit-form {
        padding: 20px;
    }

    .sth-form-field input,
    .sth-form-field select {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}