/* CKU styles - professional enhanced version */
#custom-keychain-section {
    margin: 15px 0;
    padding: 10px;
    background: #daffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f6;
    width: 100%;
}

.upload-header {
    text-align: center;
    margin-bottom: 5px;
}

.upload-header h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.upload-header p {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0;
}

.upload-container {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 15px;
    justify-content: space-between;
}

.upload-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #efefef;
    border-radius: 10px;
    padding: 7px;
    border: 1px solid #e6edf4;
    min-width: 140px;
    position: relative;
}

.upload-btn {
    width: 100%;
    text-align: center;
    position: relative;
}

.upload-btn input[type="file"] {
    display: none;
}

.upload-btn label {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border-radius: 30px;
    padding: 10px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    gap: 3px;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(108, 92, 231, 0.25);
}

.upload-btn label:hover {
    background: linear-gradient(135deg, #5d4fcf, #8e7ef7);
    transform: translateY(-2px);
}

.upload-btn label i {
    font-size: 18px;
}

.upload-btn label span {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.image-preview {
    margin-top: 10px;
    text-align: center;
    position: relative;
    min-height: 120px;
    width: 100%;
    border-radius: 8px;
    background: #ffffff;
    border: 2px dashed #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: #cbd5e1;
}

.preview-placeholder i {
    font-size: 24px;
    color: #e2e8f0;
}

.image-preview img {
    max-height: 120px;
    width: auto;
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    object-fit: contain;
}

.remove-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0px !important;
    background-color: #b11100 !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
    z-index: 10;
}

/* Upload Progress Bar Styles - Enhanced */
.upload-progress {
    width: 100%;
    margin-top: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e7ff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9, #1f618d);
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s ease-in-out;
    position: relative;
    overflow: hidden;
}

/* Animated shimmer effect for progress bar */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.upload-status {
    margin-top: 10px;
    padding: 5px 15px;
    border-radius: 8px;
    background: #f0f7ff;
    border: 1px solid #d1e3f8;
    display: flex;
    align-items: center;
    color: #3498db;
    font-size: 13px;
    font-weight: 500;
}

.upload-status i {
    margin-right: 8px;
    font-size: 16px;
}

.status-success {
    background: #eafaf1;
    border-color: #c5f0d1;
    color: #27ae60;
}

.status-error {
    background: #fef0f0;
    border-color: #fde2e2;
    color: #e74c3c;
}

.special-instructions {
    margin-top: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e6edf4;
}

.instructions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.instructions-header h4 {
    font-size: 13px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.instructions-header i {
    color: #6c5ce7;
    font-size: 18px;
}

.instructions-input input {
    width: 100%;
    padding: 7px 15px;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    font-size: 12px;
    transition: all 0.3s;
    background: #ffffff;
}

.instructions-input input:focus {
    border-color: #a29bfe;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    outline: none;
}

.instructions-input .hint {
    font-size: 10px;
    color: #7f8c8d;
    font-style: italic;
}

.whatsapp-section {
    margin-top: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e6edf4;
}

.whatsapp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.whatsapp-header h4 {
    font-size: 13px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.whatsapp-header i {
    color: #25D366;
    font-size: 18px;
}

.whatsapp-input input {
    width: 100%;
    padding: 7px 15px;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 550;
    transition: all 0.3s;
    background: #ffffff;
}

.whatsapp-input input:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
    outline: none;
}

.whatsapp-input .hint {
    font-size: 10px;
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 768px) {
    .upload-container {
        flex-wrap: wrap;
    }

    .upload-card {
        min-width: calc(50% - 8px);
    }
}

@media (max-width: 480px) {
    .upload-container {
        flex-wrap: wrap;
    }

    .upload-card {
        min-width: 47%;
    }

    .upload-btn label {
        padding: 8px;
        font-size: 11px;
    }

    .image-preview {
        min-height: 100px;
    }

    .special-instructions,
    .whatsapp-section {
        padding: 7px 10px 0px;
    }
}

/* Cart & order details styles */
.custom-image-preview {
    margin: 6px 0;
}

.custom-image-preview img {
    max-width: 70px;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.reselect-images-button {
    display: inline-block;
    background: #000000;
    color: white !important;
    border-radius: 30px;
    padding: 7px 20px;
    font-size: 9px !important;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.reselect-images-button:hover {
    background: #333;
}

.special-instruction-value {
    font-style: italic;
    color: #4a5568;
    margin-top: 4px;
}

.whatsapp-number-value {
    margin-top: 4px;
}

.whatsapp-link {
    color: #25D366 !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.whatsapp-link:hover {
    text-decoration: underline;
}

.special-instructions-order,
.special-instructions-admin,
.whatsapp-number-order,
.whatsapp-number-admin {
    margin-top: 12px;
    padding: 10px 15px;
    background: #f9f9ff;
    border-radius: 8px;
    border-left: 3px solid #a29bfe;
    font-size: 14px;
}

.whatsapp-number-order,
.whatsapp-number-admin {
    border-left-color: #25D366;
}

.special-instructions-order p,
.special-instructions-admin p,
.whatsapp-number-order p,
.whatsapp-number-admin p {
    margin: 0;
}

.image-management {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.delete-custom-image {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.delete-custom-image:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
}

.auto-delete-countdown {
    font-size: 12px;
    color: #6c757d;
    margin: 5px 0 0 !important;
    font-style: italic;
}

.image-deleted {
    font-style: italic;
    color: #6c757d;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

.minicart-image-preview {
    display: flex;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
}

.minicart-image-preview span {
    font-weight: 500;
    margin-right: 5px;
    color: #4a5568;
}

.minicart-image-preview img {
    max-width: 40px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.minicart-reselect {
    margin-top: 8px;
}

.minicart-instructions,
.minicart-whatsapp {
    font-size: 12px;
    color: #4a5568;
    font-style: italic;
    margin-top: 6px;
    padding-left: 5px;
    border-left: 2px solid #e2e8f0;
}

.minicart-whatsapp {
    border-left-color: #25D366;
}

.custom-image-admin-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    max-width: 280px;
}

.admin-image-link {
    display: block;
    margin-top: 8px;
}

.custom-image-admin-preview img {
    max-width: 200px !important;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.custom-image-order-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    display: inline-block;
}

.image-container {
    margin-top: 8px;
}

.custom-image-order-preview img {
    max-width: 200px !important;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.whatsapp-link-admin {
    color: #25D366 !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.whatsapp-link-admin:hover {
    text-decoration: underline;
}

.woocommerce-order .reselect-images-button,
.order-details .reselect-images-button {
    display: none !important;
}