@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --ux-ink: #14213d;
    --ux-accent: #f08a24;
    --ux-accent-soft: #ffe3c7;
    --ux-surface: #ffffff;
    --ux-muted: #64748b;
    --ux-line: #dbe5f0;
    --ux-bg-a: #f7fbff;
    --ux-bg-b: #fff7ee;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: radial-gradient(circle at 5% 5%, #e4f4ff 0%, transparent 40%), radial-gradient(circle at 95% 0%, #ffe8cf 0%, transparent 45%), linear-gradient(180deg, var(--ux-bg-a) 0%, var(--ux-bg-b) 100%);
    min-height: 100vh;
}

.ux-topnav {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ux-line);
}

.ux-topnav-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ux-brand {
    font-weight: 800;
    color: var(--ux-ink);
    text-decoration: none;
    letter-spacing: 0.2px;
}

.ux-topnav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ux-topnav-links a {
    border: 1px solid var(--ux-line);
    background: var(--ux-surface);
    color: var(--ux-ink);
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ux-topnav-links a.active,
.ux-topnav-links a:hover {
    background: var(--ux-ink);
    border-color: var(--ux-ink);
    color: #fff;
}

.sp-quickbar {
    max-width: 1220px;
    margin: 14px auto 0;
    border: 1px solid var(--ux-line);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(20, 33, 61, 0.08);
}

.sp-quickbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 33, 61, 0.04) 0%, rgba(240, 138, 36, 0.08) 100%);
    pointer-events: none;
}

.sp-quickbar .sp-links,
.sp-quickbar .sp-meta {
    position: relative;
    z-index: 1;
}

.sp-quickbar .sp-links {
    display: inline-flex !important;
    gap: 10px !important;
    padding: 2px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 999px;
}

.sp-chip {
    border: 1px solid transparent !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 700;
    color: #4a5568 !important;
    border-radius: 999px !important;
    transition: transform 0.22s ease, color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease !important;
}

.sp-chip:hover {
    transform: translateY(-1px);
    color: var(--ux-ink) !important;
    background: #ffffff !important;
    box-shadow: 0 6px 14px rgba(20, 33, 61, 0.08);
}

