body {
    --ink-strong: #16213f;
    --ink-mid: #52627f;
    --surface-soft: #f7f8fc;
    --surface-line: #dbe2ef;
    --brand-navy: #22346b;
    --brand-red: #d72027;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(215,32,39,0.08), transparent 28%),
        linear-gradient(180deg, #f7f8fc 0%, #eef1f7 100%);
    color: #172033;
}

body.is-rtl {
    direction: rtl;
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 1rem;
    color: white;
    background: rgba(34,52,107,0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(18,29,58,0.18);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.logo-mark {
    width: 62px;
    height: 62px;
    object-fit: contain;
    background: rgba(255,255,255,0.96);
    border-radius: 18px;
    padding: 0.45rem;
    box-shadow: 0 10px 24px rgba(10,18,36,0.18);
}

.logo-copy {
    min-width: 0;
}

.logo-eyebrow {
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.68);
}

.logo-copy h1 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.15;
}

body:not(.is-rtl) .logo-copy h1 {
    font-size: 1.08rem;
    line-height: 1.1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
}

.lang-btn {
    min-width: 48px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,0.84);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.icon-btn,
.cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: white;
    border-radius: 14px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
}

.icon-btn:hover,
.cart-button:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.28);
    transform: translateY(-1px);
}

.icon-btn.is-muted {
    opacity: 0.6;
}

.icon-btn svg,
.cart-button-icon svg,
.search-field svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cart-button {
    gap: 0.65rem;
    height: 42px;
    padding: 0 0.8rem 0 0.7rem;
}

.cart-button-label {
    font-size: 0.92rem;
    font-weight: 600;
}

.cart-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #d72027;
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
}

.search-section {
    position: sticky;
    top: 84px;
    z-index: 50;
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 1.25rem;
    border-radius: 24px;
    border: 1px solid rgba(20,32,61,0.06);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(20,32,61,0.08);
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-tools {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.search-eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7a859d;
}

.search-copy h2 {
    font-size: 1.15rem;
    line-height: 1.2;
    color: #16213f;
}

.search-field {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid #e1e6f0;
    background: #f7f8fc;
    color: #7a859d;
}

body.is-rtl .search-field {
    flex-direction: row-reverse;
}

.view-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border: 1px solid #dbe2ef;
    border-radius: 14px;
    background: #f7f8fc;
}

.view-btn {
    min-width: 78px;
    height: 40px;
    padding: 0 0.9rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #52627f;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: #22346b;
    color: white;
    box-shadow: 0 10px 20px rgba(34,52,107,0.18);
}

#search {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.98rem;
    color: #16213f;
}

#search:focus {
    outline: none;
}

