/* ===========================
   LTK Cuties - Custom CSS
   Complements Tailwind utilities
   =========================== */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FFF9F5;
}

::-webkit-scrollbar-thumb {
    background: #F4A7BB;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #103948;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #F4A7BB #FFF9F5;
}

/* ===========================
   Button Transitions
   =========================== */
.btn-primary {
    background-color: #F4A7BB;
    color: white;
    transition: all 0.25s ease;
}

.btn-primary:hover {
    background-color: #052C46;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 167, 187, 0.4);
}

.btn-secondary {
    background-color: #B8F0ED;
    color: #103948;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    background-color: #103948;
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid #F4A7BB;
    color: #F4A7BB;
    background: transparent;
    transition: all 0.25s ease;
}

.btn-outline:hover {
    background-color: #F4A7BB;
    color: white;
}

/* ===========================
   Card Hover Lift
   =========================== */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(16, 57, 72, 0.12);
}

/* ===========================
   Hero Gradient Backgrounds
   =========================== */
.hero-gradient {
    background: linear-gradient(135deg, #FFF9F5 0%, #F4A7BB20 40%, #B8F0ED30 100%);
}

.hero-gradient-alt {
    background: linear-gradient(180deg, #FFF9F5 0%, #B8F0ED20 50%, #FFF9F5 100%);
}

.hero-gradient-rose {
    background: linear-gradient(135deg, #F4A7BB15 0%, #FFF9F5 50%, #B8F0ED15 100%);
}

/* ===========================
   Loading Spinner
   =========================== */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #B8F0ED;
    border-top-color: #F4A7BB;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   Fade In Animation
   =========================== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered fade in for grid items */
.fade-in-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.fade-in-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.fade-in-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.fade-in-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.fade-in-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.fade-in-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.fade-in-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.fade-in-stagger > *:nth-child(8) { animation-delay: 0.4s; }

.fade-in-stagger > * {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

/* ===========================
   Mobile Bottom Nav
   =========================== */
.mobile-bottom-nav {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
}

/* Add safe area padding for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ===========================
   Image Aspect Ratio Containers
   =========================== */
.aspect-product {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.aspect-card {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ===========================
   Selection Color
   =========================== */
::selection {
    background-color: #F4A7BB;
    color: white;
}

/* ===========================
   Focus Styles (Accessibility)
   =========================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #F4A7BB;
    outline-offset: 2px;
}

/* ===========================
   Skeleton Loading
   =========================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===========================
   HTMX Loading Indicator
   =========================== */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-flex;
}

.htmx-request.htmx-indicator {
    display: inline-flex;
}

/* ===========================
   Alpine.js Cloak
   =========================== */
[x-cloak] {
    display: none !important;
}

/* ===========================
   Price Styles
   =========================== */
.price-original {
    text-decoration: line-through;
    color: #9ca3af;
}

.price-sale {
    color: #ef4444;
    font-weight: 700;
}

/* ===========================
   Badge Styles
   =========================== */
.badge-new {
    background-color: #B8F0ED;
    color: #103948;
}

.badge-sale {
    background-color: #ef4444;
    color: white;
}

.badge-popular {
    background-color: #F4A7BB;
    color: white;
}

/* ===========================
   Transition Utilities
   =========================== */
.transition-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transition-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
