/* ============================================
   Christmas Village Shop — Merged Stylesheet
   ============================================ */

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #f8f4f0 0%, #faf7f4 100%);
    min-height: 100vh;
    color: #2d4a2e;
}

/* === Snow Canvas === */
#snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* === Navigation === */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #c41e3a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Cart badge */
.cart-link {
    position: relative;
}

.cart-badge {
    background: #165b33;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
}

/* === Hero Section (Homepage) === */
.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(196, 30, 58, 0.05) 0%, transparent 100%);
}

.hero h1 {
    font-family: 'Crimson Text', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    color: #c41e3a;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

.hero h1 span {
    color: #165b33;
}

.hero p {
    font-size: 1.25rem;
    color: #2d4a2e;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.store-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #165b33;
    border: none;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.store-btn.secondary {
    background: #c41e3a;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* === Houses Grid (Homepage) === */
.houses-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.houses-section .section-title {
    font-family: 'Crimson Text', serif;
    font-size: 2.5rem;
    color: #c41e3a;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
    position: relative;
    display: block;
}

.houses-section .section-title::after {
    content: '\2744';
    margin-left: 1rem;
    color: #165b33;
}

.houses-section .section-title::before {
    content: '\2744';
    margin-right: 1rem;
    color: #165b33;
}

.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.house-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #165b33;
    transition: all 0.4s ease;
    animation: cardAppear 0.6s ease-out both;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.house-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(196, 30, 58, 0.3);
    border-color: #c41e3a;
}

.house-card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid #165b33;
}

.house-card:hover .house-card-image {
    border-bottom-color: #c41e3a;
}

.house-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.house-card:hover .house-card-image img {
    transform: scale(1.05);
}

.difficulty-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #c41e3a;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.house-card-content {
    padding: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #fef9f5 100%);
}

.house-card h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.75rem;
    color: #c41e3a;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.house-card p {
    font-size: 0.95rem;
    color: #2d4a2e;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.house-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #165b33;
    font-weight: 600;
}

.house-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: #165b33;
    font-weight: 700;
}

.view-guide {
    display: flex;
    align-items: center;
    color: #c41e3a;
    font-size: 0.95rem;
    font-weight: 700;
}

.view-guide svg {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.house-card:hover .view-guide svg {
    transform: translateX(5px);
}

/* === Product Detail Page === */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #165b33;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #c41e3a;
    transform: translateX(-5px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: 'Crimson Text', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #c41e3a;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    font-size: 1.25rem;
    color: #165b33;
    font-weight: 600;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-card {
    background: #ffffff;
    border: 3px solid #165b33;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-card-label {
    font-size: 0.9rem;
    color: #165b33;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.info-card-value {
    font-family: 'Crimson Text', serif;
    font-size: 1.75rem;
    color: #c41e3a;
    font-weight: 700;
}

/* Gallery */
.gallery-section {
    background: #ffffff;
    border: 3px solid #165b33;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-family: 'Crimson Text', serif;
    font-size: 2rem;
    color: #c41e3a;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title .icon {
    font-size: 1.75rem;
}

.gallery-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}

.gallery-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #ffffff;
    padding: 2rem 1.5rem 1rem;
    font-size: 1.1rem;
}

.gallery-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: #c41e3a;
    transform: scale(1.2);
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(196, 30, 58, 0.9);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: #c41e3a;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn.prev { left: 1rem; }
.gallery-nav-btn.next { right: 1rem; }

/* Content Sections */
.content-section {
    background: #ffffff;
    border: 3px solid #165b33;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-section ul,
.content-section ol {
    padding-left: 1.5rem;
    color: #2d4a2e;
    line-height: 1.8;
}

.content-section li {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.content-section li strong {
    color: #c41e3a;
}

.subsection {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed rgba(22, 91, 51, 0.3);
}

.subsection:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.subsection h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: #165b33;
    font-weight: 700;
    margin-bottom: 1rem;
}

.img_assembly {
    width: 100%;
    height: 100%;
}

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, #fef9f5 0%, #fff5e6 100%);
    border-left: 4px solid #c41e3a;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.tip-box-title {
    font-weight: 700;
    color: #c41e3a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-box-content {
    color: #2d4a2e;
    line-height: 1.6;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #c41e3a 0%, #a01730 100%);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(196, 30, 58, 0.3);
    margin-top: 3rem;
}

.cta-box h2 {
    font-family: 'Crimson Text', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.cta-box .product-price-large {
    font-family: 'Crimson Text', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #ffffff;
    color: #c41e3a;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.cta-btn.secondary {
    background: #165b33;
    color: #ffffff;
}

.cta-btn:disabled,
.cta-btn.in-cart {
    background: #165b33;
    color: #ffffff;
    cursor: default;
    transform: none;
}

/* === Cart Page === */
.cart-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.cart-section h1 {
    font-family: 'Crimson Text', serif;
    font-size: 2.5rem;
    color: #c41e3a;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.cart-empty {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #2d4a2e;
}

.cart-empty a {
    color: #c41e3a;
    font-weight: 700;
}

.cart-items {
    background: #ffffff;
    border: 3px solid #165b33;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 2px dashed rgba(22, 91, 51, 0.3);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #165b33;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.25rem;
    color: #c41e3a;
    font-weight: 700;
}

.cart-item-info p {
    font-size: 0.9rem;
    color: #2d4a2e;
}

.cart-item-price {
    font-family: 'Crimson Text', serif;
    font-size: 1.25rem;
    color: #165b33;
    font-weight: 700;
    white-space: nowrap;
}

.cart-item-remove {
    background: none;
    border: 2px solid #c41e3a;
    color: #c41e3a;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #c41e3a;
    color: #fff;
}

.cart-summary {
    background: #ffffff;
    border: 3px solid #165b33;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: right;
}

.cart-total {
    font-family: 'Crimson Text', serif;
    font-size: 2rem;
    color: #c41e3a;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* === Success / Cancel Pages === */
.message-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.message-section h1 {
    font-family: 'Crimson Text', serif;
    font-size: 2.5rem;
    color: #165b33;
    margin-bottom: 1rem;
}

.message-section p {
    font-size: 1.1rem;
    color: #2d4a2e;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.download-links {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.download-links li {
    margin-bottom: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #165b33;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* === Footer === */
footer {
    background: #165b33;
    color: #ffffff;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.social-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === Flash Messages === */
.flash-message {
    max-width: 1400px;
    margin: 6rem auto 0;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.flash-message.success {
    background: #d4edda;
    color: #165b33;
    border: 2px solid #165b33;
}

.flash-message.error {
    background: #f8d7da;
    color: #c41e3a;
    border: 2px solid #c41e3a;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        text-align: center;
    }

    .houses-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .gallery-container {
        height: 350px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .cart-item {
        flex-wrap: wrap;
    }

    .cart-actions {
        justify-content: center;
    }
}
