/* NM Kart Custom Styles - Mobile First Responsive Design */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Mobile First Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 30px;
    }
}

/* Color Variables */
:root {
    --primary-bg: #f8f4f0;
    --primary-text: #8b4513;
    --gold: #ffd700;
    --pink: #ffc0cb;
    --maroon: #800000;
    --white: #ffffff;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
}

/* Utility Classes for Buttons */
.bg-maroon {
    background-color: var(--maroon) !important;
}

.bg-gold {
    background-color: var(--gold) !important;
}

.text-maroon {
    color: var(--maroon) !important;
}

.text-gold {
    color: var(--gold) !important;
}

.border-maroon {
    border-color: var(--maroon) !important;
}

.hover\:bg-red-900:hover {
    background-color: #7f1d1d !important;
}

.hover\:bg-yellow-400:hover {
    background-color: #fbbf24 !important;
}

/* Additional Button Styles */
button.bg-maroon, .btn-maroon {
    background-color: var(--maroon) !important;
    color: white !important;
}

button.bg-gold, .btn-gold {
    background-color: var(--gold) !important;
    color: var(--maroon) !important;
}

/* Ensure buttons are visible */
.product-actions button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
}

.product-actions button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Advanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(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);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

.animate-pulse-custom {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.animate-zoomIn {
    animation: zoomIn 0.6s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.8s ease-out;
}

/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.hero-slide:not(.active) {
    opacity: 0;
    transform: translateX(100px);
}

.hero-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.hero-prev, .hero-next {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-prev:hover, .hero-next:hover {
    transform: scale(1.1);
    backdrop-filter: blur(15px);
}

/* Custom Components */
.btn-primary {
    background-color: var(--maroon);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #660000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--maroon);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--maroon);
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--maroon);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

/* Advanced Product Card Styles */
.product-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-12px) rotateX(5deg);
    box-shadow:
        0 25px 50px rgba(128, 0, 0, 0.15),
        0 10px 20px rgba(255, 215, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.product-card .product-image {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.product-card:hover .product-image {
    transform: scale(1.15) rotate(2deg);
}

.product-card .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s ease;
}

.product-card:hover .product-image::after {
    left: 100%;
}

/* Filter Tab Styles */
.filter-tab {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s ease;
}

.filter-tab:hover::before,
.filter-tab.active::before {
    left: 100%;
}

.filter-tab.active {
    background: var(--gold);
    color: var(--maroon);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

/* Glassmorphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(45deg, var(--maroon), var(--gold), var(--pink));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Button Hover Effects */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-hover-effect:hover::before {
    left: 100%;
}

.btn-hover-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Search Bar Enhancements */
.search-container {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background-color: #f9fafb;
}

.search-suggestion-item:active {
    background-color: #f3f4f6;
}

/* Loading spinner for search */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--maroon);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 2.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-menu {
        display: block;
    }

    .desktop-menu {
        display: none;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--maroon);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #660000;
}

/* Additional Custom Animations */
@keyframes pulse-custom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes bounce-gentle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    }
}

.animate-pulse-custom {
    animation: pulse-custom 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-bounce-gentle {
    animation: bounce-gentle 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Enhanced Card Hover Effects */
.card-hover-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--maroon) 0%, #a0002a 50%, var(--pink) 100%);
}

.bg-gradient-gold {
    background: linear-gradient(135deg, var(--gold) 0%, #ffed4e 50%, #fbbf24 100%);
}

.bg-gradient-elegant {
    background: linear-gradient(135deg, #f8f4f0 0%, #fdf2f8 50%, #fef3e2 100%);
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Mobile Navigation */
@media (max-width: 767px) {
    .navbar {
        padding: 10px 0;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .navbar-nav {
        text-align: center;
        margin-top: 10px;
    }

    .navbar-nav .nav-link {
        padding: 10px 15px;
        font-size: 16px;
    }

    .search-container {
        margin: 15px 0;
    }

    .search-container input {
        font-size: 16px;
        padding: 12px;
    }
}

/* Mobile Hero Section */
@media (max-width: 767px) {
    .hero-section {
        padding: 40px 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .hero-section p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .hero-section .btn {
        padding: 12px 25px;
        font-size: 16px;
    }
}

/* Mobile Product Grid */
@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }

    .product-card {
        margin-bottom: 20px;
    }

    .product-card img {
        height: 200px;
        object-fit: cover;
    }

    .product-card h3 {
        font-size: 14px;
        margin: 10px 0 5px 0;
        line-height: 1.3;
    }

    .product-card .price {
        font-size: 16px;
        margin: 5px 0;
    }

    .product-card .original-price {
        font-size: 12px;
    }

    .product-card .btn {
        padding: 8px 15px;
        font-size: 12px;
        width: 100%;
    }
}

/* Single Column for Very Small Screens */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card img {
        height: 250px;
    }

    .product-card h3 {
        font-size: 16px;
    }
}

/* Mobile Category Section */
@media (max-width: 767px) {
    .category-section {
        padding: 30px 0;
    }

    .category-section h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
        text-align: center;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-card {
        padding: 20px 10px;
        text-align: center;
    }

    .category-card h3 {
        font-size: 14px;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-card {
        padding: 25px 15px;
    }

    .category-card h3 {
        font-size: 16px;
    }
}

/* Mobile Footer */
@media (max-width: 767px) {
    .footer {
        padding: 30px 0 20px 0;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .footer-section {
        margin-bottom: 20px;
    }

    .footer-section h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .footer-section p,
    .footer-section a {
        font-size: 14px;
        line-height: 1.6;
    }

    .social-links {
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Mobile Product Detail Page */
@media (max-width: 767px) {
    .product-detail {
        flex-direction: column;
        gap: 20px;
    }

    .product-images {
        width: 100%;
        margin-bottom: 20px;
    }

    .product-info {
        width: 100%;
        padding: 0 15px;
    }

    .product-info h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .product-info .price {
        font-size: 1.5rem;
        margin: 15px 0;
    }

    .product-info .btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        margin: 10px 0;
    }
}

/* Mobile Utilities */
@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center;
    }

    .hide-mobile {
        display: none;
    }

    .show-mobile {
        display: block;
    }

    .full-width-mobile {
        width: 100%;
    }

    .padding-mobile {
        padding: 15px;
    }

    .margin-mobile {
        margin: 15px 0;
    }
}

/* Tablet Responsive Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 20px;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .hero-section {
        padding: 80px 0;
    }

    .hero-section h1 {
        font-size: 3rem;
    }
}

/* Touch-Friendly Buttons */
@media (max-width: 767px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Improved Mobile Typography */
@media (max-width: 767px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }

    p {
        margin-bottom: 15px;
        line-height: 1.6;
    }
}