/**
 * MATOO Marketplace Toolkit - Main Styles
 *
 * Brand Colors:
 * Primary:    #5E6A60 (Buttons)
 * Secondary:  #86A97A (Accents)
 * Success:    #007B20 (Green)
 * Text:       #414141 (Dark gray)
 * Background: #E1DBCB (Light beige)
 * White:      #FFFFFF
 *
 * @package Matoo_Marketplace
 * @since 4.0.0
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --matoo-primary: #5E6A60;
    --matoo-primary-hover: #4d574f;
    --matoo-secondary: #86A97A;
    --matoo-secondary-hover: #729668;
    --matoo-success: #007B20;
    --matoo-success-light: #e8f5e9;
    --matoo-danger: #dc2626;
    --matoo-danger-hover: #b91c1c;
    --matoo-warning: #f59e0b;
    --matoo-text: #414141;
    --matoo-text-light: #6b7280;
    --matoo-text-muted: #9ca3af;
    --matoo-background: #E1DBCB;
    --matoo-background-light: #f5f2eb;
    --matoo-white: #FFFFFF;
    --matoo-border: #d1d5db;
    --matoo-border-light: #e5e7eb;
    --matoo-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --matoo-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --matoo-radius: 8px;
    --matoo-radius-lg: 12px;
    --matoo-transition: 0.2s ease;
}

/* ============================================
   BASE / WRAPPER
   ============================================ */
.matoo-wrapper {
    margin: 0 auto;
    padding: 20px;
    background: var(--matoo-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--matoo-text);
    line-height: 1.6;
}

.matoo-wrapper * {
    box-sizing: border-box;
}

.matoo-hide {
    display: none !important;
}

/* ============================================
   HEADER
   ============================================ */
.matoo-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--matoo-border-light);
}

.matoo-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: var(--matoo-text);
}

.matoo-header p {
    margin: 0;
    color: var(--matoo-text-light);
    font-size: 15px;
}

.matoo-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* ============================================
   BUTTONS
   ============================================ */
.matoo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--matoo-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--matoo-transition);
    line-height: 1.4;
}

.matoo-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(94, 106, 96, 0.2);
}

.matoo-btn-primary {
    background: var(--matoo-primary);
    color: var(--matoo-white);
}

.matoo-btn-primary:hover {
    background: var(--matoo-primary-hover);
    color: var(--matoo-white);
}

.matoo-btn-secondary {
    background: var(--matoo-white);
    color: var(--matoo-text);
    border: 1px solid var(--matoo-border);
}

.matoo-btn-secondary:hover {
    background: var(--matoo-background-light);
    color: var(--matoo-text);
}

.matoo-btn-success {
    background: var(--matoo-success);
    color: var(--matoo-white);
}

.matoo-btn-danger {
    background: var(--matoo-white);
    color: var(--matoo-danger);
    border: 1px solid var(--matoo-danger);
}

.matoo-btn-danger:hover {
    background: var(--matoo-danger);
    color: var(--matoo-white);
}

.matoo-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.matoo-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.matoo-btn-full {
    width: 100%;
}

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

/* ============================================
   FORMS
   ============================================ */
.matoo-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.matoo-section {
    margin-bottom: 5px;
}

.matoo-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--matoo-text);
    font-size: 14px;
}

.matoo-required {
    color: var(--matoo-danger);
}

.matoo-input,
.matoo-select,
.matoo-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--matoo-border);
    border-radius: var(--matoo-radius);
    font-size: 14px;
    background: var(--matoo-white);
    color: var(--matoo-text);
    transition: border-color var(--matoo-transition), box-shadow var(--matoo-transition);
}

.matoo-input:focus,
.matoo-select:focus,
.matoo-textarea:focus {
    outline: none;
    border-color: var(--matoo-primary);
    box-shadow: 0 0 0 3px rgba(94, 106, 96, 0.1);
}

.matoo-textarea {
    min-height: 100px;
    resize: vertical;
}

.matoo-input-group {
    display: flex;
}

