/*
 * ModernCommerce Custom Styles
 *
 * Additional custom styles for the theme
 */

/* Smooth transitions for all interactive elements */
button, a, input, select, textarea {
    transition: var(--transition);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Selection color */
::selection {
    background: var(--primary);
    color: white;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

/* Skeleton loading for product cards */
.skeleton-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.skeleton-card .skeleton-image {
    padding-top: 100%;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-card .skeleton-text {
    height: 16px;
    margin: 12px 16px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

/* Product quick view modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quick-view-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.quick-view-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Success/Error messages */
.messages {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.messages.success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.messages.error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

/* Product variations */
.variation {
    margin-bottom: 16px;
}

.variation select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

/* Price display */
.woocommerce-Price-amount {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.woocommerce-Price-currencySymbol {
    font-weight: 600 !important;
}

/* Form validation */
.form-row.inputtext {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.form-row.inputtext:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Progress bar */
.progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card-info {
        padding: 12px;
    }

    .product-card-title {
        font-size: 14px;
    }

    .hero-title {
        font-size: 32px;
    }

    .cart-drawer {
        width: 100%;
    }
}

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