/* صفحات عمومی: محصولات، درباره ما، تماس — برند استیل/مس */
:root {
    --sp-slate: #1e2a3a;
    --sp-slate-deep: #0c1118;
    --sp-slate-mid: #2a3a4d;
    --sp-copper: #c4782a;
    --sp-copper-dark: #a86420;
    --sp-surface: #ffffff;
    --sp-muted: #5a6f86;
    --sp-line: rgba(30, 42, 58, 0.1);
    --sp-bg: #f5f7fa;
}

/* Page hero (inner pages — not homepage full-bleed photo) */
.sp-hero {
    position: relative;
    background:
        linear-gradient(120deg, rgba(12, 17, 24, 0.94) 0%, rgba(30, 42, 58, 0.88) 55%, rgba(42, 58, 77, 0.82) 100%),
        linear-gradient(160deg, #1e2a3a, #0c1118);
    color: #fff;
    padding: clamp(3.5rem, 8vw, 5.5rem) 0;
    text-align: center;
    overflow: hidden;
}

.sp-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--sp-copper), transparent);
}

.sp-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 0.65rem;
    letter-spacing: -0.02em;
    animation: sp-rise 0.5s ease both;
}

.sp-hero p {
    font-size: clamp(0.98rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.82);
    max-width: 40rem;
    margin: 0 auto;
    line-height: 1.8;
    animation: sp-rise 0.5s ease 0.08s both;
}

.sp-section {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.sp-section-title.is-spaced {
    margin-top: 2.5rem;
}

.sp-section-sub {
    text-align: center;
    color: var(--sp-muted);
    font-size: 1.05rem;
    max-width: 44rem;
    margin: 0 auto 2.5rem;
    line-height: 1.85;
}

@keyframes sp-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.sp-rise { animation: sp-rise 0.45s ease both; }
.sp-rise-d1 { animation-delay: 0.06s; }
.sp-rise-d2 { animation-delay: 0.12s; }
.sp-rise-d3 { animation-delay: 0.18s; }
.sp-rise-d4 { animation-delay: 0.24s; }

/* ---------- Products ---------- */
.sp-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.sp-filter-btn {
    padding: 0.65rem 1.15rem;
    min-height: 44px;
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--sp-slate);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.sp-filter-btn:hover,
.sp-filter-btn:focus-visible {
    border-color: var(--sp-copper);
    color: var(--sp-copper-dark);
    outline: none;
}

.sp-filter-btn.is-active {
    background: var(--sp-copper);
    border-color: var(--sp-copper);
    color: #fff;
}

.sp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.35rem;
}

.sp-product-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 10px rgba(12, 17, 24, 0.05);
}

.sp-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(12, 17, 24, 0.1);
    border-color: rgba(196, 120, 42, 0.35);
}

.sp-product-card.is-hidden {
    display: none !important;
}

.sp-product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    background: var(--sp-copper);
    color: #fff;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
}