.matoo-input-addon {
    padding: 12px 14px;
    background: var(--matoo-background-light);
    border: 1px solid var(--matoo-border);
    border-right: none;
    border-radius: var(--matoo-radius) 0 0 var(--matoo-radius);
    color: var(--matoo-text-light);
    font-weight: 500;
}

.matoo-input-group .matoo-input {
    border-radius: 0 var(--matoo-radius) var(--matoo-radius) 0;
}

.matoo-field-error {
    display: none;
    color: var(--matoo-danger);
    font-size: 13px;
    margin-top: 6px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 4px;
    border-left: 3px solid var(--matoo-danger);
}

.matoo-input-error {
    border-color: var(--matoo-danger) !important;
    background: #fef2f2 !important;
}

.matoo-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--matoo-text-muted);
}

.matoo-submit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--matoo-border-light);
    margin-top: 10px;
}

/* Submit Result (inline message above buttons) */
.matoo-submit-result {
    padding: 16px 20px;
    border-radius: var(--matoo-radius);
    margin-bottom: 20px;
    text-align: center;
}

.matoo-submit-result.success {
    background: var(--matoo-success-light);
    border: 1px solid var(--matoo-secondary);
}

.matoo-submit-result.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.matoo-submit-result h3 {
    margin: 0 0 5px;
    font-size: 16px;
    color: var(--matoo-success);
}

.matoo-submit-result.error h3 {
    color: var(--matoo-danger);
}

.matoo-submit-result p {
    margin: 0;
    font-size: 14px;
    color: var(--matoo-text);
}

.matoo-required-note {
    color: var(--matoo-text-light);
    font-size: 13px;
}

/* Submit buttons group */
.matoo-submit-buttons {
    display: flex;
    gap: 12px;
}

/* Form Groups */
.matoo-form-group {
    margin-bottom: 18px;
}

.matoo-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.matoo-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Checkbox */
.matoo-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.matoo-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--matoo-primary);
}

/* Password Toggle */
.matoo-password-wrap {
    position: relative;
}

.matoo-password-wrap .matoo-input {
    padding-right: 48px;
}

.matoo-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--matoo-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.matoo-password-toggle:hover {
    color: var(--matoo-text);
}

.matoo-password-toggle svg {
    display: block;
}

/* Links */
.matoo-link {
    color: var(--matoo-primary);
    text-decoration: none;
    font-size: 14px;
}

.matoo-link:hover {
    text-decoration: underline;
}

/* ============================================
   IMAGES SECTION
   ============================================ */

.matoo-images-section h4 {
    margin: 0 0 15px;
    color: var(--matoo-text);
    font-size: 15px;
}

.matoo-feat-image {
    position: relative;
    display: inline-block;
}

.matoo-feat-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--matoo-radius);
    object-fit: cover;
}

.matoo-remove-feat {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: var(--matoo-danger);
    color: var(--matoo-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 26px;
    transition: background var(--matoo-transition);
}

.matoo-remove-feat:hover {
    background: var(--matoo-danger-hover);
}

/* Gallery */
.matoo-gallery {
    margin-top: 20px;
}

.matoo-gallery-label {
    font-size: 13px;
    color: var(--matoo-text-light);
    margin-bottom: 10px;
}

.matoo-gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.matoo-gallery-item {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--matoo-border-light);
}

.matoo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.matoo-gallery-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: var(--matoo-danger);
    color: var(--matoo-white);
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    text-decoration: none;
}

.matoo-gallery-add {
    width: 70px;
    height: 70px;
    border: 2px dashed var(--matoo-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matoo-gallery-add a {
    color: var(--matoo-text-light);
    font-size: 24px;
    text-decoration: none;
}

.matoo-gallery-add:hover {
    border-color: var(--matoo-primary);
}

.matoo-gallery-add:hover a {
    color: var(--matoo-primary);
}

/* ============================================
   ATTRIBUTES
   ============================================ */
.matoo-attributes-section {
    background: var(--matoo-background-light);
    border: 1px solid var(--matoo-border-light);
    border-radius: var(--matoo-radius-lg);
    padding: 20px;
}

.matoo-attributes-section h4 {
    margin: 0 0 5px;
    font-size: 15px;
    color: var(--matoo-text);
}

.matoo-attributes-desc {
    margin: 0 0 15px;
    font-size: 13px;
    color: var(--matoo-text-light);
}

.matoo-attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.matoo-attribute-item {
    background: var(--matoo-white);
    padding: 12px;
    border-radius: var(--matoo-radius);
    border: 1px solid var(--matoo-border-light);
}

.matoo-attribute-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--matoo-text);
}

