/* assets/css/style.css — v4: refined editorial book-shop design */

/* ===== Design Tokens =====
   Palette: warm paper background, deep forest green (trust/education),
   terracotta accent (urgency, distinct from generic orange).
   Type: Hind Siliguri across the board for Bengali support, heavier
   weights for headings to carry personality. */
:root {
    --primary-green:    #1B5E20;
    --primary-green-2:  #2E7D32;
    --primary-green-3:  #3E8E45;
    --terracotta:       #D9602E;
    --terracotta-dark:  #B94E22;
    --terracotta-rgb:   185, 78, 34;    /* for rgba() usage */
    --primary-rgb:      27, 94, 32;
    --paper:            #FBF7EF;
    --paper-deep:       #F3ECDC;
    --ink:              #1E2A20;
    --ink-soft:         #4A5A4C;
    --cream-card:       #FFFFFF;
    --gold-accent:      #C99A3A;
    --text-light:       #FBF7EF;

    --shadow-sm: 0 2px 10px rgba(27,46,28,0.08);
    --shadow-md: 0 8px 28px rgba(27,46,28,0.12);
    --shadow-lg: 0 16px 48px rgba(27,46,28,0.18);
    --shadow-book: 0 14px 30px -10px rgba(27,46,28,0.35);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 26px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
    font-family: 'Hind Siliguri', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: 3px solid var(--terracotta);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Loading Spinner ===== */
#loadingSpinner {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 56px; height: 56px;
    border: 4px solid var(--paper-deep);
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Shared Section Headings ===== */
.section-title {
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    color: var(--primary-green);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--ink-soft);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto;
}

section { padding: 42px 0; }

/* ===== Buttons ===== */
.btn-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 15px 38px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 10px 24px -6px rgba(185,78,34,0.55);
    transition: var(--transition);
    cursor: pointer;
    animation: btn-glow-pulse 4s ease-in-out infinite;
}

/* Shimmer sweep — shadamonshop-style */
.btn-order::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        105deg,
        transparent 25%,
        rgba(255,255,255,0.4) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
    animation: btn-shimmer 3.5s linear infinite;
    border-radius: inherit;
    pointer-events: none;
}

.btn-order:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -8px rgba(185,78,34,0.7);
    color: #fff;
    animation: none;
}
.btn-order:hover::after { animation: none; opacity: 0; }

.btn-submit-order {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-green-2) 0%, var(--primary-green) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 17px;
    border-radius: 50px;
    border: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.btn-submit-order:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit-order:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ===== Hero Section ===== */
.hero-section {
    background:
        radial-gradient(circle at 85% 12%, rgba(201,154,58,0.35) 0%, transparent 45%),
        radial-gradient(circle at 8% 90%, rgba(217,96,46,0.18) 0%, transparent 40%),
        linear-gradient(160deg, #163D1A 0%, var(--primary-green) 45%, var(--primary-green-3) 100%);
    color: var(--text-light);
    padding: 44px 0 38px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.offer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 7px 18px;
    border-radius: 50px;
    margin-bottom: 18px;
    animation: badge-glow 3s ease-in-out infinite;
}

.hero-title {
    font-weight: 800;
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.22;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.88);
    margin-bottom: 10px;
    line-height: 1.6;
}

/* The dedicated hero image (separate from package cover images), admin-uploaded */
.hero-image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-book);
    border: 6px solid rgba(255,255,255,0.18);
}

.hero-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.product-image-main {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-book);
    border: 6px solid rgba(255,255,255,0.18);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 3px solid rgba(255,255,255,0.25);
    opacity: 0.65;
    transition: var(--transition);
}

.gallery-thumb:hover { opacity: 0.9; transform: translateY(-2px); }

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--gold-accent);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

/* ===== Package Section ===== */
.package-section {
    background: var(--paper);
}

.package-section.alt-bg {
    background: var(--paper-deep);
}

/* Product select card — large cover image, name below, price below that.
   Click anywhere on the card to add to cart (no qty stepper here by design;
   quantity adjustment happens in the order form cart list). */
