/**
 * Affiliate Forms Pro - Стили формы
 * Version: 3.3.0
 * 
 * КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ:
 * - Боковая прокрутка на мобильных (полный сброс)
 * - Размеры SVG иконок (жёсткие ограничения через атрибуты)
 * - Кэширование Cloudflare (версия по filemtime)
 */

/* ========================================
   КРИТИЧЕСКИЙ СБРОС - ПРЕДОТВРАЩЕНИЕ СКРОЛЛА
   ======================================== */
html {
    overflow-x: hidden !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    min-width: 0 !important;
    position: relative;
}

/* Сброс для всей страницы */
*, *::before, *::after {
    box-sizing: border-box !important;
}

/* ========================================
   RESET & BOX-SIZING
   ======================================== */
.afp-section,
.afp-section *,
.afp-section *::before,
.afp-section *::after,
.afp-modal-overlay,
.afp-modal-overlay *,
.afp-modal-overlay *::before,
.afp-modal-overlay *::after {
    box-sizing: border-box !important;
    max-width: 100%;
}

/* КРИТИЧНО: Фиксация всех SVG иконок */
.afp-section svg,
.afp-modal-overlay svg {
    flex-shrink: 0 !important;
    overflow: visible;
}

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --afp-primary: #ff7a18;
    --afp-primary-dark: #e56a0f;
    --afp-primary-light: #ffb366;
    --afp-accent: #ff3e00;
    --afp-text: #111827;
    --afp-text-muted: #6b7280;
    --afp-text-light: #9ca3af;
    --afp-bg: #ffffff;
    --afp-bg-secondary: #f9fafb;
    --afp-bg-glass: rgba(255, 255, 255, 0.92);
    --afp-bg-glass-strong: rgba(255, 255, 255, 0.96);
    --afp-border: rgba(17, 24, 39, 0.08);
    --afp-border-hover: rgba(17, 24, 39, 0.15);
    --afp-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    --afp-shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.06);
    --afp-shadow-btn: 0 8px 24px rgba(255, 62, 0, 0.3);
    --afp-shadow-btn-hover: 0 12px 32px rgba(255, 62, 0, 0.4);
    --afp-radius-xs: 8px;
    --afp-radius-sm: 10px;
    --afp-radius-md: 12px;
    --afp-radius-lg: 16px;
    --afp-radius-xl: 20px;
    --afp-radius-full: 9999px;
    --afp-section-padding: 32px;
    --afp-gap: 28px;
    --afp-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --afp-transition: 0.2s ease;
    --afp-transition-slow: 0.3s ease;
}

/* ========================================
   Main Section
   ======================================== */
.afp-section {
    width: 100%;
    max-width: 1200px;
    margin: 24px auto;
    padding: var(--afp-section-padding);
    border-radius: var(--afp-radius-xl);
    border: 1px solid var(--afp-border);
    box-shadow: var(--afp-shadow);
    backdrop-filter: blur(8px);
    color: var(--afp-text);
    font-family: var(--afp-font);
    overflow: hidden !important;
    overflow-x: hidden !important;
    position: relative;
}

/* ========================================
   Title
   ======================================== */
.afp-title {
    text-align: center;
    font-size: clamp(22px, 4vw, 36px);
    margin: 0 0 20px 0;
    padding: 0 16px;
    font-weight: 800;
    color: var(--afp-text);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* ========================================
   Benefits
   ======================================== */
.afp-benefits-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 24px 0;
    padding: 0 8px;
}

.afp-benefit-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--afp-bg-glass);
    border: 1px solid var(--afp-border);
    border-radius: var(--afp-radius-full);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--afp-text);
    box-shadow: var(--afp-shadow-soft);
    transition: transform var(--afp-transition), box-shadow var(--afp-transition);
    white-space: nowrap;
}

.afp-benefit-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.afp-benefit-icon {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    color: var(--afp-primary);
    flex-shrink: 0;
}

/* ========================================
   Stock Counter
   ======================================== */
.afp-stock-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 24px 0;
    padding: 14px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--afp-radius-md);
    animation: afp-pulse-gentle 2s ease-in-out infinite;
}

.afp-stock-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    color: #d97706;
    flex-shrink: 0;
}