.matoo-attr-select {
    height: 42px;
    padding: 0 12px;
}

/* ============================================
   CATEGORY CASCADE
   ============================================ */
.matoo-category-cascade {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.matoo-category-level {
    flex: 1;
    min-width: 180px;
}

.matoo-category-level .matoo-select {
    width: 100%;
}

/* ============================================
   RESULT BOX
   ============================================ */
#matoo-result {
    display: none;
    padding: 20px;
    border-radius: var(--matoo-radius-lg);
    margin-bottom: 20px;
    text-align: center;
}

#matoo-result.success {
    display: block;
    background: var(--matoo-success-light);
    border: 2px solid var(--matoo-secondary);
}

#matoo-result.error {
    display: block;
    background: #fff5f5;
    border: 2px solid #fc8181;
}

#matoo-result h3 {
    margin: 0 0 10px;
}

#matoo-result.success h3 {
    color: var(--matoo-success);
}

#matoo-result.error h3 {
    color: var(--matoo-danger);
}

#matoo-result p {
    margin: 5px 0;
    color: var(--matoo-text);
}

#matoo-result .matoo-result-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ============================================
   ERROR BOX
   ============================================ */
.matoo-error-box {
    text-align: center;
    padding: 40px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--matoo-radius-lg);
}

.matoo-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.matoo-error-box h3 {
    margin: 0 0 10px;
    color: #991b1b;
    font-size: 20px;
}

.matoo-error-box p {
    margin: 0 0 20px;
    color: #7f1d1d;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.matoo-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--matoo-background-light);
    border-radius: var(--matoo-radius-lg);
    border: 2px dashed var(--matoo-border-light);
}

.matoo-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.matoo-empty h3 {
    margin: 0 0 10px;
    color: var(--matoo-text-light);
    font-size: 18px;
}

.matoo-empty p {
    margin: 0 0 20px;
    color: var(--matoo-text-muted);
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.matoo-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.matoo-product-card {
    background: var(--matoo-white);
    border: 1px solid var(--matoo-border-light);
    border-radius: var(--matoo-radius-lg);
    overflow: hidden;
    transition: box-shadow var(--matoo-transition);
}

.matoo-product-card:hover {
    box-shadow: var(--matoo-shadow-lg);
}

/* Product Link (clickable area) */
.matoo-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity var(--matoo-transition);
}

.matoo-product-link:hover {
    color: inherit;
    text-decoration: none;
}

.matoo-product-card:hover .matoo-product-link {
    opacity: 0.95;
}

.matoo-product-card:hover .matoo-product-title {
    color: var(--matoo-primary);
}

.matoo-product-image {
    position: relative;
    height: 180px;
    background: var(--matoo-background-light);
}

.matoo-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.matoo-no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
}

.matoo-product-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-publish {
    background: #fff;
    color: var(--matoo-success);
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-draft {
    background: var(--matoo-border-light);
    color: var(--matoo-text-light);
}

.matoo-product-info {
    padding: 15px;
}

.matoo-product-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--matoo-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--matoo-transition);
}

.matoo-product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--matoo-success);
    margin-bottom: 5px;
}

.matoo-product-date {
    font-size: 12px;
    color: var(--matoo-text-muted);
}

.matoo-product-actions {
    padding: 12px 15px;
    border-top: 1px solid var(--matoo-border-light);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   PAGINATION
   ============================================ */
.matoo-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--matoo-border-light);
}

.matoo-pagination a,
.matoo-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--matoo-radius);
    font-size: 14px;
    text-decoration: none;
}

