/*
 * STC Carpet Marketplace Frontend Styles
 */

/* --- Global styles for our custom pages --- */
body.wpcm-auth-page,
body.wpcm-dashboard-page {
    background-color: #f0f0f1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    direction: rtl;
    line-height: 1.6;
}

#wpcm-auth-wrapper,
#wpcm-dashboard-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-sizing: border-box;
}

.wpcm-auth-container,
.wpcm-dashboard-container {
    background: #ffffff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 2.5rem;
    border-radius: 4px;
}

.wpcm-footer-text {
    text-align: center;
    color: #555;
    font-size: 12px;
    margin-top: 2rem;
}

/* --- Auth Page Styles --- */
.wpcm-auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}
.wpcm-auth-logo img {
    max-width: 150px;
    height: auto;
}
.wpcm-auth-title {
    color: #c00; /* رنگ قرمز برند شما */
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

#wpcm-form-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #1d2327;
}

#wpcm-form-subtitle {
    font-size: 14px;
    text-align: center;
    color: #3c434a;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* Form Styles */
#wpcm-auth-form .wpcm-form-step {
    display: none; /* Hide steps by default */
}
#wpcm-auth-form .wpcm-form-step.active {
    display: block; /* Show active step */
}

#wpcm-auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
    color: #1d2327;
}

#wpcm-auth-form input[type="tel"],
#wpcm-auth-form input[type="text"],
#wpcm-auth-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    margin-bottom: 1rem;
}
#wpcm-auth-form input:focus {
    border-color: #c00;
    box-shadow: 0 0 0 1px #c00;
    outline: none;
}

#wpcm-auth-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #c00; /* رنگ برند */
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
#wpcm-auth-form button[type="submit"]:hover {
    background-color: #a00;
}
#wpcm-auth-form button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.wpcm-back-btn {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #c00;
    text-decoration: none;
    margin-top: 1rem;
}

/* Messages */
#wpcm-messages {
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 1rem;
    font-size: 14px;
    display: none; /* Hidden by default */
}
#wpcm-messages.error {
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    color: #b91c1c;
    display: block;
}
#wpcm-messages.success {
    background-color: #f0fdf4;
    border: 1px solid #22c55e;
    color: #15803d;
    display: block;
}

/* --- Dashboard Page Styles --- */
.wpcm-welcome-header {
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}
.wpcm-welcome-header h1 {
    margin-top: 0;
    color: #1d2327;
}
.wpcm-welcome-header p {
    font-size: 16px;
    color: #3c434a;
    margin-bottom: 1rem;
}
.wpcm-logout-link {
    color: #c00;
    text-decoration: none;
    font-size: 14px;
}
.wpcm-logout-link:hover {
    text-decoration: underline;
}

.wpcm-dashboard-menu h2 {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #3c434a;
    margin-top: 0;
    margin-bottom: 1rem;
}
.wpcm-menu-button {
    display: block;
    text-align: center;
    padding: 12px;
    background-color: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    text-decoration: none;
    color: #1d2327;
    font-weight: 500;
    margin-bottom: 10px;
    transition: background-color 0.2s, border-color 0.2s;
}
.wpcm-menu-button:hover {
    background-color: #f0f0f1;
    border-color: #b0b1b3;
}

/* --- Seller Application Button --- */
.wpcm-menu-button.seller-cta {
    background-color: #2271b1; /* A distinct WordPress blue */
    border-color: #1a5a8e;
    color: #fff;
    font-weight: 600;
}
.wpcm-menu-button.seller-cta:hover {
    background-color: #1a5a8e;
    color: #fff;
}

/* --- Seller Application Form --- */
#wpcm-seller-app-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
    color: #1d2327;
}

#wpcm-seller-app-form input[type="text"],
#wpcm-seller-app-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    margin-bottom: 0;
}
#wpcm-seller-app-form textarea {
    min-height: 80px;
}
#wpcm-seller-app-form input:focus,
#wpcm-seller-app-form textarea:focus {
    border-color: #c00;
    box-shadow: 0 0 0 1px #c00;
    outline: none;
}

#wpcm-seller-app-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #c00; /* رنگ برند */
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
#wpcm-seller-app-form button[type="submit"]:hover {
    background-color: #a00;
}

/*
 * --- استایل‌های صفحه تک محصول ---
 */

/* یک فاصله‌گذاری عمومی برای بخش‌های جدید */
.wpcm-product-section {
    clear: both;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}
.wpcm-product-section h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: right; /* اطمینان از راست‌چین بودن */
}

/* استایل جدول مشخصات ووکامرس */
.wpcm-product-specifications .shop_attributes {
    border-top: 1px solid #ddd;
    margin-bottom: 0;
}
.wpcm-product-specifications .shop_attributes th,
.wpcm-product-specifications .shop_attributes td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}
.wpcm-product-specifications .shop_attributes th {
    font-weight: 600;
    width: 150px;
}

/* استایل شبکه گالری رگالی (AI) */
.wpcm-ai-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.wpcm-gallery-item {
    display: block;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.wpcm-gallery-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.wpcm-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* استایل دکمه دانلود کاتالوگ */
.wpcm-catalog-download .wpcm-menu-button {
    background-color: #f6f7f7;
    border-color: #dcdcde;
    color: #1d2327;
    text-decoration: none;
    display: inline-block; /* تغییر از block به inline-block */
    padding: 12px 20px;
}
.wpcm-catalog-download .wpcm-menu-button:hover {
    background-color: #f0f0f1;
    border-color: #b0b1b3;
}
