:root {
    --site-navy: #0b2545;
    --site-cyan: #0077b6;
    --site-green: #059669;
    --site-ink: #1e293b;
    --site-muted: #64748b;
    --site-line: #dbe5ee;
    --site-surface: #fff;
    --site-soft: #f8fafc;
    --site-shadow: 0 12px 32px rgba(11, 37, 69, 0.08);
}

.home-footer {
    font-family: Cairo, sans-serif;
}

.footer-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2.5rem;
}

.footer-columns > * {
    min-width: 0;
    align-self: start;
}

.footer-logo {
    display: block;
    width: min(100%, 15rem);
    height: 5.5rem;
    margin: 0 0 1rem;
    object-fit: cover;
    object-position: center 62%;
}

.footer-column > h4 {
    margin: 0 0 1.25rem;
}

.footer-column ul {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-column .space-y-3\.5 {
    display: grid;
    gap: 0.875rem;
}

body:not(.home-page) {
    color: var(--site-ink);
    font-family: Cairo, Tajawal, sans-serif;
}

body:has(#public-site-header):not(.home-page):not(.login-page) > main {
    box-sizing: border-box;
    padding-top: 6.5rem;
}

body:has(#public-site-header):not(.home-page):not(.login-page) > main.mt-\[3rem\] {
    margin-top: 0;
}

body:has(#public-site-header):not(.home-page):not(.login-page) > div.mb-12.mt-40 ~ main {
    padding-top: 2rem;
}

body:not(.home-page) main :where(button, input, select, textarea) {
    font: inherit;
}

body:not(.home-page) main :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-width: 0;
    max-width: 100%;
    border-color: var(--site-line);
}

body:not(.home-page) main :where(input, select, textarea):focus-visible {
    outline: 2px solid rgba(0, 119, 182, 0.28);
    outline-offset: 1px;
}

body:not(.home-page) main :where(img, svg, video, canvas) {
    max-width: 100%;
}

body:not(.home-page) main :where(table) {
    border-collapse: collapse;
}

body:not(.home-page) main :where(th, td) {
    vertical-align: middle;
}

body:not(.home-page) main :where(th) {
    font-weight: 800;
    text-align: right;
}

body:not(.home-page) main :where(button, [type="button"], [type="submit"]) {
    cursor: pointer;
}

body:not(.home-page) main :where(button:disabled, [type="submit"]:disabled) {
    cursor: not-allowed;
    opacity: 0.55;
}

main:has(.add-to-cart-button) > .grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 1.5rem;
}

main:has(.add-to-cart-button) > .grid > article {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid #e8eef3;
    border-radius: 1rem;
    background: var(--site-surface);
    padding: 1.25rem;
    box-shadow: 0 6px 20px rgba(11, 37, 69, 0.05);
}

main:has(.add-to-cart-button) > .grid > article > a {
    display: block;
    min-width: 0;
}

main:has(.add-to-cart-button) > .grid > article img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 0.75rem;
    background: var(--site-soft);
    object-fit: contain;
}

main:has(.add-to-cart-button) > .grid > article h2 {
    color: var(--site-ink);
    line-height: 1.5;
}

main:has(.add-to-cart-button) > .grid > article .add-to-cart-button {
    width: 100%;
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--site-navy);
    color: #fff;
    font-weight: 800;
}

main:has(.add-to-cart-button) > .grid > article .add-to-cart-button:hover {
    background: var(--site-cyan);
}

main:has(.add-to-cart-button) > .grid > article .pt-6 {
    margin-top: auto;
}

main:has(.add-to-cart-form) > .grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2rem;
}

main:has(.add-to-cart-form) > .grid > div:first-child {
    min-width: 0;
    border: 1px solid #e8eef3;
    background: #fff;
    box-shadow: var(--site-shadow);
}

main:has(.add-to-cart-form) > .grid > div:first-child img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

main:has(.add-to-cart-form) .add-to-cart-form {
    align-items: stretch;
    gap: 1rem;
    border: 1px solid #e8eef3;
    border-radius: 1rem;
    background: var(--site-soft);
    padding: 1rem;
}

main:has(.add-to-cart-form) .add-to-cart-form input {
    box-sizing: border-box;
    min-height: 2.75rem;
}

main:has(.add-to-cart-form) .add-to-cart-form button {
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--site-green);
    color: #fff;
    font-weight: 800;
}

#cartItems > div:first-child {
    border: 1px solid #e8eef3;
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--site-shadow);
}

#cartItems > div:first-child > div {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #e8eef3;
    padding: 1.25rem;
}

