/* ═══════════════════════════════════════════
   DHAKA PRINTING HOUSE — Premium Animations
   ═══════════════════════════════════════════ */

/* ── Category Card Animations ── */
.dp_box {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    background: #fff;
}
.dp_box:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
    transform: translateY(-6px);
}
.dp_thumb {
    position: relative;
    overflow: hidden;
}
.dp_thumb img {
    transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94) !important;
    border-radius: 12px 12px 0 0;
}
.dp_box:hover .dp_thumb img {
    transform: scale(1.08) !important;
}
/* Shimmer overlay on hover */
.dp_thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.dp_box:hover .dp_thumb::after {
    transform: translateX(100%);
}
/* Category title slide-up */
.dp_info {
    overflow: hidden;
    padding: 10px 12px 12px;
}
.dp_title {
    transition: color 0.25s ease;
    font-size: 14px;
    font-weight: 600;
}
.dp_box:hover .dp_title {
    color: #e05b00;
}

/* ── BC Box (Card style) Animations ── */
.bc_box {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    text-decoration: none !important;
}
.bc_box .card {
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}
.bc_box:hover .card {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}
.bc_box .card-img {
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94) !important;
    filter: brightness(0.85);
}
.bc_box:hover .card-img {
    transform: scale(1.1) !important;
    filter: brightness(0.75);
}
/* Slide-up overlay label */
.bc_box .card-img-overlay {
    transition: background 0.35s ease;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
}
.bc_box:hover .card-img-overlay {
    background: linear-gradient(to top, rgba(220,80,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}
.bc_box .custom_button2 {
    transition: letter-spacing 0.3s ease, background 0.3s ease;
}
.bc_box:hover .custom_button2 {
    letter-spacing: 1px;
}

/* ── Mega Menu Banner Animation ── */
.menu_banner a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
}
.menu_banner img {
    transition: transform 0.5s ease, filter 0.5s ease;
    border-radius: 10px;
}
.menu_banner a:hover img {
    transform: scale(1.06);
    filter: brightness(0.9) saturate(1.2);
}

/* ── Homepage Slider Enhanced Animation ── */
.slider_section .mySlides.active img {
    transform: scale(1.08) !important;
    transition: transform 12s ease-out !important;
}
.slider_content h2 {
    animation: slideInUp 0.8s ease both;
}
.slider_content p, .slider_content .btn_slider {
    animation: slideInUp 0.8s ease 0.2s both;
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Product Card Animations ── */
.product_card, .product_item, .p_card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}
.product_card:hover, .product_item:hover, .p_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* ── Page Load Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.category_section {
    animation: fadeInUp 0.6s ease both;
}

/* ── Pulse Badge ── */
@keyframes pulse-orange {
    0%   { box-shadow: 0 0 0 0 rgba(224,91,0,0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(224,91,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(224,91,0,0); }
}
.featured_badge, .new_badge {
    animation: pulse-orange 2s infinite;
}

/* ── Button Hover Effects ── */
.btn_slider, .custom_button, .custom_button2 {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.btn_slider::after, .custom_button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.btn_slider:hover::after, .custom_button:hover::after {
    transform: scaleX(1);
}

/* ── Homepage Category Grid ── */
.all_category_section a, .lac_item a {
    transition: all 0.3s ease;
    display: block;
    border-radius: 8px;
    overflow: hidden;
}
.all_category_section a:hover, .lac_item a:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ── Smooth scroll & transitions ── */
* { scroll-behavior: smooth; }
img { transition: opacity 0.3s ease; }

/* ── Top banner text animation ── */
.text_slider_wrap {
    animation: marqueeFloat 0.5s ease;
}
@keyframes marqueeFloat {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Category hero banner (on category page) ── */
.c_breadcrumb {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 12px 0;
    border-bottom: 2px solid rgba(255,120,0,0.4);
}
.c_breadcrumb a, .c_breadcrumb span {
    color: rgba(255,255,255,0.85) !important;
    font-size: 13px;
}
.c_breadcrumb a:hover { color: #ff7a00 !important; text-decoration: none !important; }

/* ── Mobile menu smooth open ── */
#collapseLeftMenu {
    transition: all 0.3s ease;
}

/* ═══════════════════════════════════════
   STAGGERED ENTRY + HOVER OVERLAY v2
   ═══════════════════════════════════════ */

/* Stagger via data-delay (applied by JS) */
.animate-on-scroll[data-delay] {
    transition-delay: 0ms;
}

/* ── Print-service hover overlay ── */
.dph_overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(30, 30, 60, 0.72);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-decoration: none !important;
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}
.dp_box:hover .dph_overlay {
    opacity: 1;
    pointer-events: auto;
}
.dph_icon {
    font-size: 2rem;
    display: block;
    transform: translateY(10px);
    transition: transform 0.35s ease;
    line-height: 1;
}
.dp_box:hover .dph_icon {
    transform: translateY(0);
}
.dph_label {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid rgba(255,255,255,0.7);
    padding: 4px 14px;
    border-radius: 20px;
    transform: translateY(10px);
    transition: transform 0.35s ease 0.05s, background 0.2s ease;
}
.dp_box:hover .dph_label {
    transform: translateY(0);
    background: rgba(255,255,255,0.15);
}

/* dp_sub_link consistent style */
.dp_sub_link {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════
   PRINTING HOUSE — FULL SITE ANIMATION SYSTEM v3
   Pages: Home · Category · Product
   ═══════════════════════════════════════════════════════ */

/* ── Core Keyframes ── */
@keyframes slideInLeft  { from { opacity:0; transform:translateX(-45px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideInRight { from { opacity:0; transform:translateX(45px);  } to { opacity:1; transform:translateX(0); } }
@keyframes fadeInDown   { from { opacity:0; transform:translateY(-22px); } to { opacity:1; transform:translateY(0); } }
@keyframes scaleInCard  { from { opacity:0; transform:translateY(22px) scale(0.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes titleUnderline { to { width:60%; } }
@keyframes drawLine       { to { width:80px; } }
@keyframes floatGlow    { from { transform:translate(0,0); } to { transform:translate(-25px,25px); } }
@keyframes spinPrint    { 0%,100%{ transform:rotate(-3deg); } 50%{ transform:rotate(3deg); } }
@keyframes popIn        { 0%{ opacity:0; transform:scale(0.7); } 70%{ transform:scale(1.06); } 100%{ opacity:1; transform:scale(1); } }

/* ── BREADCRUMB ── */
.c_breadcrumb {
    animation: fadeInDown 0.5s ease both;
}

/* ══════════════════════
   CATEGORY PAGE
   ══════════════════════ */

/* Animated page title + underline */
.cp_title {
    position: relative;
    display: inline-block;
    animation: fadeInUp 0.6s ease both;
}
.cp_title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #b78b7b), #e8a87c);
    border-radius: 3px;
    animation: titleUnderline 0.9s ease 0.5s forwards;
}

.cp_info {
    animation: fadeInUp 0.5s ease 0.2s both;
    opacity: 0;
    animation-fill-mode: both;
}

/* Product cards stagger — override base animate-on-scroll with scale effect */
.dp_box.animate-on-scroll {
    opacity: 0;
    transform: translateY(22px) scale(0.95);
    transition: none;
}
.dp_box.animate-on-scroll.visible {
    animation: scaleInCard 0.45s cubic-bezier(0.22,0.61,0.36,1) both;
}

/* Product card hover: Get Quote overlay (for product-loop) */
.dph_product_overlay {
    background: rgba(20, 20, 50, 0.75);
    border-radius: 0;
}

/* Load-more button pulse */
.category_more_button {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category_more_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

/* ══════════════════════
   PRODUCT PAGE
   ══════════════════════ */

/* Split entrance: image ← left, info → right */
.anim-slide-left {
    animation: slideInLeft 0.65s cubic-bezier(0.22,0.61,0.36,1) both;
}
.anim-slide-right {
    animation: slideInRight 0.65s cubic-bezier(0.22,0.61,0.36,1) 0.18s both;
}
.anim-fade-up {
    animation: fadeInUp 0.55s ease both;
}
.anim-scale-in {
    animation: popIn 0.5s ease both;
}

/* Product title */
.sp_title {
    animation: fadeInUp 0.5s ease 0.1s both;
}

/* Subtle glow orb behind product section */
.product_page {
    position: relative;
    overflow: hidden;
}
.product_page::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(183,139,123,0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatGlow 7s ease-in-out infinite alternate;
    z-index: 0;
}

/* Tab navigation hover + active */
.nav-link {
    transition: all 0.25s ease !important;
    position: relative;
}
.nav-link::after {
    content:'';
    position:absolute;
    bottom:0; left:50%;
    transform:translateX(-50%);
    width:0; height:2px;
    background: var(--primary, #b78b7b);
    transition: width 0.3s ease;
    border-radius:1px;
}
.nav-link:hover::after { width:70%; }

/* Table rows in product details */
.product_page table tr {
    transition: background 0.2s ease;
}
.product_page table tr:hover {
    background: rgba(183,139,123,0.07);
}

/* Review modal slide-in */
.modal.fade .modal-dialog {
    transform: translateY(-40px) scale(0.97);
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

/* ══════════════════════
   HOME PAGE ENHANCEMENTS
   ══════════════════════ */

/* Section heading with animated accent line */
.section_title h2 {
    animation: fadeInUp 0.6s ease both;
    position: relative;
    display: inline-block;
}
.section_title .empty_line {
    display: block;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--primary, #b78b7b), #e8a87c);
    border-radius: 3px;
    margin: 8px auto 24px;
    animation: drawLine 0.8s ease 0.4s forwards;
}

/* Feature product cards (on homepage) */
.feature_products .dp_box.animate-on-scroll {
    opacity: 0;
}

/* Homepage category section heading */
.category_section h2 {
    animation: fadeInUp 0.55s ease both;
}

/* Testimonial / info items */
.lac_item {
    animation: scaleInCard 0.5s ease both;
}

/* ══════════════════════
   RELATED PRODUCTS
   ══════════════════════ */
.feature_products {
    position: relative;
}
.feature_products::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
    z-index: -1;
}
.feature_products .section_title {
    overflow: hidden;
    padding-bottom: 4px;
}

/* ── Print-roller spin on product card hover ── */
.dp_thumb:hover::before {
    content: '🖨';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 18px;
    z-index: 5;
    animation: spinPrint 1.5s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* ═══════════════════════════════════════════════════
   PREMIUM ANIMATIONS v4 — Progress Bar, Transitions,
   Cursor Glow, Counters, Gradient BG, Text Reveal
   ═══════════════════════════════════════════════════ */

/* #16 Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7c59f, #ff6b35);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    transform-origin: left;
    transform: scaleX(0);
    z-index: 99999;
    transition: transform 0.1s linear;
    box-shadow: 0 0 8px rgba(255,107,53,0.6);
}
@keyframes progressShimmer {
    0%{background-position:200% 0}
    100%{background-position:-200% 0}
}

/* #17 Page Load Transition */
body { animation: pageEnter 0.5s ease-out both; }
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* #20 Cursor Glow */
#cursor-glow {
    position: fixed;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,53,0.35) 0%, transparent 70%);
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease, opacity 0.3s;
    mix-blend-mode: screen;
}
#cursor-glow.click-burst {
    width: 48px; height: 48px;
    background: radial-gradient(circle, rgba(255,107,53,0.5) 0%, transparent 70%);
    transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}

/* #21 Counter Animation */
.counter-wrap { text-align: center; padding: 20px; }
.counter-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b35;
    display: block;
    line-height: 1;
}
.counter-label { font-size: 0.85rem; color: #777; margin-top: 4px; }

/* #23 Animated Gradient Hero Overlay */
.slider_section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255,107,53,0.15) 0%,
        rgba(10,10,30,0.1) 50%,
        rgba(255,107,53,0.08) 100%);
    background-size: 400% 400%;
    animation: heroGradient 8s ease infinite;
    z-index: 1;
    pointer-events: none;
}
.slider_section { position: relative; overflow: hidden; }
.slider_section .slider_content_wrap { position: relative; z-index: 2; }
@keyframes heroGradient {
    0%  { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100%{ background-position: 0% 50%; }
}

/* #24 Text Reveal — headings animate in */
.anim-text-reveal {
    overflow: hidden;
    clip-path: inset(0 100% 0 0);
    animation: textReveal 0.8s cubic-bezier(0.77,0,0.175,1) forwards;
}
@keyframes textReveal {
    to { clip-path: inset(0 0% 0 0); }
}

/* Stagger for slide-left/right elements */
.anim-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    animation: slideFromLeft 0.7s ease forwards;
}
.anim-slide-right {
    opacity: 0;
    transform: translateX(40px);
    animation: slideFromRight 0.7s ease forwards;
}
@keyframes slideFromLeft  { to { opacity:1; transform:translateX(0); } }
@keyframes slideFromRight { to { opacity:1; transform:translateX(0); } }

/* Hero slider text animation */
.slider_content h2 {
    animation: slideFromLeft 0.8s ease both;
}
.slider_content p, .slider_content .btn {
    animation: fadeUp 0.8s ease 0.3s both;
}
@keyframes fadeUp {
    from { opacity:0; transform:translateY(20px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Hover float effect on service cards */
.dp_box {
    transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.3s ease !important;
}
.dp_box:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* #19 Magnetic Buttons — smooth follow transition */
.custom_button, .btn_slider, .so_button, .load-more {
    transition: transform 0.12s cubic-bezier(0.23, 1, 0.32, 1),
                background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important;
    will-change: transform;
}

/* #22 Skeleton Loading — shimmer on images before they load */
.dp_thumb img,
.whp,
.img-fluid.whp {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
}
.dp_thumb img.loaded,
.whp.loaded {
    background: none;
    animation: none;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-color-scheme: dark) {
    .dp_thumb img, .whp, .img-fluid.whp {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
    }
}

/* #18 Parallax Hero */
.slider_content_wrap {
    will-change: transform, opacity;
}
.slider_section .mySlides img {
    will-change: transform;
}
/* Subtle vignette on hero for depth */
.slider_section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.25) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   #30 Mobile Speed & CWV Fixes
   ═══════════════════════════════════════════════════ */

/* Remove 300ms tap delay on all interactive elements */
a, button, .btn, .dp_box, .custom_button, .load-more, input, select {
    touch-action: manipulation;
}

/* CLS fix: reserve image aspect ratio before load */
.dp_thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}
.dp_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile: show overlay on touch — always visible on small screens */
@media (max-width: 767px) {
    .dph_overlay {
        opacity: 1 !important;
        background: rgba(0,0,0,0.55) !important;
    }
    .dph_overlay .dph_label {
        font-size: 11px;
    }
    /* Better tap targets — min 44px */
    .nav-link, .navbar-brand, .dp_sub_link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    /* Prevent text overflow on hero */
    .slider_content h2 {
        font-size: 22px !important;
        line-height: 1.3;
        word-break: break-word;
    }
    .slider_content p {
        font-size: 14px !important;
    }
    /* Card float effect off on mobile (saves GPU) */
    .dp_box:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    /* Parallax off on mobile (too heavy, causes CLS) */
    .slider_content_wrap {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
}

/* ═══════════════════════════════════════════════════
   Higgsfield Video Showcase Section (#31-34)
   ═══════════════════════════════════════════════════ */
.video_showcase_section {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 50%, #f0f4ff 100%);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.video_showcase_section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
}
.video_player_wrap {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    position: relative;
    background: #000;
}
.video_showcase {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.video_placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.video_placeholder_inner {
    text-align: center;
    color: rgba(255,255,255,0.7);
}
.play_icon_large {
    width: 80px;
    height: 80px;
    background: rgba(255,107,53,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto;
    animation: pulsePlay 2s ease infinite;
}
@keyframes pulsePlay {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,107,53,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255,107,53,0); }
}
.video_feature_list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    font-size: 0.95rem;
    font-weight: 500;
}
.video_feature_list li:last-child { border-bottom: none; }

/* Hero background video (when hero.mp4 is uploaded) */
.video_hero_bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.slider_section.has-video-bg .slideshow_container { position: relative; z-index: 2; }
