/* IUE Digital Shop - Frontend Styles */

:root {
    --iue-ds-primary: #2271b1;
    --iue-ds-success: #46b450;
    --iue-ds-warning: #f0ad4e;
    --iue-ds-danger: #dc3545;
    --iue-ds-border: #ddd;
    --iue-ds-bg: #f9f9f9;
}

/* Buttons */
.iue-ds-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.iue-ds-btn-primary {
    background: var(--iue-ds-primary);
    color: #fff;
}

.iue-ds-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.iue-ds-btn-success {
    background: var(--iue-ds-success);
    color: #fff;
}

.iue-ds-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid var(--iue-ds-border);
}

.iue-ds-btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.iue-ds-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Product Grid */
.iue-ds-products-grid {
    display: grid;
    gap: 20px;
}

.iue-ds-products-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.iue-ds-products-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.iue-ds-products-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .iue-ds-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .iue-ds-products-grid { grid-template-columns: 1fr; }
}

.iue-ds-product-card {
    background: #fff;
    border: 1px solid var(--iue-ds-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s;
}

.iue-ds-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.iue-ds-sale-badge,
.iue-ds-vip-badge-small {
    position: absolute;
    top: 10px;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.iue-ds-sale-badge {
    left: 10px;
    background: var(--iue-ds-danger);
    color: #fff;
}

.iue-ds-vip-badge-small {
    right: 10px;
    background: #FFD700;
    color: #333;
}

.iue-ds-product-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--iue-ds-bg);
}

.iue-ds-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iue-ds-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
}

.iue-ds-product-info {
    padding: 15px;
}

.iue-ds-product-title {
    margin: 0 0 10px;
    font-size: 16px;
}

.iue-ds-product-price {
    margin-bottom: 15px;
}

.iue-ds-product-price .original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.iue-ds-product-price .current-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--iue-ds-primary);
}

/* Payment Form */
.iue-ds-payment-form {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.iue-ds-payment-header {
    background: var(--iue-ds-primary);
    color: #fff;
    padding: 20px;
    text-align: center;
}

.iue-ds-payment-header h2 {
    margin: 0;
}

.iue-ds-order-info {
    margin: 10px 0 0;
    opacity: 0.9;
}

.iue-ds-product-summary {
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--iue-ds-bg);
    gap: 15px;
}

.iue-ds-product-thumb {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
}

.iue-ds-product-summary h3 {
    margin: 0 0 5px;
}

.iue-ds-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--iue-ds-primary);
}

.iue-ds-payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

@media (max-width: 600px) {
    .iue-ds-payment-methods {
        grid-template-columns: 1fr;
    }
}

.iue-ds-qr-section,
.iue-ds-manual-section {
    padding: 20px;
    border: 1px solid var(--iue-ds-border);
    border-radius: 8px;
}

.iue-ds-qr-section h3,
.iue-ds-manual-section h3 {
    margin-top: 0;
    text-align: center;
}

.iue-ds-qr-wrapper {
    text-align: center;
    margin: 20px 0;
}

.iue-ds-qr-image {
    max-width: 250px;
}

.iue-ds-payment-status {
    text-align: center;
    padding: 10px;
    background: #fffbcc;
    border-radius: 5px;
}

.iue-ds-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--iue-ds-warning);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    margin-right: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.iue-ds-bank-info {
    width: 100%;
    border-collapse: collapse;
}

.iue-ds-bank-info td {
    padding: 10px 5px;
    border-bottom: 1px solid var(--iue-ds-border);
}

.iue-ds-bank-info td:first-child {
    color: #666;
    width: 120px;
}

.iue-ds-copy-btn {
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    background: var(--iue-ds-bg);
    border: 1px solid var(--iue-ds-border);
    border-radius: 3px;
    margin-left: 5px;
}

.iue-ds-transfer-content {
    font-family: monospace;
    background: #ffe;
    padding: 5px 10px;
    border-radius: 3px;
}

