/* WooCommerce Credit Packages - Beautiful Card Design */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --wcp-primary: #667eea;
    --wcp-primary-dark: #5a67d8;
    --wcp-secondary: #48bb78;
    --wcp-secondary-dark: #38a169;
    --wcp-danger: #f56565;
    --wcp-warning: #ed8936;
    --wcp-info: #4299e1;
    --wcp-gray-50: #f7fafc;
    --wcp-gray-100: #edf2f7;
    --wcp-gray-200: #e2e8f0;
    --wcp-gray-300: #cbd5e0;
    --wcp-gray-600: #718096;
    --wcp-gray-700: #4a5568;
    --wcp-gray-800: #2d3748;
    --wcp-gray-900: #1a202c;
    --wcp-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wcp-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --wcp-radius: 20px;
}

* {
    box-sizing: border-box;
}

body,
.wcp-package-selector,
.wcp-package-selector * {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.wcp-package-selector {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    direction: rtl;
}

.wcp-title {
    text-align: center;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    margin: 0 0 48px 0;
    color: var(--wcp-gray-900);
    position: relative;
    padding-bottom: 20px;
}

.wcp-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--wcp-primary), var(--wcp-secondary));
    border-radius: 3px;
}

/* Steps */
.wcp-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcp-step-active {
    display: block;
}

.wcp-step h3 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin: 0 0 40px 0;
    color: var(--wcp-gray-800);
    text-align: center;
}

/* Package Cards Grid */
.wcp-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin-bottom: 50px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.wcp-package-card {
    background: white;
    border-radius: var(--wcp-radius);
    overflow: hidden;
    box-shadow: var(--wcp-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    border: 3px solid transparent;
}

.wcp-package-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--wcp-primary) 0%, var(--wcp-secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.wcp-package-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--wcp-shadow-lg);
}

.wcp-package-card:hover::before {
    opacity: 0.05;
}

.wcp-package-card.selected {
    border-color: var(--wcp-primary);
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 50px -12px rgba(102, 126, 234, 0.35);
}

.wcp-package-card.selected::after {
    content: '✓';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--wcp-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: checkBounce 0.5s ease;
}

@keyframes checkBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.wcp-package-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.wcp-package-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wcp-package-card:hover .wcp-package-image img {
    transform: scale(1.1) rotate(2deg);
}

.wcp-package-info {
    padding: 28px;
    position: relative;
    z-index: 1;
}

.wcp-package-info h4 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--wcp-gray-900);
}

.wcp-package-description {
    color: var(--wcp-gray-600);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
    min-height: 48px;
}

.wcp-package-price,
.wcp-package-credit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.wcp-package-price {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-right: 4px solid var(--wcp-danger);
}

.wcp-package-credit {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-right: 4px solid var(--wcp-secondary);
}

.wcp-price-label,
.wcp-credit-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--wcp-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcp-price-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--wcp-danger);
    direction: ltr;
}

.wcp-credit-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--wcp-secondary);
    direction: ltr;
}

.wcp-select-package {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--wcp-primary) 0%, var(--wcp-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 20px;
}

.wcp-select-package:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.wcp-select-package:active {
    transform: translateY(0);
}


/* Credit Bar */
.wcp-credit-bar {
    background: linear-gradient(135deg, var(--wcp-primary) 0%, var(--wcp-primary-dark) 100%);
    color: white;
    padding: 32px;
    border-radius: var(--wcp-radius);
    box-shadow: var(--wcp-shadow-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 40px 0;
}

.wcp-credit-bar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* Desktop: Static between steps */
@media (min-width: 769px) {
    .wcp-credit-bar {
        margin: 40px 0;
    }
}

/* Mobile: Show temporarily when product selected */
@media (max-width: 768px) {
    .wcp-credit-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0 0 var(--wcp-radius) var(--wcp-radius);
        z-index: 1000;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        padding: 20px;
    }
    
    .wcp-credit-bar.wcp-credit-visible {
        transform: translateY(0);
    }
    
    /* Add spacing for mobile */
    #wcp-step-2 .wcp-secondary-products {
        padding-top: 20px;
    }
}

