/* Orbitron font loaded via <link> in index.html for better performance */

/* ---- Global box-sizing fix (critical for mobile overflow) ---- */
.book-product-section *,
.book-product-section *::before,
.book-product-section *::after,
.sales-progress-wrap *,
.sales-progress-wrap *::before,
.sales-progress-wrap *::after,
.countdown-wrapper *,
.countdown-wrapper *::before,
.countdown-wrapper *::after {
    box-sizing: border-box;
}

/* ---- Sales Progress Bar ---- */
.sales-progress-wrap {
    background: #e8e8e8;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1rem;
    margin: 1.5rem 0 1.25rem;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.sales-count-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
}

.sales-count-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #333;
    font-weight: 700;
}

.sales-count-num {
    font-size: 0.9rem;
    color: #111;
    font-weight: 800;
}

/* Override progress.css dot/label colours for light background */
.sales-progress-wrap .ms-dot {
    background: #b0b0b0;
    border-color: rgba(0, 0, 0, 0.2);
    color: #444;
}

.sales-progress-wrap .sales-milestone.completed .ms-dot {
    background: #05a660;
    border-color: #05a660;
    color: #fff;
    box-shadow: 0 0 10px rgba(5, 166, 96, 0.35);
    animation: none;
}

.sales-progress-wrap .sales-milestone.in-progress .ms-dot {
    background: #05a660;
    border-color: #05a660;
    color: #fff;
}

.sales-progress-wrap .ms-date {
    color: #444;
}

.sales-progress-wrap .sales-milestone.completed .ms-date {
    color: #05a660;
}

.sales-progress-wrap .sales-milestone.upcoming .ms-date {
    color: #666;
}

.sales-progress-wrap .ms-title {
    color: #333;
}

.sales-progress-wrap .sales-milestone.upcoming .ms-title {
    color: #666;
}

.sales-progress-wrap .ms-badge.complete {
    background: rgba(5, 166, 96, 0.12);
    color: #05a660;
    border-color: rgba(5, 166, 96, 0.4);
}

.sales-progress-wrap .ms-badge.future {
    background: rgba(0, 0, 0, 0.07);
    color: #666;
    border-color: rgba(0, 0, 0, 0.18);
}

.sales-progress-wrap .sales-timeline-track::before {
    background: rgba(0, 0, 0, 0.12);
}

/* Timeline track */
.sales-timeline-track {
    position: relative;
    height: 120px;
}

/* Background line */
.sales-timeline-track::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    z-index: 0;
}

/* Filled progress line */
.sales-progress-fill {
    position: absolute;
    top: 18px;
    left: 18px;
    height: 5px;
    background: #05a660;
    border-radius: 3px;
    width: 0;
    transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

/* Individual milestone */
.sales-milestone {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    z-index: 1;
}

.sales-milestone[data-target="3500"] {
    transform: translateX(-100%);
    align-items: flex-end;
}

/* Scroll wrapper — always scrollable so labels never overlap */
.sales-track-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 168, 201, 0.5) rgba(0, 0, 0, 0.08);
}

.sales-track-scroll::-webkit-scrollbar {
    height: 6px;
}

.sales-track-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

.sales-track-scroll::-webkit-scrollbar-thumb {
    background: rgba(74, 168, 201, 0.5);
    border-radius: 6px;
}

.sales-track-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 168, 201, 0.7);
}

.sales-timeline-track {
    min-width: 820px;
    padding: 0 0.5rem;
}

@media (max-width: 640px) {
    .sales-progress-wrap {
        padding: 1rem;
        padding-bottom: 0.75rem;
        overflow: hidden;
    }
}

/* ---- Book Product Section ---- */
.book-product-section {
    padding: 1rem 0;
    background: #e8e8e8;
    overflow-x: hidden;
    width: 100%;
}

.product-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    overflow: hidden;
}

.product-image {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    background: #e8e8e8;
    overflow: hidden;
    min-width: 0;
}

.product-gallery {
    position: relative;
    width: 100%;
    max-width: 950px;
}

.product-gallery .gallery-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}

.product-gallery .gallery-img.active {
    display: block;
}

.product-gallery:hover .gallery-img.active {
    transform: scale(1.02);
}

