/* style.css - Complete stylesheet for boekenweek.com */

/* Back button at top */
.detail-topbar {
    margin: 10px 0 0 0;
}
.back-button {
    display: inline-block;
    padding: 8px 14px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 0.95em;
}
.back-button:hover {
    background: #e0e0e0;
}

/* Detail layout: image left, info right */
.detail-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 20px 0;
}
.detail-image {
    flex: 0 0 auto;
    max-width: 320px;
}
.detail-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.detail-info {
    flex: 1 1 300px;
    min-width: 240px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}
.detail-row {
    display: flex;
    gap: 8px;
    padding: 4px 0;
}
.detail-label {
    font-weight: bold;
    min-width: 130px;
    color: #555;
}
.detail-value {
    flex: 1;
}

/* Carousel */
.carousel-section {
    margin: 40px 0 20px 0;
}
.carousel-heading {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #444;
}
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 0;
    flex: 1;
    scrollbar-width: thin;
}
.carousel-item {
    flex: 0 0 auto;
    width: 110px;
    text-decoration: none;
    color: #333;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}
.carousel-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}
.carousel-item.active {
    opacity: 1;
    outline: 2px solid #333;
    border-radius: 6px;
}
.carousel-item img {
    width: 110px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    display: block;
}
.carousel-caption {
    display: block;
    font-size: 0.85em;
    margin-top: 4px;
}
.carousel-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}
.carousel-btn:hover {
    background: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffcc77;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: black;
    font-size: 1rem;
    line-height: 1.4;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: bold;
    margin-left: 3rem;
    color: #2c1810;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px 20px;
    margin: 30px 0 20px;
}

.grid-item {
    background: rgba(255, 245, 220, 0.7);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    background: #fff2e0;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px 10px 12px;
    text-align: center;
}

.card-link img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    border-radius: 12px;
    background: #fae4b3;
    padding: 5px;
    transition: 0.2s;
}

.card-link h2 {
    font-size: clamp(0.9rem, 3.5vw, 1.2rem);
    margin-left: 0;
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #3a2a1f;
    word-break: break-word;
}

.card-link:hover img {
    opacity: 0.95;
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .collection-grid {
        gap: 16px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .card-link {
        padding: 10px 6px 8px;
    }

    .card-link h2 {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .card-link h2 {
        font-size: 0.75rem;
    }
}

.contact-section {
    margin-top: 45px;
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid #e6a821;
    font-size: 1.1rem;
}

.contact-section a {
    color: #1f4f2b;
    font-weight: bold;
    background: #fff0cc;
    padding: 5px 12px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.2s;
}

.contact-section a:hover {
    background: #e6b422;
    color: black;
    transform: scale(1.02);
}

.phone {
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

.update-date {
    background: #b87c2e40;
    display: inline-block;
    padding: 5px 16px;
    border-radius: 40px;
    font-weight: bold;
    font-size: clamp(1rem, 3vw, 1.3rem);
}

.note {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 15px;
    font-style: italic;
}

/* Optional: reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .grid-item, .card-link:hover img, .contact-section a {
        transition: none;
    }

    .grid-item:hover {
        transform: none;
    }
}

/* ============================================
   Boekenweekgeschenken page specific styles
   ============================================ */

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: #2c1810;
    margin-bottom: 15px;
}

.instruction {
    text-align: center;
    font-size: 1rem;
    color: #3a2a1f;
    background: rgba(255, 245, 220, 0.6);
    padding: 12px 20px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 25px;
}

/* Gallery grid for the images */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.gallery-item {
    background: rgba(255, 245, 220, 0.5);
    border-radius: 12px;
    padding: 10px;
    transition: all 0.2s ease;
    text-align: center;
}

.gallery-item:hover {
    transform: translateY(-3px);
    background: #fff2e0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item a {
    display: block;
    text-decoration: none;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s ease;
    display: block;
}

/* Hover effect: make image transparent and show year overlay */
.gallery-item:hover img {
    opacity: 0.3;
}

/* Year label - hidden by default, appears on hover */
.year-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c1810;
    background: rgba(255, 245, 220, 0.9);
    padding: 8px 16px;
    border-radius: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Show year label on hover */
.gallery-item:hover .year-label {
    opacity: 1;
    visibility: visible;
}

/* Navigation back link */
.back-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 20px;
    background: #e6a821;
    color: #2c1810;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: 0.2s;
}

.back-link:hover {
    background: #d4941a;
    transform: translateX(-3px);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .year-label {
        font-size: 1rem;
        padding: 5px 10px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    .gallery-item {
        padding: 6px;
    }

    .year-label {
        font-size: 0.8rem;
        padding: 4px 8px;
        white-space: nowrap;
    }
}

/* ============================================
   Off-Canvas Hamburger Menu (Push Content)
   ============================================ */

/* Base styles - body with transition for smooth push effect */
body {
    transition: margin-left 0.4s ease;
    margin-left: 0;
}

/* When menu is open, push body content to the right */
body.menu-open {
    margin-left: 280px;
}

/* Hamburger button - fixed position */
.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 45px;
    height: 45px;
    background: #2c1810;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
}

/* When menu is open, move hamburger button to the right */
body.menu-open .hamburger-btn {
    left: 300px;
    background: #e6a821;
}

.hamburger-btn:hover {
    background: #e6a821;
    transform: scale(1.05);
}

.hamburger-btn:hover span {
    background: #2c1810;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: #ffcc77;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Optional: Transform hamburger into X when menu is open */
body.menu-open .hamburger-btn span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

body.menu-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
}

body.menu-open .hamburger-btn span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* The off-canvas sidebar menu */
.offcanvas-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff2e0;
    z-index: 1000;
    transition: left 0.4s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    border-right: 2px solid #e6a821;
}

