/* ================================================
   SUPPLIER DETAILS — Premium Profile Page
   Based on details.html template
   ================================================ */

:root {
    --sd-brand: #378b95;
    --sd-brand-dark: #23656c;
    --sd-brand-light: rgba(55, 139, 149, 0.08);
    --sd-brand-glow: rgba(55, 139, 149, 0.2);
    --sd-accent: #f5833d;
    --sd-accent-glow: rgba(245, 131, 61, 0.2);
    --sd-text-main: #475569;
    --sd-text-muted: #94a3b8;
    --sd-text-dark: #1e293b;
    --sd-border-soft: #e2e8f0;
    --sd-bg-body: #f4f7f9;
    --sd-bg-card: #ffffff;
    --sd-bg-input: #f8fafc;
    --sd-radius-sm: 8px;
    --sd-radius-md: 16px;
    --sd-radius-lg: 24px;
    --sd-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --sd-shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
}

/* ===== HERO BANNER ===== */
.sd-profile-hero {
    background: linear-gradient(135deg, var(--sd-brand-dark) 0%, var(--sd-brand) 100%);
    height: 240px; position: relative; overflow: hidden;
}
.sd-profile-hero::before {
    content: ''; position: absolute; top: -100px; right: 10%; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%); border-radius: 50%;
}
.sd-breadcrumb {
    position: absolute; top: 30px; left: 24px; display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); z-index: 10;
}
[dir="rtl"] .sd-breadcrumb { left: auto; right: 24px; }
.sd-breadcrumb a { color: #fff; text-decoration: none; transition: opacity 0.2s; }
.sd-breadcrumb a:hover { opacity: 0.8; }

/* ===== MAIN PROFILE CARD ===== */
.sd-profile-card {
    background: var(--sd-bg-card); border-radius: var(--sd-radius-lg); box-shadow: var(--sd-shadow-card);
    padding: 32px; margin-top: -80px; position: relative; z-index: 20;
    display: flex; gap: 30px; align-items: center; border: 1px solid rgba(255,255,255,0.8);
}
.sd-pc-logo {
    width: 140px; height: 140px; border-radius: var(--sd-radius-md); background: #fff;
    border: 1px solid var(--sd-border-soft); box-shadow: var(--sd-shadow-soft);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.sd-pc-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.sd-pc-info { flex: 1; min-width: 0; }
.sd-pc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.sd-pc-title h1, .sd-pc-title h4 { font-size: 28px; font-weight: 800; color: var(--sd-text-dark); margin: 0; line-height: 1.2; letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px; }
.sd-verified-badge { color: #10b981; font-size: 18px; }
.sd-pc-location { font-size: 14px; font-weight: 600; color: var(--sd-text-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.sd-pc-rating { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.sd-stars { color: #f59e0b; font-size: 14px; letter-spacing: 2px; }
.sd-review-count { font-size: 13px; font-weight: 600; color: var(--sd-text-muted); }
.sd-pc-regions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sd-region-lbl { font-size: 12px; font-weight: 700; color: var(--sd-text-dark); margin-right: 4px; }
[dir="rtl"] .sd-region-lbl { margin-right: 0; margin-left: 4px; }
.sd-region-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--sd-bg-input); border: 1px solid var(--sd-border-soft); border-radius: 8px; font-size: 11px; font-weight: 700; color: var(--sd-text-main); }
.sd-pc-actions { display: flex; gap: 12px; flex-shrink: 0; }
.sd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 24px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s; border: none; font-family: 'Inter', sans-serif; text-decoration: none; }
.sd-btn-outline { background: transparent; color: var(--sd-text-dark); border: 2px solid var(--sd-border-soft); }
.sd-btn-outline:hover { border-color: var(--sd-brand); color: var(--sd-brand); }
.sd-btn-primary { background: var(--sd-brand); color: #fff; box-shadow: 0 4px 12px var(--sd-brand-glow); }
.sd-btn-primary:hover { background: var(--sd-accent); transform: translateY(-2px); box-shadow: 0 6px 16px var(--sd-accent-glow); }

/* ===== GRID LAYOUT ===== */
.sd-profile-grid { display: grid; grid-template-columns: 1fr 340px; gap: 30px; margin-top: 30px; align-items: start; }

/* ===== LEFT: CONTENT TABS ===== */
.sd-content-box { background: var(--sd-bg-card); border-radius: var(--sd-radius-md); box-shadow: var(--sd-shadow-soft); border: 1px solid var(--sd-border-soft); overflow: hidden; margin-bottom: 30px; }
.sd-tabs-header { display: flex; border-bottom: 1px solid var(--sd-border-soft); background: var(--sd-bg-input); padding: 0 10px; }
.sd-tab-btn { padding: 20px 24px; font-size: 14px; font-weight: 700; color: var(--sd-text-muted); background: transparent; border: none; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; font-family: inherit; text-decoration: none; display: inline-block; }
.sd-tab-btn:hover { color: var(--sd-brand); }
.sd-tab-btn.active { color: var(--sd-brand); border-bottom-color: var(--sd-brand); background: var(--sd-bg-card); }
.sd-tab-content { padding: 32px; display: none; }
.sd-tab-content.active { display: block; animation: sdFadeIn 0.4s ease; }
@keyframes sdFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.sd-section-title { font-size: 18px; font-weight: 800; color: var(--sd-text-dark); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.sd-section-title i { color: var(--sd-brand); }
.sd-about-text { font-size: 15px; color: var(--sd-text-main); line-height: 1.8; margin-bottom: 30px; }

/* Contact form */
.sd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.sd-form-group { display: flex; flex-direction: column; gap: 8px; grid-column: span 2; }
.sd-form-group.half { grid-column: span 1; }
.sd-form-group label, .sd-form-group span { font-size: 13px; font-weight: 700; color: var(--sd-text-dark); }
.sd-form-group .req { color: #ef4444; }
.sd-form-control { width: 100%; padding: 14px 16px; border-radius: var(--sd-radius-sm); border: 2px solid var(--sd-border-soft); background: var(--sd-bg-input); font-family: inherit; font-size: 14px; color: var(--sd-text-dark); transition: all 0.2s; outline: none; }
.sd-form-control:focus { background: var(--sd-bg-card); border-color: var(--sd-brand); box-shadow: 0 0 0 4px var(--sd-brand-light); }
textarea.sd-form-control { resize: vertical; min-height: 120px; }
.sd-char-count { font-size: 11px; color: var(--sd-text-muted); text-align: right; margin-top: -4px; }
[dir="rtl"] .sd-char-count { text-align: left; }

/* Products / services badges */
.sd-product-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.sd-product-tag { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--sd-bg-input); border: 1px solid var(--sd-border-soft); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--sd-text-main); }
.sd-product-tag i { color: var(--sd-brand); }

/* ===== RIGHT: SIDEBAR WIDGETS ===== */
.sd-widget { background: var(--sd-bg-card); border-radius: var(--sd-radius-md); box-shadow: var(--sd-shadow-soft); border: 1px solid var(--sd-border-soft); padding: 24px; margin-bottom: 24px; }
.sd-widget-title { font-size: 15px; font-weight: 800; color: var(--sd-text-dark); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--sd-border-soft); }
.sd-widget-title i, .sd-widget-title img { color: var(--sd-brand); }

.sd-contact-list { list-style: none; display: flex; flex-direction: column; gap: 20px; padding: 0; margin: 0; }
.sd-contact-item { display: flex; gap: 16px; align-items: flex-start; }
.sd-contact-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--sd-brand-light); color: var(--sd-brand); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.sd-contact-details h5 { font-size: 11px; font-weight: 700; color: var(--sd-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 4px; }
.sd-contact-details p, .sd-contact-details a { font-size: 14px; font-weight: 600; color: var(--sd-text-dark); text-decoration: none; transition: color 0.2s; line-height: 1.4; margin: 0; }
.sd-contact-details a:hover { color: var(--sd-brand); }

.sd-social-links { display: flex; gap: 10px; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--sd-border-soft); justify-content: center; }
.sd-social-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--sd-bg-input); color: var(--sd-text-muted); display: flex; align-items: center; justify-content: center; transition: all 0.2s; text-decoration: none; font-size: 15px; }
.sd-social-btn:hover { background: var(--sd-brand); color: #fff; transform: translateY(-2px); }
.sd-social-btn.disabled-link { background: #e0e0e0; pointer-events: none; }

/* Related suppliers */
.sd-related-list { list-style: none; display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0; }
.sd-related-item { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 8px; border-radius: 12px; transition: background 0.2s; color: inherit; }
.sd-related-item:hover { background: var(--sd-bg-input); }
.sd-related-logo { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--sd-border-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; flex-shrink: 0; }
.sd-related-logo img { width: 100%; height: 100%; object-fit: contain; }
.sd-related-info h6 { font-size: 13px; font-weight: 700; color: var(--sd-text-dark); margin: 0 0 2px; line-height: 1.3; }
.sd-related-info small { font-size: 11px; font-weight: 500; color: var(--sd-text-muted); }

/* Free tenders */
.sd-tender-list { list-style: none; display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0; }
.sd-tender-item { text-decoration: none; display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--sd-border-soft); transition: opacity 0.2s; color: inherit; }
.sd-tender-item:last-child { border-bottom: none; padding-bottom: 0; }
.sd-tender-item:hover { opacity: 0.7; }
.sd-tender-title { font-size: 13px; font-weight: 700; color: var(--sd-brand); line-height: 1.4; }
.sd-tender-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; color: var(--sd-text-muted); }

/* Featured CTA */
.sd-featured-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.sd-featured-box i { font-size: 32px; color: var(--sd-accent); margin-bottom: 8px; }
.sd-featured-box h5 { font-size: 14px; font-weight: 700; color: var(--sd-text-dark); line-height: 1.4; margin: 0; }

/* Flag icons */
.sd-flag-icon { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.1); vertical-align: middle; }

/* Alert overrides */
.sd-alert { padding: 16px 20px; border-radius: var(--sd-radius-sm); margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.sd-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.sd-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sd-profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sd-profile-card { flex-direction: column; text-align: center; padding: 24px; gap: 20px; }
    .sd-pc-head { flex-direction: column; align-items: center; gap: 10px; }
    .sd-pc-rating, .sd-pc-regions { justify-content: center; }
    .sd-pc-actions { width: 100%; flex-direction: column; }
    .sd-btn { width: 100%; }
    .sd-form-grid { grid-template-columns: 1fr; }
    .sd-form-group.half { grid-column: span 2; }
    .sd-pc-location { justify-content: center; }
    .sd-profile-hero { height: 180px; }
    .sd-pc-logo { width: 100px; height: 100px; }
    .sd-pc-title h1, .sd-pc-title h4 { font-size: 22px; }
}
