/* Ape Kit Plugin Styles */

/* Main Containers */
#ape-kit-selection,
#ape-kit-checkout {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

/* Headers */
.ape-kit-header,
.ape-kit-checkout-header {
    text-align: center;
    margin-bottom: 30px;
}

.ape-kit-header h2,
.ape-kit-checkout-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.ape-kit-header p {
    color: #666;
    font-size: 16px;
}

/* Product Grid */
.ape-kit-products-grid {
    margin-bottom: 30px;
}

.ape-kit-section {
    margin-bottom: 40px;
}

.ape-kit-section h3 {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.ape-kit-products-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Product Cards */
.ape-kit-product-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    cursor: pointer;
    position: relative;
}

.ape-kit-product-card:hover {
    border-color: #22c55e;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
}

.ape-kit-product-card.selected {
    border-color: #22c55e;
    background: #f0fdf4;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.15);
}

.ape-kit-product-card.selected::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.ape-kit-product-image {
    margin-bottom: 15px;
    text-align: center;
}

.ape-kit-product-image img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ape-kit-placeholder-image {
    width: 100%;
    height: 200px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
    border: 2px dashed #d1d5db;
}

.ape-kit-product-info h4 {
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ape-kit-product-info p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.ape-kit-product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ape-kit-product-checkbox {
    margin-right: 5px;
}

.ape-kit-quantity-controls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.ape-kit-quantity-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 5px;
}

/* Checkout Summary */
.ape-kit-checkout-summary,
.checkout-summary-card {
    background: #f9fafb;
    padding: 24px;
    border-radius: 12px;
    margin-top: 32px;
    border: 1px solid #e5e7eb;
}

.ape-kit-checkout-summary h3,
.checkout-summary-card h3 {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#selected-items-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 16px;
}

#selected-items-list li {
    margin-bottom: 12px;
}

#selected-items-list .item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#selected-items-list .item-bullet {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
}

#selected-items-list .item-name {
    font-weight: 400;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}


.total-section {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.item-count {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

/* Buttons */
.ape-kit-btn-primary,
.ape-kit-btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ape-kit-btn-primary {
    background: #22c55e;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ape-kit-btn-primary:hover {
    background: #16a34a;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

.ape-kit-btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.new-order-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #22c55e;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.new-order-btn:hover {
    background: #16a34a;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

.ape-kit-btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.ape-kit-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Checkout back button */
.checkout-back-button {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.back-to-selection-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.back-to-selection-btn:hover {
    color: #374151;
}

/* Checkout content layout */
.ape-kit-checkout-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Order summary with images */
.ape-kit-checkout-summary .checkout-summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.checkout-summary-card h2 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
}

.order-items-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.order-item:last-child {
    border-bottom: none;
}

.item-image img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #1f2937;
}

/* Payment methods styling */
.payment-methods-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.payment-methods-card h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 700;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: #22c55e;
}

.payment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.payment-info-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.payment-icon {
    width: 40px;
    height: 40px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
}

.payment-title {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.payment-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.payment-badge {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 500;
}

.payment-continue-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Form section */
.ape-kit-form-section {
    margin-bottom: 2rem;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.form-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 700;
}

.back-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: #374151;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-submit {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Form Styles */
.ape-kit-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.ape-kit-form-group {
    display: flex;
    flex-direction: column;
}

.ape-kit-form-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ape-kit-form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ape-kit-form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}

/* Success Message */
#ape-kit-success-message {
    text-align: center;
    background: #d4edda;
    color: #155724;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

#ape-kit-success-message h3 {
    color: #155724;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #ape-kit-selection,
    #ape-kit-checkout {
        padding: 15px;
    }
    
    .ape-kit-products-row {
        grid-template-columns: 1fr;
    }
    
    .ape-kit-checkout-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ape-kit-form-row {
        grid-template-columns: 1fr;
    }
}