/* =====================
   🛡️ IMAGE PROTECTION STYLES
   ===================== */

/* Disable text selection and drag for all images except logos */
img:not([src*="logo.png"]):not([alt*="logo"]):not([alt*="Logo"]) {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    pointer-events: none !important;
    -webkit-touch-callout: none !important;
}

/* Allow normal behavior for logo images */
img[src*="logo.png"],
img[alt*="logo"],
img[alt*="Logo"] {
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
    -webkit-user-drag: auto !important;
    -khtml-user-drag: auto !important;
    -moz-user-drag: auto !important;
    -o-user-drag: auto !important;
    pointer-events: auto !important;
    -webkit-touch-callout: default !important;
}

/* Re-enable pointer events for clickable images (like carousel navigation), logos, and zoom modal images */
.carousel-button img, 
button img,
a img,
.clickable img,
.zoom-active,
#zoomImage,
#zoomModal img,
.modal-content img,
img[src*="logo.png"],
img[alt*="logo"],
img[alt*="Logo"] {
    pointer-events: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
}

/* Watermark container styles */
.watermark-container {
    position: relative !important;
    overflow: hidden !important;
    display: inline-block !important;
}

.watermark-container img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
}

.watermark {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(-45deg) !important;
    font-weight: bold !important;
    color: rgba(255, 255, 255, 0.3) !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
    pointer-events: none !important;
    user-select: none !important;
    z-index: 10 !important;
    font-family: Arial, sans-serif !important;
    letter-spacing: 2px !important;
    white-space: nowrap !important;
}

/* Disable highlighting and selection */
*::selection {
    background: transparent !important;
}

*::-moz-selection {
    background: transparent !important;
}

/* Disable image drag ghost */
img::-webkit-drag-placeholder {
    display: none !important;
}

/* Zoom modal specific styles */
#zoomModal {
    z-index: 1000 !important;
}

#zoomImage {
    cursor: crosshair !important;
    pointer-events: auto !important;
}

#lens {
    pointer-events: none !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.3) !important;
}

.zoom-active {
    pointer-events: auto !important;
    cursor: crosshair !important;
}

/* Disable print for images */
@media print {
    img:not(.zoom-active):not([src*="logo.png"]) {
        display: none !important;
    }
    .watermark-container::after {
        content: "Protected Content - Tirupati" !important;
        display: block !important;
        text-align: center !important;
        font-weight: bold !important;
    }
}

/* Custom animations and transitions */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* General styles */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Product container styles */
.product-container {
    transition: all 0.3s ease;
}

.product-container img {
    backface-visibility: hidden;
    transform-origin: center;
}

.product-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Carousel styles */
#carousel {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#carousel img {
    backface-visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.carousel-button {
    transition: all 0.3s ease;
    opacity: 0.7;
}

.carousel-button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.carousel-button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contact Form Enhancements */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.border-red-500:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.border-green-500:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Notification animations */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-enter {
    animation: slideInFromRight 0.3s ease-out forwards;
}

.notification-exit {
    animation: slideOutToRight 0.3s ease-in forwards;
}

/* WhatsApp button pulse effect */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.whatsapp-btn {
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    animation: none;
    transform: scale(1.1);
}

/* ======================================
   MODERN NAVIGATION ENHANCEMENTS
   ====================================== */

/* Enhanced Carousel Buttons */
.carousel-button {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.carousel-button:active {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle {
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.9), rgba(243, 244, 246, 0.9));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(229, 231, 235, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, rgba(243, 244, 246, 1), rgba(229, 231, 235, 1));
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

/* Hamburger Icon Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Animation */
.mobile-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-item {
    position: relative;
    overflow: hidden;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    transition: width 0.3s ease;
}

.mobile-menu-item:hover::before {
    width: 100%;
}

.mobile-menu-item svg {
    transition: all 0.3s ease;
}

.mobile-menu-item:hover svg {
    transform: translateX(2px);
    color: #2563eb;
}

/* Desktop Navigation Links */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:not(.bg-gradient-to-r):hover {
    transform: translateY(-1px);
}

/* Contact Button Special Effects */
.nav-link.bg-gradient-to-r {
    position: relative;
    overflow: hidden;
}

.nav-link.bg-gradient-to-r::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;
}