.matoo-pagination a {
    background: var(--matoo-white);
    border: 1px solid var(--matoo-border-light);
    color: var(--matoo-text);
}

.matoo-pagination a:hover {
    background: var(--matoo-background-light);
}

.matoo-pagination span.current {
    background: var(--matoo-primary);
    color: var(--matoo-white);
}

/* ============================================
   MODAL
   ============================================ */
.matoo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.matoo-modal.active {
    display: flex;
}

.matoo-modal-content {
    background: var(--matoo-white);
    padding: 30px;
    border-radius: var(--matoo-radius-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.matoo-modal-content h3 {
    margin: 0 0 15px;
    font-size: 20px;
}

.matoo-modal-warning {
    color: var(--matoo-danger);
    font-size: 13px;
}

.matoo-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Success Modal */
.matoo-modal-success {
    border-top: 4px solid var(--matoo-success);
}

.matoo-modal-success .matoo-modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--matoo-success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--matoo-success);
}

.matoo-modal-success h3 {
    color: var(--matoo-success);
}

.matoo-modal-success p {
    color: var(--matoo-text);
    margin-bottom: 0;
}

.matoo-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--matoo-text-light);
}

/* ============================================
   ANNOUNCEMENTS
   ============================================ */
.matoo-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.matoo-badge-red {
    background: #fee2e2;
    color: var(--matoo-danger);
}

.matoo-announcements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.matoo-announcement {
    background: var(--matoo-white);
    border: 1px solid var(--matoo-border-light);
    border-radius: var(--matoo-radius-lg);
    padding: 20px;
    position: relative;
    cursor: pointer;
    transition: all var(--matoo-transition);
}

.matoo-announcement:hover {
    border-color: var(--matoo-border);
    box-shadow: var(--matoo-shadow);
}

.matoo-announcement.unread {
    background: #f0f7ee;
    border-color: var(--matoo-secondary);
    border-left: 4px solid var(--matoo-primary);
}

.matoo-announcement.read {
    opacity: 0.85;
}

.matoo-announcement-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--matoo-primary);
    color: var(--matoo-white);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.matoo-announcement-header {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.matoo-announcement-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--matoo-primary), var(--matoo-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.matoo-announcement-meta {
    flex: 1;
}

.matoo-announcement-meta h4 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--matoo-text);
    padding-right: 60px;
}

.matoo-announcement.unread h4 {
    color: var(--matoo-primary);
}

.matoo-announcement-date {
    font-size: 13px;
    color: var(--matoo-text-light);
}

.matoo-announcement-excerpt {
    color: var(--matoo-text);
    font-size: 14px;
    line-height: 1.6;
}

.matoo-announcement-content {
    display: none;
    background: var(--matoo-background-light);
    padding: 15px;
    border-radius: var(--matoo-radius);
    margin-top: 12px;
    color: var(--matoo-text);
    font-size: 14px;
    line-height: 1.7;
}

.matoo-announcement-content p {
    margin: 0 0 10px;
}

.matoo-announcement-content p:last-child {
    margin: 0;
}

.matoo-announcement-toggle {
    background: none;
    border: none;
    color: var(--matoo-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 0;
    margin-top: 10px;
}

.matoo-announcement-toggle:hover {
    text-decoration: underline;
}

/* ============================================
   AUTH BOX
   ============================================ */
.matoo-auth-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 40px;
    background: var(--matoo-white);
    border-radius: var(--matoo-radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--matoo-border-light);
}

.matoo-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.matoo-auth-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.matoo-auth-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    color: var(--matoo-text);
}

.matoo-auth-header p {
    margin: 0;
    color: var(--matoo-text-light);
    font-size: 14px;
}

.matoo-auth-form {
    margin-bottom: 20px;
}

.matoo-auth-form .matoo-form-group {
    margin-bottom: 20px;
}

.matoo-auth-form .matoo-form-group label {
    font-size: 14px;
    color: var(--matoo-text);
    margin-bottom: 4px;
}

.matoo-auth-form .matoo-input {
    border: none;
    border-bottom: 1px solid var(--matoo-border);
    border-radius: 0;
    padding: 12px 0;
    font-size: 16px;
}