.product-select-card {
    border: 1px solid rgba(27,46,28,0.08);
    border-radius: var(--radius-md);
    padding: 0 0 22px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--cream-card);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-select-card:hover {
    border-color: var(--primary-green-3);
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.product-select-card.selected {
    border-color: var(--terracotta);
    box-shadow: 0 14px 32px -8px rgba(217,96,46,0.32);
}

.product-select-card.selected .product-select-card-imgwrap {
    background: linear-gradient(180deg, #FFF3EC 0%, #FFFFFF 60%);
}

.product-select-card-imgwrap {
    position: relative;
    background: linear-gradient(180deg, var(--paper-deep) 0%, #FFFFFF 65%);
    padding: 22px 22px 16px;
}

.product-select-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-book);
}

.product-select-card .badge-text {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--terracotta);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(217,96,46,0.4);
    z-index: 2;
}

.product-select-card .selected-badge {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--terracotta);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(217,96,34,0.4);
}

.product-select-card.selected .selected-badge { display: flex; }

.product-select-card-body {
    padding: 10px 16px 0;
    text-align: center;
}

.product-select-card h6 {
    font-weight: 700;
    color: var(--ink);
    font-size: 1.05rem;
    margin-bottom: 4px;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-select-card .free-delivery-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-green-2);
    margin-bottom: 4px;
}

.product-select-card .price-row {
    margin-bottom: 10px;
}

/* Visual button inside the card body (the whole card is clickable via .add-to-cart-btn) */
.product-select-card-body .btn-order.btn-sm {
    margin: 0 auto;
    width: auto;
    min-width: min(100%, 140px);
    padding: 9px 16px;
    font-size: 0.88rem;
    display: block;
}

/* ===== Price Tags ===== */
.price-old, .price-old-sm {
    text-decoration: line-through;
    color: #9A9484;
    margin-right: 8px;
}

.price-old { font-size: 1.1rem; }
.price-old-sm { font-size: 0.9rem; }

.price-new, .price-new-sm {
    color: var(--terracotta-dark);
    font-weight: 800;
}

.price-new { font-size: 1.8rem; }
.price-new-sm { font-size: 1.3rem; }

.discount-badge {
    display: inline-block;
    background: var(--gold-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ===== Quantity Stepper (used in the order-form cart list) =====
   Pill-shaped container with a raised center value, replacing the plain
   button pair for a more polished, app-like feel. */
.qty-control {
    user-select: none;
    display: inline-flex;
    align-items: center;
    background: var(--paper-deep);
    border-radius: 50px;
    padding: 4px;
    gap: 2px;
}

.qty-control .qty-minus,
.qty-control .qty-plus {
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 1;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--cream-card);
    color: var(--primary-green);
    box-shadow: 0 1px 4px rgba(27,46,28,0.15);
    transition: var(--transition);
}

.qty-control .qty-minus:hover,
.qty-control .qty-plus:hover {
    background: var(--primary-green-2);
    color: #fff;
    transform: scale(1.08);
}

.qty-control .qty-minus:active,
.qty-control .qty-plus:active {
    transform: scale(0.94);
}

.qty-control .qty-plus {
    background: var(--terracotta);
    color: #fff;
}

.qty-control .qty-plus:hover { background: var(--terracotta-dark); }

.qty-control .qty-value {
    font-size: 1rem;
    color: var(--ink);
    font-weight: 800;
    min-width: 28px;
    text-align: center;
}

.add-to-cart-btn { font-weight: 700; }

/* ===== Order Section (cart summary styled after the reference checkout box) ===== */
.order-section {
    background: var(--paper-deep);
}

.order-form-wrapper {
    background: var(--cream-card);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 575px) {
    .order-form-wrapper { padding: 22px 18px; }
}

.order-form-wrapper .form-label { font-weight: 600; color: var(--ink); }

.order-form-wrapper .form-control,
.order-form-wrapper .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #E4DCC8;
    padding: 11px 14px;
}

.order-form-wrapper .form-control:focus,
.order-form-wrapper .form-select:focus {
    border-color: var(--primary-green-2);
    box-shadow: 0 0 0 0.2rem rgba(46,125,50,0.15);
}

