/* ============================================================
   Custom Styles - E-Commerce Website
   ============================================================ */

html { scroll-behavior: smooth; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.animate-fadeIn { animation: fadeIn 0.6s ease-out forwards; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease-out forwards; }

/* Product Card */
.product-card { transition: all 0.3s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.product-card .product-image { transition: transform 0.5s ease; }
.product-card:hover .product-image { transform: scale(1.08); }
.product-card .overlay { opacity: 0; transition: all 0.3s ease; }
.product-card:hover .overlay { opacity: 1; }

/* Glassmorphism */
.glass { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); }
.glass-dark { background: rgba(15,23,42,0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Gradient Buttons */
.btn-gradient { background: linear-gradient(135deg, #3b82f6, #8b5cf6); transition: all 0.3s ease; }
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(59,130,246,0.4); }
.btn-gradient-green { background: linear-gradient(135deg, #10b981, #059669); transition: all 0.3s ease; }
.btn-gradient-green:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(16,185,129,0.4); }
.btn-gradient-red { background: linear-gradient(135deg, #ef4444, #dc2626); transition: all 0.3s ease; }

/* Hero Slider */
.hero-slider { position: relative; overflow: hidden; }
.hero-slide { transition: opacity 0.8s ease, transform 0.8s ease; }

/* Skeleton Loading */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-title { height: 20px; width: 70%; margin-bottom: 12px; }
.skeleton-image { height: 200px; width: 100%; margin-bottom: 12px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Spinner */
.spinner { width: 40px; height: 40px; border: 4px solid #e2e8f0; border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { animation: slideInRight 0.3s ease, fadeIn 0.3s ease; padding: 16px 24px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); max-width: 400px; }

input[type="range"] { -webkit-appearance: none; width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #3b82f6; border-radius: 50%; cursor: pointer; }

.star-rating input { display: none; }
.star-rating label { font-size: 24px; color: #d1d5db; cursor: pointer; transition: color 0.2s; }
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: #f59e0b; }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.mega-menu { opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; }
.mega-menu-trigger:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.form-input { width: 100%; padding: 12px 16px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; outline: none; transition: all 0.3s; }
.form-input:focus { ring: 2px solid #3b82f6; border-color: transparent; }

.gallery-thumb { cursor: pointer; border: 2px solid transparent; transition: all 0.3s ease; }
.gallery-thumb:hover, .gallery-thumb.active { border-color: #3b82f6; }

@media (max-width: 640px) {
    .hero-slider h1 { font-size: 1.5rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 400px) { .product-grid { grid-template-columns: 1fr; } }