/* When menu is open, slide it in */
body.menu-open .offcanvas-menu {
    left: 0;
}

/* Menu header */
.menu-header {
    padding: 25px 20px;
    background: #e6a821;
    text-align: center;
    border-bottom: 1px solid #d4941a;
}

.menu-header h3 {
    color: #2c1810;
    font-size: 1.3rem;
    margin: 0;
    font-weight: bold;
}

.menu-header p {
    color: #2c1810;
    font-size: 0.8rem;
    margin: 5px 0 0;
    opacity: 0.8;
}

/* Close button inside menu */
.close-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2c1810;
    padding: 5px;
    line-height: 1;
    transition: 0.2s;
}

.close-menu:hover {
    transform: scale(1.1);
    color: #ffcc77;
}

/* Menu scrollable content */
.menu-content {
    margin: 5px;
}

.menu-category {
    font-weight: bold;
    color: #e6a821;
    padding: 12px 20px 4px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #e6a821;
    margin-top: 10px;
}

.menu-category:first-of-type {
    margin-top: 0;
}

.menu-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-content li {
    border-bottom: 1px solid #f0dbb4;
}

.menu-content li:last-child {
    border-bottom: none;
}

.menu-content a {
    display: block;
    padding: 2px 10px 2px 10px;
    color: #2c1810;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-content a:hover {
    background: #e6a821;
    color: #2c1810;
    padding-left: 20px;
}

/* Home link special styling */
.menu-content .home-link {
    background: #e6a82120;
    font-weight: bold;
    border-top: 1px solid #e6a821;
    margin-top: 10px;
}

.menu-content .home-link a {
    padding-left: 20px;
}

.menu-content .home-link a:hover {
    background: #e6a821;
    padding-left: 30px;
}

/* Overlay when menu is open (click to close) */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* Adjust container padding when menu is open */
body.menu-open .container {
    padding-left: 20px;
    padding-right: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .offcanvas-menu {
        width: 260px;
        left: -260px;
    }

    body.menu-open {
        margin-left: 260px;
    }

    body.menu-open .hamburger-btn {
        left: 280px;
    }

    .hamburger-btn {
        width: 40px;
        height: 40px;
        gap: 5px;
    }

    .hamburger-btn span {
        width: 20px;
        height: 2.5px;
    }

    .menu-content a {
        padding: 8px 20px 8px 30px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .offcanvas-menu {
        width: 240px;
        left: -240px;
    }

    body.menu-open {
        margin-left: 240px;
    }

    body.menu-open .hamburger-btn {
        left: 260px;
    }

    .menu-category {
        font-size: 0.75rem;
    }
}

/* The off-canvas sidebar menu */
.offcanvas-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff2e0;
    z-index: 1000;
    transition: left 0.4s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    border-right: 2px solid #e6a821;

    /* Custom scrollbar for Firefox */
    scrollbar-width: thin;
    scrollbar-color: #e6a821 #f0dbb4;
}

/* Custom scrollbar for WebKit browsers (Chrome, Safari, Edge) */
.offcanvas-menu::-webkit-scrollbar {
    width: 8px;
}

.offcanvas-menu::-webkit-scrollbar-track {
    background: #f0dbb4;
    border-radius: 10px;
    margin: 8px 0;
}

.offcanvas-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e6a821, #c98510);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.offcanvas-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f0b831, #e6a821);
}