#cartItems .cart-quantity {
    box-sizing: border-box;
    width: 5rem;
    min-height: 2.5rem;
    margin-top: 0.35rem;
    padding: 0.5rem;
    border: 1px solid var(--site-line);
    border-radius: 0.5rem;
    text-align: center;
}

#cartItems > div:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: 1.5rem;
    border-radius: 1rem;
    background: var(--site-soft);
    padding: 1.5rem;
}

#cartItems > div:nth-child(2) > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

#cartItems button,
#checkout-panel button {
    min-height: 2.75rem;
}

#checkout-panel {
    margin-top: 2rem;
    border: 1px solid #e8eef3;
    border-radius: 1rem;
    background: #fff;
    padding: clamp(1rem, 3vw, 2rem);
    box-shadow: var(--site-shadow);
}

#checkout-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

#checkout-form :where(label, h3) {
    line-height: 1.6;
}

#checkout-form :where(input:not([type="radio"]), select, textarea) {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.4rem;
    border: 1px solid var(--site-line);
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.75rem;
}

#checkout-form textarea {
    min-height: 7rem;
    resize: vertical;
}

#checkout-form > .md\:col-span-2 {
    min-width: 0;
    border-radius: 1rem;
}

#checkout-form > .md\:col-span-2 {
    grid-column: 1 / -1;
}

#checkout-form .peer + span {
    display: flex;
    min-height: 4rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid var(--site-line);
    border-radius: 0.75rem;
    background: #fff;
    padding: 1rem;
}

#checkout-form .peer:checked + span {
    border-color: var(--site-cyan);
    background: #f0f9ff;
}

#checkout-form button,
.site-primary-button {
    border: 0;
    border-radius: 0.75rem;
    background: var(--site-navy);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 800;
}

#checkout-form button:hover,
.site-primary-button:hover {
    background: var(--site-cyan);
}

.login-page main > div {
    box-sizing: border-box;
    width: min(100%, 28rem);
    border: 1px solid #e8eef3;
}

.login-page main > div h1 {
    color: var(--site-navy);
    line-height: 1.5;
}

.login-page main > div button {
    min-height: 3rem;
    border: 0;
    border-radius: 0.75rem;
    color: #fff;
    font-weight: 800;
}

body:has(#public-site-header):not(.home-page) main > section:has(table) {
    overflow-x: auto;
    border: 1px solid #e8eef3;
    border-radius: 1rem;
    background: #fff;
}

body:has(#public-site-header):not(.home-page) main table {
    width: 100%;
}

body:has(#public-site-header):not(.home-page) main th,
body:has(#public-site-header):not(.home-page) main td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e8eef3;
}

body:has(#public-site-header):not(.home-page) main thead {
    background: #f1f5f9;
    color: var(--site-navy);
}

body:has(#public-site-header):not(.home-page) main tbody tr:hover {
    background: #f8fafc;
}

 .auth-modal-backdrop {
    position: fixed;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(11, 37, 69, 0.56);
    backdrop-filter: blur(3px);
    pointer-events: auto;
}

#auth-modal {
    position: fixed;
    z-index: 1001;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 1rem;
    isolation: isolate;
}

#auth-modal.hidden,
#auth-modal-message.hidden,
#auth-register-form.hidden,
#auth-login-form.hidden,
.auth-spinner.hidden {
    display: none !important;
}

.auth-modal-card {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: min(100%, 31rem);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 1.25rem;
    background: #fff;
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: 0 24px 70px rgba(11, 37, 69, 0.24);
    isolation: isolate;
    pointer-events: auto;
}

.auth-modal-close {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid var(--site-line);
    border-radius: 50%;
    background: #fff;
    color: var(--site-navy);
}

.auth-modal-close svg,
.auth-eye-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-header-wrap {
    margin-bottom: 1.25rem;
    padding-inline-end: 2.5rem;
}

.auth-title {
    margin: 0;
    color: var(--site-navy);
    font-size: 1.5rem;
    font-weight: 900;
}

.auth-subtitle {
    margin: 0.4rem 0 0;
    color: var(--site-muted);
    font-size: 0.9rem;
}

.auth-tablist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    border-radius: 0.8rem;
    background: #f1f5f9;
    padding: 0.35rem;
}

.auth-tab-btn {
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: var(--site-muted);
    font-weight: 800;
}

.auth-tab-btn.active {
    background: #fff;
    color: var(--site-navy);
    box-shadow: 0 2px 8px rgba(11, 37, 69, 0.09);
}

.auth-form-group,
.auth-form-group-inner {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.auth-field-label {
    color: var(--site-navy);
    font-size: 0.85rem;
    font-weight: 800;
}

.auth-field-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.85rem;
    border: 1px solid var(--site-line);
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.7rem 0.8rem;
    color: var(--site-ink);
}

