@font-face {
    font-family: 'Cairo';
    src: url('../assets/cairo-arabic.woff2') format('woff2');
    font-weight: 200 1000;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0660-0669, U+0640;
}
@font-face {
    font-family: 'Cairo';
    src: url('../assets/cairo-latin.woff2') format('woff2');
    font-weight: 200 1000;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0100-02BA, U+2000-206F, U+20A0-20C4;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    color: #1c1c1e;
    background: linear-gradient(160deg, #dcf3e5 0%, #e9e4f7 55%, #e3dcf5 100%);
    background-attachment: fixed;
    line-height: 1.7;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

.demo-banner {
    background: #fff8d6;
    color: #6b5d1a;
    font-size: 12px;
    text-align: center;
    padding: 6px 12px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1120px;
    margin: 16px auto 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    width: calc(100% - 32px);
}
.brand { font-size: 20px; font-weight: 700; color: #1c1c1e; text-decoration: none; }
.nav-links { display: flex; gap: 20px; margin-inline-start: 8px; }
.nav-links a { color: #4a4a4e; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: #1c1c1e; }
.cart-btn {
    margin-inline-start: auto;
    border: 1px solid #1c1c1e;
    background: transparent;
    border-radius: 999px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}
.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #1c1c1e;
    color: #fff;
    font-size: 12px;
    padding: 0 6px;
}

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.hero { padding: 48px 0 24px; }
.hero-copy h1 {
    font-size: clamp(30px, 6vw, 52px);
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 12px;
    text-wrap: balance;
}
.hero-copy p { font-size: 17px; color: #4a4a4e; margin: 0 0 24px; max-width: 520px; }
.hero-img {
    display: block;
    width: 100%;
    border-radius: 24px;
    margin-top: 32px;
    box-shadow: 0 24px 60px rgba(80, 70, 120, 0.18);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1c1c1e;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 28px;
    min-height: 48px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), background-color 300ms;
}
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary.full { width: 100%; }

.catalog { padding: 40px 0; }
.catalog h2, .contact h2 { font-size: 26px; font-weight: 700; margin: 0 0 24px; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 768px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 400ms;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(80, 70, 120, 0.16); }
.card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-body { padding: 14px 16px 16px; }
.card-name { font-weight: 600; font-size: 15px; margin: 0; }
.card-meta { color: #8a8a8e; font-size: 12px; margin: 2px 0 6px; }
.card-price { font-weight: 700; font-size: 15px; margin: 0; }

.contact { padding: 24px 0 48px; }
.contact p { margin: 4px 0; color: #4a4a4e; }

.footer {
    text-align: center;
    color: #8a8a8e;
    font-size: 13px;
    padding: 24px 16px 40px;
}
.footer p { margin: 0; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 28, 30, 0.35);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: min(400px, 92vw);
    background: #fff;
    z-index: 11;
    display: flex;
    flex-direction: column;
    border-radius: 20px 0 0 20px;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.15);
}
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.drawer-head h3 { margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 16px 20px 24px; border-top: 1px solid #eee; }
.total-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }

.cart-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f2f2f2; }
.cart-item img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.cart-item .ci-name { font-weight: 600; font-size: 14px; margin: 0; }
.cart-item .ci-meta { color: #8a8a8e; font-size: 12px; margin: 0; }
.cart-item .ci-remove { margin-inline-start: auto; border: 0; background: none; color: #c0392b; cursor: pointer; font-family: inherit; font-size: 13px; min-height: 44px; }
.cart-empty { color: #8a8a8e; text-align: center; padding: 40px 0; }

.icon-btn {
    border: 0;
    background: #f2f2f4;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 14px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 12;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(28, 28, 30, 0.35);
}
@media (min-width: 768px) { .modal { align-items: center; } }
.modal-card {
    position: relative;
    background: #fff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    gap: 20px;
}
@media (min-width: 768px) {
    .modal-card { border-radius: 24px; grid-template-columns: 1fr 1fr; align-items: start; }
    .checkout-card { grid-template-columns: 1fr; max-width: 520px; }
}
.modal-card img { width: 100%; border-radius: 16px; aspect-ratio: 1; object-fit: cover; }
.modal-close { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 2; }
.modal-info h3 { margin: 0 0 4px; font-size: 22px; }
.muted { color: #8a8a8e; font-size: 14px; margin: 0 0 8px; }
.price { font-weight: 700; font-size: 20px; margin: 0 0 16px; }

.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.size-pill {
    border: 1px solid #d8d8dc;
    background: #fff;
    border-radius: 999px;
    min-width: 48px;
    min-height: 44px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.size-pill[aria-pressed="true"] { background: #1c1c1e; color: #fff; border-color: #1c1c1e; }

.checkout-card h3 { margin: 0; font-size: 20px; padding-inline-start: 48px; }
.checkout-summary { background: #f7f7f9; border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.checkout-summary p { margin: 2px 0; }
#checkoutForm { display: grid; gap: 14px; }
#checkoutForm label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
#checkoutForm input[type="text"], #checkoutForm input[type="tel"], #checkoutForm select {
    border: 1px solid #d8d8dc;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    min-height: 48px;
    background: #fff;
}
#checkoutForm input:focus, #checkoutForm select:focus { outline: 2px solid #1c1c1e; outline-offset: 1px; }
.pay { border: 1px solid #e6e6ea; border-radius: 12px; padding: 12px 16px; margin: 0; }
.pay legend { font-size: 14px; font-weight: 700; padding: 0 6px; }
.pay-opt { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; padding: 8px 0; min-height: 44px; }
.pay-opt input { width: 18px; height: 18px; }
.receipt-box { background: #f7f7f9; border-radius: 12px; padding: 12px 16px; }
.receipt-box input { margin-top: 8px; }
.form-error { color: #c0392b; font-size: 14px; margin: 0; }
.confirm { text-align: center; padding: 24px 0 8px; }
.confirm-title { font-size: 20px; font-weight: 700; }