/* Cart-list product cards inside the order form — compact row style,
   image left, name + qty stepper + price right (closer to the reference
   site's order-form product rows). */
.order-select-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    text-align: left;
}

.order-select-card .product-select-card-imgwrap {
    padding: 0;
    background: none;
    flex: 0 0 64px;
}

.order-select-card img {
    width: 64px;
    height: 64px;
    min-width: 64px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: block;
}

.order-select-card .product-select-card-body {
    padding: 0;
    flex: 1;
    text-align: left;
}

.order-select-card h6 {
    font-size: 0.92rem;
    min-height: 0;
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
}

.order-select-card .selected-badge {
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

.order-select-card .badge-text { display: none; }

/* Order summary — line items + totals, echoing the reference site's table */
.order-summary {
    background: var(--paper-deep);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin-top: 8px;
}

.order-summary h5 {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 14px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(27,46,28,0.1);
    font-size: 0.98rem;
}

.summary-item:last-of-type { border-bottom: none; }

.summary-item.total {
    border-top: 2px solid var(--primary-green);
    border-bottom: none;
    margin-top: 6px;
    padding-top: 14px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--terracotta-dark);
}

/* ===== Benefits Section ===== */
.benefits-section { background: var(--paper); }

.benefit-card {
    background: var(--cream-card);
    border-radius: var(--radius-md);
    padding: 30px 24px;
    text-align: center;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 3px solid transparent;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--terracotta);
}

.benefit-icon {
    font-size: 2.1rem;
    color: var(--primary-green);
    margin-bottom: 16px;
}

.benefit-card h5 { font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.benefit-card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }

/* ===== Book Details Section ===== */
.book-details-section { background: var(--paper-deep); }

.book-cover-large {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-book);
}