.sp-chip.active {
    color: #fff !important;
    background: linear-gradient(120deg, var(--ux-ink), #243b64) !important;
    box-shadow: 0 8px 18px rgba(20, 33, 61, 0.28);
}

.sp-quickbar .sp-meta {
    font-weight: 700;
    color: #334155 !important;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 12px;
}

.sp-dashboard {
    max-width: 1220px;
    margin: 14px auto;
    background: var(--ux-surface);
    border: 1px solid var(--ux-line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 15px 45px rgba(20, 33, 61, 0.08);
}

.sp-dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

.sp-dashboard-main h2 {
    margin: 0;
    color: var(--ux-ink);
    font-size: 24px;
    font-weight: 800;
}

.sp-dashboard-main p {
    margin: 8px 0 12px;
    color: var(--ux-muted);
}

.sp-cta-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sp-cta,
.sp-cta:focus {
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.sp-cta.primary {
    background: var(--ux-accent);
    color: #fff;
}

.sp-cta.secondary {
    background: var(--ux-ink);
    color: #fff;
}

.sp-stat {
    border: 1px solid var(--ux-line);
    border-radius: 14px;
    padding: 14px;
    min-height: 136px;
    background: linear-gradient(180deg, #fff 0%, #f9fcff 100%);
    box-shadow: 0 14px 30px rgba(20, 33, 61, 0.09);
    animation: spStatReveal 0.55s ease both;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.sp-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 35px rgba(20, 33, 61, 0.13);
}

.sp-stat-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sp-stat .title {
    font-size: 13px;
    color: #334155;
    font-weight: 700;
    line-height: 1.3;
}

.sp-stat .value {
    font-size: 34px;
    color: #0f172a;
    font-weight: 800;
    margin-top: 6px;
    min-height: 44px;
    letter-spacing: 0.2px;
}

.sp-stat-foot {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.sp-stat-products {
    background: linear-gradient(160deg, #f2f8ff 0%, #ecf7ff 45%, #ffffff 100%);
    border-color: #cbe6ff;
}

.sp-stat-products .sp-stat-icon {
    background: linear-gradient(135deg, #1d9bf0, #0f6fb6);
    color: #ffffff;
}

.sp-stat-offers {
    background: linear-gradient(160deg, #fff7ea 0%, #fff2de 45%, #ffffff 100%);
    border-color: #ffd8a5;
}

.sp-stat-offers .sp-stat-icon {
    background: linear-gradient(135deg, #f08a24, #cc6114);
    color: #ffffff;
}

.sp-offer-flow {
    margin-top: 14px;
    border-top: 1px dashed var(--ux-line);
    padding-top: 12px;
}

.sp-offer-flow h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--ux-ink);
}

.sp-offer-flow p {
    margin: 6px 0 10px;
    color: var(--ux-muted);
}

.sp-offer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sp-offer-links a {
    border: 1px solid #ffc78f;
    background: var(--ux-accent-soft);
    color: #9a560e;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    text-decoration: none;
}

.main .container {
    max-width: 1220px;
}

.product-parent {
    border: 1px solid var(--ux-line);
    background: var(--ux-surface);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(20, 33, 61, 0.06);
    animation: spCardReveal 0.55s ease both;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.product-parent:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(20, 33, 61, 0.12);
}

.product-parent .product-img > img {
    transition: transform 0.45s ease, filter 0.45s ease;
}

.product-parent .product-img .sp-product-open {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    z-index: 2;
    cursor: pointer;
}

.product-parent:hover .product-img > img {
    transform: scale(1.035);
    filter: saturate(1.05);
}

.product-parent .product-img .button,
.product-parent .product-img .mydropdown,
.product-parent .product-img .my-delete-dropdown {
    position: relative;
    z-index: 3;
}

.product-parent h3 {
    min-height: 44px;
}

.product-quick-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-quick-actions .action-btn {
    border: 1px solid var(--ux-line);
    background: #f8fbff;
    color: var(--ux-ink);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.product-quick-actions .action-btn.offer {
    border-color: #ffc78f;
    background: var(--ux-accent-soft);
    color: #9a560e;
}

.product-quick-actions .action-btn.delete {
    border-color: #f7c2c2;
    background: #fff1f1;
    color: #b83232;
}

.sp-product-modal-content {
    border: 1px solid #dbe5f0;
    border-radius: 16px;
    overflow: hidden;
}

.sp-product-modal-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 18px;
    align-items: start;
}

.sp-modal-image-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e6edf5;
    background: #f8fbff;
}

.sp-modal-image-wrap img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sp-modal-meta {
    display: inline-flex;
    background: #edf5ff;
    border: 1px solid #d4e3f7;
    color: #365a84;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.sp-modal-title {
    margin: 0;
    color: #14213d;
    font-size: 24px;
    font-weight: 800;
}

.sp-modal-description {
    margin: 12px 0;
    color: #4a5568;
    line-height: 1.75;
}

.sp-modal-prices {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sp-modal-price-new {
    color: #0f5f32;
    background: #e9f9f0;
    border: 1px solid #bceccf;
    border-radius: 10px;
    padding: 7px 10px;
    font-weight: 800;
}

.sp-modal-price-old {
    color: #9aa4b2;
    text-decoration: line-through;
    font-weight: 700;
}

.main .row > [class*='col-']:nth-child(2n) .product-parent {
    animation-delay: 0.08s;
}

.main .row > [class*='col-']:nth-child(3n) .product-parent {
    animation-delay: 0.14s;
}

@keyframes spCardReveal {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spStatReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-edit-info,
.main-logo,
.bottom-edit-buttons {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.top-edit-info .container,
.main-logo .container,
.bottom-edit-buttons .container {
    border: 1px solid var(--ux-line);
    border-radius: 16px;
    background: var(--ux-surface);
    box-shadow: 0 10px 34px rgba(20, 33, 61, 0.06);
}

.top-edit-info .container {
    margin-top: 16px;
}

.main-logo .container {
    margin-top: 12px;
}

.bottom-edit-buttons .container {
    margin-top: 12px;
    margin-bottom: 16px;
}

.mbutton {
    border-radius: 10px;
}

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

    .sp-quickbar {
        padding: 10px 12px !important;
    }

    .sp-quickbar .sp-links {
        width: 100%;
        justify-content: space-between;
    }

    .sp-chip {
        flex: 1;
        text-align: center;
        min-width: 0;
    }

    .sp-product-modal-grid {
        grid-template-columns: 1fr;
    }

    .sp-quickbar .sp-meta {
        margin-left: auto;
        margin-top: 10px;
    }
}
