

@media (max-width: 767px) {
    .flat-mobile-page {
        background: #ffffff !important;
    }

    .flat-mobile-page main.py-14,
    .flat-mobile-page section.py-16 {
        padding-top: 0.75rem !important;
        padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    }

    .flat-mobile-page .max-w-5xl.mx-auto.px-4.sm\:px-6.lg\:px-8.space-y-6,
    .flat-mobile-page .max-w-4xl.mx-auto.px-4.sm\:px-6.lg\:px-8.space-y-8 {
        row-gap: 0 !important;
    }

    .flat-mobile-page .bg-white.rounded-2xl.border.border-gray-200.p-7,
    .flat-mobile-page .bg-white.rounded-xl.p-8.border.border-gray-200,
    .flat-mobile-page .bg-blue-50.rounded-xl.p-8.border.border-blue-200 {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 1rem 0 !important;
        border-top: 1px solid #e2e8f0 !important;
    }

    .flat-mobile-page .max-w-5xl > .bg-white.rounded-2xl.border.border-gray-200.p-7:first-child,
    .flat-mobile-page .max-w-4xl > .bg-white.rounded-xl.p-8.border.border-gray-200:first-child,
    .flat-mobile-page .max-w-4xl > .bg-blue-50.rounded-xl.p-8.border.border-blue-200:first-child {
        border-top: 0 !important;
        padding-top: 0.25rem !important;
    }

    .checkout-page {
        overflow-x: clip;
    }

    .checkout-page > section {
        background: #ffffff;
        padding-top: 0 !important;
        padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    }

    .checkout-page > section .max-w-7xl {
        padding-left: 0.875rem !important;
        padding-right: 0.875rem !important;
    }

    .checkout-page .grid.gap-8 {
        gap: 0 !important;
    }

    .checkout-steps-wrap .max-w-7xl {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        padding-left: 0.875rem !important;
        padding-right: 0.875rem !important;
    }

    .checkout-steps {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.28rem;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
    }

    .checkout-step {
        width: 100%;
        flex: 0 0 auto;
        min-width: 0;
        flex-direction: row;
        justify-content: center;
        gap: 0.28rem;
        min-height: 1.85rem;
        padding: 0.18rem 0.08rem;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .checkout-step-number {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.8125rem;
    }

    .checkout-step-text {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        font-size: clamp(0.8125rem, 2.55vw, 0.8125rem);
        line-height: 1;
    }

    .checkout-step-line {
        display: none;
    }

    .checkout-surface-card,
    .checkout-summary {
        border-radius: 0.95rem;
    }

    .checkout-step-active {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    .checkout-main-card {
        width: 100%;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }

    .checkout-step-panel {
        padding: 0.9rem;
    }

    .checkout-feedback {
        top: 4.75rem;
        width: min(calc(100% - 1rem), 30rem);
        padding: 0.75rem 0.875rem !important;
        line-height: 1.45;
    }

    .checkout-panel-heading {
        margin-bottom: 1rem;
    }

    .checkout-panel-kicker {
        margin-bottom: 0.5rem;
        font-size: 0.8125rem;
    }

    .checkout-step-badge {
        width: 1.35rem;
        height: 1.35rem;
        font-size: 0.8125rem;
    }

    .checkout-main-card .app-section-title,
    .checkout-surface-card .app-section-title {
        font-size: 1rem !important;
        line-height: 1.25;
    }

    .checkout-step-panel .app-section-subtitle {
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    .checkout-form-section {
        padding-top: 1rem;
    }

    .checkout-form-section-optional {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .checkout-step-panel .grid {
        gap: 0.75rem !important;
    }

    .checkout-step-panel .mt-4 {
        margin-top: 0.85rem !important;
    }

    .checkout-same-address,
    .checkout-consent-card,
    .checkout-payment-intro {
        border-radius: 0.75rem;
        padding: 0.72rem 0.78rem;
    }

    .checkout-same-address {
        margin-bottom: 1rem;
    }

    .checkout-same-address span,
    .checkout-consent-card {
        font-size: 0.84rem;
    }

    .checkout-same-address small {
        font-size: 0.8125rem;
    }

    .checkout-payment-intro {
        gap: 0.75rem;
    }

    .checkout-consent-stack {
        gap: 0.6rem;
        margin-top: 1rem;
    }

    .checkout-panel-actions {
        gap: 0.6rem;
        margin-top: 1rem;
    }

    .checkout-panel-actions,
    .checkout-panel-actions-between {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .checkout-next-btn,
    .checkout-secondary-btn,
    .checkout-place-order-btn {
        width: 100%;
        min-height: 2.65rem;
        border-radius: 0.7rem;
        font-size: 0.9rem;
    }

    .checkout-place-order-btn {
        height: auto !important;
        min-height: 2.65rem !important;
        padding: 0 1rem !important;
        line-height: 1 !important;
        border-radius: 0.7rem !important;
        border-color: #0f172a !important;
        box-shadow: none !important;
    }

    .checkout-payment-copy {
        align-items: flex-start;
        gap: 0.55rem;
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .checkout-payment-methods {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .checkout-method-pill {
        justify-content: center;
        padding-inline: 0.45rem;
        min-height: 2rem;
        font-size: 0.8125rem;
        gap: 0.25rem;
    }

    .checkout-method-pill i {
        width: 0.9rem;
        height: 0.9rem;
    }

    .checkout-embed-shell {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .checkout-embed-actions {
        position: fixed;
        top: auto;
        left: max(0.75rem, env(safe-area-inset-left));
        right: max(0.75rem, env(safe-area-inset-right));
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        justify-content: center;
    }

    .checkout-embed-back-btn {
        width: 100%;
        min-height: 2.9rem;
        padding: 0 1rem;
        border-radius: 0.95rem;
        background: rgba(255, 255, 255, 0.96);
        border-color: #cbd5e1;
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
        backdrop-filter: blur(10px);
    }

    .checkout-embed-container {
        border-radius: 0.75rem;
    }

    .checkout-embed-container-ready {
        min-height: 28rem;
    }

    .checkout-summary {
        position: static !important;
        padding: 0.9rem !important;
    }

    .checkout-summary h2 {
        margin-bottom: 0.25rem !important;
        font-size: 1rem !important;
        line-height: 1.25;
    }

    .checkout-summary .app-section-subtitle {
        margin-bottom: 1rem !important;
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .checkout-summary #order-items {
        gap: 0 !important;
        margin-bottom: 0.85rem !important;
    }

    .checkout-summary-item,
    .checkout-summary #order-items > div {
        gap: 0.6rem !important;
        padding: 0.65rem 0 !important;
    }

    .checkout-summary-item:first-child {
        padding-top: 0 !important;
    }

    .checkout-summary-item:last-child {
        padding-bottom: 0 !important;
    }

    .checkout-summary-item-preview,
    .checkout-summary #order-items .checkout-summary-item-preview {
        width: 3.25rem !important;
        height: 3.25rem !important;
        --design-preview-radius: 0.55rem;
    }

    .checkout-summary-item-body {
        align-items: flex-start;
        gap: 0.55rem;
    }

    .checkout-summary-item-main h4 {
        font-size: 0.84rem;
        line-height: 1.22;
    }

    .checkout-summary-item-meta {
        gap: 0.1rem;
        margin-top: 0.25rem;
        font-size: 0.8125rem;
        line-height: 1.3;
    }

    .checkout-summary-item-total {
        font-size: 0.84rem;
    }

    .checkout-summary .border-t.pt-4 {
        padding-top: 0.85rem !important;
    }

    .checkout-shipping-box {
        margin-top: 1rem !important;
        padding: 0.85rem !important;
        border-radius: 0.75rem !important;
    }

    .checkout-shipping-box .text-sm {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .checkout-summary-note {
        margin-top: 0.85rem;
        font-size: 0.8125rem;
    }

    .checkout-inline-action {
        flex-direction: column;
        gap: 0.65rem;
    }

    .checkout-inline-btn {
        width: 100%;
    }

    .checkout-phone-country-btn {
        min-width: 5.2rem;
        padding-inline: 0.62rem;
    }

    .checkout-tax-field .checkout-phone-country-btn {
        min-width: 4.6rem;
    }

    .checkout-phone-flag {
        width: 1.45rem;
        height: 0.98rem;
    }

    .checkout-phone-dial {
        font-size: 0.82rem;
    }

    .checkout-phone-input.form-input {
        padding: 0.72rem 0.75rem;
    }

}

/* ===== BADGES ===== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ===== CUSTOM CHECKBOX & RADIO ===== */

.custom-checkbox,
.custom-radio {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-radio {
    border-radius: 50%;
}

.custom-checkbox:checked,
.custom-radio:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

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

/* ===== CONTACT FORM HARDENING ===== */

.privacy-consent-row #privacy.custom-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex: 0 0 20px;
    margin-top: 0.125rem;
}

.privacy-consent-row label[for="privacy"] {
    flex: 1 1 auto;
    line-height: 1.45;
}

.contact-submit-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    min-height: 3rem;
}

.contact-submit-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    line-height: 1;
    white-space: nowrap;
}

.contact-submit-label {
    display: inline-block;
    white-space: nowrap;
}

.contact-submit-btn-loading {
    cursor: wait;
}

.contact-submit-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: spin 0.75s linear infinite;
    flex: 0 0 auto;
}

/* ===== SEARCH BAR ===== */

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* ===== UTILITY CLASSES ===== */

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.pointer-events-none {
    pointer-events: none;
}

.select-none {
    user-select: none;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-30 {
    z-index: 30;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* ===== ANIMATIONS FOR PAGE TRANSITIONS ===== */

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

.page-transition {
    animation: pageSlideIn 0.4s ease-out;
}

/* ===== HOVER EFFECTS FOR LINKS ===== */

a {
    text-decoration: none;
    color: inherit;
}