/* ===== Package Items (what's inside) — larger image cards ===== */
.package-card {
    background: var(--cream-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.package-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.package-card-body {
    padding: 16px 18px;
    text-align: center;
}

.package-card-body h6 {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.98rem;
    margin-bottom: 6px;
}

/* ===== Why Buy Section ===== */
.why-buy-section { background: var(--paper); }

.why-buy-card {
    text-align: center;
    padding: 14px 12px;
    height: 100%;
}

.why-buy-icon {
    font-size: 1.9rem;
    color: var(--terracotta);
    margin-bottom: 8px;
}

.why-buy-card h5 { font-weight: 700; margin-bottom: 6px; color: var(--ink); font-size: 0.95rem; }
.why-buy-card p  { font-size: 0.83rem; color: var(--ink-soft); margin-bottom: 0; }

/* Mobile: reduce row gap for why-buy */
@media (max-width: 767px) {
    .why-buy-card { padding: 10px 8px; }
    .why-buy-icon { font-size: 1.6rem; margin-bottom: 6px; }
}

/* ===== Testimonials ===== */
.testimonials-section { background: var(--paper-deep); }

.testimonial-card {
    background: var(--cream-card);
    border-radius: var(--radius-md);
    padding: 26px;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gold-accent);
}

.testimonial-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.testimonial-name { font-weight: 700; color: var(--ink); }
.testimonial-designation { font-size: 0.85rem; color: var(--ink-soft); }
.testimonial-rating { color: var(--gold-accent); font-size: 0.9rem; letter-spacing: 1px; }

.testimonial-review {
    margin-top: 16px;
    color: var(--ink-soft);
    font-style: italic;
    line-height: 1.7;
}

/* ===== Videos ===== */
.videos-section { background: var(--paper); }

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ===== FAQ ===== */
.faq-section { background: var(--paper-deep); }

.faq-item {
    background: var(--cream-card);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
}

.faq-question i { color: var(--primary-green); transition: var(--transition); }

.faq-answer {
    display: none;
    padding: 0 22px 20px;
    color: var(--ink-soft);
    line-height: 1.65;
}

.faq-answer.active { display: block; }

/* ===== Footer ===== */
.footer {
    background: var(--ink);
    color: rgba(255,255,255,0.75);
    padding: 16px 0;
}

.footer h5 { font-weight: 700; }



.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-left: 8px;
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover { background: var(--terracotta); transform: translateY(-3px); }

/* ===== Floating Buttons ===== */
.floating-btn {
    position: fixed;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
}

.floating-btn:hover { transform: scale(1.1); color: #fff; }

.floating-btn.whatsapp { background: #25D366; right: 24px; bottom: 24px; }
.floating-btn.call { background: var(--primary-green-2); right: 24px; bottom: 90px; }
.floating-btn.messenger { background: #0084FF; right: 24px; bottom: 156px; }

@media (max-width: 575px) {
    .floating-btn { width: 46px; height: 46px; font-size: 1.1rem; right: 16px; }
    .floating-btn.whatsapp { bottom: 86px; }
    .floating-btn.call { bottom: 142px; }
    .floating-btn.messenger { bottom: 198px; }
}

/* ===== Sticky Mobile Order Bar ===== */
.sticky-mobile-order {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--cream-card);
    box-shadow: 0 -6px 24px rgba(27,46,28,0.15);
    padding: 12px 0;
    z-index: 998;
}

.sticky-mobile-order .price-display {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--terracotta-dark);
}

.sticky-badge-text {
    font-size: 0.75rem;
    color: var(--ink-soft);
    display: block;
    margin-bottom: 2px;
}

/* ===== Combo / Why-buy supplementary lists ===== */
.feature-list { list-style: none; padding: 0; }

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(27,46,28,0.15);
    color: var(--ink-soft);
}

.feature-list li i { color: var(--terracotta); margin-right: 10px; }
.feature-list li:last-child { border-bottom: none; }

/* ===== Utility ===== */
.cursor-pointer { cursor: pointer; }
.text-orange { color: var(--terracotta) !important; }
.bg-light-green { background: var(--paper-deep) !important; }

@media (max-width: 767px) {
    .product-select-card .product-select-card-imgwrap { padding: 16px 16px 12px; }
    .order-form-wrapper { padding: 24px 18px; }
}

/* ===== "একটু পরে দেখতে চাই" preview link + modal gallery ===== */
.package-card { position: relative; }

.preview-pages-link {
    position: absolute;
    top: 9px;
    right: 9px;
    background: linear-gradient(135deg, rgba(27,94,32,0.92) 0%, rgba(46,125,50,0.95) 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 10px 5px 5px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.preview-pages-link:hover {
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(185,78,34,0.5);
}

/* Round eye icon circle */
.preview-eye-circle {
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.22);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: background 0.2s;
}
.preview-pages-link:hover .preview-eye-circle {
    background: rgba(255,255,255,0.30);
}

.preview-pages-link i { font-size: 0.7rem; }

/* Modal gallery (Bootstrap modal body content) */
.preview-modal .modal-content {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.preview-modal .modal-header {
    background: var(--primary-green);
    color: #fff;
    border: none;
}

.preview-modal .modal-header .btn-close { filter: invert(1); }

.preview-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1.414;   /* A4/A5 paper ratio (1:√2) */
    object-fit: contain;
    background: var(--paper-deep);
    border-radius: var(--radius-sm);
}

/* PDF embed in the preview gallery */
.preview-gallery-pdf {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--paper-deep);
    display: block;
}

/* Thumbnail that represents a PDF file */
.preview-thumb-pdf {
    width: 56px;
    height: 56px;
    aspect-ratio: 1 / 1.414;
    background: #F3ECDC;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    font-size: 1.4rem;
    color: #B94E22;
}

.preview-thumb-pdf:hover { opacity: 0.9; }
.preview-thumb-pdf.active { opacity: 1; border-color: var(--terracotta); }

/* Thumbnail strip — horizontal scroll only, never wraps vertically */
.preview-gallery-thumbs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.15) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}
.preview-gallery-thumbs::-webkit-scrollbar { height: 3px; }
.preview-gallery-thumbs::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 2px; }

.preview-gallery-thumbs img {
    width: 52px;
    height: auto;
    aspect-ratio: 1 / 1.414;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
    scroll-snap-align: start;
}

.preview-gallery-thumbs img:hover { opacity: 0.9; }

.preview-gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--terracotta);
}

