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

body.lang-ar {
    --font-display: 'Tajawal', sans-serif;
    --font-body: 'Tajawal', sans-serif;
}

body.lang-ar,
body.lang-ar button,
body.lang-ar input,
body.lang-ar textarea,
body.lang-ar select {
    font-family: var(--font-body, 'Tajawal', sans-serif);
}

body.lang-ar .hero-title,
body.lang-ar .section-title,
body.lang-ar .about-title,
body.lang-ar .story-heading,
body.lang-ar .values-heading,
body.lang-ar .quote-text,
body.lang-ar .sidebar-title,
body.lang-ar .invoice-brand h1,
body.lang-ar .invoice-meta h2,
body.lang-ar .team-name {
    font-family: var(--font-display, 'Tajawal', sans-serif);
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .nav-container,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .nav-icons,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .search-input-row,
html[dir="rtl"] .cart-header,
html[dir="rtl"] .cart-total,
html[dir="rtl"] .summary-row,
html[dir="rtl"] .total-row,
html[dir="rtl"] .checkout-header-inner,
html[dir="rtl"] .invoice-actions,
html[dir="rtl"] .whatsapp-modal-content .btn-group,
html[dir="rtl"] .success-banner {
    direction: rtl;
}

html[dir="rtl"] .hero,
html[dir="rtl"] .quickview-content,
html[dir="rtl"] .about-hero,
html[dir="rtl"] .about-story,
html[dir="rtl"] .invoice-head,
html[dir="rtl"] .invoice-grid,
html[dir="rtl"] .checkout-container {
    direction: rtl;
}

html[dir="rtl"] .search-suggestion,
html[dir="rtl"] .delivery-option,
html[dir="rtl"] .order-item,
html[dir="rtl"] .cart-item,
html[dir="rtl"] .invoice-table th,
html[dir="rtl"] .invoice-table td {
    text-align: right;
}

html[dir="rtl"] .invoice-table td:last-child {
    text-align: left;
}

html[dir="rtl"] .back-link i,
html[dir="rtl"] .back-shop i,
html[dir="rtl"] .return-btn i {
    transform: rotate(180deg);
}

.lang-toggle {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 2200;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 999px;
    background: rgba(24, 22, 15, 0.92);
    color: white;
    box-shadow: 0 12px 28px rgba(24, 22, 15, 0.22);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, background 0.2s ease;
}

.lang-toggle:hover {
    transform: translateY(-2px);
    background: rgba(43, 93, 136, 0.96);
}

.footer-bottom {
    flex-wrap: wrap;
    gap: 0.85rem 1.5rem;
}

.site-credit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    margin: 0;
    font-size: 0.8rem;
    color: inherit;
    padding: 0.6rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.site-credit-label {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(212, 184, 122, 0.18);
    color: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-credit strong {
    color: inherit;
    font-weight: 600;
}

.site-credit a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.site-credit a:hover {
    border-bottom-color: currentColor;
}

.page-credit-footer {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-cream-3, #e0ddd5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
}

.page-credit-footer .site-credit {
    justify-content: center;
    color: var(--color-ink-2, #4a4741);
    border-color: rgba(24, 22, 15, 0.12);
    background: rgba(24, 22, 15, 0.03);
}

.page-credit-footer .site-credit a {
    border-bottom-color: rgba(74, 71, 65, 0.24);
}

html[dir="rtl"] .lang-toggle {
    left: auto;
    right: 1.25rem;
}

.search-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 320px;
    overflow-y: auto;
    border-top: 1px solid var(--color-cream-3, #e8e5de);
    padding-top: 0.5rem;
}

.search-suggestions:empty {
    display: none;
}

.search-suggestion {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.85rem 0.75rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.search-suggestion:hover,
.search-suggestion.active {
    background: var(--color-cream-2, #f3f1ec);
    transform: translateY(-1px);
}

.search-suggestion-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.search-suggestion-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-ink, #18160f);
}

.search-suggestion-meta {
    font-size: 0.78rem;
    color: var(--color-ink-3, #6a6760);
}

.search-empty-state {
    padding: 0.75rem 0.5rem 0.25rem;
    color: var(--color-ink-3, #6a6760);
    font-size: 0.9rem;
}

.search-suggestion-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-ink, #18160f);
    white-space: nowrap;
}

.product-card.is-highlighted {
    outline: 2px solid var(--color-accent, #2b5d88);
    outline-offset: 4px;
}

.success-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid #cfe4d4;
    background: #eef7f0;
}

.success-banner p {
    color: #2f5237;
    font-size: 0.95rem;
}

.success-banner button {
    white-space: nowrap;
}

.success-banner .primary {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: #1a1916;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 800px) {
    .lang-toggle {
        left: 1rem;
        bottom: 1rem;
        padding: 0.72rem 0.9rem;
    }

    html[dir="rtl"] .lang-toggle {
        left: auto;
        right: 1rem;
    }

    .search-container {
        width: min(92vw, 640px);
    }

    .page-credit-footer {
        width: min(100% - 1.5rem, 1100px);
        margin-bottom: 1.5rem;
        padding: 0.9rem 1rem;
    }

    .success-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .success-banner button {
        width: 100%;
        justify-content: center;
    }
}
