/* ==========================================
   ISHA ELITE – Custom Styles
   Premium Artificial Jewellery eCommerce
   ========================================== */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --wine: #561C24;
    --wine-light: #6D2932;
    --wine-dark: #3D1019;
    --beige: #C7B7A3;
    --beige-light: #E8D8C4;
    --beige-lighter: #F5EDE3;
    --gold: #C9A96E;
    --gold-light: #E8D5A3;
    --gold-dark: #8B7340;
    --body-text: #3A3232;
    --shadow-sm: 0 2px 8px rgba(86, 28, 36, 0.06);
    --shadow-md: 0 8px 24px rgba(86, 28, 36, 0.1);
    --shadow-lg: 0 16px 48px rgba(86, 28, 36, 0.12);
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL RESETS ===== */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--wine) var(--beige-light);
}

*::-webkit-scrollbar {
    width: 6px;
}

*::-webkit-scrollbar-track {
    background: var(--beige-light);
}

*::-webkit-scrollbar-thumb {
    background: var(--wine);
    border-radius: 3px;
}

::selection {
    background-color: var(--wine);
    color: var(--beige-light);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--body-text);
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--beige-light);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
    font-family: 'Poppins', sans-serif;
}

.announcement-content {
    animation: announcementScroll 20s linear infinite;
}

@keyframes announcementScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(0);
    }
}

/* ===== NAVBAR ===== */
.navbar-main {
    transition: var(--transition);
}

.navbar-main.scrolled {
    box-shadow: 0 4px 30px rgba(86, 28, 36, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wine), var(--gold));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== MOBILE MENU ===== */
.mobile-menu.open {
    transform: translateX(0);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
}

.particle {
    animation: particleFloat 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    animation-delay: 0s;
}

.particle:nth-child(2) {
    animation-delay: 1s;
}

.particle:nth-child(3) {
    animation-delay: 2s;
}

.particle:nth-child(4) {
    animation-delay: 3s;
}

.particle:nth-child(5) {
    animation-delay: 4s;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-10px) translateX(-5px);
        opacity: 0.3;
    }

    75% {
        transform: translateY(-30px) translateX(15px);
        opacity: 0.5;
    }
}

.floating-badge {
    animation: floatBadge 4s ease-in-out infinite;
}

.floating-badge-2 {
    animation: floatBadge 4s ease-in-out infinite 2s;
}

@keyframes floatBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Slow spin for decorative ring */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
}

/* ===== WISHLIST BUTTON ===== */
.wishlist-active {
    color: #ef4444 !important;
}

.wishlist-active i {
    color: #ef4444 !important;
}

/* ===== CATEGORY CARDS ===== */
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: border-color 0.5s ease;
    z-index: 1;
}

.category-card:hover::before {
    border-color: rgba(201, 169, 110, 0.3);
}

/* ===== FLASH MESSAGES ===== */
.flash-message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99;
    animation: flashSlideIn 0.5s ease-out;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.flash-warning {
    background: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.flash-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.flash-close:hover {
    opacity: 1;
}

@keyframes flashSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== STAR RATING ===== */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: var(--gold);
    font-size: 12px;
}

.star-rating .rating-count {
    color: #999;
    font-size: 11px;
    margin-left: 4px;
    font-family: 'Poppins', sans-serif;
}

/* ===== BUTTONS ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::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.7s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ===== SECTION ANIMATIONS ===== */
.section-header,
.feature-card,
.testimonial-card,
.product-card,
.category-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-header.animate-in,
.feature-card.animate-in,
.testimonial-card.animate-in,
.product-card.animate-in,
.category-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback: force-show elements after 0.8s in case observer doesn't fire (e.g. top-of-page cards) */
@keyframes forceShow {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delay - shorter for shop page responsiveness */
.product-card:nth-child(1) {
    transition-delay: 0.0s;
}

.product-card:nth-child(2) {
    transition-delay: 0.1s;
}

.product-card:nth-child(3) {
    transition-delay: 0.2s;
}

.product-card:nth-child(4) {
    transition-delay: 0.3s;
}

.product-card:nth-child(5) {
    transition-delay: 0.4s;
}

.product-card:nth-child(6) {
    transition-delay: 0.5s;
}

.product-card:nth-child(7) {
    transition-delay: 0.6s;
}

.product-card:nth-child(8) {
    transition-delay: 0.7s;
}

.category-card:nth-child(1) {
    transition-delay: 0.0s;
}

.category-card:nth-child(2) {
    transition-delay: 0.1s;
}

.category-card:nth-child(3) {
    transition-delay: 0.15s;
}

.category-card:nth-child(4) {
    transition-delay: 0.2s;
}

.category-card:nth-child(5) {
    transition-delay: 0.25s;
}

.category-card:nth-child(6) {
    transition-delay: 0.3s;
}

.feature-card:nth-child(1) {
    transition-delay: 0.0s;
}

.feature-card:nth-child(2) {
    transition-delay: 0.15s;
}

.feature-card:nth-child(3) {
    transition-delay: 0.3s;
}

.feature-card:nth-child(4) {
    transition-delay: 0.45s;
}

.testimonial-card:nth-child(1) {
    transition-delay: 0.0s;
}

.testimonial-card:nth-child(2) {
    transition-delay: 0.15s;
}

.testimonial-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* ===== WHATSAPP BUTTON ===== */
.whatsapp-btn {
    animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
    }
}

/* ===== BACK TO TOP ===== */
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
    .hero-section {
        min-height: 100vh;
    }

    .hero-section .floating-badge,
    .hero-section .floating-badge-2 {
        display: none;
    }

    .flash-message {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* ===== PAGE TRANSITION ===== */
.page-transition {
    animation: pageIn 0.6s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== GOLD GRADIENT TEXT ===== */
.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GLASS MORPHISM ===== */
.glass {
    background: rgba(232, 216, 196, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(199, 183, 163, 0.3);
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg,
            var(--beige-light) 25%,
            var(--beige) 50%,
            var(--beige-light) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== CUSTOM CURSOR HOVER (premium touch) ===== */
@media (hover: hover) {

    a,
    button {
        cursor: pointer;
    }
}

/* ===== DROPDOWN ANIMATION ===== */
.dropdown-menu {
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .dropdown-menu {
    transform: translateY(0);
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== BADGE SHIMMER ===== */
.badge-shimmer {
    position: relative;
    overflow: hidden;
}

.badge-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}