.preview-gallery-wrap {
    position: relative;
}

.preview-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.preview-gallery-nav.prev {
    left: 12px;
}

.preview-gallery-nav.next {
    right: 12px;
}


/* ================================================================
   v13: ANIMATIONS + CAROUSEL + RESPONSIVE FIXES
   ================================================================ */

/* ---- Keyframes (defined once, cleanly) ---- */
@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217,96,46,.5); }
    50%       { box-shadow: 0 0 0 7px rgba(217,96,46,0); }
}
@keyframes btn-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes btn-glow-pulse {
    0%, 100% { box-shadow: 0 10px 24px -6px rgba(185,78,34,.55); }
    50%       { box-shadow: 0 12px 34px -4px rgba(185,78,34,.80); }
}

/* ---- Section padding overrides for specific sections ---- */
.why-buy-section      { padding-top: 28px; padding-bottom: 28px; }
.benefits-section     { padding-top: 32px; padding-bottom: 32px; }

/* ====================================================================
   CAROUSEL — horizontal scroll snap on mobile, normal grid on desktop
   ==================================================================== */

.book-carousel-wrapper  { position: relative; }

/* Book carousel track */
.book-carousel-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
}
.book-carousel-track::-webkit-scrollbar { display: none; }

.book-carousel-track .book-slide {
    flex: 0 0 72vw;
    max-width: 280px;
    scroll-snap-align: start;
}

/* Testimonials carousel track */
.testi-carousel-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
}
.testi-carousel-track::-webkit-scrollbar { display: none; }

.testi-carousel-track .testi-slide {
    flex: 0 0 85vw;
    max-width: 380px;
    scroll-snap-align: start;
}

/* Dot indicators (mobile only) */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
}
.carousel-dots .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--paper-deep);
    border: 2px solid var(--primary-green-3);
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.carousel-dots .dot.active {
    background: var(--terracotta);
    border-color: var(--terracotta);
    transform: scale(1.3);
}

/* ---- Tablet: slightly wider slides ---- */
@media (min-width: 480px) {
    .book-carousel-track .book-slide  { flex: 0 0 46%; max-width: 260px; }
    .testi-carousel-track .testi-slide { flex: 0 0 70vw; max-width: 420px; }
}

/* ---- Desktop: revert to normal grid, hide dots ---- */
@media (min-width: 768px) {
    .book-carousel-track {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
        gap: 18px;
    }
    .book-carousel-track .book-slide {
        flex: unset; max-width: unset;
    }
    .testi-carousel-track {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
        gap: 20px;
    }
    .testi-carousel-track .testi-slide {
        flex: unset; max-width: unset;
    }
    .carousel-dots { display: none; }
}

/* ---- Mobile: package section button width ---- */
/* ===================================================================
   COMPREHENSIVE MOBILE RESPONSIVE — max-width: 575px (phones)
   =================================================================== */