.iue-ds-notice {
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.iue-ds-notice-warning {
    background: #fff8e1;
    border-left: 4px solid var(--iue-ds-warning);
}

/* Payment Success */
.iue-ds-payment-success {
    text-align: center;
    padding: 40px 20px;
}

.iue-ds-success-icon {
    width: 80px;
    height: 80px;
    background: var(--iue-ds-success);
    color: #fff;
    font-size: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* VIP Pricing */
.iue-ds-vip-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.iue-ds-vip-card {
    background: #fff;
    border: 2px solid var(--iue-ds-border);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
}

.iue-ds-vip-card.current {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.iue-ds-vip-header {
    padding: 20px;
    color: #fff;
}

.iue-ds-vip-header h3 {
    margin: 0;
}

.iue-ds-current-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 5px;
}

.iue-ds-vip-price {
    padding: 30px 20px;
}

.iue-ds-vip-price .price {
    font-size: 32px;
    font-weight: bold;
    color: var(--iue-ds-primary);
}

.iue-ds-vip-price .duration {
    color: #666;
}

.iue-ds-vip-benefits {
    list-style: none;
    padding: 0 20px 20px;
    margin: 0;
    text-align: left;
}

.iue-ds-vip-benefits li {
    padding: 8px 0;
    border-bottom: 1px solid var(--iue-ds-bg);
}

.iue-ds-vip-action {
    padding: 20px;
    background: var(--iue-ds-bg);
}

/* VIP Badge */
.iue-ds-vip-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* Downloads */
.iue-ds-my-downloads {
    max-width: 900px;
}

.iue-ds-vip-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.iue-ds-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.iue-ds-download-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--iue-ds-border);
    border-radius: 8px;
    padding: 15px;
    gap: 15px;
}

.iue-ds-download-item.disabled {
    opacity: 0.6;
}

.iue-ds-download-thumb {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--iue-ds-bg);
    flex-shrink: 0;
}

.iue-ds-download-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iue-ds-placeholder-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 32px;
}

.iue-ds-download-info {
    flex: 1;
}

.iue-ds-download-info h4 {
    margin: 0 0 5px;
}

.iue-ds-order-meta {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.iue-ds-sep {
    margin: 0 10px;
    color: #ddd;
}

.iue-ds-download-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.iue-ds-btn-download {
    background: var(--iue-ds-success);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.iue-ds-btn-download .file-size {
    opacity: 0.8;
    font-size: 12px;
}

.iue-ds-status-badge {
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.iue-ds-status-badge.expired {
    background: #f8d7da;
    color: #721c24;
}

.iue-ds-status-badge.limit {
    background: #fff3cd;
    color: #856404;
}

/* Checkout */
.iue-ds-checkout-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.iue-ds-checkout-summary {
    background: var(--iue-ds-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.iue-ds-checkout-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.iue-ds-checkout-thumb {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    object-fit: cover;
}

.iue-ds-checkout-item-info h3 {
    margin: 0 0 5px;
    font-size: 16px;
}

.iue-ds-checkout-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--iue-ds-primary);
}

.iue-ds-payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.iue-ds-payment-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border: 2px solid var(--iue-ds-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.iue-ds-payment-option:hover:not(:disabled) {
    border-color: var(--iue-ds-primary);
    background: #f8fbff;
}

.iue-ds-payment-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.iue-ds-option-icon {
    font-size: 28px;
}

.iue-ds-option-title {
    font-weight: 600;
    display: block;
}

.iue-ds-option-desc {
    font-size: 13px;
    color: #666;
}

/* Guest Form */
.iue-ds-guest-form {
    margin-bottom: 25px;
}

.iue-ds-guest-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.iue-ds-guest-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--iue-ds-border);
    border-radius: 5px;
}

/* Error */
.iue-ds-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
}

/* Loading */
.iue-ds-loading {
    text-align: center;
    padding: 40px;
}

.iue-ds-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--iue-ds-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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