.auth-field-input:focus {
    border-color: var(--site-cyan);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.12);
}

.auth-password-wrapper {
    position: relative;
}

.auth-password-input {
    padding-inline-end: 3rem;
}

.auth-eye-btn {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.35rem;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--site-muted);
}

.auth-submit-btn,
.auth-google-btn {
    display: flex;
    width: 100%;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border-radius: 0.7rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-submit-btn {
    border: 0;
    background: var(--site-navy);
    color: #fff;
}

.auth-submit-btn:hover {
    background: var(--site-cyan);
}

.auth-grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--site-muted);
    font-size: 0.8rem;
}

.auth-divider-line {
    height: 1px;
    flex: 1;
    background: var(--site-line);
}

.auth-google-btn {
    border: 1px solid var(--site-line);
    background: #fff;
    color: var(--site-ink);
}

.auth-google-icon {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
}

.auth-terms-note {
    margin: 1rem 0 0;
    color: var(--site-muted);
    font-size: 0.75rem;
    line-height: 1.6;
    text-align: center;
}

.auth-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: site-spin 0.8s linear infinite;
}

@keyframes site-spin {
    to { transform: rotate(360deg); }
}

.services-page,
.policy-page,
.order-success-page {
    min-width: 0;
}

.services-page article,
.policy-page section,
.order-success-page section {
    min-width: 0;
}

.services-page article > div,
.policy-page .policy-content-pane,
.order-success-page > section {
    border: 1px solid #e8eef3;
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--site-shadow);
}

.policy-tab-trigger {
    min-height: 2.75rem;
    flex: 0 0 auto;
}

.policy-content-pane {
    min-width: 0;
    line-height: 1.9;
}

.policy-content-pane :where(h2, h3) {
    color: var(--site-navy);
    line-height: 1.5;
}

#public-site-header {
    box-shadow: 0 10px 40px rgba(0, 119, 182, 0.15);
}