.afp-stock-text {
    font-size: 15px;
    font-weight: 600;
    color: #92400e;
}

.afp-stock-number {
    font-weight: 800;
    color: #b45309;
    font-size: 17px;
}

@keyframes afp-pulse-gentle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.005); }
}

/* ========================================
   Grid Layout - 50/50 РАВНЫЕ КОЛОНКИ
   ======================================== */
.afp-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: var(--afp-gap);
    width: 100%;
}

/* ========================================
   Product Column
   ======================================== */
.afp-product-col {
    background: var(--afp-bg);
    border: 1px solid var(--afp-border);
    border-radius: var(--afp-radius-xl);
    padding: 24px;
    box-shadow: var(--afp-shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.afp-product-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.afp-product-image {
    border-radius: var(--afp-radius-lg);
    max-width: 100%;
    max-height: 380px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    animation: afp-float 6s ease-in-out infinite;
    will-change: transform, filter;
}

@media (prefers-reduced-motion: reduce) {
    .afp-product-image {
        animation: none;
    }
}

@keyframes afp-float {
    0%   { transform: translateY(0); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.1)); }
    50%  { transform: translateY(-6px); filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.13)); }
    100% { transform: translateY(0); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.1)); }
}

/* ========================================
   Form Column
   ======================================== */
.afp-form-col {
    width: 100%;
}

.afp-form-box {
    background: var(--afp-bg-glass-strong);
    border: 1px solid var(--afp-border);
    border-radius: var(--afp-radius-xl);
    padding: 28px;
    box-shadow: var(--afp-shadow);
    width: 100%;
    min-height: 100%;
}

/* ========================================
   Price Line
   ======================================== */
.afp-price-line {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    margin: 0 0 20px;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--afp-radius-full);
    background: var(--afp-bg);
    border: 1px solid var(--afp-border);
    box-shadow: var(--afp-shadow-soft);
}

.afp-old-price {
    text-decoration: line-through;
    color: var(--afp-text-light);
    font-weight: 600;
    font-size: 15px;
}

.afp-price-arrow {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    color: var(--afp-text-muted);
    flex-shrink: 0;
}

.afp-new-price {
    color: #dc2626;
    font-weight: 900;
    font-size: clamp(20px, 3vw, 26px);
    letter-spacing: -0.02em;
}

/* ========================================
   Form Fields
   ======================================== */
.afp-order-form {
    width: 100%;
}

.afp-field-group {
    margin-bottom: 16px;
}

.afp-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--afp-text);
    font-size: 14px;
}

.afp-input-wrapper {
    position: relative;
    width: 100%;
}

.afp-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    color: var(--afp-text-muted);
    pointer-events: none;
    transition: color var(--afp-transition);
    z-index: 1;
    flex-shrink: 0;
}

.afp-input {
    width: 100%;
    padding: 14px 14px 14px 46px;
    border: 2px solid #e5e7eb;
    border-radius: var(--afp-radius-md);
    font-size: 16px;
    font-family: var(--afp-font);
    background: var(--afp-bg);
    color: var(--afp-text);
    transition: border-color var(--afp-transition), box-shadow var(--afp-transition), background var(--afp-transition);
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.afp-input::placeholder {
    color: var(--afp-text-light);
}

.afp-input:hover {
    border-color: #d1d5db;
}

.afp-input:focus {
    outline: none;
    border-color: var(--afp-primary);
    box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.12);
    background: #fff;
}

.afp-input:focus + .afp-input-icon,
.afp-input-wrapper:focus-within .afp-input-icon {
    color: var(--afp-primary);
}

/* ========================================
   Submit Button
   ======================================== */
.afp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 20px;
    background: linear-gradient(180deg, var(--afp-primary), var(--afp-accent));
    border: none;
    border-radius: var(--afp-radius-lg);
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: 800;
    font-family: var(--afp-font);
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    transition: transform var(--afp-transition), filter var(--afp-transition), box-shadow var(--afp-transition);
    text-transform: uppercase;
    box-shadow: var(--afp-shadow-btn);
    position: relative;
    overflow: hidden;
}

.afp-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, transparent 50%, rgba(0, 0, 0, 0.08) 100%);
    pointer-events: none;
}