.matoo-auth-form .matoo-input:focus {
    border-bottom-color: var(--matoo-primary);
    box-shadow: none;
}

.matoo-auth-form .matoo-input::placeholder {
    color: var(--matoo-text-light);
    font-size: 14px;
}

.matoo-auth-footer {
    text-align: center;
    padding-top: 20px;
}

.matoo-auth-footer a.matoo-link {
    display: block;
    color: var(--matoo-primary);
    font-size: 14px;
    margin-bottom: 15px;
    text-decoration: none;
}

.matoo-auth-footer a.matoo-link:hover {
    text-decoration: underline;
}

.matoo-auth-footer p {
    margin: 0;
    color: var(--matoo-text-light);
    font-size: 14px;
}

.matoo-auth-footer p a {
    color: var(--matoo-primary);
    font-weight: 500;
    text-decoration: none;
}

.matoo-auth-footer p a:hover {
    text-decoration: underline;
}

.matoo-auth-success {
    text-align: center;
}

.matoo-auth-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

#matoo-auth-result {
    display: none;
    padding: 15px;
    border-radius: var(--matoo-radius);
    margin-bottom: 20px;
    text-align: center;
}

#matoo-auth-result.success {
    display: block;
    background: var(--matoo-success-light);
    color: var(--matoo-success);
}

#matoo-auth-result.error {
    display: block;
    background: #fef2f2;
    color: var(--matoo-danger);
}

/* ============================================
   VENDOR PROFILE
   ============================================ */
.matoo-vendor-profile {
    /* Profile styles */
}

.matoo-vendor-header {
    position: relative;
    margin-bottom: 30px;
}

.matoo-vendor-banner {
    height: 200px;
    background: linear-gradient(135deg, var(--matoo-primary), var(--matoo-secondary));
    background-size: cover;
    background-position: center;
    border-radius: var(--matoo-radius-lg);
}

.matoo-vendor-info {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-top: -40px;
    padding: 0 20px;
}

.matoo-vendor-avatar {
    flex-shrink: 0;
}

.matoo-vendor-avatar img,
.matoo-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--matoo-white);
    box-shadow: var(--matoo-shadow);
    object-fit: cover;
}

.matoo-vendor-details {
    flex: 1;
    padding-bottom: 10px;
}

.matoo-vendor-name {
    margin: 0 0 8px;
    font-size: 24px;
    color: var(--matoo-text);
}

.matoo-vendor-location {
    color: var(--matoo-text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.matoo-vendor-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--matoo-text-muted);
}

.matoo-vendor-actions {
    padding-bottom: 10px;
}

.matoo-vendor-bio {
    background: var(--matoo-background-light);
    padding: 20px;
    border-radius: var(--matoo-radius);
    margin-bottom: 20px;
}

.matoo-vendor-bio h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.matoo-vendor-bio p {
    margin: 0;
    color: var(--matoo-text);
    line-height: 1.7;
}

.matoo-vendor-stats {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: var(--matoo-white);
    border: 1px solid var(--matoo-border-light);
    border-radius: var(--matoo-radius);
}

.matoo-stat-item {
    text-align: center;
}

.matoo-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--matoo-primary);
}

.matoo-stat-label {
    font-size: 13px;
    color: var(--matoo-text-light);
}

.dokan-store-info .dokan-store-rating, .matoo-meta-item{align-items: normal!important;}

/* Share Modal */
.matoo-share-modal-content {
    max-width: 360px;
}

.matoo-share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.matoo-share-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--matoo-background-light);
    border-radius: var(--matoo-radius);
    text-decoration: none;
    color: var(--matoo-text);
    font-size: 14px;
    transition: background var(--matoo-transition);
}

.matoo-share-link:hover {
    background: var(--matoo-border-light);
}

.matoo-share-icon {
    font-size: 18px;
}

.matoo-share-copy {
    display: flex;
    gap: 10px;
}

.matoo-share-copy .matoo-input {
    flex: 1;
}