.nav-link.bg-gradient-to-r:hover::before {
    left: 100%;
}

/* Floating Action Button Style for WhatsApp */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    position: relative;
    overflow: hidden;
}

.whatsapp-btn::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;
}

.whatsapp-btn:hover::before {
    left: 100%;
}

.whatsapp-btn:hover {
    animation: float 1.5s ease-in-out infinite;
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

/* Glassmorphism Effect for Modern Look */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Modern Button Hover Effects */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.ripple-effect:active::after {
    animation: ripple 0.6s ease-out;
}

/* Modern Footer Styling */
.footer-link {
    position: relative;
    padding: 0.5rem 0;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-link:hover {
    transform: translateY(-2px);
}

/* Enhanced Mobile Responsiveness for Navigation */
@media (max-width: 640px) {
    .carousel-button {
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-button svg {
        width: 1rem;
        height: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .nav-link svg {
        width: 1rem;
        height: 1rem;
    }
    
    .mobile-menu-item {
        padding: 1rem 1.5rem;
    }
    
    .footer-link {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
}

/* ======================================
   RESPONSIVE DESIGN ENHANCEMENTS
   ====================================== */

/* Mobile First Approach */
@media (max-width: 640px) {
    /* Mobile Carousel Adjustments */
    .carousel-container {
        height: 250px !important;
        margin: 0 -1rem;
    }
    
    .carousel-button {
        padding: 8px;
        font-size: 14px;
    }
    
    /* Mobile Product Grid */
    .product-container {
        margin-bottom: 1rem;
    }
    
    .product-container:hover {
        transform: none; /* Disable hover effects on mobile */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    /* Mobile Header */
    .logo-mobile {
        height: 2.5rem !important;
    }
    
    /* Mobile Contact Form */
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    /* Mobile WhatsApp Button */
    .whatsapp-btn {
        bottom: 1rem !important;
        right: 1rem !important;
        padding: 0.75rem !important;
        font-size: 0.875rem;
    }
    
    .whatsapp-btn svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
        margin-right: 0.5rem !important;
    }
    
    /* Mobile Modal Adjustments */
    #zoomModal .modal-content {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Mobile Navigation */
    .mobile-menu-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid #e5e7eb;
    }
    
    /* Mobile Notifications */
    .notification-mobile {
        top: 1rem !important;
        left: 1rem !important;
        right: 1rem !important;
        max-width: none !important;
    }
}

/* Tablet Styles */
@media (min-width: 641px) and (max-width: 1024px) {
    .carousel-container {
        height: 350px;
    }
    
    .product-grid-tablet {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Tablet Contact Form */
    .contact-grid-tablet {
        gap: 2rem;
    }
    
    /* Tablet WhatsApp Button */
    .whatsapp-btn {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 1025px) {
    .carousel-container {
        height: 500px;
    }
    
    .product-container:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
    }
    
    /* Desktop WhatsApp Button */
    .whatsapp-btn {
        bottom: 2rem;
        right: 2rem;
    }
}

/* Landscape Phone Orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .carousel-container {
        height: 200px;
    }
    
    .landscape-adjust {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-container img,
    #carousel img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .product-container:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .carousel-button:hover {
        opacity: 0.7;
        transform: none;
    }
    
    /* Increase touch targets */
    .carousel-button {
        min-width: 44px;
        min-height: 44px;
    }
    
    .mobile-menu-item {
        min-height: 44px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .whatsapp-btn {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .carousel-button {
        background: rgba(0, 0, 0, 0.8);
        color: white;
    }
    
    .loading-spinner {
        border-color: #374151;
        border-top-color: #60a5fa;
    }
}

/* Print Styles */
@media print {
    .whatsapp-btn,
    .carousel-button,
    .mobile-menu-btn {
        display: none !important;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
    }
}