/* ============================================
   Peddlers Village Antiques & More Mall
   Custom Styles
============================================ */

/* --- Custom Properties --- */
:root {
    --plum-50: #fdf4f8;
    --plum-100: #fce7ef;
    --plum-200: #fad0e3;
    --plum-300: #f6a9c7;
    --plum-400: #ed709e;
    --plum-500: #db4072;
    --plum-600: #c22052;
    --plum-700: #a11540;
    --plum-800: #84163a;
    --plum-900: #721737;
    --plum-950: #3d0717;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--plum-50);
}
::-webkit-scrollbar-thumb {
    background: var(--plum-300);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--plum-400);
}

/* --- Navigation --- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 244, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(114, 23, 55, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500));
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--plum-700), var(--plum-600));
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(114, 23, 55, 0.25);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(114, 23, 55, 0.35);
    background: linear-gradient(135deg, var(--plum-800), var(--plum-700));
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--plum-700);
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: 2px solid var(--plum-200);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--plum-400);
    background: var(--plum-50);
    transform: translateY(-2px);
}

.btn-amber {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
    color: var(--plum-950);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.btn-amber:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

/* --- Input Fields --- */
.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--plum-100);
    border-radius: 12px;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 0.9375rem;
    color: var(--plum-900);
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.input-field::placeholder {
    color: var(--plum-300);
}

.input-field:hover {
    border-color: var(--plum-200);
}

.input-field:focus {
    border-color: var(--plum-400);
    box-shadow: 0 0 0 4px rgba(237, 112, 158, 0.1);
}

/* --- Hero Animations --- */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-image {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease 0.2s forwards;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* --- Feature Cards --- */
.feature-card {
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    animation: cardFadeUp 0.5s ease forwards;
}

@keyframes cardFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: auto;
}

.gallery-item:nth-child(2),
.gallery-item:nth-child(5) {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 7, 23, 0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* --- About Images --- */
.about-images {
    opacity: 0;
    transform: translateX(-30px);
}

.about-images.visible {
    animation: slideInLeft 0.7s ease forwards;
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
}

.about-content.visible {
    animation: slideInRight 0.7s ease 0.2s forwards;
}

@keyframes slideInLeft {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    to { opacity: 1; transform: translateX(0); }
}

/* --- Visit Map --- */
.visit-map {
    opacity: 0;
    transform: scale(0.95);
}

.visit-map.visible {
    animation: scaleIn 0.6s ease forwards;
}

@keyframes scaleIn {
    to { opacity: 1; transform: scale(1); }
}

/* --- Mobile Menu --- */
.mobile-link {
    font-family: 'Playfair Display', serif;
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    .btn-primary, .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* --- Print styles --- */
@media print {
    #navbar, .animate-float, .animate-scroll-line {
        display: none;
    }
}
