:root {
    --orange: #ff6420;
    --orange-d: #e5531a;
    --blue: #254c9b;
    --navy: #0a0f1f;
    --bg: #f4f6fb;
    --text: #3b4254;
    --muted: #7a8296;
    --line: #e6e9f2
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth
}

body {
    font-family: 'Cairo', Tahoma, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.8
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

.container {
    width: min(1200px, 92%);
    margin-inline: auto
}

.ico {
    width: 18px;
    height: 18px;
    flex: none
}

.muted {
    color: var(--muted)
}

.center {
    text-align: center
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 10px;
    font: 600 14px 'Cairo';
    cursor: pointer;
    border: 1px solid transparent;
    transition: .2s
}

.btn-primary {
    background: var(--orange);
    color: #fff
}

.btn-primary:hover {
    background: var(--orange-d)
}

.btn-outline {
    background: #fff;
    color: var(--orange);
    border-color: var(--orange)
}

.btn-outline:hover {
    background: #fff4ef
}

.btn-danger {
    background: #fff;
    color: #c62828;
    border-color: #c62828
}

.btn-danger:hover {
    background: #fdecec
}

/* header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08)
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 68px
}

.brand img {
    height: 42px
}

.links {
    display: flex;
    gap: 26px;
    font-weight: 700;
    font-size: 14px;
    color: var(--blue)
}

.links a {
    padding: 4px 0;
    border-bottom: 2px solid transparent
}

.links a.on,
.links a:hover {
    color: var(--orange);
    border-color: var(--orange)
}

.nav-actions {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 14px
}

.search-btn {
    background: none;
    border: 1px solid #9aa3b8;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #555;
    cursor: pointer
}

.burger {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0
}

.burger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--blue);
    transition: transform .25s, opacity .2s
}

.menu-open .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg)
}

.menu-open .burger span:nth-child(2) {
    opacity: 0
}

.menu-open .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg)
}

.menu-cta {
    display: none
}

.searchbox {
    display: none;
    gap: 10px;
    padding: 10px 0 14px
}

.searchbox.show {
    display: flex
}

.searchbox input,
.filters input,
.filters select {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit
}

/* hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
    background: var(--bg)
}

.hero-text {
    padding: 60px 48px;
    align-self: center
}

.hero-text h1 {
    color: var(--blue);
    font-size: 26px;
    line-height: 1.5
}

.hero-text h2 {
    color: var(--orange);
    font-size: 16px;
    margin-bottom: 10px
}

.hero-text p {
    font-size: 13px;
    max-width: 520px;
    margin-bottom: 24px
}

.hero-img {
    background: url(../img/hero.jpg) center/cover, radial-gradient(ellipse at 30% 20%, #e0302a 0, #9c0f10 40%, #2a0204 100%)
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

/* sections */
.section {
    padding: 72px 0
}

.section.alt {
    background: var(--bg)
}

.sec-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px
}

.sec-title {
    font-size: 26px;
    font-weight: 800
}

.orange {
    color: var(--orange)
}

.blue {
    color: var(--blue)
}

.sec-sub {
    font-size: 13px;
    max-width: 640px;
    margin: 6px 0 34px;
    color: #555
}

.more {
    color: var(--blue);
    font-weight: 700;
    font-size: 13px
}

.more:hover {
    color: var(--orange)
}

.grid4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden
}

/* products */
.product {
    display: flex;
    flex-direction: column;
    transition: .2s
}

.product:hover {
    box-shadow: 0 8px 24px rgba(37, 76, 155, .12);
    transform: translateY(-3px)
}

.p-img {
    background: var(--bg);
    aspect-ratio: 4/3;
    display: grid;
    place-items: center;
    overflow: hidden
}

.p-img>img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.p-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: .55;
    color: var(--blue);
    font-weight: 700
}

.p-ph img {
    height: 90px;
    width: auto
}

.p-ph.big img {
    height: 200px
}

.p-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1
}

.p-body h3 {
    color: var(--blue);
    font-size: 15px
}

.p-body p {
    font-size: 12px;
    color: var(--muted)
}

.badge,
.pill {
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    color: var(--orange);
    background: #fff1ea;
    border: 1px solid #ffd6c4;
    padding: 0 10px;
    border-radius: 99px
}

.pill {
    font-size: 12px;
    padding: 2px 14px;
    margin-bottom: 6px;
    display: inline-block
}

.price {
    margin-top: auto;
    padding-top: 10px;
    color: var(--orange);
    font-weight: 800;
    font-size: 13px
}

.price.big {
    font-size: 24px
}

/* services */
.service {
    padding: 26px 18px;
    text-align: center
}

.service h3 {
    color: var(--orange);
    font-size: 15px;
    margin: 10px 0 4px
}

.service p {
    font-size: 12px;
    color: var(--muted)
}

.circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff0ec;
    border: 1px solid #ffc9b6;
    display: grid;
    place-items: center;
    margin: auto;
    color: var(--orange)
}

.circle .ico {
    width: 26px;
    height: 26px
}

.circle.sm {
    width: 44px;
    height: 44px;
    margin: 0;
    flex: none
}

