* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: #0d0d0d;
    /* Optional background photo (file was missing, so the page was always plain #0d0d0d):
       background: #0d0d0d url('../assets/images/bg.jpg') center / cover no-repeat fixed; */
    color: #ffffff;
    min-height: 100vh;
}

/* 1. White Top Navigation Bar */
.top-bar {
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.top-bar-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Store Branding (Logo & Name) */
.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #000000;
}

.store-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.store-name {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}

/* Cart Icon & Counter */
.cart-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px;
}

.cart-icon {
    width: 26px;
    height: 26px;
    stroke: #000000;
}

.cart-count {
    position: absolute;
    top: -4px;
    left: -8px;
    background-color: #cc0000;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Moving Discount Banner */
.announcement-bar {
    width: 100%;
    background-color: #1a1a1a;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    padding: 8px 0;
    font-weight: 700;
    font-size: 0.88rem;
    position: relative;
}

.announcement-bar { direction: ltr; }

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 45s linear infinite;
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
}

.marquee-content span {
    direction: rtl;
    white-space: nowrap;
    padding: 0 40px;
}

/* Two identical groups: moving exactly one group width loops with no jump */
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}


/* 3. Main Storefront Grid */
.main-content {
    margin-top: 50px;
    padding: 0 20px 60px 20px;
}

.catalog-section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 35px;
    color: #ffffff;
}

.product-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.product-card {
    background-color: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    width: 320px;
}

.product-image-container {
    position: relative;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.product-image-container img {
    max-width: 100%;
    height: auto;
}

.size-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #000000;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin: 16px 0;
    text-decoration: none;
    color: #ffffff;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
}