.afp-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: var(--afp-shadow-btn-hover);
}

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

.afp-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.afp-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.afp-spinner {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    animation: afp-spin 1s linear infinite;
}

@keyframes afp-spin {
    100% { transform: rotate(360deg); }
}

/* ========================================
   Trust Badges - КОМПАКТНЫЕ, ТЕКСТ ВИДЕН
   ======================================== */
.afp-trust-badges {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: var(--afp-radius-sm);
    flex-wrap: wrap;
}

.afp-trust-badge {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    text-align: left;
    padding: 4px 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.afp-trust-badge-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    color: #16a34a;
    flex-shrink: 0;
}

.afp-trust-badge-icon svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
}

.afp-trust-badge-text {
    font-size: 11px;
    font-weight: 600;
    color: #166534;
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ========================================
   Social Proof
   ======================================== */
.afp-social-proof {
    margin-top: 20px;
    padding: 16px;
    background: var(--afp-bg);
    border: 1px solid var(--afp-border);
    border-radius: var(--afp-radius-md);
    box-shadow: var(--afp-shadow-soft);
    text-align: center;
}

.afp-social-proof-text {
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--afp-text);
    font-size: 14px;
    line-height: 1.4;
}

.afp-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.afp-stars svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    color: #fbbf24;
    flex-shrink: 0;
}

/* ========================================
   Secure Row
   ======================================== */
.afp-secure-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--afp-text-muted);
}

.afp-secure-row span {
    font-weight: 500;
}

.afp-secure-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    color: #22c55e;
    flex-shrink: 0;
}

/* ========================================
   Modal - БЕЗ ОВЕРЛЕЯ, КРАСИВАЯ АНИМАЦИЯ
   ======================================== */
.afp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: transparent;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
}

.afp-modal-overlay.afp-modal-open {
    display: flex;
}

body.afp-modal-active {
    /* Не блокируем скролл */
}

.afp-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 28px;
    border-radius: var(--afp-radius-xl);
    background: var(--afp-bg);
    border: 1px solid var(--afp-border);
    box-shadow: 0 25px 80px -12px rgba(0, 0, 0, 0.35), 0 10px 40px -10px rgba(0, 0, 0, 0.2);
    animation: afp-modal-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    isolation: isolate;
    z-index: 1;
    pointer-events: auto;
}

.afp-modal-form {
    position: relative;
    z-index: 2;
}

.afp-modal-form .afp-field-group {
    position: relative;
    z-index: 3;
}

.afp-modal-form .afp-input-wrapper {
    position: relative;
    z-index: 4;
}

.afp-modal-form .afp-input {
    position: relative;
    z-index: 5;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.afp-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--afp-bg-secondary);
    border: 1px solid var(--afp-border);
    border-radius: var(--afp-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--afp-transition), background var(--afp-transition);
    box-shadow: var(--afp-shadow-soft);
    z-index: 10;
}

.afp-modal-close svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    color: var(--afp-text);
    flex-shrink: 0;
}

.afp-modal-close:hover {
    transform: rotate(90deg);
    background: #fee2e2;
}

.afp-modal-close:hover svg {
    color: #dc2626;
}

.afp-modal-title {
    text-align: center;
    font-size: clamp(18px, 3vw, 24px);
    margin: 0 0 20px 0;
    font-weight: 800;
    color: var(--afp-text);
    padding-right: 40px;
}

.afp-modal-product {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.afp-modal-product-image {
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--afp-radius-md);
}

.afp-modal-price {
    margin-bottom: 20px;
}

.afp-modal-secure {
    margin-top: 16px;
}

.afp-modal-trust-badges {
    margin-top: 16px;
}