@media (max-width: 575px) {

    /* --- Section spacing --- */
    section              { padding: 28px 0; }
    .container           { padding-left: 14px; padding-right: 14px; }

    /* --- Hero --- */
    .hero-section        { padding: 28px 0 24px; }
    .hero-title          { font-size: clamp(1.45rem, 6.5vw, 1.85rem); margin-bottom: 10px; }
    .hero-subtitle       { font-size: 0.88rem; line-height: 1.5; }
    .col-lg-6:last-child .hero-image-frame { margin-top: 16px; }
    .hero-image-frame img { border-radius: 12px; }

    /* --- Typography --- */
    .section-title       { font-size: 1.25rem; }
    .section-subtitle    { font-size: 0.85rem; }
    h5                   { font-size: 1rem; }

    /* --- Hero CTA button --- */
    .btn-order           { font-size: 0.88rem; padding: 11px 22px; }
    a.btn-order, .hero-section .btn-order { padding: 11px 24px; font-size: 0.9rem; }

    /* --- Package SELECT cards (আমাদের প্যাকেজসমূহ) --- */
    /* 2-column grid but button must not be full-width */
    .product-select-card-body .btn-order.btn-sm {
        padding: 6px 10px;
        font-size: 0.72rem;
        width: auto !important;
        min-width: unset;
        max-width: 110px;
        display: block;
        margin: 0 auto;
    }
    .product-select-card h6  { font-size: 0.82rem; min-height: unset; }
    .price-new-sm            { font-size: 1.05rem; }
    .price-old-sm            { font-size: 0.82rem; }

    /* --- Package ITEMS carousel (book cards) --- */
    .package-card-title  { font-size: 0.84rem; }
    .package-card-desc   { font-size: 0.76rem; -webkit-line-clamp: 2; }
    .package-card-body   { padding: 10px 10px 10px; }
    .preview-pages-link  { font-size: 0.68rem; padding: 4px 8px 4px 4px; top: 7px; right: 7px; }
    .preview-eye-circle  { width: 17px; height: 17px; font-size: 0.58rem; }

    /* --- Why buy --- */
    .why-buy-card        { padding: 10px 6px; }
    .why-buy-icon        { font-size: 1.5rem; margin-bottom: 5px; }
    .why-buy-card h5     { font-size: 0.82rem; margin-bottom: 3px; }
    .why-buy-card p      { font-size: 0.75rem; }

    /* --- Testimonials --- */
    .testimonial-card    { padding: 16px; }
    .testimonial-review  { font-size: 0.84rem; }
    .testimonial-name    { font-size: 0.9rem; }

    /* --- FAQ --- */
    .faq-question        { font-size: 0.9rem; padding: 13px 14px; }
    .faq-answer          { font-size: 0.84rem; padding: 10px 14px; }

    /* --- Order form --- */
    .order-form-wrapper  { padding: 16px 14px; border-radius: 12px; }
    .order-select-card   { padding: 10px 10px; gap: 10px; }
    .order-select-card img { width: 52px; height: 52px; }
    .order-summary       { padding: 14px; }
    .qty-control         { transform: scale(0.9); }

    /* --- Video --- */
    .video-wrapper-landscape { border-radius: 8px; }

    /* --- Footer --- */
    .footer-inner        { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
    .footer-copy,
    .footer-dev {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 0.78rem;
    }

    /* --- Sticky bar --- */
    .sticky-mobile-order .price-display { font-size: 1rem; }

    /* --- Floating buttons spacing --- */
    .floating-btn        { width: 44px; height: 44px; font-size: 1rem; }
}

/* ===================================================================
   TABLET responsive — 576px to 767px
   =================================================================== */
@media (min-width: 576px) and (max-width: 767px) {
    section              { padding: 32px 0; }
    .hero-title          { font-size: clamp(1.65rem, 4vw, 2.1rem); }
    .btn-order           { font-size: 0.95rem; }
    .product-select-card-body .btn-order.btn-sm {
        padding: 7px 12px;
        font-size: 0.8rem;
        width: auto;
        max-width: 130px;
        display: block;
        margin: 0 auto;
    }
}

/* ---- Global Color (injected inline from admin) ---- */
/* No styles here — injected via <style id="lp-global-color"> in header.php */

/* ================================================================
   Preview Modal — responsive, not too large on desktop
   ================================================================ */
.preview-modal-dialog {
    max-width: min(520px, 96vw);
    width: 100%;
}
.preview-gallery-main {
    width: 100%;
    max-height: 62vh;
    aspect-ratio: 1 / 1.414;
    object-fit: contain;
    background: #f0ede6;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}
.preview-gallery-pdf {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    max-height: 62vh;
    border: none;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* ---- Package card pages text ---- */
.package-card-pages {
    font-size: 0.76rem;
    color: var(--ink-soft);
    margin: 4px 0 0;
    opacity: 0.75;
}

/* ---- Video 16:9 — ensure perfect ratio ---- */
.video-wrapper-landscape {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    background: #000;
}
.video-wrapper-landscape iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* Mobile: full-width video, smaller modal */
@media (max-width: 575px) {
    .preview-modal-dialog { max-width: 98vw; }
    .preview-gallery-main, .preview-gallery-pdf { max-height: 55vh; }
    .video-wrapper-landscape { border-radius: 8px; }
    .package-card-pages { font-size: 0.72rem; }
}
