/* =========================================
   Leopard Mobile - Enhanced Styles v2
   ========================================= */

/* ---- Base ---- */
html { scroll-behavior: smooth; }

::selection { background: #e6b800; color: #1a1a2e; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #1a1a2e; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #e6b800; }

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33%       { transform: translateY(-15px) rotate(1deg); }
    66%       { transform: translateY(-8px) rotate(-1deg); }
}
@keyframes slideInRight {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideInLeft {
    from { transform: translateX(-110%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(230,184,0,0.3); }
    50%       { box-shadow: 0 0 25px rgba(230,184,0,0.7), 0 0 50px rgba(230,184,0,0.3); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
@keyframes spin-slow {
    to { transform: rotate(360deg); }
}
@keyframes bounce-in {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.05); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fadeInUp      { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeInDown    { animation: fadeInDown 0.5s ease forwards; }
.animate-float         { animation: float 4s ease-in-out infinite; }
.animate-slideInRight  { animation: slideInRight 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.animate-bounce-in     { animation: bounce-in 0.6s ease forwards; }
.animate-pulse-glow    { animation: pulse-glow 2s ease-in-out infinite; }

/* ---- Preloader ---- */
#preloader { transition: opacity 0.6s ease, visibility 0.6s ease; }
#preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---- Navbar ---- */
#navbar { transition: all 0.3s ease; }
#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ---- Mobile Menu ---- */
#mobileMenu { opacity: 0; visibility: hidden; transition: all 0.3s ease; }
#mobileMenu.active { opacity: 1; visibility: visible; }
#mobileMenu.active #mobileMenuPanel { transform: translateX(0) !important; }

/* ---- Product Cards ---- */
.product-card {
    position: relative;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, rgba(230,184,0,0.08), rgba(230,184,0,0));
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.product-card:hover::after { opacity: 1; }

/* Gold border on hover */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.3s ease;
    pointer-events: none;
}
.product-card:hover::before {
    background: linear-gradient(135deg, #e6b800, #ffd700, #e6b800);
}

/* ---- Brand Cards ---- */
.brand-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(230,184,0,0.2);
}

/* ---- Category Cards ---- */
.category-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* ---- Hero Swiper ---- */
.heroSwiper .swiper-pagination-bullet {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.4);
    opacity: 1;
    transition: all 0.4s ease;
}
.heroSwiper .swiper-pagination-bullet-active {
    width: 48px;
    background: #e6b800;
}

/* ---- Swiper Buttons ---- */
.swiper-button-next,
.swiper-button-prev {
    width: 44px !important;
    height: 44px !important;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #e6b800;
    box-shadow: 0 6px 20px rgba(230,184,0,0.4);
}
.swiper-button-next:hover::after,
.swiper-button-prev:hover::after { color: #000; }
.swiper-button-next::after,
.swiper-button-prev::after { font-size: 14px !important; font-weight: 900; color: #1a1a2e; }

/* ---- Gradient Text ---- */
.gradient-text {
    background: linear-gradient(135deg, #e6b800, #ffd700, #ff9500);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

/* ---- Glassmorphism ---- */
.glass {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
}
.glass-dark {
    background: rgba(26,26,46,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ---- Shimmer Skeleton ---- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ---- Toast ---- */
.toast { animation: slideInRight 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* ---- Line Clamp ---- */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.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; }

/* ---- Buttons ---- */
.btn-gold {
    background: linear-gradient(135deg, #e6b800, #ffd700);
    color: #1a1a2e;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230,184,0,0.3);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #ffd700, #e6b800);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230,184,0,0.5);
}
.btn-gold:active { transform: translateY(0); }

.btn-dark {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    transition: all 0.3s ease;
}
.btn-dark:hover {
    background: linear-gradient(135deg, #e6b800, #ffd700);
    color: #1a1a2e;
    transform: translateY(-2px);
}

/* ---- Badge ---- */
.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: pulse-glow 2s ease-in-out infinite;
}
.badge-sale {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.badge-hot {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

/* ---- Mobile Bottom Nav ---- */
.mobile-bottom-nav {
    display: none; /* Disabled */
}

/* Remove bottom padding that was added for bottom nav */
@media (max-width: 768px) {
    body { padding-bottom: 0 !important; }
}

/* ---- AOS ---- */
[data-aos] { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; }

/* ========================================
   MOBILE RESPONSIVE FIXES
   ======================================== */

@media (max-width: 768px) {
    /* Hide desktop swiper nav */
    .swiper-button-next,
    .swiper-button-prev { display: none !important; }

    /* Hero slider - smaller on mobile */
    .heroSwiper .swiper-slide > div {
        min-height: 420px !important;
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Product image height on mobile */
    .product-card img {
        height: 160px !important;
        object-fit: contain;
    }

    /* Tighter grid on mobile */
    .product-grid-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Fix cart page on mobile */
    #cartContent { grid-template-columns: 1fr !important; }

    /* Fix checkout on mobile */
    .checkout-grid { grid-template-columns: 1fr !important; }

    /* Hero text smaller on mobile */
    .hero-title { font-size: 2.5rem !important; }
    .hero-subtitle { font-size: 1rem !important; }

    /* Category cards smaller on mobile */
    .category-mobile { padding: 1rem !important; }

    /* Specs table on product page */
    .specs-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
    /* Even smaller hero */
    .hero-title { font-size: 2rem !important; }

    /* Single column products on very small screens - optional */
    /* .product-grid-mobile { grid-template-columns: 1fr; } */

    /* Smaller padding */
    .section-padding { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
}

/* ---- WhatsApp Float Button ---- */
.whatsapp-float {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 49;
    transition: all 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1) rotate(-5deg); }

@media (min-width: 769px) {
    .whatsapp-float { bottom: 30px; }
}

/* ---- Promo Banner Animation ---- */
.promo-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

/* ---- Section Divider ---- */
.section-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, #e6b800, transparent);
    border: none;
    margin: 0;
}

/* ---- Image Zoom on Hover ---- */
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.img-zoom:hover img { transform: scale(1.08); }

/* ---- Sticky Add to Cart on Product Page ---- */
.sticky-atc {
    position: sticky;
    bottom: 70px;
    z-index: 40;
}
@media (min-width: 769px) {
    .sticky-atc { position: sticky; top: 80px; bottom: auto; }
}

/* ---- Price Tag ---- */
.price-tag {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ---- Gold Underline ---- */
.gold-underline {
    position: relative;
    display: inline-block;
}
.gold-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e6b800, #ffd700);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}
.gold-underline:hover::after { transform: scaleX(1); }

/* ---- Ripple Effect ---- */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.ripple:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

/* ---- Input Focus Ring ---- */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(230,184,0,0.2);
}

/* ---- Cart Badge Bounce ---- */
@keyframes cart-bounce {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.3); }
}
.cart-count-bounce { animation: cart-bounce 0.3s ease; }

/* ---- Page Transition ---- */
.page-enter {
    animation: fadeInUp 0.4s ease forwards;
}
