/* Custom CSS for webshop */
.product-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
}

.admin-sidebar {
    min-height: calc(100vh - 4rem);
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Cart animation */
.cart-item-remove {
    animation: slideOut 0.3s ease-in-out;
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Cart Styles */
.cart-item {
    transition: all 0.2s ease-in-out;
}

.cart-item:hover {
    background-color: #f9fafb;
}

.quantity-input {
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Category Grid Responsive */
@media (max-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect ratio utilities */
.aspect-w-1 {
    position: relative;
    padding-bottom: 100%;
}

.aspect-w-1 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #3498db;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Cart animations */
.cart-item-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.cart-item-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms, transform 300ms;
}

.cart-item-exit {
    opacity: 1;
    transform: translateY(0);
}

.cart-item-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 300ms, transform 300ms;
}

/* Product hover effects */
.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image {
    transition: transform 0.3s ease;
}

/* Category hover effects */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

/* Responsive grid improvements */
@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


/* Basic Pages Styles */

/* Page content styling */
.prose {
    max-width: none;
    color: #4b5563;
    line-height: 1.75;
}

.prose h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1f2937;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #374151;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #4b5563;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 0.375rem;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #ef4444;
}

.prose pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
}

.prose ul, .prose ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th, .prose td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.prose th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* Copy button for code blocks */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.copy-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

pre:hover .copy-button {
    opacity: 1;
}

/* Page transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print styles for pages */
@media print {
    .no-print {
        display: none !important;
    }
    
    .prose {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .prose h1, .prose h2, .prose h3 {
        break-after: avoid;
    }
    
    .prose a {
        color: inherit;
        text-decoration: none;
    }
    
    .prose a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Dark mode support for pages */
@media (prefers-color-scheme: dark) {
    .prose {
        color: #e5e7eb;
    }
    
    .prose h1, .prose h2, .prose h3 {
        color: #f9fafb;
    }
    
    .prose blockquote {
        background-color: #374151;
        color: #d1d5db;
        border-left-color: #60a5fa;
    }
    
    .prose code {
        background-color: #374151;
        color: #fbbf24;
    }
    
    .prose pre {
        background-color: #111827;
    }
    
    .prose th {
        background-color: #374151;
        color: #f9fafb;
    }
    
    .prose td {
        border-color: #4b5563;
    }
}