.circle.sm .ico {
    width: 20px;
    height: 20px
}

/* about */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center
}

.feat {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px
}

.feat b {
    display: block;
    color: var(--blue);
    font-size: 14px
}

.feat span {
    font-size: 12px;
    color: var(--muted)
}

.about-text .row {
    margin-top: 26px
}

.about-img {
    position: relative;
    padding: 0 0 24px 24px
}

.about-img .frame {
    position: absolute;
    inset: 24px 24px 0 0;
    border: 1px solid #ffd6c4;
    background: #fff5f1;
    border-radius: 18px
}

.about-img .photo {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 18px;
    background: url(../img/about.jpg) center/cover, radial-gradient(ellipse at 40% 20%, #e0302a 0, #9c0f10 45%, #2a0204 100%)
}

/* page head, detail */
.page-head {
    background: var(--bg);
    padding: 40px 0
}

.page-head h1 {
    color: var(--blue);
    margin-bottom: 14px
}

.filters {
    display: flex;
    gap: 10px;
    max-width: 640px
}

.filters select {
    flex: 0 0 180px
}

.pager {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 36px
}

.pager a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 700
}

.pager a.on,
.pager a:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange)
}

.detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start
}

.d-img {
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    place-items: center;
    min-height: 320px
}

.d-img>img {
    width: 100%
}

.d-info h1 {
    color: var(--blue);
    margin: 8px 0
}

.desc {
    margin: 14px 0 24px
}

/* footer */
.site-footer {
    background: var(--navy);
    color: #a9b2c9;
    padding-top: 56px;
    font-size: 13px
}

.fgrid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-bottom: 44px
}

.fgrid h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px
}

.fgrid a,
.fgrid .ci {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px
}

.fgrid a:hover {
    color: var(--orange)
}

.ci .ico {
    color: var(--orange);
    width: 22px;
    height: 22px
}

.f-about p {
    line-height: 2.2
}

.copy {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 22px 0;
    color: #7f89a3
}

/* forms (admin + login) */
.admin-bar {
    background: var(--navy);
    color: #fff
}

.admin-bar .container {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 58px
}

.admin-bar a {
    color: #cfd6ea;
    font-weight: 600;
    font-size: 14px
}

.admin-bar a:hover,
.admin-bar a.on {
    color: var(--orange)
}

.admin-bar .sp {
    margin-inline-start: auto
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    margin: 28px 0
}

.panel h1,
.panel h2 {
    color: var(--blue);
    margin-bottom: 16px
}

.field {
    margin-bottom: 16px
}

.field label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px
}

.field input[type=text],
.field input[type=password],
.field input[type=number],
.field input[type=file],
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: #fff
}

.field textarea {
    min-height: 130px
}

.alert {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px
}

.alert.err {
    background: #fdecec;
    color: #b71c1c
}

.alert.ok {
    background: #e8f6ec;
    color: #1b6b34
}

table.t {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px
}

.t th,
.t td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    text-align: start;
    vertical-align: middle
}

.t th {
    color: var(--blue);
    background: var(--bg)
}

.t img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px
}

.t .act {
    display: flex;
    gap: 6px
}

.t .btn {
    padding: 4px 12px;
    font-size: 12px
}

.tag {
    font-size: 11px;
    padding: 1px 10px;
    border-radius: 99px;
    background: #e8f6ec;
    color: #1b6b34
}

.tag.off {
    background: #eee;
    color: #777
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
    padding: 20px
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    width: min(400px, 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .08)
}

.login-box img {
    height: 70px;
    margin: 0 auto 14px
}

.login-box h1 {
    text-align: center;
    color: var(--blue);
    font-size: 20px;
    margin-bottom: 20px
}

.login-box .btn {
    width: 100%;
    justify-content: center
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px
}

.stat {
    background: var(--bg);
    border-radius: 12px;
    padding: 18px;
    text-align: center
}

.stat b {
    display: block;
    font-size: 30px;
    color: var(--orange)
}

@media(max-width:900px) {
    .grid4 {
        grid-template-columns: repeat(2, 1fr)
    }

    .hero,
    .about,
    .detail {
        grid-template-columns: 1fr
    }

    .hero-img {
        min-height: 220px;
        order: -1
    }

    .fgrid {
        grid-template-columns: 1fr 1fr
    }

    .nav {
        gap: 10px
    }

    .burger {
        display: flex;
        order: 3
    }

    .nav-actions {
        order: 2;
        margin-inline-start: auto;
        gap: 0
    }

    .search-btn {
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 10px;
        background: var(--bg);
        color: var(--blue)
    }

    .nav-actions .btn {
        display: none
    }

    .links {
        display: none
    }

    .menu-open .links {
        display: flex;
        position: absolute;
        top: 68px;
        inset-inline: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 8px 4% 18px;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        font-size: 16px
    }

    .links a {
        padding: 14px 12px;
        border-bottom: 1px solid var(--line);
        border-inline-start: 3px solid transparent;
        border-radius: 0
    }

    .links a.on,
    .links a:hover {
        background: #fff4ef;
        border-bottom-color: var(--line);
        border-inline-start-color: var(--orange)
    }

    .links .menu-cta {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 14px;
        padding: 12px;
        border: 0;
        border-radius: 10px;
        background: var(--orange);
        color: #fff
    }

    .links .menu-cta:hover {
        background: var(--orange-d);
        color: #fff
    }

    .sec-head {
        flex-direction: column
    }
}