/* ============================================
   SPINNER
   ============================================ */
.matoo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--matoo-white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: matoo-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes matoo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   SELECT2 OVERRIDES
   ============================================ */
.select2-dropdown {
    z-index: 999999 !important;
}

.matoo-wrapper .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--matoo-border);
    border-radius: var(--matoo-radius);
    min-height: 44px;
    padding: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .matoo-wrapper {
        padding: 15px;
    }
    
    .matoo-header-flex {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .matoo-submit {
        flex-direction: column;
        gap: 15px;
    }
    
    .matoo-products-grid {
        grid-template-columns: 1fr;
    }
    
    .matoo-attributes-grid {
        grid-template-columns: 1fr;
    }
    
    .matoo-product-actions {
        justify-content: center;
    }
    
    .matoo-category-cascade {
        flex-direction: column;
    }
    
    .matoo-category-level {
        min-width: 100%;
    }
    
    .matoo-form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .matoo-auth-box {
        padding: 25px;
    }
    
    .matoo-vendor-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .matoo-vendor-meta {
        justify-content: center;
    }
    
    .matoo-vendor-stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .matoo-share-buttons {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RECOMMENDATIONS GRID
   ============================================ */

.matoo-recommend-wrapper {
    padding: 0;
}

.matoo-recommend-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--matoo-text);
}

/* Uniform image height */
.matoo-recommend-wrapper .matoo-recommend-grid .product .product-media img,
.matoo-recommend-wrapper .matoo-recommend-grid .product .product-wrap img,
.matoo-recommend-wrapper .matoo-recommend-grid .product > a > img,
.matoo-recommend-wrapper .matoo-recommend-grid .product img.attachment-woocommerce_thumbnail,
.matoo-recommend-wrapper .matoo-recommend-grid .product img.wp-post-image {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.matoo-load-more-wrapper {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
}

.matoo-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
}

.matoo-load-more-btn svg {
    transition: transform 0.2s ease;
}

.matoo-load-more-btn:hover svg {
    transform: translateX(4px);
}

.matoo-no-products {
    text-align: center;
    padding: 40px 20px;
    color: var(--matoo-text-light);
}

@media (max-width: 991px) {
    .matoo-recommend-wrapper .matoo-recommend-grid .product .product-media img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product .product-wrap img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product > a > img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product img.attachment-woocommerce_thumbnail,
    .matoo-recommend-wrapper .matoo-recommend-grid .product img.wp-post-image {
        height: 240px !important;
    }
}

@media (max-width: 767px) {
    .matoo-recommend-wrapper .matoo-recommend-grid .product .product-media img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product .product-wrap img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product > a > img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product img.attachment-woocommerce_thumbnail,
    .matoo-recommend-wrapper .matoo-recommend-grid .product img.wp-post-image {
        height: 200px !important;
    }
    
    .matoo-recommend-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .matoo-recommend-wrapper .matoo-recommend-grid .product .product-media img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product .product-wrap img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product > a > img,
    .matoo-recommend-wrapper .matoo-recommend-grid .product img.attachment-woocommerce_thumbnail,
    .matoo-recommend-wrapper .matoo-recommend-grid .product img.wp-post-image {
        height: 160px !important;
    }
}

/* ============================================
   EDIT PROFILE FORM
   ============================================ */
.matoo-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--matoo-border-light);
}

.matoo-form-section h3 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--matoo-text);
}

/* Banner upload */
.matoo-banner-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.matoo-banner-preview {
    width: 100%;
    height: 150px;
    border-radius: var(--matoo-radius);
    border: 2px dashed var(--matoo-border);
    background-color: var(--matoo-background-light);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--matoo-transition);
}

.matoo-banner-preview:hover {
    border-color: var(--matoo-primary);
}

.matoo-banner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--matoo-text-muted);
    font-size: 14px;
}

.matoo-banner-placeholder i {
    font-size: 32px;
}

/* Avatar upload */
.matoo-avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
}

.matoo-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--matoo-border-light);
}

.matoo-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Form hint */
.matoo-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--matoo-text-muted);
}