* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    display: flex; align-items: center;
    padding: 14px 32px; background: #fff; border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 100;
}
.site-header .logo { flex-shrink: 0; }
.site-header .site-nav {
    margin-left: auto;
    margin-right: auto;
}
.header-right {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.site-header .logo { display: flex; align-items: center; gap: 8px; }
.site-header .logo img { height: 32px; width: auto; }
.site-nav { display: flex; gap: 26px; font-size: 14px; color: #555; }
.site-nav a:hover { color: #3272B8; }
.site-nav a.active { color: #3272B8; font-weight: 600; }
.btn-supplier-login {
    background: transparent; color: #3272B8; border: 1.5px solid #3272B8;
    padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 600;
    transition: all 0.2s ease;
}
.btn-supplier-login:hover {
    background: #3272B8; color: #fff;
    box-shadow: 0 4px 14px rgba(50,114,184,0.35); transform: translateY(-1px);
}
.btn-supplier-dashboard {
    background: #3272B8; color: #fff; border: 1.5px solid #3272B8;
    padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 600;
    transition: all 0.2s ease;
}
.btn-supplier-dashboard:hover {
    background: #285d99; box-shadow: 0 4px 14px rgba(50,114,184,0.35); transform: translateY(-1px);
}
.btn-logout {
    background: #FCEBEB; color: #A32D2D; border: 1.5px solid #F7C1C1;
    padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 600;
    transition: all 0.2s ease;
}
.btn-logout:hover {
    background: #A32D2D; color: #fff; border-color: #A32D2D;
    box-shadow: 0 4px 14px rgba(163,45,45,0.3); transform: translateY(-1px);
}
.mobile-toggle { display: none; background: none; border: none; font-size: 24px; color: #333; cursor: pointer; padding: 4px; }
.search-icon-btn {
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
    cursor: pointer; padding: 7px 8px; color: #555; border-radius: 6px;
    transition: background .15s, color .15s;
}
.search-icon-btn:hover { background: #F4F6F8; color: #3272B8; }

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 8px 24px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-nav.open { display: flex; max-height: 400px; }
.mobile-nav a {
    padding: 12px 4px; font-size: 15px; color: #444; border-bottom: 1px solid #f2f2f2;
}
.mobile-nav a.active { color: #3272B8; font-weight: 600; }
.mobile-nav a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */
.hero-carousel { position: relative; min-height: 420px; overflow: hidden; }
.hero {
    position: relative; min-height: 420px;
    background: linear-gradient(120deg, #0C447C 0%, #185FA5 55%, #BA7517 100%);
    background-size: cover; background-position: center;
    overflow: hidden;
}
.hero .container { width: 100%; }
.hero-carousel .hero { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; z-index: 0; display: flex; align-items: stretch; }
.hero-carousel .hero .container { display: flex; align-items: center; }
.hero-carousel .hero.active { opacity: 1; z-index: 1; }
.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.4); border: none; cursor: pointer; padding: 0; transition: 0.2s; }
.hero-dot.active { background: #fff; width: 22px; border-radius: 5px; }
.hero .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(4,44,83,0.75) 0%, rgba(4,44,83,0.35) 55%, rgba(4,44,83,0.05) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 90px 0; max-width: 600px; text-align: left; }
.hero-badge {
    display: inline-block; background: rgba(255,255,255,0.15); color: #fff;
    font-size: 13px; padding: 4px 14px; border-radius: 20px; margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,0.3);
}
.hero h1 { font-size: 38px; font-weight: 600; color: #fff; line-height: 1.3; margin-bottom: 16px; }
.hero p { font-size: 16px; color: rgba(255,255,255,0.85); margin-bottom: 32px; max-width: 460px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 14px 28px; border-radius: 6px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; }
.btn-accent { background: #EB6D24; color: #fff; }
.btn-accent:hover { background: #d15e1a; }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }
.btn-primary { background: #3272B8; color: #fff; }
.btn-primary:hover { background: #285d99; }

/* ---------- Stats bar ---------- */
.stats-bar { background: #F8F9FA; border-top: 1px solid #eee; padding: 24px 0; }
.stats-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.stats-bar .stat { text-align: center; }
.stats-bar .stat .num { font-size: 24px; font-weight: 700; color: #3272B8; }
.stats-bar .stat .label { font-size: 13px; color: #5A5A5A; }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-alt { background: #F8F9FA; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head .eyebrow { color: #EB6D24; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 8px; }
.section-head h2 { font-size: 28px; font-weight: 600; color: #1e1e1e; margin-bottom: 12px; }
.section-head p { color: #666; font-size: 15px; }

/* ---------- Category grid ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.category-card {
    background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 24px 16px;
    text-align: center; transition: 0.2s;
}
.category-card:hover { border-color: #3272B8; box-shadow: 0 4px 16px rgba(50,114,184,0.1); transform: translateY(-2px); }
.category-icon {
    width: 56px; height: 56px; border-radius: 50%; background: #E6F1FB;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
    font-size: 24px; color: #3272B8; overflow: hidden;
}
.category-card h3 { font-size: 15px; font-weight: 600; color: #222; }
.category-card p { font-size: 12px; color: #999; margin-top: 4px; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.product-card { background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden; transition: 0.2s; }
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-3px); }
.product-card .thumb { width: 100%; height: 170px; object-fit: cover; background: #F0F0F0; }
.product-card .thumb-placeholder { width: 100%; height: 170px; background: #E6F1FB; display: flex; align-items: center; justify-content: center; color: #3272B8; font-size: 32px; }
.product-card .body { padding: 16px 18px; }
.product-card .cat-tag { font-size: 11px; color: #EB6D24; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.product-card h3 { font-size: 16px; font-weight: 600; margin: 6px 0 8px; color: #1e1e1e; }
.product-card p { font-size: 13px; color: #777; margin-bottom: 14px; }
.product-card .view-link { font-size: 13px; font-weight: 600; color: #3272B8; }

/* ---------- Why choose us ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.feature-item { text-align: center; padding: 0 12px; }
.feature-icon { width: 60px; height: 60px; border-radius: 50%; background: #FAEEDA; color: #BA7517; display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 16px; overflow: hidden; }
.feature-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-item p { font-size: 14px; color: #777; }

/* ---------- CTA ---------- */
.cta-section {
    background: linear-gradient(120deg, #0C447C 0%, #185FA5 100%);
    padding: 56px 0; text-align: center; color: #fff;
}
.cta-section h2 { font-size: 26px; font-weight: 600; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.85); margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: #12253A; color: rgba(255,255,255,0.7); padding: 48px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 16px; }
.footer-grid p { font-size: 13px; color: rgba(255,255,255,0.65); display: block; margin-bottom: 10px; }
.footer-grid a { font-size: 13px; color: rgba(255,255,255,0.65); display: block; margin-bottom: 10px; }
.footer-grid a:hover { color: #fff; }
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.footer-bottom { text-align: center; font-size: 12px; color: rgba(255,255,255,0.4); border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }

/* ---------- Contact form ---------- */
.contact-form input, .contact-form textarea, .contact-form select {
    width: 100%; padding: 11px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; margin-bottom: 14px; font-family: inherit;
}
.contact-form textarea { min-height: 100px; resize: vertical; }
.alert { padding: 12px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 18px; }
.alert-success { background: #EAF3DE; color: #27500A; }
.alert-error { background: #FCEBEB; color: #A32D2D; }
.alert-warning { background: #FAEEDA; color: #854F0B; }

/* ---------- Generic forms (supplier register/dashboard) ---------- */
.form-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 28px; margin-bottom: 24px; }
.form-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f0f0f0; color: #1e1e1e; display: flex; align-items: center; gap: 10px; }
.step-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #3272B8; color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 13px; color: #444; margin-bottom: 6px; font-weight: 600; }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password],
.form-group input[type=tel], .form-group select, .form-group textarea {
    width: 100%; padding: 11px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #3272B8; box-shadow: 0 0 0 3px rgba(50,114,184,0.1); }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 12px; color: #999; margin-top: 6px; }

.section-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; border: 1px solid #eee; padding: 18px; border-radius: 10px; background: #FAFBFC; }
.section-row .field-col { flex: 1; }
.section-row .remove-btn { background: #FCEBEB; color: #A32D2D; border: none; border-radius: 6px; padding: 8px 12px; cursor: pointer; font-size: 12px; font-weight: 600; height: fit-content; flex-shrink: 0; }
.section-row .remove-btn:hover { background: #F7C1C1; }

/* ---------- Supplier profile (LinkedIn-style) ---------- */
.profile-header { margin-bottom: 24px; }
.profile-cover {
    width: 100%; height: 200px; border-radius: 12px 12px 0 0;
    background: linear-gradient(120deg, #0C447C 0%, #185FA5 55%, #BA7517 100%);
    background-size: cover; background-position: center; position: relative;
}
.profile-avatar-wrap { position: absolute; left: 24px; bottom: -46px; z-index: 3; }
.profile-avatar {
    width: 104px; height: 104px; border-radius: 50%; border: 4px solid #fff;
    background: #E6F1FB; display: flex; align-items: center; justify-content: center;
    font-size: 38px; color: #3272B8; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    position: relative;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info-bar {
    background: #fff; border: 1px solid #eee; border-top: none; border-radius: 0 0 12px 12px;
    padding: 58px 24px 20px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px;
}
.profile-info-bar h1 { font-size: 22px; font-weight: 700; color: #1e1e1e; margin-bottom: 4px; }
.profile-info-bar .headline { font-size: 14px; color: #666; margin-bottom: 8px; }
.profile-info-bar .meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #999; }

/* Photo edit icon overlays (SVG-based, no external font dependency) */
.photo-edit-form { display: inline; }
.avatar-edit-btn {
    position: absolute; bottom: 0; right: 0; width: 32px; height: 32px; border-radius: 50%;
    background: #3272B8; color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 3px solid #fff; z-index: 4; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.avatar-edit-btn:hover { background: #285d99; }
.avatar-edit-btn svg { width: 15px; height: 15px; }
.avatar-edit-btn input[type=file] { display: none; }
.cover-edit-btn {
    position: absolute; bottom: 14px; right: 14px; background: rgba(0,0,0,0.6); color: #fff;
    padding: 8px 16px; border-radius: 6px; display: flex; align-items: center; gap: 7px;
    cursor: pointer; font-size: 13px; font-weight: 600; z-index: 2;
}
.cover-edit-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.cover-edit-btn:hover { background: rgba(0,0,0,0.8); }
.cover-edit-btn input[type=file] { display: none; }

/* Dashboard sidebar + tabs */
.dashboard-layout { display: flex; gap: 24px; align-items: flex-start; }
.dashboard-sidebar { width: 220px; flex-shrink: 0; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 10px; position: sticky; top: 90px; }
.dashboard-sidebar a {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px;
    font-size: 14px; color: #555; margin-bottom: 4px; cursor: pointer; text-decoration: none;
}
.dashboard-sidebar a.active, .dashboard-sidebar a:hover { background: #E6F1FB; color: #3272B8; font-weight: 600; }
.dashboard-content { flex: 1; min-width: 0; }
.dashboard-tab { display: none; }
.dashboard-tab.active { display: block; }

/* Info card view/edit toggle */
.profile-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.profile-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f0f0f0; }
.profile-card-header h3 { font-size: 16px; font-weight: 600; color: #1e1e1e; display: flex; align-items: center; gap: 8px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.info-grid .full { grid-column: 1 / -1; }
.info-row .info-label { font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.info-row .info-value { font-size: 14px; color: #2b2b2b; font-weight: 500; }
.info-row .info-value.empty { color: #bbb; font-weight: 400; font-style: italic; }

@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; }
    .dashboard-sidebar { width: 100%; position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
    .dashboard-sidebar a { white-space: nowrap; margin-bottom: 0; }
    .info-grid { grid-template-columns: 1fr; }
    .profile-cover { height: 150px; }
    .profile-avatar { width: 84px; height: 84px; font-size: 30px; }
    .profile-avatar-wrap { left: 16px; bottom: -38px; }
    .avatar-edit-btn { width: 26px; height: 26px; }
    .avatar-edit-btn svg { width: 13px; height: 13px; }
    .profile-info-bar { padding: 48px 16px 16px; }
    .cover-edit-btn { padding: 7px 10px; font-size: 0; }
    .cover-edit-btn svg { width: 15px; height: 15px; }
}
.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-approved, .badge-active { background: #EAF3DE; color: #27500A; }
.badge-pending { background: #FAEEDA; color: #854F0B; }
.badge-rejected, .badge-inactive { background: #FCEBEB; color: #A32D2D; }

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .product-detail-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Dynamic Homepage Sections ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 24px; }
.testimonial-card .quote-icon { color: #E6F1FB; font-size: 32px; line-height: 1; margin-bottom: 10px; }
.testimonial-card p.quote { font-size: 14px; color: #444; line-height: 1.7; margin-bottom: 18px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testimonial-author .avatar-fallback { width: 44px; height: 44px; border-radius: 50%; background: #E6F1FB; color: #3272B8; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.testimonial-author .name { font-size: 14px; font-weight: 700; color: #1e1e1e; }
.testimonial-author .role { font-size: 12px; color: #999; }

.clients-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; align-items: center; }
.client-logo-card { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; transition: 0.2s; }
.client-logo-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.06); transform: translateY(-2px); }
.client-logo-card img { max-width: 100%; max-height: 56px; object-fit: contain; }
.client-logo-card .client-name { font-size: 12px; color: #777; }

.ad-banner { display: block; border-radius: 12px; overflow: hidden; }
.ad-banner img { width: 100%; display: block; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.gallery-grid .gallery-item { border-radius: 10px; overflow: hidden; position: relative; }
.gallery-grid .gallery-item img { width: 100%; height: 200px; object-fit: cover; display: block; }
.gallery-grid .gallery-item .caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); color: #fff; font-size: 13px; padding: 20px 12px 8px; }

.richtext-block { max-width: 760px; margin: 0 auto; text-align: center; }
.richtext-block .body-text { font-size: 15px; color: #555; line-height: 1.8; white-space: pre-line; }
@media (max-width: 768px) {
    .site-nav { display: none; }
    .header-right { display: none; }
    .mobile-toggle { display: block; }
    .site-header { padding: 12px 16px; }
    .site-header .logo img { height: 26px; }
    .hero-content { padding: 44px 0; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 14px; }
    .section { padding: 40px 0; }
    .section-head h2 { font-size: 22px; }
    .stats-bar { padding: 20px 0; }
    .stats-bar .container { gap: 20px; justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; }
    .container { padding: 0 16px; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; text-align: center; }
    .stats-bar { justify-content: center; gap: 24px 36px; }
}