.categories {
    display: flex;
    gap: 0.6rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

body.is-rtl .categories {
    direction: rtl;
}

.categories::-webkit-scrollbar {
    height: 6px;
}

.categories::-webkit-scrollbar-track {
    background: #edf1f7;
    border-radius: 10px;
}

.categories::-webkit-scrollbar-thumb {
    background: #22346b;
    border-radius: 10px;
}

.categories::-webkit-scrollbar-thumb:hover {
    background: #d72027;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.68rem 1rem;
    border: 1px solid #dbe2ef;
    border-radius: 999px;
    background: #f7f8fc;
    color: #324161;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.cat-btn-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    box-shadow: inset 0 0 0 1px rgba(34,52,107,0.08);
}

.cat-btn-label {
    line-height: 1;
}

.cat-btn:hover,
.cat-btn.active {
    background: #22346b;
    color: white;
    border-color: #22346b;
}

.cat-btn:hover .cat-btn-icon,
.cat-btn.active .cat-btn-icon {
    background: rgba(255,255,255,0.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.line-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cat-btn-icon .line-icon {
    width: 16px;
    height: 16px;
    color: var(--brand-navy);
}

.cat-btn:hover .line-icon,
.cat-btn.active .line-icon {
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}

.products-table-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}

.products-table {
    overflow: hidden;
    border: 1px solid rgba(22,33,63,0.08);
    border-radius: 22px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 16px 40px rgba(17,28,52,0.08);
}

.products-table-header,
.products-table-row {
    display: grid;
    grid-template-columns: minmax(280px, 2.7fr) minmax(140px, 1fr) minmax(90px, 0.8fr) 78px 108px;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
}

.products-table-header {
    border-bottom: 1px solid #e6ebf3;
    background: #f8fafd;
    color: #70809d;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.products-table-row {
    border-bottom: 1px solid #eef2f8;
}

.products-table-row:last-child {
    border-bottom: none;
}

.table-product {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

body.is-rtl .table-product,
body.is-rtl .contact-btn,
body.is-rtl .cart-item,
body.is-rtl .cart-total,
body.is-rtl .cart-header,
body.is-rtl .product-head,
body.is-rtl .product-meta-row,
body.is-rtl .header-content,
body.is-rtl .logo,
body.is-rtl .header-actions {
    direction: rtl;
}

.table-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8f9fd 0%, #eef2f8 100%);
}

.table-thumb img {
    width: 100%;
    height: 100%;
    padding: 0.35rem;
    object-fit: contain;
}

.table-thumb-hidden {
    background: #f3f6fb;
}

.table-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #22346b 0%, #314b96 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.table-product-copy {
    min-width: 0;
}

.table-product-copy strong {
    display: block;
    color: #16213f;
    font-size: 0.95rem;
    line-height: 1.25;
}

body.is-rtl .table-product-copy,
body.is-rtl .cart-item-info,
body.is-rtl .modal-content,
body.is-rtl .logo-copy,
body.is-rtl .search-copy {
    text-align: right;
}

.table-product-copy span {
    display: block;
    margin-top: 0.2rem;
    color: #70809d;
    font-size: 0.78rem;
    line-height: 1.35;
}

.table-cell {
    min-width: 0;
    color: #23314f;
    font-size: 0.84rem;
    font-weight: 600;
}

.table-format {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.table-format-head {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.table-format-icon,
.product-format-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #dde4f0;
    background: linear-gradient(180deg, #ffffff 0%, #f5f7fc 100%);
    color: var(--brand-navy);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.table-format-icon .line-icon,
.product-format-icon .line-icon {
    width: 18px;
    height: 18px;
}

.table-format small {
    color: #7b869c;
    font-size: 0.74rem;
    font-weight: 600;
}

.table-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 0 0.65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table-badge-neutral {
    background: #f4f6fb;
    border-color: rgba(111,125,151,0.14);
    color: #52627f;
}

.table-price {
    color: #d72027;
    font-weight: 800;
}

.table-qty .qty-input {
    width: 64px;
}

.btn-add-table {
    width: 100%;
    min-width: 96px;
}

.product-card {
    overflow: visible;
    border: 1px solid rgba(22,33,63,0.06);
    border-radius: 20px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 14px 38px rgba(17,28,52,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.product-card:has(.product-details[open]) {
    z-index: 40;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 46px rgba(17,28,52,0.12);
}

.product-image {
    width: 100%;
    height: 154px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg, #f8f9fd 0%, #eef2f8 100%);
    color: #99a3b8;
}

.product-image.hidden {
    display: none;
}

.product-image img {
    width: 100%;
    height: 100%;
    padding: 0.55rem;
    object-fit: contain;
    object-position: center;
}

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient(135deg, #22346b 0%, #314b96 100%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 14px 30px rgba(34,52,107,0.28);
}

.product-info {
    padding: 0.8rem 0.8rem 0.75rem;
}

.product-card-sauce {
    border-radius: 24px;
}

.product-image-sauce {
    position: relative;
    height: 182px;
    padding: 0.9rem;
    border-radius: 20px 20px 0 0;
}

.product-image-sauce img {
    padding: 1.05rem 0.55rem 0.55rem;
    filter: drop-shadow(0 14px 28px rgba(23,36,71,0.12));
}

.product-badges {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    right: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    z-index: 2;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.72rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-badge-primary {
    background: rgba(23,36,71,0.92);
    color: white;
}

.product-badge-danger {
    background: #fff1f1;
    border-color: rgba(215,32,39,0.14);
    color: #d72027;
}

.product-badge-success {
    background: #eefaf4;
    border-color: rgba(29,143,87,0.14);
    color: #1d8f57;
}

.product-badge-warning {
    background: #fff7e8;
    border-color: rgba(183,121,31,0.16);
    color: #b7791f;
}

.product-badge-neutral {
    background: #f4f6fb;
    border-color: rgba(111,125,151,0.14);
    color: #52627f;
}

.product-info-sauce {
    padding-top: 0.8rem;
}

.product-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    position: relative;
}

.product-meta-kicker,
.product-meta-ref {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7d89a1;
}

.product-name-sauce {
    font-size: 1rem;
    line-height: 1.18;
    margin-bottom: 0.35rem;
}

.product-copy {
    min-height: 42px;
    margin-bottom: 0.85rem;
    color: #6f7d97;
    font-size: 0.83rem;
    line-height: 1.45;
}

.product-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.product-spec {
    padding: 0.72rem;
    border: 1px solid #e2e8f2;
    border-radius: 14px;
    background: #f8f9fc;
}

.product-spec-label {
    margin-bottom: 0.28rem;
    color: #7b869c;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-spec-value {
    color: #172447;
    font-size: 0.83rem;
    font-weight: 700;
    line-height: 1.3;
}

.product-footer {
    padding-top: 0.55rem;
    border-top: 1px solid #e6ebf3;
}

.product-price-wrap {
    margin-bottom: 0.55rem;
}

.product-price-wrap-compact {
    margin-bottom: 0.45rem;
}

.product-price-note {
    display: block;
    margin-bottom: 0.28rem;
    color: #7b869c;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-name {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.22;
    color: #16213f;
    font-weight: 700;
}

.product-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
    position: relative;
}

.product-ref {
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    color: #6f7d97;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.product-visual-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.product-packaging {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.product-packaging-copy {
    min-width: 0;
}

.product-packaging-label {
    display: block;
    margin-bottom: 0.12rem;
    color: #7b869c;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-packaging-value {
    display: block;
    color: var(--ink-strong);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.product-card-sauce .product-visual-row {
    margin-bottom: 0.8rem;
}

body.is-rtl .product-tags,
body.is-rtl .product-badges,
body.is-rtl .product-controls,
body.is-rtl .search-tools {
    direction: rtl;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: #eef2f8;
    color: #52627f;
    font-size: 0.68rem;
    font-weight: 700;
}

.product-tag-soft {
    background: #fff3f3;
    color: #bf2d2d;
}

.product-tag-shelf-life {
    background: #fff7e8;
    color: #9b6a11;
    border: 1px solid rgba(183,121,31,0.16);
    white-space: nowrap;
}

.product-details {
    position: static;
    flex-shrink: 0;
}

.product-details[open] {
    z-index: 3;
}

.product-details-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #d8deeb;
    background: #fff;
    color: #52627f;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.product-details-toggle::-webkit-details-marker {
    display: none;
}

.product-details-toggle:hover {
    border-color: rgba(215,32,39,0.22);
    background: #fff3f3;
    color: #d72027;
}

.product-details-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 0.2rem);
    max-width: 240px;
    padding: 0.7rem;
    border: 1px solid #e2e8f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(17,28,52,0.12);
    z-index: 30;
}

body.is-rtl .product-details-panel,
body.is-rtl .product-details-panel-wide {
    text-align: right;
}

.product-details-panel-wide {
    max-width: none;
}

.product-detail-item + .product-detail-item {
    margin-top: 0.45rem;
}

.product-detail-item span {
    display: block;
    margin-bottom: 0.12rem;
    color: #7b869c;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-detail-item strong {
    color: #172447;
    font-size: 0.8rem;
    line-height: 1.35;
}

.product-detail-copy {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e6ebf3;
    color: #6f7d97;
    font-size: 0.76rem;
    line-height: 1.42;
}

.product-price {
    margin-bottom: 0;
    font-size: 1.18rem;
    color: #d72027;
    font-weight: 700;
}

.order-unit-summary {
    display: grid;
    gap: 0.14rem;
    margin-top: 0.42rem;
    color: #65728c;
    font-size: 0.71rem;
    font-weight: 600;
    line-height: 1.35;
}

.order-unit-summary strong {
    color: #213760;
    font-size: 0.74rem;
}

.table-price .order-unit-summary {
    margin-top: 0.3rem;
}

.product-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qty-input {
    width: 52px;
    height: 36px;
    padding: 0.35rem;
    border: 1px solid #d8deeb;
    border-radius: 10px;
    background: #f8f9fc;
    color: #16213f;
    font-weight: 700;
    text-align: center;
}

.btn {
    padding: 0.65rem 0.85rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    flex: 1;
    background: #22346b;
    color: white;
}

.btn-primary:hover {
    background: #1a2a57;
}

.btn-danger {
    background: #d72027;
    color: white;
}

.btn-danger:hover {
    background: #b71c1f;
}

.btn-add {
    flex: 1;
    background: #d72027;
    color: white;
}

.btn-add:hover {
    background: #b71c1f;
    transform: translateY(-1px);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fbfcff;
    box-shadow: -16px 0 40px rgba(15,23,42,0.18);
    transform: translateX(100%);
    transition: transform 0.3s;
}

.cart-sidebar.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e9f2;
}

.close-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #e2e7f1;
    border-radius: 12px;
    background: #f3f5fa;
    font-size: 1.1rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    padding: 0.9rem;
    border: 1px solid #e3e8f2;
    border-radius: 16px;
    background: white;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.cart-item-unit {
    margin-top: 0.12rem;
    color: #71809a;
    font-size: 0.76rem;
    font-weight: 600;
}

.cart-item-price {
    font-size: 0.9rem;
    color: #666;
}

.cart-price-figure {
    display: inline-block;
    unicode-bidi: isolate;
}

.currency-label {
    display: inline-block;
    unicode-bidi: isolate;
}

.currency-label-ar {
    font-size: 0.64rem;
    line-height: 1;
    color: #7b869c;
    vertical-align: middle;
}

.empty-cart {
    padding: 2rem;
    text-align: center;
    color: #7b879c;
}

.cart-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e9f2;
}

body.is-rtl .cart-footer {
    text-align: right;
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e9f2;
    border-bottom: 1px solid #e5e9f2;
    font-size: 1.2rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
}

.overlay.show {
    display: block;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.modal.show {
    display: flex !important;
}

.modal-content {
    width: 90%;
    max-width: 420px;
    padding: 2rem;
    border-radius: 24px;
    background: white;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15,23,42,0.24);
}

body.is-rtl .modal-content {
    text-align: right;
}

.contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid #dbe2ef;
    border-radius: 16px;
    background: #f7f8fc;
    color: #16213f;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background: #eef2ff;
    border-color: #b9c6ea;
}

