@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

@font-face {
    font-family: 'Montaga';
    src: url('../fonts/Montaga-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

:root {
    --cream-bg: #F2ECE4;
    --deep-red: #8B1D1D;
    --soft-brown: #5C4033;
    --font-title: 'Source Serif 4', serif;
    --font-body: 'Inter', sans-serif;
    --font-body-alt: 'Montaga', serif;
}

/* Base elements */
body {
    font-family: var(--font-body) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-title {
    font-family: var(--font-title) !important;
    letter-spacing: 0.02em !important;
}

/* --- PRODUCT CARD BASE --- */
.product-card {
    position: relative;
    z-index: 1;
    overflow: hidden !important;
    border-radius: 2rem;
    background: white;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.premium-border-wrapper {
    position: relative;
    padding: 1.5px;
    border-radius: 2.22rem;
    display: flex;
    height: 100%;
    background: #EDE4D9;
    overflow: hidden;
    z-index: 1;
}

.premium-border-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    transform: translate(-50%, -50%);
    background: conic-gradient(#008C45 0deg,
            #008C45 40deg,
            #FFFFFF 80deg,
            #FFFFFF 120deg,
            #CD212A 160deg,
            #CD212A 200deg,
            #008C45 240deg,
            #008C45 280deg,
            #FFFFFF 320deg,
            #CD212A 360deg);
    animation: spin 3s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.product-item.group:hover .premium-border-wrapper::before {
    opacity: 1;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.product-card-inner {
    background: white;
    border-radius: 2.45rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
    overflow: hidden !important;
}

.product-card:hover .product-card-inner {
    background: white;
}

/* --- HOVER EFFECTS: IMAGE ZOOM & INFO PREVIEW --- */
.product-image-container img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-item.group:hover .product-image-container img {
    transform: scale(1.1);
}

.info-preview {
    position: absolute !important;
    inset: 0 !important;
    background: #FFFFFF !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 2rem !important;
    border-radius: 2rem !important;
    text-align: left !important;
}

.product-item.group:hover .info-preview {
    opacity: 1 !important;
    visibility: visible !important;
}

/* --- FLAG SWEEP REMOVED --- */

/* --- PROFILE ELEMENTS --- */
.profile-title {
    font-family: var(--font-title) !important;
    font-size: 26px !important;
    font-weight: 600 !important;
    color: #1A1A1A !important;
    margin-bottom: 8px !important;
    text-transform: none !important;
    letter-spacing: 0.05em !important;
    line-height: 1.2 !important;
}

.profile-desc {
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #6B6B70 !important;
    margin-bottom: 0 !important;
    font-style: normal !important;
}

/* --- MAIN CARD CONTENT FONTS --- */
.card-product h4 {
    min-height: 2.5rem;
    font-family: var(--font-title) !important;
    letter-spacing: 0.02em !important;
}

.card-content-original h4 {
    font-family: var(--font-title) !important;
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.15em !important;
}

.card-content-original p {
    font-family: var(--font-body) !important;
    min-height: 1.2rem;
}

.preview-btn {
    background: #8B0000 !important;
    color: white !important;
    padding: 1rem 1.5rem !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-decoration: none !important;
    margin-top: 24px;
}

.product-item.group:hover .preview-btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.preview-btn:hover {
    background: #a32222 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 25px rgba(139, 29, 29, 0.3);
}

.preview-content-fade {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s ease-out !important;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.product-item.group:hover .preview-content-fade {
    opacity: 1;
    transform: translateY(0);
}

/* --- CATALOG HEADER & FILTER --- */
.catalog-header h2 {
    font-family: var(--font-title);
    letter-spacing: 0.08em !important;
    line-height: 1.1;
    text-transform: uppercase;
}

#product-search {
    font-family: var(--font-body);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#product-search::placeholder {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.6;
}

#product-search:focus {
    box-shadow: 0 10px 30px -5px rgba(139, 29, 29, 0.15);
    background-color: #fff;
    transform: translateY(-2px);
}

#no-products p {
    font-family: var(--font-body);
    font-style: italic;
}

/* Swiper Custom Pagination */
.swiper-pagination-bullet-active {
    background: var(--deep-red) !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #D1C4B5;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 5px;
}

/* --- PREMIUM ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.floating-decor {
    animation: float 4s ease-in-out infinite;
}

/* Staggered animations */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* --- PREMIUM CARD ENHANCEMENTS --- */
.product-card {
    box-shadow: 0 4px 20px -2px rgba(92, 64, 51, 0.08);
}

.product-item.group:hover .product-card {
    box-shadow: 0 20px 40px -10px rgba(92, 64, 51, 0.15);
    transform: translateY(-8px);
}

.product-item.group {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- BUTTON STYLES --- */
.btn-ver-detalhes {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ver-detalhes::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;
}

.product-item.group:hover .btn-ver-detalhes::before {
    left: 100%;
}

.product-item.group:hover .btn-ver-detalhes {
    transform: scale(1.02);
    box-shadow: 0 8px 20px -5px rgba(139, 29, 29, 0.4);
}

/* --- PREMIUM GLASS EFFECT --- */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- SCROLL REVEAL --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- SWIPER NAVIGATION --- */
.swiper-button-next,
.swiper-button-prev {
    width: 48px !important;
    height: 48px !important;
    background: white !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px !important;
    font-weight: bold !important;
}

/* --- SEARCH INPUT ENHANCEMENTS --- */
#product-search {
    box-shadow: 0 4px 20px -2px rgba(92, 64, 51, 0.08);
}

#product-search:focus {
    box-shadow: 0 10px 40px -5px rgba(139, 29, 29, 0.2);
}

/* --- ICON STYLES --- */
.lucide {
    stroke-width: 2;
}

/* --- SMOOTH SCROLL --- */
html {
    scroll-behavior: smooth;
}

/* --- SELECTION STYLE --- */
::selection {
    background: rgba(139, 29, 29, 0.15);
    color: var(--soft-brown);
}