/* Mobile House - Custom Styles */

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

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    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);
    }
}

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

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

/* Product Card Hover Effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

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

/* Button Animations */
button, .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before, .btn:active::before {
    width: 300px;
    height: 300px;
}

/* Image Zoom Effect */
.cursor-zoom-in {
    cursor: zoom-in;
}

/* Thumbnail Border Active State */
.thumbnail {
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: #0891b2;
}

/* Color Option Hover */
.color-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

.color-option:hover {
    transform: scale(1.1);
}

/* Storage Option */
.storage-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

.storage-option:hover {
    background-color: #f0f9ff;
}

/* Tab Transitions */
.tab-content {
    animation: fadeIn 0.4s ease-out;
}

.tab-btn {
    transition: all 0.3s ease;
}

/* Back to Top Button */
#backToTop {
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0891b2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Cart Item Animation */
.cart-item {
    transition: all 0.3s ease;
}

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

/* Quantity Input Styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Focus Styles for Accessibility */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: 2px solid #0891b2;
    outline-offset: 2px;
}

/* Checkbox Styling */
input[type="checkbox"]:checked {
    background-color: #0891b2;
    border-color: #0891b2;
}

input[type="radio"]:checked {
    background-color: #0891b2;
    border-color: #0891b2;
}

/* Search Bar Animation */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Product Grid Responsive Gap */
@media (max-width: 640px) {
    .grid-cols-1 {
        gap: 1rem;
    }
}

/* Newsletter Form */
#newsletterForm input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Slide Animation */
#mobileMenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobileMenu.active {
    max-height: 500px;
}

/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

/* Badge Pulse Animation */
.badge-pulse {
    animation: pulse 2s infinite;
}

/* Wishlist Heart Animation */
.wishlist-btn.active i {
    color: #ef4444;
    animation: pulse 0.5s ease;
}

/* Compare Feature */
.compare-checkbox:checked + label {
    background-color: #0891b2;
    color: white;
}

/* Star Rating Hover */
.star-rating i {
    transition: color 0.2s ease;
    cursor: pointer;
}

.star-rating i:hover,
.star-rating i:hover ~ i {
    color: #fbbf24;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Price Tag Animation */
.price-tag {
    position: relative;
}

.price-tag::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0891b2;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.price-tag:hover::after {
    transform: scaleX(1);
}

/* Modal Backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

/* Sticky Add to Cart */
.sticky-add-to-cart {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 40;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-add-to-cart.visible {
    transform: translateY(0);
}

/* Print Styles */
@media print {
    header, footer, .no-print {
        display: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0891b2;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0e7490;
}

/* Selection Color */
::selection {
    background-color: #0891b2;
    color: white;
}

/* Image Loading Placeholder */
img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

img[data-loaded="true"] {
    filter: blur(0);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    h3 {
        font-size: 1.5rem;
    }
}
