:root {
    --primary-color: #000000;
    --text-color: #1F2937;
    --border-color: #E5E7EB;
    --background-color: #F9FAFB;
    --error-color: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.mobile-cart {
    display: none;
}

.features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.features-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
}

.features span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    font-size: 0.75rem;
}

.features span img {
    width: 16px;
    height: 16px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

.form-section {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
}

h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.is-invalid {
    border: 1px solid #c0392b!important;
    background-color: #f8d7da!important;
    color: #721c24!important;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Floating Label Input Styles */
.floating-input {
    position: relative;
    margin-bottom: 1rem;
}

.floating-input input {
    width: 100%;
    padding: 1.5rem 0.75rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-bottom: 0;
    background: white;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.floating-input label {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: #6B7280;
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 0.125rem;
}

/* Float label up when input is focused or has value */
.floating-input input:focus ~ label,
.floating-input input:not(:placeholder-shown) ~ label {
    top: 0.55rem;
    transform: translateY(0);
    font-size: 0.7rem;
    color: #6B7280;
}

.floating-input input:focus {
    border-color: #1773b0;
    outline: none;
}

.floating-input input:focus ~ label {
    color: #1773b0;
}

/* RTL support for floating inputs */
[dir="rtl"] .floating-input label {
    left: auto;
    right: 0.75rem;
}

/* LTR inputs within RTL context (email, phone, postal code) */
[dir="rtl"] .input-ltr input {
    text-align: left;
    direction: ltr;
}

[dir="rtl"] .input-ltr label {
    left: auto;
    right: 0.75rem;
}

/* Auto-direction inputs (Arabic text fields) */
[dir="rtl"] input[dir="auto"],
[dir="rtl"] textarea[dir="auto"] {
    text-align: start;
}

select {
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 2rem;
    color: #000000!important;
}

/* Country Select with Floating Label */
.country-select {
    position: relative;
    margin-bottom: 1rem;
}

.country-select-label {
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    font-size: 0.7rem;
    color: #6B7280;
    pointer-events: none;
    z-index: 1;
}

.country-select select {
    width: 100%;
    padding: 1.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-bottom: 0;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

[dir="rtl"] .country-select-label {
    left: auto;
    right: 0.75rem;
}

[dir="rtl"] .country-select select {
    background-position: left 10px center;
    padding-left: 2rem;
    padding-right: 0.75rem;
}

/* Phone Combined Input */
.phone-combined-input {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-direction: row;
}

.phone-combined-input input[type="tel"] {
    flex: 1;
    padding-left: 0.75rem;
    border-radius: 0 0.375rem 0.375rem 0;
    border-left: none;
    margin-left: 0;
}

.phone-prefix-display {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-width: 60px;
    background-color: #f3f4f6;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem;
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 500;
}

/* In RTL context, keep phone input LTR with prefix on LEFT side */
[dir="rtl"] .phone-combined-input {
    direction: ltr;
}

[dir="rtl"] .phone-combined-input input[type="tel"] {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 0 0.375rem 0.375rem 0;
    border-left: none;
    text-align: left;
}

[dir="rtl"] .phone-prefix-display {
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem;
}

/* Label positioning for phone combined input */
.phone-combined-input label {
    left: 70px;
}

.phone-combined-input input:focus ~ label,
.phone-combined-input input:not(:placeholder-shown) ~ label {
    left: 70px;
}

/* Adjust label position for phone combined input - keep on right in RTL context */
[dir="rtl"] .phone-combined-input label {
    left: auto;
    right: 0.75rem;
    text-align: right;
}

[dir="rtl"] .phone-combined-input input:focus ~ label,
[dir="rtl"] .phone-combined-input input:not(:placeholder-shown) ~ label {
    right: 0.75rem;
    left: auto;
}

/* Floating Select */
.floating-select {
    width: 100%;
    padding: 1.5rem 0.75rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat;
    background-position: left 10px center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

[dir="rtl"] .floating-select {
    padding-left: 2rem;
    padding-right: 0.75rem;
}

.floating-input select.floating-select + label {
    top: 0.55rem;
    transform: translateY(0);
    font-size: 0.7rem;
    color: #6B7280;
}

/* Textarea Floating Input */
.floating-input textarea {
    width: 100%;
    padding: 1.5rem 0.75rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.floating-input textarea:focus {
    border-color: #1773b0;
    outline: none;
}

.floating-input textarea + label {
    top: 0.55rem;
    transform: translateY(0);
    font-size: 0.7rem;
    color: #6B7280;
}

.floating-input textarea:focus + label {
    color: #1773b0;
}

/* Delivery Notes Section */
.delivery-notes {
    margin-top: 1.5rem;
}

.delivery-notes h2 {
    margin-bottom: 0.75rem;
}

.name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.name-fields .floating-input {
    margin-bottom: 0;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.shipping-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    gap: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.shipping-option.selected {
    background-color: #f0f5ff;
    border-color: #1773b0;
}

/* Custom Radio Toggle Styles */
.option-toggle {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border: 1px solid #8a8a8a;
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    margin: 0;
    flex-shrink: 0;
}

.option-toggle:checked {
    border: none;
    background-color: #0066ff;
}

.option-toggle:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    background-color: white;
    border-radius: 50%;
}

.option-toggle:focus {
    outline: none;
}

.shipping-option-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0rem;
    cursor: pointer;
}

.shipping-option-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shipping-title {
    font-weight: 500;
    font-size: 0.875rem;
}

.shipping-price {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.shipping-description {
    color: #6B7280;
    font-size: 0.75rem;
}

.card-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icons img {
    height: 20px;
    width: auto;
}

.card-icons span {
    color: #6B7280;
    font-size: 0.875rem;
}

.payment-forms {
    background-color: hsla(0, 0%, 0%, 0.043);
    border-radius: 0.5rem;
    border: 1px solid hsla(0, 0%, 0%, 0.1);
    margin: 1.5rem 0;
}

.security-note {
    margin-bottom: 1rem;
    color: #6B7280;
    font-size: 0.875rem;
}

.complete-purchase {
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 1rem;
    display: block;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
}

.order-summary {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.product {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.product-image {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    background: #f3f4f6;
    border-radius: 0.5rem;
    padding: 4px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
}

.quantity {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #1f2937;
    color: white;
    min-width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0 0.25rem;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex: 1;
    font-size: 0.875rem;
    margin-left: 0.75rem;
}

.summary > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.total {
    font-weight: 500;
    font-size: 1rem !important;
    margin: 1rem 0;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.product-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-color);
}

.product-variant {
    color: #6b7280;
    font-size: 0.8125rem;
}

.product-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.sale-price {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-color);
}

.price-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.original-price {
    color: #9CA3AF;
    text-decoration: line-through;
    font-size: 0.875rem;
}

.order-summary-header {
    display: none;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.summary-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    gap: 0.2rem;
}

.payment-title {
    margin-bottom: 0.25rem;
}

.chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.order-summary-header.active .chevron {
    transform: rotate(180deg);
}

@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 1rem;
    }

    .checkout-container {
        gap: 1.5rem;
    }
}


@media (max-width: 580px) {
    .container {
        padding: 0;
        background-color: white;
    }

    header {
        padding: 1rem;
        margin-bottom: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .checkout-container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-section {
        padding: 1rem;
        border-radius: 0;
        background-color: transparent;
    }

    .order-summary {
        border-radius: 0;
        background-color: var(--background-color);
        margin: 0;
        padding: 0;
        order: -1;
    }

    .payment-title {
        margin-bottom: 0.25rem;
    }

    .mobile-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 1rem;
        right: 1rem;
        gap: 0.25rem;
        z-index: 10;
        height: 28px;
    }

    .mobile-cart svg {
        width: 20px;
        height: 20px;
    }

    .mobile-cart svg path {
        fill: none !important;
        stroke: #000 !important;
        stroke-width: 1 !important;
    }

    .mobile-cart img {
        width: 20px;
    }

    h2 {
        font-size: 1.125rem;
        font-weight: 600;
    }

    .complete-purchase {
        position: static;
        border-radius: 0.375rem;
        margin: 1rem 0;
        padding: 1rem;
        max-width: 100%;
    }

    .name-fields {
        grid-template-columns: 1fr;
    }


    .card-icons {
        gap: 0.25rem;
    }

    .card-icons img {
        height: 16px;
    }

    .product {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .product-image {
        width: 72px;
        height: 72px;
    }

    .product-info {
        justify-content: space-between;
        text-align: left;
    }

    .product-details {
        align-items: flex-start;
    }

    .price-container {
        justify-content: flex-end;
    }

    .order-summary-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        background-color: #f6f6f6;
    }

    .order-summary-content {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.3s ease-out;
        overflow: hidden;
    }

    .order-summary-content.active {
        grid-template-rows: 1fr;
    }

    .order-summary-inner {
        overflow: hidden;
        padding: 0 1rem;
        transition: padding 0.3s ease-out;
    }

    .order-summary-content.active .order-summary-inner {
        padding: 1rem;
    }

    .features span {
        font-size: 0.7rem;
    }

    .features span img {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0.75rem;
    }

    h2 {
        font-size: 0.875rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        padding: 0.625rem;
        font-size: 0.8125rem;
    }

    .floating-input input {
        padding: 1.125rem 0.625rem 0.375rem;
        font-size: 0.8125rem;
    }

    .floating-input label {
        left: 0.625rem;
        font-size: 0.8125rem;
    }

    .floating-input input:focus ~ label,
    .floating-input input:not(:placeholder-shown) ~ label {
        font-size: 0.65rem;
    }

    .checkbox {
        font-size: 0.8125rem;
    }

    .security-note {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-icons img {
        height: 20px;
    }
}

@media (max-width: 896px) and (orientation: landscape) {
    .container {
        padding: 0.75rem;
    }

    .checkout-container {
        gap: 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (hover: none) and (pointer: coarse) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    button {
        min-height: 44px;
    }

    .floating-input input {
        min-height: 52px;
    }

    .checkbox {
        padding: 0.5rem 0;
    }

    .checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .checkout-container {
        gap: 3rem;
    }
}

@media (min-width: 581px) {
    .checkout-container {
        grid-template-columns: 1fr 340px;
        gap: 2rem;
    }

    .form-section {
        padding: 2rem;
        border-radius: 0.5rem;
        background-color: white;
    }

    .order-summary {
        border-radius: 0.5rem;
        padding: 1.5rem;
        position: sticky;
        top: 1rem;
    }

    .name-fields {
        grid-template-columns: 1fr 1fr;
    }

    .product {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .product-info {
        justify-content: space-between;
        text-align: left;
    }

    .container {
        padding: 2rem;
        background-color: var(--background-color);
    }

    .complete-purchase {
        max-width: 300px;
        margin: 2rem auto 1rem;
    }
}

@media (min-width: 1024px) {
    .checkout-container {
        gap: 3rem;
    }

    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Payment Method Box - Redirect Style */
.payment-method-box {
    border-radius: 0.375rem;
    overflow: hidden;
    background-color: white;
}

.payment-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f0f5ff;
    border: 1px solid #1773b0;
    border-radius: 0.375rem 0.375rem 0 0;
}

.payment-method-label {
    font-size: 0.875rem;
    color: var(--text-color);
}

.more-cards {
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

.payment-redirect-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    background-color: #f3f4f6;
}

.redirect-icon {
    width: 80px;
    height: auto;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.redirect-text {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 280px;
}

/* RTL (Right-to-Left) Support for Arabic */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] * {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] select {
    background-position: left 10px center;
    padding-left: 2rem;
    padding-right: 0.75rem;
}

[dir="rtl"] .checkbox {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .shipping-option {
    flex-direction: row-reverse;
}

[dir="rtl"] .shipping-option-content {
    text-align: right;
}

[dir="rtl"] .shipping-option-text {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-icons {
    flex-direction: row-reverse;
}

[dir="rtl"] .product {
    flex-direction: row-reverse;
}

[dir="rtl"] .product-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .product-details {
    align-items: flex-end;
}

[dir="rtl"] .product-prices {
    align-items: flex-start;
}

[dir="rtl"] .quantity {
    right: auto;
    left: -0.5rem;
}

[dir="rtl"] .price-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .summary > div {
    flex-direction: row-reverse;
}

[dir="rtl"] .summary-preview {
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-cart {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .spinner {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .name-fields {
    direction: rtl;
}

.logo {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.logo img {
    height: 64px;
    width: auto;
    cursor: pointer;
}

@media (max-width: 580px) {
    .logo img {
        height: 48px;
    }
}

.payment {
    border-radius: 0.5rem;
    margin: 2rem 0;
}

@media (max-width: 580px) {
    .payment {
        border-radius: 0;
    }

    .payment-forms {
        margin: 1.5rem 0;
        border-radius: 0.375rem;
    }
}

/* Inline Order Summary */
.inline-order-summary {
    margin-top: 2rem;
}

.inline-summary-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

.inline-product {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.inline-product-image {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: #f3f4f6;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.inline-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.inline-quantity {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #5a5a5a;
    color: white;
    min-width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
}

.inline-product-prices {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.inline-product-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.inline-product-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-color);
}

.inline-product-variant {
    color: #6b7280;
    font-size: 0.8125rem;
}

.inline-original-price {
    color: #9CA3AF;
    text-decoration: line-through;
    font-size: 0.8125rem;
}

.inline-sale-price {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-color);
}

.inline-summary-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inline-subtotal,
.inline-shipping {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-color);
}

.inline-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.inline-total-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.inline-currency {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
}

.inline-total-amount {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Footer Divider */
.footer-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1.5rem 0;
}

/* Footer Links */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-link {
    color: #1773b0;
    text-decoration: underline;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: #135a8a;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    padding: 2rem;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: var(--text-color);
}

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.modal-body {
    color: var(--text-color);
    font-size: 0.875rem;
    line-height: 1.7;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-loading {
    color: #6b7280;
    text-align: center;
    padding: 2rem 0;
}

/* RTL support for inline order summary */
[dir="rtl"] .inline-product {
    flex-direction: row-reverse;
}

[dir="rtl"] .inline-product-details {
    align-items: flex-end;
}

[dir="rtl"] .inline-product-prices {
    position: absolute;
    left: 0;
    top: 0;
    align-items: flex-start;
}

[dir="rtl"] .inline-quantity {
    right: auto;
    left: -0.5rem;
}

[dir="rtl"] .inline-subtotal,
[dir="rtl"] .inline-shipping,
[dir="rtl"] .inline-total {
    flex-direction: row-reverse;
}

[dir="rtl"] .inline-total-price {
    flex-direction: row-reverse;
}

[dir="rtl"] .modal-close {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .modal-content h2 {
    padding-right: 0;
    padding-left: 2rem;
}

@media (max-width: 580px) {
    .inline-order-summary {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }

    .inline-product-image {
        width: 56px;
        height: 56px;
    }

    .footer-links {
        gap: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        max-height: 85vh;
    }
}