.sp-product-media {
    height: 190px;
    background: linear-gradient(145deg, #e8eef4, #d5dee8);
    overflow: hidden;
}

.sp-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.sp-product-card:hover .sp-product-media img {
    transform: scale(1.04);
}

.sp-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.sp-product-body {
    padding: 1.15rem 1.2rem 1.35rem;
}

.sp-product-cat {
    color: var(--sp-copper);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.sp-product-body h3 {
    font-size: 1.1rem;
    color: var(--sp-slate);
    margin-bottom: 0.5rem;
    line-height: 1.45;
}

.sp-product-body p {
    color: var(--sp-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

.sp-empty,
.sp-alert {
    text-align: center;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin: 1rem auto;
    max-width: 36rem;
}

.sp-empty {
    background: #eef6f9;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.sp-alert {
    background: #fdecea;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---------- About ---------- */
.sp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 2.5rem;
}

.sp-feature {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    padding: 1.75rem 1.35rem;
    text-align: center;
    border-top: 3px solid var(--sp-slate);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(12, 17, 24, 0.08);
}

.sp-feature-icon {
    font-size: 2rem;
    margin-bottom: 0.85rem;
    color: var(--sp-copper);
    font-weight: 800;
    min-height: 2.2rem;
}

.sp-feature h3 {
    color: var(--sp-slate);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.sp-feature p {
    color: var(--sp-muted);
    font-size: 0.92rem;
    line-height: 1.75;
    margin: 0;
}

.sp-mv {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

.sp-mv-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    border-right: 4px solid var(--sp-copper);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-mv-card.is-vision {
    border-right-color: var(--sp-slate);
}

.sp-mv-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(12, 17, 24, 0.07);
}

.sp-mv-card h3 {
    color: var(--sp-slate);
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
}

.sp-mv-card p {
    color: var(--sp-muted);
    line-height: 1.85;
    margin: 0;
}

.sp-stats {
    background: linear-gradient(145deg, var(--sp-slate) 0%, var(--sp-slate-deep) 100%);
    color: #fff;
    padding: clamp(2.5rem, 6vw, 4rem) 0;
    margin: 2.5rem 0;
    position: relative;
}

.sp-stats::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--sp-copper);
}

.sp-stats .sp-section-title {
    color: #fff;
    margin-bottom: 2rem;
}

.sp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.sp-stat-num {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--sp-copper);
    margin-bottom: 0.35rem;
}

.sp-stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.sp-timeline {
    position: relative;
    max-width: 52rem;
    margin: 2rem auto 0;
    padding: 0.5rem 0 1rem;
}

.sp-timeline::before {
    content: "";
    position: absolute;
    right: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(30, 42, 58, 0.2);
    transform: translateX(50%);
}

.sp-timeline-item {
    position: relative;
    width: 46%;
    margin-bottom: 1.75rem;
}

.sp-timeline-item:nth-child(odd) {
    margin-right: 0;
    margin-left: auto;
    padding-right: 1.5rem;
}

.sp-timeline-item:nth-child(even) {
    margin-left: 0;
    margin-right: auto;
    padding-left: 1.5rem;
    text-align: left;
}

.sp-timeline-item::after {
    content: "";
    position: absolute;
    top: 1.1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sp-copper);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(196, 120, 42, 0.35);
}

.sp-timeline-item:nth-child(odd)::after {
    right: -5px;
}

.sp-timeline-item:nth-child(even)::after {
    left: -5px;
}

.sp-timeline-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 10px;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 2px 10px rgba(12, 17, 24, 0.04);
}

.sp-timeline-year {
    color: var(--sp-copper);
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.sp-timeline-card h3 {
    color: var(--sp-slate);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.sp-timeline-card p {
    color: var(--sp-muted);
    font-size: 0.92rem;
    line-height: 1.75;
    margin: 0;
}

.sp-team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.35rem;
    margin-top: 2rem;
}

.sp-team-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(12, 17, 24, 0.08);
}

.sp-team-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: linear-gradient(145deg, #2a3a4d, #1e2a3a);
}

.sp-team-avatar {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2a3a4d, #1e2a3a);
    color: #fff;
    font-size: 2.4rem;
    font-weight: 800;
}

.sp-team-info {
    padding: 1.25rem 1.1rem 1.5rem;
}

