/* Hamkhan Bookstore - Custom Styles */

/* 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;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: #a855f7;
    color: white;
}

/* Purple gradient background */
.bg-gradient-purple {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
}

/* Card hover effect */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Purple button gradient */
.btn-purple {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #9333ea 0%, #6b21a8 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

/* Badge styles */
.badge-purple {
    background-color: #f3e8ff;
    color: #7e22ce;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Input focus animation */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

.animate-slide-in {
    animation: slideInRight 0.5s ease forwards;
}

.animate-pulse-slow {
    animation: pulse 3s infinite;
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3e8ff;
    border-top: 4px solid #a855f7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Price tag style */
.price-tag {
    position: relative;
    display: inline-block;
}

.price-tag::after {
    content: 'تومان';
    font-size: 0.75rem;
    margin-right: 0.25rem;
    opacity: 0.7;
}

/* Star rating */
.star-rating {
    color: #fbbf24;
}

.star-rating .empty {
    color: #d1d5db;
}

/* Product image zoom */
.img-zoom {
    transition: transform 0.3s ease;
}

.img-zoom:hover {
    transform: scale(1.05);
}

/* Responsive container */
.container-custom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Notification toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