.contact-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #22346b;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
}

.btn-remove {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 10px;
    background: #d72027;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
}

.toast-viewport {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: min(360px, calc(100vw - 2rem));
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.toast {
    position: relative;
    display: grid;
    grid-template-columns: 12px 48px minmax(0, 1fr) 28px;
    align-items: center;
    column-gap: 0.75rem;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(198,206,222,0.8);
    border-radius: 16px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 20px 50px rgba(16,24,40,0.16);
    backdrop-filter: blur(18px);
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 0.32s ease, opacity 0.32s ease;
    pointer-events: auto;
}

.toast-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast-out {
    transform: translateY(-24px) scale(0.96);
    opacity: 0;
}

.toast-accent {
    align-self: stretch;
    background: linear-gradient(180deg, #22346b 0%, #1a2550 100%);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 38px;
    height: 38px;
    margin: 0.85rem 0 0.85rem 0.85rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #22346b 0%, #314b96 100%);
    color: #fff;
}

.toast-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toast-body {
    min-width: 0;
    padding: 0.8rem 0;
}

.toast-title {
    display: block;
    margin-bottom: 0.18rem;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #14213d;
    font-weight: 700;
}

.toast-message {
    display: block;
    font-size: 0.86rem;
    line-height: 1.35;
    color: #51607f;
}

.toast-close {
    appearance: none;
    border: none;
    background: transparent;
    color: #7c869d;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    align-self: center;
    padding: 0 0.75rem 0 0;
}

.toast-progress {
    position: absolute;
    left: 14px;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(34,52,107,0.12);
}

.toast-progress::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    animation: toast-progress 3s linear forwards;
    background: linear-gradient(90deg, #22346b 0%, #d72027 100%);
}

.toast-success .toast-accent,
.toast-success .toast-icon {
    background: linear-gradient(180deg, #1f8f58 0%, #156f44 100%);
}

.toast-success .toast-progress::after {
    background: linear-gradient(90deg, #1f8f58 0%, #46c98d 100%);
}

.toast-warning .toast-accent,
.toast-warning .toast-icon {
    background: linear-gradient(180deg, #d98f00 0%, #b36e00 100%);
}

.toast-warning .toast-progress::after {
    background: linear-gradient(90deg, #d98f00 0%, #f5b62f 100%);
}

.toast-error .toast-accent,
.toast-error .toast-icon {
    background: linear-gradient(180deg, #d72027 0%, #aa1b21 100%);
}

.toast-error .toast-progress::after {
    background: linear-gradient(90deg, #d72027 0%, #ff6b70 100%);
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 768px) {
    .header-content,
    .search-panel,
    .search-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        display: grid;
        grid-template-columns: auto 38px 38px minmax(0, 1fr);
        align-items: center;
        gap: 0.45rem;
    }

    .logo {
        gap: 0.55rem;
    }

    .logo-mark {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        padding: 0.35rem;
    }

    .logo-eyebrow {
        margin-bottom: 0.18rem;
        font-size: 0.56rem;
        letter-spacing: 0.08em;
    }

    body:not(.is-rtl) .logo-copy h1 {
        font-size: 14px;
        line-height: 1.05;
        white-space: nowrap;
    }

    .search-section {
        top: 74px;
        margin: 0.75rem auto 0;
        padding: 0.8rem;
        border-radius: 20px;
    }

    .search-panel {
        display: block;
        margin-bottom: 0.75rem;
    }

    .search-copy {
        display: none;
    }

    .search-tools {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 0.45rem;
        flex-wrap: nowrap;
        width: 100%;
    }

    .search-field {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0.72rem 0.8rem;
        border-radius: 14px;
    }

    #search {
        font-size: 0.92rem;
    }

    .view-switch {
        flex: 0 0 auto;
        padding: 0.16rem;
        border-radius: 12px;
    }

    .view-btn {
        min-width: 58px;
        height: 38px;
        padding: 0 0.7rem;
        font-size: 0.78rem;
    }

    .lang-switch {
        order: -1;
        width: max-content;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
    }

    .cart-button {
        width: 100%;
        min-width: 0;
        height: 38px;
        gap: 0.35rem;
        padding: 0 0.55rem;
        justify-content: center;
    }

    .cart-button-label {
        font-size: 0.8rem;
    }

    .cart-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.72rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

    .products-table-wrap {
        padding: 1rem;
    }

    .products-table {
        overflow-x: auto;
    }

    .products-table-header,
    .products-table-row {
        min-width: 650px;
    }

    .product-spec-grid {
        grid-template-columns: 1fr;
    }

    .product-details-panel,
    .product-details-panel-wide {
        width: calc(100% - 0.2rem);
        max-width: none;
    }

    .cart-sidebar {
        max-width: 100%;
    }

    .categories {
        overflow-x: auto;
    }

    .contacts {
        grid-template-columns: 1fr;
    }

    .toast-viewport {
        width: min(360px, calc(100vw - 2rem));
    }

    .toast {
        grid-template-columns: 10px 44px minmax(0, 1fr) 26px;
        column-gap: 0.65rem;
    }
}
