/**
 * Herry Clothing International - Custom Styles
 * Version: 1.0.0
 * Author: Timeline Digital Solutions
 * 
 * Note: Most styling is handled via Tailwind CSS classes.
 * This file contains additional custom styles and animations.
 */

/* =============================================
   Base Styles
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* =============================================
   Typography
   ============================================= */
.font-heading {
    font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

/* Text line clamp */
.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;
}

/* =============================================
   Custom Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =============================================
   Selection
   ============================================= */
::selection {
    background: #2563eb;
    color: #ffffff;
}

::-moz-selection {
    background: #2563eb;
    color: #ffffff;
}

/* =============================================
   Links
   ============================================= */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* =============================================
   Buttons
   ============================================= */
button, .btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

button:focus, .btn:focus {
    outline: none;
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

/* =============================================
   Form Elements
   ============================================= */
input, textarea, select {
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Custom checkbox */
input[type="checkbox"] {
    cursor: pointer;
}

/* Placeholder styling */
::placeholder {
    color: #94a3b8;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #94a3b8;
}

::-ms-input-placeholder {
    color: #94a3b8;
}

/* =============================================
   Animations
   ============================================= */
/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Fade out animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Slide up animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

/* Scale animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse-custom {
    animation: pulse 2s ease-in-out infinite;
}

/* Float animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Spin animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin 3s linear infinite;
}

/* =============================================
   Header Styles
   ============================================= */
header {
    transition: all 0.3s ease;
}

/* Sticky header styles */
header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Navigation dropdown */
.nav-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile menu animation */
#mobileMenu {
    transition: all 0.3s ease;
}

#mobileMenu.show {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
}

/* =============================================
   Hero Section
   ============================================= */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
}

.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* =============================================
   Cards
   ============================================= */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* Product card overlay */
.product-card-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, transparent 100%);
}

/* =============================================
   FAQ Accordion
   ============================================= */
.faq-item {
    transition: all 0.3s ease;
}

.faq-button {
    cursor: pointer;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.rotate-45 {
    transform: rotate(45deg);
}

.faq-answer {
    transition: all 0.3s ease;
}

/* =============================================
   Back to Top Button
   ============================================= */
#backToTop {
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
}

/* =============================================
   WhatsApp Button
   ============================================= */
#whatsappBtn {
    transition: all 0.3s ease;
}

#whatsappBtn:hover {
    transform: scale(1.1);
}

/* WhatsApp button ring animation */
#whatsappBtn::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: #25D366;
    opacity: 0.3;
    animation: ring 2s ease-out infinite;
}

@keyframes ring {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* =============================================
   Image Effects
   ============================================= */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* Image overlay gradient */
.img-overlay {
    position: relative;
}

.img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.7) 0%, transparent 50%);
    pointer-events: none;
}

/* =============================================
   Loading States
   ============================================= */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* =============================================
   Preloader
   ============================================= */
#preloader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =============================================
   Notification Toast
   ============================================= */
.notification-toast {
    z-index: 9999;
}

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 768px) {
    /* Reduce animation distances on mobile */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Disable hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .img-zoom:hover img {
        transform: none;
    }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
    header, footer, #backToTop, #whatsappBtn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
}

/* =============================================
   Accessibility
   ============================================= */
/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================
   Dark Mode Support (Future Enhancement)
   ============================================= */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here when needed */
}

/* =============================================
   Utility Classes
   ============================================= */
.text-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

.shadow-soft {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.shadow-primary {
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

/* =============================================
   Mobile Responsiveness Enhancements
   ============================================= */

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Container adjustments for mobile */
.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Mobile text sizing */
@media (max-width: 639px) {
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
    
    p {
        font-size: 0.875rem !important;
        line-height: 1.6 !important;
    }
    
    /* Reduce padding on mobile */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Button sizing on mobile */
    .btn, button, a[class*="px-6"], a[class*="px-8"] {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        font-size: 0.875rem !important;
    }
}

/* Mobile header adjustments */
@media (max-width: 639px) {
    header nav {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    header .flex.justify-between {
        gap: 0.5rem;
    }
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix floating cards on mobile */
@media (max-width: 639px) {
    [class*="absolute"][class*="top-"] {
        transform: scale(0.85);
    }
    
    [class*="absolute"][class*="bottom-"] {
        transform: scale(0.85);
    }
}

/* Mobile grid improvements */
@media (max-width: 639px) {
    .grid {
        gap: 0.75rem !important;
    }
    
    .grid-cols-2 > * {
        min-width: 0;
    }
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile navigation */
    #mobile-menu a {
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
    }
}

/* Fix icon sizing on mobile */
@media (max-width: 639px) {
    .fas, .fab {
        font-size: inherit;
    }
}

/* Smooth transitions for mobile menu */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Better readability on small screens */
@media (max-width: 374px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