.wcp-credit-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.wcp-selected-package-name {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wcp-btn-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.wcp-btn-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.wcp-credit-meter {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

.wcp-credit-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.wcp-credit-used,
.wcp-credit-remaining {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.wcp-credit-used span:first-child,
.wcp-credit-remaining span:first-child {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wcp-credit-used strong,
.wcp-credit-remaining strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    direction: ltr;
}

.wcp-progress-bar {
    height: 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wcp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wcp-secondary) 0%, var(--wcp-secondary-dark) 100%);
    transition: width 0.5s ease;
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.5);
}

/* Secondary Products - Flippable Cards */
.wcp-secondary-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.wcp-secondary-product {
    perspective: 1000px;
    height: 380px;
}

.wcp-product-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.wcp-secondary-product.flipped .wcp-product-card-inner {
    transform: rotateY(180deg);
}

.wcp-product-card-front,
.wcp-product-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--wcp-radius);
    box-shadow: var(--wcp-shadow);
    overflow: hidden;
}

.wcp-product-card-front {
    background: white;
}

.wcp-product-card-back {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    transform: rotateY(180deg);
}

/* Front of Card */
.wcp-product-card-front {
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.wcp-secondary-product.selected .wcp-product-card-front {
    border-color: var(--wcp-secondary);
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2), var(--wcp-shadow-lg);
}

.wcp-secondary-product.selected .wcp-product-card-front::after {
    content: '✓';
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    background: var(--wcp-secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
    animation: checkBounce 0.5s ease;
}

.wcp-product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.wcp-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcp-product-details {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.wcp-product-details h4 {
    display: none; /* Hide product name */
}

.wcp-product-tier {
    margin: 10px 0;
}

.wcp-tier-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.wcp-product-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--wcp-secondary);
    margin: 0;
    border: 2px solid var(--wcp-secondary);
    height: 44px; /* Same height as buttons */
}

.wcp-product-value::before {
    content: '💎';
    font-size: 22px;
}

.wcp-product-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.wcp-btn-select,
.wcp-btn-info {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    height: 44px;
}