@keyframes afp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes afp-scale-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes afp-modal-slide-up {
    0% { opacity: 0; transform: translateY(60px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========================================
   Themes
   ======================================== */
.afp-theme-modern { }

.afp-theme-minimal {
    background: #ffffff !important;
    border-color: #e5e7eb;
}

.afp-theme-minimal .afp-product-col,
.afp-theme-minimal .afp-form-box {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.afp-theme-bold .afp-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.afp-theme-bold .afp-btn:hover {
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.afp-theme-bold .afp-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.afp-theme-dark {
    background: linear-gradient(135deg, #1f2937, #111827) !important;
    color: #f9fafb;
}

.afp-theme-dark .afp-title { color: #f9fafb; }

.afp-theme-dark .afp-product-col,
.afp-theme-dark .afp-form-box {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

.afp-theme-dark .afp-label { color: #e5e7eb; }

.afp-theme-dark .afp-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.afp-theme-dark .afp-input::placeholder { color: #9ca3af; }

.afp-theme-dark .afp-social-proof {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

.afp-theme-dark .afp-social-proof-text { color: #e5e7eb; }

.afp-theme-dark .afp-benefit-box {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.afp-theme-dark .afp-trust-badges {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.afp-theme-dark .afp-trust-badge-icon { color: #34d399; }

.afp-theme-dark .afp-trust-badge-text { color: #a7f3d0; }

.afp-theme-dark .afp-stock-counter {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    border-color: rgba(251, 191, 36, 0.4);
}

.afp-theme-dark .afp-stock-text,
.afp-theme-dark .afp-stock-number { color: #fcd34d; }

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */
@media (min-width: 1201px) {
    .afp-section { padding: 40px; }
    .afp-horizontal { gap: 32px; }
    .afp-form-box { padding: 32px; }
}

@media (max-width: 1200px) and (min-width: 921px) {
    .afp-section { padding: 32px; margin: 20px auto; }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 920px) {
    .afp-section {
        padding: 24px 20px;
        margin: 16px;
        max-width: calc(100% - 32px);
        width: calc(100% - 32px);
    }
    
    .afp-horizontal {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .afp-product-col { order: 1; min-height: 220px; padding: 20px; }
    .afp-form-col { order: 2; }
    .afp-product-image { max-height: 280px; }
    .afp-form-box { padding: 24px 20px; }
    
    .afp-trust-badges { 
        gap: 6px; 
        padding: 10px;
        flex-wrap: wrap;
    }
    .afp-trust-badge { 
        padding: 4px; 
        gap: 4px;
        flex: 1 1 calc(33% - 8px);
        min-width: calc(33% - 8px);
    }
    .afp-trust-badge-icon,
    .afp-trust-badge-icon svg { 
        width: 16px !important; 
        height: 16px !important; 
        min-width: 16px !important; 
        max-width: 16px !important;
        min-height: 16px !important; 
        max-height: 16px !important;
    }
    .afp-trust-badge-text { font-size: 10px; }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .afp-section {
        margin: 12px;
        padding: 20px 16px;
        max-width: calc(100% - 24px);
        width: calc(100% - 24px);
        border-radius: var(--afp-radius-lg);
        overflow: hidden !important;
    }
    
    .afp-title { font-size: 20px; margin-bottom: 16px; padding: 0 8px; }
    .afp-benefits-wrapper { gap: 8px; margin-bottom: 16px; padding: 0; }
    .afp-benefit-box { font-size: 12px; padding: 8px 12px; }
    
    .afp-benefit-icon {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        max-width: 14px !important;
        min-height: 14px !important;
        max-height: 14px !important;
    }
    
    .afp-stock-counter { padding: 12px 16px; margin-bottom: 16px; gap: 8px; }
    .afp-stock-icon { 
        width: 20px !important; 
        height: 20px !important; 
        min-width: 20px !important; 
        max-width: 20px !important;
        min-height: 20px !important; 
        max-height: 20px !important;
    }
    .afp-stock-text { font-size: 14px; }
    .afp-stock-number { font-size: 15px; }
    .afp-product-col { padding: 16px; min-height: 180px; }
    .afp-product-image { max-height: 200px; }
    .afp-form-box { padding: 20px 16px; }
    .afp-price-line { padding: 12px 14px; gap: 10px; margin-bottom: 16px; }
    .afp-old-price { font-size: 14px; }
    .afp-new-price { font-size: 18px; }
    .afp-input { padding: 12px 12px 12px 42px; font-size: 16px; /* Предотвращает зум на iOS */ }
    .afp-input-icon { 
        width: 18px !important; 
        height: 18px !important; 
        min-width: 18px !important; 
        max-width: 18px !important;
        min-height: 18px !important; 
        max-height: 18px !important;
        left: 12px; 
    }
    .afp-btn { padding: 14px 20px; font-size: 15px; margin-top: 16px; }
    
    .afp-trust-badges {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 8px;
        margin-top: 12px;
    }
    
    .afp-trust-badge {
        padding: 4px 6px;
        gap: 4px;
        flex: 1 1 calc(33% - 8px);
        min-width: 0;
    }
    
    .afp-trust-badge-icon,
    .afp-trust-badge-icon svg {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        max-width: 14px !important;
        min-height: 14px !important;
        max-height: 14px !important;
    }
    
    .afp-trust-badge-text { 
        font-size: 9px; 
        white-space: normal;
        line-height: 1.2;
    }
    .afp-social-proof { padding: 12px; margin-top: 16px; }
    .afp-social-proof-text { font-size: 13px; }
    .afp-stars svg { 
        width: 18px !important; 
        height: 18px !important; 
        min-width: 18px !important; 
        max-width: 18px !important;
        min-height: 18px !important; 
        max-height: 18px !important;
    }
    .afp-secure-row { margin-top: 12px; font-size: 12px; }
    .afp-secure-icon { 
        width: 16px !important; 
        height: 16px !important; 
        min-width: 16px !important; 
        max-width: 16px !important;
        min-height: 16px !important; 
        max-height: 16px !important;
    }
    
    .afp-modal-overlay { padding: 12px; }
    .afp-modal-content { padding: 20px 16px; max-height: 88vh; }
    .afp-modal-close { width: 36px; height: 36px; top: 12px; right: 12px; }
    .afp-modal-close svg { 
        width: 18px !important; 
        height: 18px !important; 
        min-width: 18px !important; 
        max-width: 18px !important;
        min-height: 18px !important; 
        max-height: 18px !important;
    }
    .afp-modal-title { font-size: 18px; padding-right: 36px; }
    .afp-modal-product-image { max-width: 130px; max-height: 130px; }
    .afp-modal-trust-badges .afp-trust-badges { flex-wrap: wrap; }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE
   ======================================== */
@media (max-width: 400px) {
    .afp-section { 
        margin: 8px; 
        padding: 16px 12px; 
        max-width: calc(100% - 16px); 
        width: calc(100% - 16px);
    }
    .afp-title { font-size: 18px; padding: 0 4px; }
    .afp-benefit-box { font-size: 11px; padding: 6px 10px; }
    .afp-benefit-icon {
        width: 12px !important;
        height: 12px !important;
        min-width: 12px !important;
        max-width: 12px !important;
        min-height: 12px !important;
        max-height: 12px !important;
    }
    .afp-product-col { min-height: 150px; padding: 12px; }
    .afp-product-image { max-height: 160px; }
    .afp-form-box { padding: 16px 12px; }
    .afp-btn { padding: 12px 16px; font-size: 14px; }
    
    .afp-trust-badges { flex-wrap: wrap; gap: 4px; padding: 8px 6px; }
    .afp-trust-badge { 
        padding: 3px 5px; 
        gap: 3px; 
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
    }
    .afp-trust-badge-icon,
    .afp-trust-badge-icon svg { 
        width: 12px !important; 
        height: 12px !important;
        min-width: 12px !important;
        max-width: 12px !important;
        min-height: 12px !important;
        max-height: 12px !important;
    }
    .afp-trust-badge-text { font-size: 8px; white-space: normal; line-height: 1.2; }
    .afp-stock-counter { padding: 10px 12px; }
    .afp-stock-icon {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        min-height: 18px !important;
        max-height: 18px !important;
    }
    .afp-stock-text { font-size: 13px; }
}

/* ========================================
   Error & Success States
   ======================================== */
.afp-input.afp-error {
    border-color: #dc2626;
    animation: afp-shake 0.4s ease;
}

.afp-input.afp-error:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

@keyframes afp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.afp-btn.afp-success {
    background: linear-gradient(180deg, #22c55e, #16a34a);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

/* ========================================
   Print & Utility
   ======================================== */
@media print {
    .afp-modal-overlay { display: none !important; }
    .afp-section { box-shadow: none; border: 1px solid #e5e7eb; }
}

.afp-hidden { display: none !important; }