.gallery-nav {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gallery-dot.active {
    background: #3d2817;
}

.gallery-dot:hover {
    background: #73563d;
}

.product-badge {
    position: absolute;
    top: 6rem;
    right: calc(50% - 250px - 2rem);
    background: #ff6b6b;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.product-details {
    background: #e8e8e8;
    padding: 4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.product-header {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.product-title {
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.product-subtitle {
    font-size: 1rem;
    color: #4a4a4a;
    font-style: normal;
    font-weight: 400;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.price-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b6b;
}

.price-original {
    font-size: 1.3rem;
    color: #888;
    text-decoration: line-through;
}

.product-description {
    margin-bottom: 2rem;
    max-width: 100%;
}

.product-description p {
    font-size: 1rem;
    line-height: 1.6;
    color: #2a2a2a;
    overflow-wrap: break-word;
}

/* Product Type Toggle */
.product-type-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.type-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
}

.type-btn.selected {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.type-btn:hover:not(.selected) {
    border-color: #999;
    color: #333;
}

.bulk-order-note {
    font-size: 0.85rem;
    color: #888;
    text-align: center;
    margin-top: 0.5rem;
}

.bulk-order-note a {
    color: #ff6b6b;
    text-decoration: none;
}

.bulk-order-note a:hover {
    text-decoration: underline;
}

.product-actions {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    flex-direction: column;
    max-width: 100%;
}

.quantity-selector {
    display: none;
}

.pre-order-btn,
.pre-order-btn:visited {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    text-decoration: none;
}

.pre-order-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    text-decoration: none;
    color: white;
}

.cart-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    border-top: none;
    max-width: 100%;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #2a2a2a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.badge::before {
    content: '☑';
    color: #5b9bd5;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Name Notice */
.name-notice {
    font-size: 0.85rem;
    color: #cc0000;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ---- Countdown Timer - Digital Style ---- */

.countdown-wrapper {
    background: #e8e8e8;
    padding: 2rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
    overflow: hidden;
}

.countdown-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    max-width: 100%;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    padding: 0;
    min-width: 0;
}

.time-value {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: #cc0000;
    line-height: 1;
    text-shadow: 0 0 20px rgba(204, 0, 0, 0.5);
}

.time-unit {
    font-size: 0.7rem;
    color: rgb(0, 0, 0);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
}

.time-separator {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: #cc0000;
    margin: 0 0.25rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(204, 0, 0, 0.5);
}

/* ---- Responsive: Tablet ---- */
@media (max-width: 968px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 0;
        min-height: auto;
    }

    .product-image {
        padding: 2.5rem 1.5rem;
    }

    .product-gallery {
        max-width: 450px;
        width: 100%;
    }

    .product-badge {
        top: 3rem;
        right: 1.5rem;
    }

    .product-details {
        padding: 2.5rem 1.5rem;
    }

    .product-title {
        font-size: 1.8rem;
    }

    .price-current {
        font-size: 2rem;
    }

    .countdown-wrapper {
        padding: 1.5rem 1rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }

    .time-value {
        font-size: 2.5rem;
    }

    .time-separator {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .time-unit {
        font-size: 0.55rem;
    }
}

/* ---- Responsive: Small Mobile ---- */
@media (max-width: 480px) {
    .product-image {
        padding: 1.5rem 1rem;
    }

    .product-gallery {
        max-width: 100%;
    }

    .product-details {
        padding: 1.5rem 1rem;
    }

    .product-title {
        font-size: 1.35rem;
        letter-spacing: 0.02em;
    }

    .product-subtitle {
        font-size: 0.9rem;
    }

    .price-current {
        font-size: 1.6rem;
    }

    .price-original {
        font-size: 1.1rem;
    }

    .product-badge {
        top: 2rem;
        right: 1rem;
        font-size: 0.65rem;
        padding: 0.4rem 0.8rem;
    }

    .pre-order-btn {
        padding: 1rem 1rem;
        font-size: 0.85rem;
        letter-spacing: 0.03em;
    }

    .countdown-timer {
        gap: 0.2rem;
    }

    .time-value {
        font-size: clamp(1.1rem, 9vw, 1.75rem);
    }

    .time-separator {
        font-size: clamp(0.9rem, 7vw, 1.5rem);
        margin: 0 0.1rem;
        margin-bottom: 0.75rem;
    }

    .time-unit {
        font-size: 0.45rem;
        letter-spacing: 0.08em;
    }

    .product-type-toggle {
        flex-wrap: wrap;
    }

    .type-btn {
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .product-description p {
        font-size: 0.9rem;
    }

    .name-notice {
        font-size: 0.8rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }
}