.sp-team-name {
    font-size: 1.15rem;
    color: var(--sp-slate);
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.sp-team-role {
    color: var(--sp-copper);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
}

.sp-team-info p {
    color: var(--sp-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* ---------- Contact ---------- */
.sp-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.sp-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 2px 12px rgba(12, 17, 24, 0.05);
}

.sp-card h2 {
    color: var(--sp-slate);
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.sp-card > p {
    color: var(--sp-muted);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.sp-contact-list {
    display: grid;
    gap: 0.85rem;
}

.sp-contact-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--sp-bg);
    border-radius: 10px;
    border-right: 3px solid var(--sp-slate);
    transition: background 0.2s ease, transform 0.15s ease;
}

.sp-contact-item:hover {
    background: #eef2f6;
    transform: translateX(-3px);
}

.sp-contact-mark {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: 8px;
    background: var(--sp-slate);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

.sp-contact-item h4 {
    margin: 0 0 0.25rem;
    color: var(--sp-slate);
    font-size: 0.95rem;
}

.sp-contact-item p,
.sp-contact-item a {
    margin: 0;
    color: var(--sp-muted);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.65;
}

.sp-contact-item a:hover {
    color: var(--sp-copper);
}

.sp-form-group {
    margin-bottom: 1.1rem;
}

.sp-form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--sp-slate);
    font-size: 0.92rem;
}

.sp-form-group input,
.sp-form-group select,
.sp-form-group textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d5dde5;
    border-radius: 8px;
    font: inherit;
    font-size: 0.95rem;
    min-height: 44px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    direction: rtl;
}

.sp-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.sp-form-group input:focus,
.sp-form-group select:focus,
.sp-form-group textarea:focus {
    outline: none;
    border-color: var(--sp-copper);
    box-shadow: 0 0 0 3px rgba(196, 120, 42, 0.18);
}

.sp-form-group .field-error {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.sp-form-group.has-error input,
.sp-form-group.has-error select,
.sp-form-group.has-error textarea {
    border-color: #c0392b;
}

.sp-submit {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sp-slate) 0%, var(--sp-slate-deep) 100%);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.sp-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(12, 17, 24, 0.2);
}

.sp-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.sp-flash {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.92rem;
}

.sp-flash.is-success {
    background: #e8f8ef;
    color: #1e8449;
    border: 1px solid #b7e4c7;
}

.sp-flash.is-error {
    background: #fdecea;
    color: #922b21;
    border: 1px solid #f5c6cb;
}

.sp-depts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.sp-dept {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    padding: 1.35rem 1.15rem;
    text-align: center;
    border-top: 3px solid var(--sp-copper);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-dept:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(12, 17, 24, 0.08);
}

.sp-dept h3 {
    color: var(--sp-slate);
    font-size: 1.1rem;
    margin-bottom: 0.65rem;
}

.sp-dept p,
.sp-dept a {
    color: var(--sp-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    text-decoration: none;
}

.sp-dept a:hover {
    color: var(--sp-copper);
}

.sp-map {
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--sp-line);
    min-height: 320px;
    background: var(--sp-slate);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}

.sp-map iframe {
    width: 100%;
    height: 360px;
    border: 0;
    display: block;
}

#sp-toast-root {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.sp-toast {
    pointer-events: auto;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    animation: sp-rise 0.28s ease both;
    box-shadow: 0 8px 24px rgba(12, 17, 24, 0.15);
}

.sp-toast.is-success {
    background: #e8f8ef;
    color: #1e8449;
}

.sp-toast.is-error {
    background: #fdecea;
    color: #922b21;
}

@media (max-width: 900px) {
    .sp-contact-grid,
    .sp-mv {
        grid-template-columns: 1fr;
    }

    .sp-timeline::before {
        right: 1rem;
        transform: none;
    }

    .sp-timeline-item,
    .sp-timeline-item:nth-child(odd),
    .sp-timeline-item:nth-child(even) {
        width: calc(100% - 2.5rem);
        margin-right: 0;
        margin-left: 2.5rem;
        padding: 0;
        text-align: right;
    }

    .sp-timeline-item:nth-child(odd)::after,
    .sp-timeline-item:nth-child(even)::after {
        right: auto;
        left: -1.65rem;
    }
}

@media (max-width: 600px) {
    .sp-products-grid {
        grid-template-columns: 1fr;
    }

    .sp-filter-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .sp-product-card:hover,
    .sp-feature:hover,
    .sp-team-card:hover,
    .sp-dept:hover {
        transform: none;
    }
}