.offcanvas-menu::-webkit-scrollbar-thumb:active {
    background: #b87c2e;
}

.offcanvas-menu::-webkit-scrollbar-corner {
    background: #f0dbb4;
}

/* Additional page-specific styles for book detail page */
.book-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.book-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e6a821;
    padding-bottom: 15px;
}

.book-header h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: #2c1810;
    margin: 0;
}

.book-header .subtitle {
    color: #b87c2e;
    font-size: 1rem;
    margin-top: 5px;
}

.book-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.book-image {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.book-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 8px solid #fff2e0;
    transition: transform 0.3s ease;
}

.book-image img:hover {
    transform: scale(1.02);
}

.book-details {
    flex: 1.5;
    min-width: 280px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid #f0dbb4;
}

.info-table td {
    padding: 12px 8px;
    vertical-align: top;
}

.info-label {
    font-weight: bold;
    color: #b87c2e;
    width: 35%;
    font-size: 0.95rem;
}

.info-value {
    color: #2c1810;
    width: 65%;
    font-size: 0.95rem;
}

.price-tag {
    background: #e6a821;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c1810;
}

.stock-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
}

.stock-yes {
    background: #4caf50;
    color: white;
}

.stock-no {
    background: #f44336;
    color: white;
}

.nav-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0dbb4;
}

.nav-button {
    display: inline-block;
    padding: 10px 24px;
    background: #e6a821;
    color: #2c1810;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.nav-button:hover {
    background: #d4941a;
    transform: translateX(-3px);
}

.nav-button-next {
    background: #2c1810;
    color: #ffcc77;
}

.nav-button-next:hover {
    background: #3a2a1f;
    transform: translateX(3px);
}

.special-note {
    background: rgba(230, 168, 33, 0.1);
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 4px solid #e6a821;
    font-size: 0.9rem;
    color: #3a2a1f;
}

@media (max-width: 768px) {
    .book-content {
        flex-direction: column;
        gap: 20px;
    }

    .info-label {
        width: 40%;
    }

    .info-value {
        width: 60%;
    }

    .nav-buttons {
        justify-content: center;
    }
}

/* Carousel styles */
.carousel-container {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 2px solid #e6a821;
}

.carousel-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c1810;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-title::before {
    content: "📖";
    font-size: 1.3rem;
}

.carousel-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding: 15px 0;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: #e6a821 #f0dbb4;
}

.carousel-wrapper::-webkit-scrollbar {
    height: 8px;
}

.carousel-wrapper::-webkit-scrollbar-track {
    background: #f0dbb4;
    border-radius: 10px;
}

.carousel-wrapper::-webkit-scrollbar-thumb {
    background: #e6a821;
    border-radius: 10px;
}

.carousel-track {
    display: inline-flex;
    gap: 15px;
    padding: 0 10px;
}

.carousel-item {
    display: inline-block;
    width: 100px;
    text-align: center;
    transition: transform 0.2s;
}

.carousel-item a {
    text-decoration: none;
}

.carousel-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.carousel-item img:hover {
    transform: scale(1.05);
    border-color: #e6a821;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-year {
    display: block;
    font-size: 0.7rem;
    color: #2c1810;
    margin-top: 5px;
    font-weight: 500;
}

/* Active item highlight (optional) */
.carousel-item.active img {
    border-color: #e6a821;
    box-shadow: 0 0 0 2px #e6a821;
}

@media (max-width: 768px) {
    .book-content {
        flex-direction: column;
        gap: 20px;
    }

    .info-label {
        width: 40%;
    }

    .carousel-item {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        width: 70px;
    }

    .carousel-year {
        font-size: 0.6rem;
    }
}

.page-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: #2c1810;
    margin-bottom: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.gallery-item {
    background: rgba(255, 245, 220, 0.5);
    border-radius: 12px;
    padding: 10px;
    transition: all 0.2s ease;
    text-align: center;
}

.gallery-item:hover {
    transform: translateY(-3px);
    background: #fff2e0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item a {
    display: block;
    text-decoration: none;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s ease;
    display: block;
}

.gallery-item:hover img {
    opacity: 0.3;
}

.gallery-item:hover .year-label {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .year-label {
        font-size: 1rem;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    .gallery-item {
        padding: 6px;
    }

    .year-label {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Additional header styling */
.main-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #d4c9b8;
}

.main-header h1 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    color: #2c3e2f;
    letter-spacing: 2px;
    font-weight: 600;
}

.main-header .header-description {
    font-size: 1rem;
    color: #5a6e5a;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .main-header h1 {
        font-size: 1.8rem;
    }
    .main-header .header-description {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}