@media(max-width:560px) {

    .grid4,
    .fgrid,
    .stats {
        grid-template-columns: 1fr
    }

    .t .hide-sm {
        display: none
    }
}

/* ---- services & about (refined) ---- */
.services-sec {
    background: var(--bg)
}

.services-sec .sec-title {
    font-size: 30px
}

.services-sec .sec-sub {
    max-width: 700px;
    font-size: 15px;
    line-height: 2;
    margin-bottom: 36px
}

.service {
    background: #fff;
    border: 1px solid #f6d9d3;
    border-radius: 16px;
    padding: 36px 24px 32px;
    text-align: center;
    transition: transform .25s, box-shadow .25s, border-color .25s
}

.service:hover {
    transform: translateY(-4px);
    border-color: #ffc9b6;
    box-shadow: 0 14px 30px rgba(255, 100, 32, .12)
}

.service .circle {
    width: 72px;
    height: 72px;
    background: #ffeae3;
    border: 1px solid #ffd6c4
}

.service .circle .ico {
    width: 30px;
    height: 30px
}

.service h3 {
    color: var(--blue);
    font-size: 18px;
    font-weight: 800;
    margin: 22px 0 10px
}

.service p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--muted)
}

.about-text .sec-sub {
    line-height: 2;
    margin-bottom: 22px
}

.feat {
    gap: 16px;
    margin-bottom: 18px
}

.feat b {
    font-size: 16px;
    margin-bottom: 2px
}

.feat span {
    font-size: 13px
}

.feat .circle.sm {
    width: 54px;
    height: 54px;
    background: #ffeae3;
    border-color: #ffd6c4
}

.feat .circle.sm .ico {
    width: 24px;
    height: 24px
}

.about-text .btn .ico {
    width: 18px;
    height: 18px
}

.about-img .photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.18/1;
    object-fit: cover;
    background: none;
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .15)
}

.about-img .frame {
    border-radius: 22px
}

/* center admin forms */
.panel {
    margin-inline: auto
}

.panel+.panel {
    margin-top: 24px
}

/* ---- search (header + products) ---- */
.searchbox {
    padding: 12px 0 16px
}

.searchbox input {
    border-radius: 99px;
    padding: 11px 20px;
    background: var(--bg);
    border-color: transparent;
    transition: border-color .2s, background .2s
}

.searchbox input:focus,
.bigsearch:focus-within {
    outline: none;
    border-color: var(--orange);
    background: #fff
}

.searchbox .btn {
    border-radius: 99px;
    padding-inline: 28px
}

.search-btn {
    transition: .2s
}

.search-btn:hover {
    border-color: var(--orange);
    color: var(--orange)
}

/* ---- products page: sidebar + products fill the rest ---- */
.wide {
    width: min(1500px, 96%);
    margin-inline: auto
}

.shop-head {
    padding: 36px 0 32px;
    background: var(--navy);
    color: #fff
}

.shop-head h1 {
    color: #fff;
    margin-bottom: 16px
}

.bigsearch {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 99px;
    padding: 6px 8px 6px 6px;
    padding-inline-start: 20px;
    transition: border-color .2s
}

.bigsearch .ico {
    color: var(--muted);
    display: grid;
    place-items: center
}

.bigsearch .ico svg {
    width: 20px;
    height: 20px
}

.bigsearch input {
    flex: 1;
    border: 0;
    outline: 0;
    background: none;
    font: inherit;
    font-size: 16px;
    padding: 8px 4px;
    min-width: 0;
    color: var(--text)
}

.bigsearch .clear {
    color: var(--muted);
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 13px
}

.bigsearch .clear:hover {
    background: var(--bg);
    color: var(--text)
}

.bigsearch .btn {
    border-radius: 99px;
    padding: 9px 32px
}

.shop {
    padding: 32px 0 64px
}

.shop-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start
}

.shop-side {
    position: sticky;
    top: 84px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px
}

.shop-side h2 {
    font-size: 15px;
    color: var(--navy);
    margin-bottom: 10px
}

.cat-list {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.cat-list a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text)
}

.cat-list a:hover {
    background: var(--bg)
}

.cat-list a.on {
    background: var(--orange);
    color: #fff
}

.shop-main {
    min-width: 0;
    width: 100%
}

.result-info {
    font-size: 14px;
    margin-bottom: 14px
}

.pgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    width: 100%
}

@media(max-width:900px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .shop-side {
        position: static;
        padding: 0;
        border: 0;
        background: none
    }

    .shop-side h2 {
        display: none
    }

    .cat-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px
    }

    .cat-list a {
        white-space: nowrap;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 99px;
        padding: 6px 16px
    }
}

@media(max-width:560px) {
    .pgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px
    }

    .bigsearch .btn {
        padding-inline: 18px
    }
}