.wcp-btn-select {
    background: linear-gradient(135deg, var(--wcp-secondary) 0%, var(--wcp-secondary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.wcp-btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.wcp-btn-select.selected {
    background: linear-gradient(135deg, var(--wcp-danger) 0%, #e53e3e 100%);
}

.wcp-btn-info {
    background: linear-gradient(135deg, var(--wcp-info) 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.wcp-btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

/* Back of Card */
.wcp-product-card-back {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.wcp-back-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--wcp-gray-300);
}

.wcp-back-header h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--wcp-gray-900);
    margin: 0;
}

.wcp-btn-flip-back {
    background: var(--wcp-gray-700);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: var(--wcp-shadow);
}

.wcp-btn-flip-back:hover {
    background: var(--wcp-gray-800);
    transform: scale(1.1);
}

.wcp-back-description {
    flex: 1;
    color: var(--wcp-gray-700);
    font-size: 15px;
    line-height: 1.8;
    overflow-y: auto;
    margin-bottom: 20px;
}

.wcp-back-footer {
    padding-top: 16px;
    border-top: 2px solid var(--wcp-gray-300);
}

/* Actions */
.wcp-actions {
    text-align: center;
    padding: 50px 0;
}

.wcp-btn-primary {
    background: linear-gradient(135deg, var(--wcp-secondary) 0%, var(--wcp-secondary-dark) 100%);
    color: white;
    border: none;
    padding: 18px 48px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(72, 187, 120, 0.4);
}

.wcp-btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(72, 187, 120, 0.5);
}

.wcp-btn-primary:disabled {
    background: var(--wcp-gray-300);
    cursor: not-allowed;
    box-shadow: none;
}

.wcp-credit-notice {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 24px;
    border-radius: 12px;
    display: inline-block;
}

.wcp-credit-notice.completed {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    color: var(--wcp-secondary);
    border: 2px solid var(--wcp-secondary);
}

.wcp-credit-notice.exceeded {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: var(--wcp-danger);
    border: 2px solid var(--wcp-danger);
}

/* Mobile Credit Notice - Fixed Bottom */
@media (max-width: 768px) {
    .wcp-credit-notice-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        z-index: 998;
        text-align: center;
        font-size: 15px;
        padding: 20px;
        transform: translateY(100%);
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        font-weight: 700;
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .wcp-credit-notice-mobile.visible {
        transform: translateY(0);
    }
    
    .wcp-credit-notice-mobile.completed {
        background: var(--wcp-secondary);
        color: white;
        border: none;
    }
    
    .wcp-credit-notice-mobile.exceeded {
        background: var(--wcp-danger);
        color: white;
        border: none;
    }
    
    .wcp-credit-notice-mobile .wcp-mobile-submit-btn {
        background: white;
        color: var(--wcp-secondary);
        border: none;
        padding: 12px 32px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        display: none;
    }
    
    .wcp-credit-notice-mobile.completed .wcp-mobile-submit-btn {
        display: block;
    }
    
    .wcp-credit-notice-mobile.wcp-stay-visible {
        /* Keep visible when completed */
    }
}

/* Notice */
.wcp-notice {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid var(--wcp-warning);
    color: var(--wcp-gray-800);
    padding: 24px;
    border-radius: var(--wcp-radius);
    text-align: center;
    font-weight: 600;
    box-shadow: var(--wcp-shadow);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .wcp-package-selector {
        padding: 30px 16px;
    }
    
    .wcp-packages-grid,
    .wcp-secondary-products {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .wcp-package-selector {
        padding: 24px 12px;
    }
    
    .wcp-title {
        font-size: 32px;
        margin-bottom: 32px;
    }
    
    .wcp-step h3 {
        font-size: 24px;
        margin-bottom: 28px;
    }
    
    .wcp-packages-grid,
    .wcp-secondary-products {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wcp-package-info {
        padding: 20px;
    }
    
    .wcp-package-info h4 {
        font-size: 22px;
    }
    
    .wcp-credit-bar {
        padding: 24px 20px;
    }
    
    .wcp-credit-info {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .wcp-selected-package-name {
        font-size: 20px;
        text-align: center;
    }
    
    .wcp-btn-link {
        width: 100%;
        text-align: center;
    }
    
    .wcp-credit-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .wcp-credit-used strong,
    .wcp-credit-remaining strong {
        font-size: 24px;
    }
    
    .wcp-secondary-product {
        height: 540px;
    }
    
    /* Mobile: Make image bigger and move price down */
    .wcp-product-image {
        height: 350px;
    }
    
    .wcp-product-details {
        padding: 12px 16px;
        gap: 8px;
        justify-content: flex-end;
    }
    
    .wcp-product-value {
        margin-bottom: 0;
        padding: 8px 16px;
        font-size: 16px;
        height: auto;
    }
    
    .wcp-product-details h4 {
        font-size: 18px;
    }
    
    .wcp-btn-select,
    .wcp-btn-info {
        padding: 12px;
        font-size: 14px;
    }
    
    .wcp-btn-primary {
        width: 100%;
        padding: 16px 32px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .wcp-title {
        font-size: 28px;
    }
    
    .wcp-step h3 {
        font-size: 20px;
    }
    
    .wcp-package-image,
    .wcp-product-image {
        height: 160px;
    }
    
    .wcp-package-info {
        padding: 16px;
    }
    
    .wcp-package-info h4 {
        font-size: 20px;
    }
    
    .wcp-package-price,
    .wcp-package-credit {
        padding: 12px 14px;
    }
    
    .wcp-price-value,
    .wcp-credit-value {
        font-size: 18px;
    }
    
    .wcp-credit-bar {
        padding: 20px 16px;
    }
    
    .wcp-credit-meter {
        padding: 16px;
    }
    
    .wcp-selected-package-name {
        font-size: 18px;
    }
    
    .wcp-credit-used strong,
    .wcp-credit-remaining strong {
        font-size: 22px;
    }
    
    .wcp-secondary-product {
        height: 400px;
    }
    
    .wcp-product-details {
        padding: 16px;
    }
    
    .wcp-back-description {
        font-size: 14px;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .wcp-package-card,
    .wcp-btn-select,
    .wcp-btn-info,
    .wcp-btn-primary {
        -webkit-tap-highlight-color: transparent;
    }
    
    .wcp-btn-select,
    .wcp-btn-info,
    .wcp-btn-primary,
    .wcp-btn-flip-back {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Print styles */
@media print {
    .wcp-btn-select,
    .wcp-btn-info,
    .wcp-btn-flip-back,
    .wcp-btn-link,
    .wcp-btn-primary {
        display: none;
    }
    
    .wcp-package-card,
    .wcp-product-card-front {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Animations disabled for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .wcp-product-card-inner {
        transition: none !important;
    }
}


/* Responsive Design */

/* Tablets and below */
@media (max-width: 1024px) {
    .wcp-package-selector {
        padding: 20px 12px;
    }
    
    .wcp-packages-grid,
    .wcp-secondary-products {
        gap: 16px;
    }
    
    .wcp-credit-bar {
        padding: 20px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .wcp-package-selector {
        padding: 16px 12px;
    }
    
    .wcp-title {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .wcp-step h3 {
        font-size: 22px;
        margin-bottom: 24px;
        padding-bottom: 12px;
    }
    
    /* Single column layout */
    .wcp-packages-grid,
    .wcp-secondary-products {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Package cards optimized for mobile */
    .wcp-package-card {
        border-radius: 12px;
    }
    
    .wcp-package-image {
        height: 180px;
    }
    
    .wcp-package-info {
        padding: 20px 16px;
    }
    
    .wcp-package-info h4 {
        font-size: 20px;
    }
    
    .wcp-package-price,
    .wcp-package-credit {
        padding: 10px 12px;
        flex-direction: row;
        align-items: center;
    }
    
    .wcp-price-value,
    .wcp-credit-value {
        font-size: 18px;
    }
    
    /* Credit bar mobile layout */
    .wcp-credit-bar {
        padding: 20px 16px;
        border-radius: 16px;
        margin-bottom: 24px;
    }
    
    .wcp-credit-info {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        margin-bottom: 16px;
    }
    
    .wcp-selected-package-name {
        font-size: 18px;
        text-align: center;
    }
    
    .wcp-credit-meter {
        padding: 16px;
    }
    
    .wcp-credit-stats {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 12px;
    }
    
    .wcp-credit-used,
    .wcp-credit-remaining {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    .wcp-credit-used span:first-child,
    .wcp-credit-remaining span:first-child {
        font-size: 12px;
    }
    
    .wcp-credit-used strong,
    .wcp-credit-remaining strong {
        font-size: 20px;
    }
    
    .wcp-progress-bar {
        height: 10px;
    }
    
    /* Secondary products mobile */
    .wcp-secondary-product {
        padding: 16px;
        border-radius: 12px;
    }
    
    .wcp-product-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .wcp-product-image {
        width: 100%;
        height: 160px;
    }
    
    .wcp-product-details h4 {
        font-size: 17px;
    }
    
    .wcp-product-description {
        font-size: 13px;
    }
    
    .wcp-product-value {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    /* Buttons mobile */
    .wcp-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .wcp-select-package {
        padding: 14px 24px;
    }
    
    .wcp-btn-primary {
        width: 100%;
        font-size: 17px;
        padding: 16px 32px;
    }
    
    .wcp-btn-link {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    /* Actions mobile */
    .wcp-actions {
        padding: 32px 0;
    }
    
    .wcp-credit-notice {
        font-size: 14px;
        padding: 10px 20px;
        display: block;
        width: 100%;
    }
    
    /* Checkbox wrapper mobile */
    .wcp-checkbox-wrapper {
        font-size: 15px;
        padding: 10px 16px;
        width: 100%;
        justify-content: center;
    }
    
    .wcp-checkbox-wrapper input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .wcp-package-selector {
        padding: 12px 8px;
    }
    
    .wcp-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .wcp-step h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .wcp-package-info {
        padding: 16px 12px;
    }
    
    .wcp-package-info h4 {
        font-size: 18px;
    }
    
    .wcp-price-value,
    .wcp-credit-value {
        font-size: 16px;
    }
    
    .wcp-credit-bar {
        padding: 16px 12px;
    }
    
    .wcp-selected-package-name {
        font-size: 16px;
    }
    
    .wcp-credit-meter {
        padding: 12px;
    }
    
    .wcp-credit-used strong,
    .wcp-credit-remaining strong {
        font-size: 18px;
    }
    
    .wcp-secondary-product {
        padding: 12px;
    }
    
    .wcp-product-details h4 {
        font-size: 16px;
    }
    
    .wcp-btn-primary {
        font-size: 16px;
        padding: 14px 28px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .wcp-package-image,
    .wcp-product-image {
        height: 120px;
    }
    
    .wcp-product-content {
        flex-direction: row;
    }
    
    .wcp-product-image {
        width: 100px;
    }
    
    .wcp-credit-stats {
        flex-direction: row;
        gap: 16px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .wcp-package-card,
    .wcp-secondary-product,
    .wcp-btn,
    .wcp-checkbox-wrapper {
        -webkit-tap-highlight-color: transparent;
    }
    
    .wcp-package-card:active,
    .wcp-secondary-product:active {
        transform: scale(0.98);
    }
    
    .wcp-btn:active {
        transform: scale(0.95);
    }
    
    /* Larger touch targets */
    .wcp-checkbox-wrapper {
        min-height: 48px;
    }
    
    .wcp-btn {
        min-height: 48px;
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .wcp-package-card,
    .wcp-secondary-product,
    .wcp-credit-bar {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Can be extended for dark mode support */
}

/* Print styles */
@media print {
    .wcp-package-selector {
        max-width: 100%;
        padding: 0;
    }
    
    .wcp-btn,
    .wcp-checkbox-wrapper {
        display: none;
    }
    
    .wcp-package-card,
    .wcp-secondary-product {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Referral Code Login Form */
.wcp-referral-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.wcp-referral-card {
    background: white;
    border-radius: var(--wcp-radius);
    box-shadow: var(--wcp-shadow-lg);
    padding: 48px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.wcp-referral-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.wcp-referral-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--wcp-gray-900);
}

.wcp-referral-card p {
    font-size: 16px;
    color: var(--wcp-gray-600);
    margin: 0 0 32px 0;
}

.wcp-referral-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wcp-referral-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 2px solid var(--wcp-gray-300);
    border-radius: 12px;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.wcp-referral-input:focus {
    outline: none;
    border-color: var(--wcp-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.wcp-btn-verify {
    background: linear-gradient(135deg, var(--wcp-primary) 0%, var(--wcp-primary-dark) 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.wcp-btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.wcp-btn-verify:disabled {
    background: var(--wcp-gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wcp-referral-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    display: none;
}

.wcp-referral-message.success {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    color: var(--wcp-secondary);
    border: 2px solid var(--wcp-secondary);
    display: block;
}

.wcp-referral-message.error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: var(--wcp-danger);
    border: 2px solid var(--wcp-danger);
    display: block;
}

.wcp-referral-info {
    text-align: center;
    margin-bottom: 24px;
}

.wcp-referral-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--wcp-primary) 0%, var(--wcp-primary-dark) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: var(--wcp-shadow);
}

.wcp-referral-badge::before {
    content: '👤';
    font-size: 20px;
}

/* Persian Number Support */
.wcp-price-value,
.wcp-credit-value,
.wcp-product-value,
.wcp-credit-used strong,
.wcp-credit-remaining strong {
    font-family: 'Vazirmatn', sans-serif !important;
    font-feature-settings: "ss01";
}

/* Hidden class */
.wcp-hidden {
    display: none !important;
}
