/*
 * EGYPT OUTLET CALCULATOR - MODERN UI
 * Professional, sleek calculator interface with glassmorphism
 */

/* ========== CSS VARIABLES ========== */
:root {
    /* Primary Colors - Aligned with Admin Panel (Indigo) */
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #6366F1;
    --primary-dark: #3730A3;

    /* Primary Gradient - Smoother Indigo-Purple */
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --gradient-secondary: linear-gradient(135deg, #EC4899 0%, #F43F5E 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);

    /* Solid Colors - Admin Panel Aligned */
    --primary-purple: #4F46E5;
    --primary-violet: #7C3AED;
    --accent-pink: #EC4899;
    --accent-red: #EF4444;
    --success-green: #10B981;
    --success-emerald: #059669;
    --warning-amber: #F59E0B;
    --info-blue: #3B82F6;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Card Styling - Cleaner, Less Glassmorphism */
    --card-bg: #ffffff;
    --card-bg-dark: #1f2937;
    --card-border: rgba(229, 231, 235, 1);
    --card-border-dark: rgba(55, 65, 81, 1);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --card-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Legacy Glassmorphism - Reduced */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-bg-dark: rgba(31, 41, 55, 0.95);
    --glass-border: rgba(229, 231, 235, 0.5);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    /* Shadows - Cleaner, Subtle */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Focus Ring */
    --ring-primary: 0 0 0 3px rgba(79, 70, 229, 0.3);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'Cairo', 'Tajawal', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Border Radius - Consistent with Admin */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ========== BASE STYLES ========== */
.calculator-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.calculator-page {
    font-family: var(--font-sans);
    /* Subtle gradient that works with dark mode */
    background: linear-gradient(135deg, #f6f8fc 0%, #eef1f8 50%, #f3f0fc 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Dark mode - target html.dark ancestor */
html.dark .calculator-page {
    background: linear-gradient(135deg, #0f172a 0%, #1a1f35 50%, #1e1b2e 100%);
}

[dir="rtl"] .calculator-page {
    font-family: var(--font-arabic);
}

/* ========== CONTAINER & LAYOUT ========== */
.calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header with Glass Effect */
.calculator-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-2xl);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.brand-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.brand-subtitle {
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.375rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: var(--gray-600);
    text-decoration: none;
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.lang-btn:hover:not(.active) {
    background: var(--gray-100);
}

/* ========== MAIN CALCULATOR CARD ========== */
.calculator-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--card-shadow-lg);
    animation: fadeInUp 0.5s ease-out both;
}

html.dark .calculator-card {
    background: var(--card-bg-dark);
    border-color: var(--card-border-dark);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

html.dark .card-header {
    border-bottom-color: var(--gray-700);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

html.dark .card-title {
    color: var(--white);
}

/* ========== FORM ELEMENTS ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.label-icon {
    font-size: 18px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html.dark .form-input,
html.dark .form-select {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--white);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring-primary);
}

html.dark .form-input:focus,
html.dark .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.form-input::placeholder {
    color: var(--gray-400);
}

html.dark .form-input::placeholder {
    color: var(--gray-500);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 16px;
    font-weight: 600;
    pointer-events: none;
}

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

.input-with-icon .form-input {
    padding-right: 2.5rem;
}

[dir="rtl"] .input-with-icon .form-input {
    padding-right: 1rem;
    padding-left: 2.5rem;
}

/* Info Badge */
.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: var(--text-xs);
    color: var(--primary-purple);
    margin-top: 0.5rem;
}

/* Package Dimensions */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* ========== BUTTONS ========== */
.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.35);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

html.dark .btn-secondary {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

html.dark .btn-secondary:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

/* Button Group */
.button-group {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ========== RESULTS SECTION ========== */
.results-section {
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--card-shadow-lg);
    transition: box-shadow 0.2s ease;
}

html.dark .result-card {
    background: var(--card-bg-dark);
    border-color: var(--card-border-dark);
}

.result-card:hover {
    box-shadow: var(--shadow-xl);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

html.dark .result-header {
    border-bottom-color: var(--gray-700);
}

.result-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

html.dark .result-title {
    color: var(--gray-100);
}

/* Cost Breakdown Items */
.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

html.dark .breakdown-item {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

.breakdown-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

html.dark .breakdown-item:hover {
    background: var(--gray-700);
}

[dir="rtl"] .breakdown-item:hover {
    transform: translateX(-4px);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-success);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.item-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
}

html.dark .item-name {
    color: var(--gray-200);
}

.item-amount {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--primary);
}

html.dark .item-amount {
    color: var(--primary-light);
}

/* Total Section */
.total-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--gradient-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
}

.total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.total-label {
    font-size: var(--text-lg);
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.total-amount {
    text-align: right;
}

[dir="rtl"] .total-amount {
    text-align: left;
}

.amount-usd {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: white;
}

.amount-egp {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

.btn-pdf {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

/* ========== FAQ SECTION ========== */
.faq-section {
    margin-top: 3rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.faq-header {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

html.dark .faq-title {
    color: var(--gray-100);
}

.faq-subtitle {
    font-size: var(--text-base);
    color: var(--gray-600);
}

html.dark .faq-subtitle {
    color: var(--gray-400);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.faq-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
}

html.dark .faq-card {
    background: var(--card-bg-dark);
    border-color: var(--card-border-dark);
}

.faq-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

html.dark .faq-card:hover {
    border-color: var(--primary-light);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

html.dark .faq-question {
    color: var(--gray-100);
}

.faq-icon {
    font-size: 20px;
    color: var(--primary);
}

.faq-answer {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.6;
    padding-left: 2rem;
}

html.dark .faq-answer {
    color: var(--gray-400);
}

[dir="rtl"] .faq-answer {
    padding-left: 0;
    padding-right: 2rem;
}

/* ========== FOOTER ========== */
.calculator-footer {
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    color: var(--gray-600);
}

html.dark .calculator-footer {
    background: var(--gray-900);
    border-top-color: var(--gray-800);
    color: var(--gray-400);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color 0.2s ease;
}

html.dark .footer-link {
    color: var(--gray-400);
}

.footer-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

html.dark .footer-link:hover {
    color: var(--primary-light);
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

html.dark .footer-copyright {
    color: var(--gray-500);
}

/* ========== SLIDERS / HERO ========== */
.calculator-slider {
    margin-bottom: 2rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.slider-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .calculator-wrapper {
        padding: 1rem;
    }

    .calculator-header,
    .calculator-card,
    .result-card {
        border-radius: 16px;
        padding: 1.25rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-title {
        font-size: var(--text-xl);
    }

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

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

    .button-group,
    .action-buttons {
        grid-template-columns: 1fr;
    }

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

    .breakdown-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .item-info {
        flex-direction: column;
    }

    .total-row {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .total-amount {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .brand-title {
        font-size: var(--text-lg);
    }

    .card-title {
        font-size: var(--text-base);
    }

    .amount-usd {
        font-size: var(--text-xl);
    }
}

/* ========== RESPONSIVE DESIGN - MOBILE FIRST ========== */

/* Global mobile fixes */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Small mobile devices (< 480px) */
@media (max-width: 479px) {
    :root {
        --text-xs: 0.6875rem;
        --text-sm: 0.8125rem;
        --text-base: 0.9375rem;
        --text-lg: 1rem;
        --text-xl: 1.125rem;
        --text-2xl: 1.25rem;
    }

    .calculator-page {
        overflow-x: hidden;
        min-height: 100vh;
    }

    .calculator-wrapper {
        padding: 0.75rem;
    }

    .calculator-header {
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .brand-section {
        justify-content: center;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 10px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        display: none;
    }

    .language-toggle {
        width: 100%;
        justify-content: center;
    }

    .calculator-card,
    .result-card {
        border-radius: 12px;
        padding: 1rem;
    }

    .card-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        gap: 0.5rem;
    }

    .card-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-radius: 8px;
    }

    .card-title {
        font-size: 0.9375rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-label {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    .form-input,
    .form-select {
        padding: 0.75rem;
        font-size: 16px;
        /* Prevents iOS zoom */
        border-radius: 10px;
    }

    .dimensions-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .button-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .btn-whatsapp,
    .btn-pdf {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .breakdown-item {
        padding: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .item-info {
        width: 100%;
    }

    .item-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .item-amount {
        width: 100%;
        text-align: right;
    }

    [dir="rtl"] .item-amount {
        text-align: left;
    }

    .total-section {
        padding: 1rem;
        border-radius: 12px;
    }

    .total-row {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .total-amount {
        text-align: center;
    }

    .amount-usd {
        font-size: 1.25rem;
    }

    .amount-egp {
        font-size: 0.875rem;
    }

    .faq-section {
        margin-top: 1.5rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .faq-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .faq-question {
        font-size: 0.8125rem;
    }

    .faq-answer {
        font-size: 0.6875rem;
        padding-left: 1.5rem;
    }

    [dir="rtl"] .faq-answer {
        padding-right: 1.5rem;
        padding-left: 0;
    }

    .calculator-footer {
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-copyright {
        font-size: 0.75rem;
    }

    /* Calculator slider */
    .calculator-slider {
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    /* Swiper improvements */
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px !important;
        height: 30px !important;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px !important;
    }

    /* Fix for long form labels */
    .form-group .flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Weight quick select */
    .weight-quick-select {
        flex-wrap: wrap;
    }

    .weight-quick-select button {
        flex: 1 1 auto;
        min-width: 60px;
    }

    /* Info text */
    .info-badge {
        font-size: 0.625rem;
        padding: 0.375rem 0.5rem;
    }
}

/* Tablets and small laptops (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
    .calculator-wrapper {
        padding: 1rem;
    }

    .calculator-header,
    .calculator-card,
    .result-card {
        border-radius: 16px;
        padding: 1.25rem;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .brand-title {
        font-size: var(--text-xl);
    }

    .brand-subtitle {
        display: block;
    }

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

    .dimensions-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .button-group {
        grid-template-columns: 2fr 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }

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

    .breakdown-item {
        flex-direction: row;
    }

    .item-info {
        width: auto;
    }

    .item-amount {
        width: auto;
    }

    .total-row {
        flex-direction: row;
    }

    .total-amount {
        text-align: right;
    }

    [dir="rtl"] .total-amount {
        text-align: left;
    }
}

/* Medium devices (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1023px) {
    .calculator-wrapper {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (1024px+) */
@media (min-width: 1024px) {
    .calculator-wrapper {
        padding: 2rem;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== LOADING STATE ========== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* ========== PRINT STYLES ========== */
@media print {
    .calculator-page {
        background: white;
    }

    .calculator-header,
    .language-toggle,
    .button-group,
    .action-buttons,
    .faq-section,
    .calculator-footer {
        display: none;
    }

    .calculator-card,
    .result-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}