.product-3d {
    transform-style: preserve-3d;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-3d:hover {
    transform: translateY(-0.5rem);
    box-shadow: var(--site-shadow);
}

.auth-divider-text {
    flex: 0 0 auto;
}

.login-page main > div button {
    background: linear-gradient(110deg, #10b981, #0077b6 55%, #0b2545);
}

.city-option {
    cursor: pointer;
    padding: 0.6rem 1rem;
}

.city-option:hover {
    background: #f1f5f9;
    color: var(--site-navy);
}

body:has(#public-site-header) main.min-h-screen :where(.pb-16) { padding-bottom: 4rem; }
body:has(#public-site-header) main.min-h-screen :where(.px-3\.5) { padding-inline: 0.875rem; }
body:has(#public-site-header) main.min-h-screen :where(.p-1\.5) { padding: 0.375rem; }
body:has(#public-site-header) main.min-h-screen :where(.pt-5) { padding-top: 1.25rem; }
body:has(#public-site-header) main.min-h-screen :where(.pb-5) { padding-bottom: 1.25rem; }
body:has(#public-site-header) main.min-h-screen :where(.pt-2) { padding-top: 0.5rem; }
body:has(#public-site-header) main.min-h-screen :where(.pr-5) { padding-inline-start: 1.25rem; }
body:has(#public-site-header) main.min-h-screen :where(.mb-5) { margin-bottom: 1.25rem; }
body:has(#public-site-header) main.min-h-screen :where(.min-w-0) { min-width: 0; }
body:has(#public-site-header) main.min-h-screen :where(.whitespace-nowrap) { white-space: nowrap; }
body:has(#public-site-header) main.min-h-screen :where(.truncate) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:has(#public-site-header) main.min-h-screen :where(.list-disc) { list-style-type: disc; }
body:has(#public-site-header) main.min-h-screen :where(.list-decimal) { list-style-type: decimal; }
body:has(#public-site-header) main.min-h-screen :where(.text-slate-200) { color: #e2e8f0; }
body:has(#public-site-header) main.min-h-screen :where(.text-\[\#25d366\]) { color: #25d366; }
body:has(#public-site-header) main.min-h-screen :where(.bg-black\/30) { background-color: rgba(0, 0, 0, 0.3); }
body:has(#public-site-header) main.min-h-screen :where(.border-white\/15) { border-color: rgba(255, 255, 255, 0.15); }

body:has(#public-site-header) main.min-h-screen :where(.space-y-1\.5) > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.375rem;
}

body:has(#public-site-header) main.min-h-screen :where([class~="hover:border-[#25d366]"]):hover {
    border-color: #25d366;
}

body:has(#public-site-header) main.min-h-screen > .max-w-7xl {
    box-sizing: border-box;
    width: min(100%, 80rem);
    margin-inline: auto;
}

body:has(#public-site-header) main.min-h-screen > .max-w-7xl > .grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2rem;
}

body:has(#public-site-header) main.min-h-screen > .max-w-7xl > .grid > aside {
    min-width: 0;
}

body:has(#public-site-header) main.min-h-screen .policy-tab-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 0.65rem;
    padding: 0.75rem 1rem;
    font-weight: 800;
}

body:has(#public-site-header) main.min-h-screen .policy-tab-trigger:not(.active) {
    background: transparent;
    color: var(--site-muted);
}

body:has(#public-site-header) main.min-h-screen .policy-tab-trigger:not(.active):hover {
    background: #f1f5f9;
    color: var(--site-navy);
}

body:has(#public-site-header) main.min-h-screen .policy-tab-trigger.active {
    background: var(--site-navy);
    color: #fff;
}

body:has(#public-site-header) main.min-h-screen .policy-content-pane {
    min-width: 0;
    border: 1px solid #e8eef3;
    border-radius: 1rem;
    background: #fff;
    padding: clamp(1rem, 3vw, 2rem);
    box-shadow: var(--site-shadow);
}

body:has(#public-site-header) main.min-h-screen .policy-content-pane ul,
body:has(#public-site-header) main.min-h-screen .policy-content-pane ol {
    padding-inline-start: 1.25rem;
}

main:has(.add-to-cart-form) model-viewer {
    display: block;
    width: 100%;
    height: min(55vw, 32rem);
    min-height: 25rem;
}

#edit-certificate-dialog {
    box-sizing: border-box;
    width: min(92vw, 35rem);
    max-width: 100%;
    border: 0;
}

.sbc-verify-seal {
    position: fixed;
    z-index: 20;
}

main:has(> section.w-full) > section {
    box-sizing: border-box;
    border: 1px solid #e8eef3;
    box-shadow: var(--site-shadow);
}

.payment-shell {
    box-sizing: border-box;
    width: min(calc(100% - 2rem), 38.75rem);
}

.animate__animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

.animate__fadeInUp {
    animation-name: site-fade-in-up;
}

.animate__fadeIn {
    animation-name: site-fade-in;
}

.animate__fadeOutUp {
    animation-name: site-fade-out-up;
}

@keyframes site-fade-in-up {
    from { opacity: 0; transform: translate3d(0, 1rem, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes site-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes site-fade-out-up {
    to { opacity: 0; transform: translate3d(0, -1rem, 0); }
}

@media (min-width: 640px) {
    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    main:has(.add-to-cart-button) > .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    main:has(.add-to-cart-form) > .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem;
    }

    #checkout-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body:has(#public-site-header) main.min-h-screen > .max-w-7xl > .grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    body:has(#public-site-header) main.min-h-screen > .max-w-7xl > .grid > aside {
        grid-column: span 4 / span 4;
    }

    body:has(#public-site-header) main.min-h-screen > .max-w-7xl > .grid > :not(aside) {
        grid-column: span 8 / span 8;
    }
}

@media (min-width: 1024px) {
    .footer-columns {
        grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }

    main:has(.add-to-cart-button) > .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body:has(#public-site-header) main.min-h-screen > .max-w-7xl > .grid > aside {
        position: sticky;
        top: 7rem;
    }
}

@media (max-width: 639px) {
    body:has(#public-site-header):not(.home-page):not(.login-page) > main {
        padding-inline: 1rem;
        padding-top: 5.75rem;
    }

    main:has(.add-to-cart-form) > .grid {
        gap: 1.25rem;
    }

    #cartItems > div:first-child > div {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    #cartItems > div:first-child > div > :first-child {
        width: 100%;
        text-align: right;
    }

    #cartItems > div:nth-child(2) {
        align-items: stretch;
        padding: 1rem;
    }

    #cartItems > div:nth-child(2) > div {
        width: 100%;
    }

    #cartItems > div:nth-child(2) button {
        flex: 1 1 auto;
    }

    .auth-modal-card {
        max-height: calc(100dvh - 1.5rem);
        width: min(calc(100vw - 1.5rem), 23rem);
        border-radius: 1rem;
        padding: 1rem;
    }

    .auth-header-wrap {
        margin-bottom: 0.75rem;
    }

    .auth-tablist {
        margin-bottom: 0.75rem;
    }

    .auth-form-group,
    .auth-form-group-inner {
        margin-bottom: 0.65rem;
    }

    .auth-divider {
        margin: 0.75rem 0;
    }

    .auth-terms-note {
        margin-top: 0.65rem;
    }

    .policy-tab-trigger {
        padding-inline: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate__animated,
    .auth-spinner {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }
}