.buy-btn {
    width: 100%;
    padding: 10px;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

/* Lightbox Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 85%;
    max-height: 85%;
    border-radius: 6px;
}

#modalClose {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Product Detail Page Styling */
.product-page-container {
    max-width: 1000px;
    margin: 40px auto 60px auto;
    padding: 0 20px;
}

.back-link {
    display: inline-block;
    color: #aaaaaa;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #ffffff;
}

.product-detail-card {
    background-color: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    backdrop-filter: blur(6px);
}

.product-detail-image-box {
    flex: 1;
    min-width: 300px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-detail-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.product-detail-info {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.product-detail-price {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-label {
    color: #aaaaaa;
    font-size: 1.1rem;
}

.price-value {
    color: #ffffff;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.quantity-selector input {
    width: 70px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
    text-align: center;
}

.add-to-cart-btn {
    padding: 14px;
    font-size: 1.1rem;
}

.payment-methods {
    display: flex;
    gap: 15px;
    color: #777777;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

/* Cart */
.cart-wrapper { text-decoration: none; }

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 20px);
    background-color: #ffffff;
    color: #000000;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
    width: max-content;
    max-width: calc(100vw - 32px);
    text-align: center;
    line-height: 1.6;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #cc0000; margin-inline-start: 12px; }

.cart-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.cart-items { flex: 2; min-width: 300px; display: flex; flex-direction: column; gap: 16px; }

.cart-item, .cart-summary, .cart-empty {
    background-color: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(6px);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    flex-wrap: wrap;
}

.cart-item img {
    width: 110px;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 8px;
}

.cart-item-info { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 6px; }
.cart-item-name { color: #ffffff; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.cart-item-price { color: #aaaaaa; }

.cart-qty { display: flex; align-items: center; gap: 10px; }
.cart-qty button, .cart-remove {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
}
.cart-qty button:hover, .cart-remove:hover { background-color: #333333; }
.cart-qty span { min-width: 24px; text-align: center; font-weight: 700; }
.cart-item-total { font-weight: 700; min-width: 80px; }
.cart-remove { color: #ff6666; }

.cart-summary { flex: 1; min-width: 280px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.cart-summary h3 { font-size: 1.3rem; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
}
.coupon-btn {
    padding: 0 18px;
    border: none;
    border-radius: 4px;
    background-color: #ffffff;
    color: #000000;
    font-weight: 700;
    cursor: pointer;
}
.coupon-msg { min-height: 1.2em; font-size: 0.9rem; color: #aaaaaa; }
.coupon-msg.ok { color: #4cd964; }
.coupon-msg.error { color: #ff6666; }
.summary-row { display: flex; justify-content: space-between; font-size: 1.05rem; }
.summary-total { font-size: 1.3rem; font-weight: 900; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 14px; }

.cart-empty { max-width: 420px; margin: 0 auto; padding: 40px 20px; text-align: center; display: flex; flex-direction: column; gap: 20px; font-size: 1.2rem; }
.cart-link-btn { display: block; text-decoration: none; text-align: center; }
[hidden] { display: none !important; }

.cart-summary #citySelect {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
}

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #cc0000;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
}

.product-specs {
    margin-top: 24px;
    background-color: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px 30px;
    backdrop-filter: blur(6px);
}
.product-specs h2 { font-size: 1.4rem; margin-bottom: 14px; }
.product-specs ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.product-specs li { position: relative; padding-inline-start: 24px; color: #dddddd; }
.product-specs li::before { content: '\2713'; position: absolute; inset-inline-start: 0; color: #4cd964; }

.section-gap { margin-top: 60px; }

/* Header: cart + language on the left, logo in the middle */
.top-bar-container {
    max-width: none;
    margin: 0;
    padding: 0 20px;
    direction: ltr;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.bar-left { display: flex; align-items: center; gap: 16px; justify-self: start; }
.brand-link { gap: 12px; }
.store-logo { height: 42px; }
.lang-btn {
    background: none;
    color: #000000;
    border: 1px solid #000000;
    border-radius: 4px;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}
.lang-btn:hover { background-color: #000000; color: #ffffff; }
html[dir="ltr"] .marquee-content span { direction: ltr; }

@media (max-width: 480px) {
    .top-bar-container { padding: 0 12px; }
    .store-name { font-size: 1rem; }
    .brand-link { gap: 6px; }
}

/* Menu (3 lines) */
html { scroll-behavior: smooth; }
.bar-right { justify-self: end; display: flex; align-items: center; }
.menu-btn { background: none; border: none; color: #000000; cursor: pointer; padding: 4px; display: flex; }
.menu-panel {
    position: absolute;
    top: 100%;
    right: 12px;
    min-width: 220px;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    direction: rtl;
    text-align: right;
    overflow: hidden;
    z-index: 200;
}
html[dir="ltr"] .menu-panel { direction: ltr; text-align: left; }
.menu-panel a {
    padding: 14px 20px;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    border-top: 1px solid #eeeeee;
}
.menu-panel a:first-child { border-top: none; }
.menu-panel a:hover { background-color: #f2f2f2; }

/* English: the banner moves the opposite way */
html[dir="ltr"] .marquee-track { animation-direction: reverse; }

/* Header on phones: keep the logo centered */
.top-bar-container { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.store-name { white-space: nowrap; }
@media (max-width: 480px) {
    .top-bar-container { padding: 0 10px; }
    .store-name { font-size: 0.85rem; }
    .store-logo { height: 34px; }
    .brand-link { gap: 5px; }
    .bar-left { gap: 10px; }
    .lang-btn { padding: 3px 7px; font-size: 0.8rem; }
}

/* City list (custom, works on phones) */
.city-box { position: relative; }
.city-box #citySelect { width: 100%; padding-inline-end: 40px; }
.city-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 40px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
}
.city-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: 50;
}
.city-opt, .city-none { padding: 10px 12px; }
.city-opt { cursor: pointer; }
.city-opt:hover { background-color: #333333; }
.city-none { color: #aaaaaa; }

/* Menu group (cloth mousepads) with arrow */
.menu-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    border-top: 1px solid #eeeeee;
    color: #000000;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-align: inherit;
}
.menu-group:hover { background-color: #f2f2f2; }
.menu-arrow { transition: transform 0.2s ease; }
.menu-group.open .menu-arrow { transform: rotate(180deg); }
.menu-sub { display: flex; flex-direction: column; background-color: #f7f7f7; }
.menu-sub a { padding-inline-start: 36px; font-weight: 500; }

/* Add-to-cart animation */
.fly-img {
    position: fixed;
    z-index: 3000;
    pointer-events: none;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    will-change: transform, opacity;
}
.cart-bump { animation: cart-bump 0.5s ease; }
@keyframes cart-bump {
    0% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.3) rotate(-12deg); }
    50% { transform: scale(0.95) rotate(8deg); }
    75% { transform: scale(1.1) rotate(-4deg); }
    100% { transform: scale(1) rotate(0); }
}
.count-pop { animation: count-pop 0.45s ease; }
@keyframes count-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.7); }
    100% { transform: scale(1); }
}
.btn-added { animation: btn-added 0.45s ease; }
@keyframes btn-added {
    0% { transform: scale(1); }
    30% { transform: scale(0.94); background-color: #4cd964; }
    100% { transform: scale(1); }
}

/* Sticky top bar */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 500;
}

/* Logo exactly centered in the top bar (any screen size) */
.top-bar-container { position: relative; }
.bar-left { grid-column: 1; }
.bar-right { grid-column: 3; }
.top-bar .brand-link {
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.top-bar .brand-link .store-logo { display: block; flex: none; }
.top-bar .brand-link .store-name { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; }
.top-bar .brand-link .store-name:first-child { right: 100%; margin-right: 12px; }
.top-bar .brand-link .store-name:last-child { left: 100%; margin-left: 12px; }
@media (max-width: 480px) {
    .top-bar .brand-link .store-name:first-child { margin-right: 5px; }
    .top-bar .brand-link .store-name:last-child { margin-left: 5px; }
}

/* Cart: remove animation + "+N" badge */
.cart-item.removing {
    animation: cart-item-out 0.4s ease forwards;
    pointer-events: none;
    overflow: hidden;
}
@keyframes cart-item-out {
    0% { opacity: 1; transform: translateX(0); max-height: 300px; }
    60% { opacity: 0; transform: translateX(-60px); max-height: 300px; }
    100% { opacity: 0; transform: translateX(-60px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -16px; border-width: 0; }
}
.cart-count.count-plus {
    width: auto;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: #2ea043;
}

/* Account / login */
.account-btn { display: flex; align-items: center; color: #000; position: relative; }
.account-btn.signed-in::after { content: ''; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: #2ea043; border: 1.5px solid #fff; }
.auth-msg { text-align: center; min-height: 1.2em; font-size: 0.9rem; }
.auth-msg.ok { color: #4cd964; }
.auth-msg.error { color: #ff6b6b; }

/* hide the reCAPTCHA badge (disclosure text is shown in the login box) */

.google-btn-box { display: flex; justify-content: center; min-height: 44px; }

/* no tap delay on phones */
button, a, [data-add], .cart-wrapper { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ===== Profile card ===== */
.prof-card {
    max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 270px 1fr; gap: 0; align-items: stretch;
    background: linear-gradient(180deg, rgba(22,22,22,0.96), rgba(12,12,12,0.96));
    border: 1px solid rgba(255,255,255,0.1); border-radius: 22px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.prof-side { padding: 26px 20px; display: flex; flex-direction: column; gap: 22px; border-inline-end: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); }
.prof-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prof-id .acc-avatar { width: 60px; height: 60px; box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }
.prof-nav { display: flex; flex-direction: column; gap: 6px; }
.prof-nav button {
    text-align: start; padding: 12px 14px; border: none; border-radius: 10px; background: transparent; color: #b5b5b5;
    border-inline-start: 3px solid transparent; font: 500 1rem 'Tajawal', sans-serif; cursor: pointer; transition: background .15s, color .15s;
}
.prof-nav button:hover { background: rgba(255,255,255,0.05); color: #fff; }
.prof-nav button.active { background: rgba(255,255,255,0.08); color: #fff; font-weight: 700; border-inline-start-color: #fff; }
.prof-nav button.is-danger { color: #ff6b6b; margin-top: 10px; }
.prof-nav button.is-danger:hover, .prof-nav button.is-danger.active { background: rgba(204,0,0,0.14); color: #ff8a8a; border-inline-start-color: #cc0000; }

.prof-main { position: relative; padding: 28px 30px 30px; min-width: 0; }
.prof-edit { position: absolute; z-index: 5; top: 24px; inset-inline-end: 26px; padding: 9px 18px; white-space: nowrap; }
.prof-card[data-tab="other"] #editBtn, .prof-card[data-tab="danger"] #editBtn,
.prof-card[data-tab="other"] #profileForm, .prof-card[data-tab="danger"] #profileForm { display: none; }
.prof-panel { display: flex; flex-direction: column; gap: 16px; }
.prof-panel[hidden] { display: none !important; }
.prof-panel h3 { font-size: 1.3rem; min-height: 40px; display: flex; align-items: center; }
.prof-code { margin: 6px 0 20px; padding: 18px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.prof-id .acc-id-text strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.prof-grid .span2 { grid-column: 1 / -1; }
.prof-grid .fld input:disabled, .prof-grid .fld input[readonly] { color: #a8a8a8; background: #121212; }
.prof-grid input[type="date"] { color-scheme: dark; min-height: 48px; }
.phone-row input { min-width: 0; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-opt span {
    display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px;
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.14); background: #171717; color: #bbb;
    font: 700 1rem 'Tajawal', sans-serif; transition: background .15s, color .15s, border-color .15s;
}
.seg-opt input:checked + span { background: #fff; color: #000; border-color: #fff; }
.seg-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(204,0,0,0.35); }
.seg-opt input:disabled { cursor: default; }

#newEmailCodeRow { margin-top: 18px; }
.prof-actions { display: flex; gap: 10px; margin-top: 22px; }
.prof-links { display: flex; flex-wrap: wrap; gap: 10px; }
.prof-links .acc-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* tab switch animation */
.prof-panel:not([hidden]) { animation: panelIn .38s cubic-bezier(.2,.7,.2,1) both; }
.prof-panel:not([hidden]) > * { animation: panelItem .45s cubic-bezier(.2,.7,.2,1) both; }
.prof-panel:not([hidden]) > *:nth-child(2) { animation-delay: .04s; }
.prof-panel:not([hidden]) > *:nth-child(3) { animation-delay: .08s; }
.prof-panel:not([hidden]) > *:nth-child(4) { animation-delay: .12s; }
@keyframes panelIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes panelItem { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.prof-nav button { transition: background .25s, color .25s, padding-inline-start .25s, border-color .25s; }
.prof-nav button.active { padding-inline-start: 18px; }
@media (prefers-reduced-motion: reduce) { .prof-panel:not([hidden]), .prof-panel:not([hidden]) > * { animation: none; } }

/* hold to delete */
.hold-hint { color: #ff9a9a; font-size: 0.9rem; margin-top: -6px; }
.acc-btn.danger.hold-btn, .acc-btn.danger.hold-btn:hover { background: #1a0a0a; color: #ff6b6b; }
.acc-btn.danger.hold-btn.holding { color: #fff; }
.hold-btn { position: relative; isolation: isolate; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; min-width: 190px; }
.hold-btn::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: linear-gradient(90deg, #cc0000, #ff3b3b); z-index: -1; transition: width .3s ease-out; }
.hold-btn.holding::before { width: 100%; transition: width 2s linear; }
.hold-btn.holding { color: #fff; }
@media (prefers-reduced-motion: reduce) { .hold-btn.holding::before { transition-duration: 2s; } }

@media (max-width: 760px) {
    .prof-card { grid-template-columns: 1fr; border-radius: 18px; }
    .prof-side { padding: 20px 16px 12px; border-inline-end: none; border-bottom: 1px solid rgba(255,255,255,0.08); gap: 14px; }
    .prof-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
    .prof-nav button { white-space: nowrap; border-inline-start: none; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; }
    .prof-nav button.active, .prof-nav button.is-danger.active { border-bottom-color: #fff; }
    .prof-nav button.is-danger { margin-top: 0; }
    .prof-main { padding: 20px 16px 24px; }
    .prof-edit { position: static; width: 100%; margin-bottom: 14px; }
    .prof-grid { grid-template-columns: 1fr; }
    .prof-actions .acc-btn { flex: 1; }
}

/* ===== Sign in + account page ===== */
.auth-box { max-width: 960px; margin: 0 auto; }
.signin[hidden], .code-step[hidden] { display: none !important; }

.fld { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.fld label { color: #c9c9c9; font-size: 0.92rem; font-weight: 500; }
.fld input, .code-input {
    width: 100%; padding: 12px 14px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14); background: #171717; color: #fff;
    font: 1rem 'Tajawal', sans-serif; transition: border-color .15s, box-shadow .15s;
}
.fld input::placeholder { color: #666; }
.fld input:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 3px rgba(204,0,0,0.35); }
.fld input[readonly] { color: #9a9a9a; background: #121212; cursor: not-allowed; }
.code-input { text-align: center; letter-spacing: 8px; font-size: 1.3rem; font-weight: 700; }
.phone-row { display: flex; gap: 8px; }
.phone-row input { flex: 1; }
.phone-prefix { display: flex; align-items: center; padding: 0 14px; background: #222; color: #fff; border-radius: 10px; font-weight: 700; }

.acc-btn { padding: 12px 22px; border-radius: 10px; border: 1px solid transparent; font: 700 1rem 'Tajawal', sans-serif; cursor: pointer; transition: transform .12s, background .15s, color .15s; }
.acc-btn:active { transform: scale(0.98); }
.acc-btn.primary { background: #fff; color: #000; }
.acc-btn.primary:hover { background: #e9e9e9; }
.acc-btn.ghost { background: transparent; color: #bbb; border-color: rgba(255,255,255,0.14); }
.acc-btn.ghost:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.acc-btn.danger { background: transparent; color: #ff6b6b; border-color: #cc0000; }
.acc-btn.danger:hover { background: #cc0000; color: #fff; }

/* Sign in card */
.signin {
    display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.signin-brand {
    padding: 44px 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center;
    background: radial-gradient(circle at 20% 0%, rgba(204,0,0,0.35), transparent 55%), linear-gradient(160deg, #1c1c1c, #0b0b0b);
}
.signin-logo { font-weight: 900; letter-spacing: 2px; font-size: 1.1rem; color: #fff; opacity: 0.9; }
.signin-brand h2 { font-size: 1.9rem; line-height: 1.25; }
.signin-brand p { color: #bdbdbd; }
.signin-brand ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.signin-brand li { position: relative; padding-inline-start: 26px; color: #e2e2e2; }
.signin-brand li::before { content: '\2713'; position: absolute; inset-inline-start: 0; color: #4cd964; font-weight: 900; }
.signin-form { padding: 44px 36px; display: flex; flex-direction: column; gap: 16px; background: #0f0f0f; }
.signin-form h3 { font-size: 1.4rem; }
.signin-form .google-btn-box { justify-content: flex-start; }
.auth-or { text-align: center; color: #777; position: relative; font-size: 0.9rem; }
.auth-or::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.12); }
.auth-or span { position: relative; background: #0f0f0f; padding: 0 12px; }
.code-step { display: flex; flex-direction: column; gap: 12px; }

/* Account page */
.acc-avatar {
    width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #cc0000; color: #fff; font-weight: 900; font-size: 1.4rem;
}
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-id-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1; }
.acc-id-text strong { font-size: 1.15rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-id-text span { color: #8f8f8f; font-size: 0.85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-sub { color: #9a9a9a; margin-top: -8px; font-size: 0.95rem; }
.auth-msg { text-align: center; min-height: 1.2em; font-size: 0.92rem; margin-top: 14px; }
.auth-msg.ok { color: #4cd964; }
.auth-msg.error { color: #ff6b6b; }

@media (max-width: 760px) {
    .signin { grid-template-columns: 1fr; }
    .signin-brand { padding: 28px 22px; }
    .signin-form { padding: 28px 22px; }
    .signin-brand h2 { font-size: 1.5rem; }
}
.signin > * { min-width: 0; }
.auth-box { width: 100%; }

/* ===== Checkout page ===== */
.co-note { font-size: 0.9rem; color: #aaaaaa; }
.co-form {
    flex: 2; min-width: 300px; padding: 20px;
    display: flex; flex-direction: column; gap: 16px;
    background-color: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(6px);
}
.co-form h3 { font-size: 1.3rem; }
.co-field { display: flex; flex-direction: column; gap: 6px; }
.co-field label { font-size: 0.95rem; font-weight: 700; }
.co-form input, .co-form textarea {
    width: 100%; padding: 10px; border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #1a1a1a; color: #ffffff;
    font: inherit; font-size: 1rem;
}
.co-form textarea { resize: vertical; }
.co-form input:focus, .co-form textarea:focus { outline: none; border-color: #ffffff; }
.co-err { min-height: 1em; color: #ff6666; font-size: 0.85rem; }
.co-hint { color: #aaaaaa; font-size: 0.85rem; }
.co-map { height: 320px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); direction: ltr; z-index: 1; }
.co-map-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.co-locate-btn {
    padding: 8px 14px; border: none; border-radius: 4px;
    background-color: #ffffff; color: #000000; font: inherit; font-weight: 700; cursor: pointer;
}
.co-map-status { font-size: 0.9rem; color: #aaaaaa; }
.co-map-status.ok { color: #4cd964; }
.co-items { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.co-item { display: flex; justify-content: space-between; gap: 12px; }
.co-done h3 { font-size: 1.5rem; }
.co-done p { font-size: 1.05rem; line-height: 1.7; }
.co-wa-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 20px; border-radius: 6px; background-color: #25D366; color: #ffffff;
    text-decoration: none; font-weight: 900; font-size: 1.1rem;
}
.co-wa-btn svg { width: 24px; height: 24px; flex: none; }
.co-wa-btn:hover { filter: brightness(1.08); }
.co-edit-btn { background: none; border: none; color: #aaaaaa; font: inherit; font-size: 0.95rem; text-decoration: underline; cursor: pointer; }
.co-short-status { font-size: 0.9rem; color: #aaaaaa; }
.co-short-status.ok { color: #4cd964; }
