/* =========================
   BOOK DETAILS - MFG STYLE
   Theme: Clean, Technical, Solid Colors
   ========================= */

:root {
    --bd-primary: #1a237e;
    --bd-accent: #ff8a65;
    --bd-text: #212121;
    --bd-muted: #616161;
    --bd-bg: #ffffff;
}

/* --- Animations --- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.book-details-container {
    padding-bottom: 80px;
    background-color: var(--bd-bg);
}

/* Breadcrumb */
.breadcrumb {
    padding: 30px 0;
    font-size: 14px;
    color: var(--bd-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}
.breadcrumb a { 
    text-decoration: none; 
    color: var(--bd-muted); 
    font-weight: 500;
    transition: color 0.2s; 
}
.breadcrumb a:hover { color: var(--bd-primary); }
.breadcrumb .current { color: var(--bd-primary); font-weight: 700; }

/* Layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    padding-top: 60px;
    
}

@media (min-width: 900px) {
    .product-layout {
        grid-template-columns: 45% 50%; /* Balanced split */
        justify-content: space-between;
    }
}

/* --- Left: Visuals --- */
.main-image-wrapper {
    background: #f4f6f9;
    border-radius: 16px;
    padding: 60px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.mfg-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--bd-primary);
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 5;
}

.book-3d img {
    max-width: 100%;
    height: 450px;
    /* max-height: 450px; */
    /* Subtle realistic shadow */
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15)); 
    transition: transform 0.3s ease;
}
.book-3d:hover img {
    transform: scale(1.05);
}

.image-thumbnails {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.thumb {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.thumb.active {
    border-color: var(--bd-primary);
    transform: translateY(-3px);
}

/* --- Right: Info --- */
.info-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.tag-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.badge-solid {
    background: var(--bd-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}
.badge-outline {
    border: 1px solid var(--bd-muted);
    color: var(--bd-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.book-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--bd-primary);
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.mfg-desc {
    font-size: 1.05rem;
    color: var(--bd-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.rating {
    color: #ffc107;
    font-size: 14px;
    font-weight: 600;
}
.rating span { color: var(--bd-text); margin-left: 8px; }

/* Price Block */
.price-block {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid var(--bd-primary);
}
.price-label {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--bd-muted);
    margin: 0 0 5px 0;
    font-weight: 600;
}
.price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bd-primary);
}
.price-unit {
    font-size: 1rem;
    color: var(--bd-muted);
}
.price-note {
    font-size: 12px;
    color: #d32f2f;
    margin: 5px 0 0 0;
}

/* Actions */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.btn-primary-action {
    flex: 1;
    background: var(--bd-primary);
    color: #fff;
    border: none;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-primary-action:hover { background: #141b6a; }

.btn-secondary-action {
    flex: 1;
    background: #fff;
    color: #25D366;
    border: 2px solid #25D366;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
    text-decoration: none;
}
.btn-secondary-action:hover { background: #e8f5e9; }

/* Tabs */
.info-tabs {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}
.tab-headers {
    display: flex;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}
.tab-link {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--bd-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.tab-link.active {
    background: #fff;
    color: var(--bd-primary);
    border-bottom: 3px solid var(--bd-accent);
}
.tab-content {
    padding: 30px;
    display: none;
}
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Specs Table */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: var(--bd-text);
}
.specs-table tr:last-child td { border-bottom: none; }
.specs-table td:first-child {
    width: 40%;
    color: var(--bd-muted);
    font-weight: 500;
}
.specs-table i { color: var(--bd-accent); margin-right: 8px; width: 20px; }

/* Features */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 20px 80px 1fr;
    align-items: center;
    gap: 10px;
    color: var(--bd-text);
    font-size: 14px;
}
.feature-list i { color: var(--bd-accent); margin-top: 4px; }

/* Turnaround Box */
.turnaround-box {
    display: flex;
    align-items: center;
    background: #f0f4f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.t-item { flex: 1; text-align: center; }
.t-label { display: block; font-size: 12px; text-transform: uppercase; color: var(--bd-muted); margin-bottom: 4px; }
.t-time { display: block; font-size: 18px; font-weight: 700; color: var(--bd-primary); }
.t-sep { width: 1px; height: 40px; background: #ccc; margin: 0 20px; }

.shipping-note { font-size: 13px; color: #2e7d32; font-weight: 600; margin: 0; }

/* Related Grid */
.related-books { margin-top: 80px; }
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.section-header-row h2 { font-size: 1.8rem; color: var(--bd-primary); margin: 0; }
.view-all-link { color: var(--bd-accent); text-decoration: none; font-weight: 600; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}
.mini-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
}
.mini-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.mini-card img { width: 100%; height: 250px; object-fit: cover; background: #f9f9f9; }
.mini-card-body { padding: 15px; }
.mini-card-body h4 { font-size: 15px; margin: 0 0 5px 0; color: var(--bd-text); }
.mini-cat { font-size: 12px; color: var(--bd-muted); text-transform: uppercase; }

/* Mobile */
@media (max-width: 768px) {
    .book-title { font-size: 1.8rem; }
    .action-buttons { flex-direction: column; }
    .tab-headers { overflow-x: auto; }
    .tab-link { white-space: nowrap; }
}



/* =========================================
   MOBILE STICKY ACTION BAR
   (Paste this at the very bottom of book-details.css)
   ========================================= */

@media (max-width: 768px) {
    /* 1. Make the main container have space at the bottom so content isn't hidden */
    .book-details-container {
        padding-bottom: 100px; /* Space for the sticky bar */
    }

    /* 2. The Sticky Bar Container */
    .action-buttons {
        position: fixed;       /* Sticks to viewport */
        bottom: 0;             /* Aligns to bottom */
        left: 0;
        right: 0;
        background: #ffffff;   /* White background */
        padding: 15px 20px;    /* Inner spacing */
        margin: 0;             /* Remove default margins */
        box-shadow: 0 -5px 20px rgba(0,0,0,0.15); /* Shadow pointing up */
        z-index: 1000;         /* Sits on top of everything */
        
        /* Layout adjustments */
      display: grid;
      grid-template-columns: 1fr 1fr; /* Side-by-side buttons */
        gap: 10px;
    }

    /* 3. Adjust Button Styles for the Bar */
    .btn-primary-action, 
    .btn-secondary-action {
        padding: 12px 10px;    /* Slightly smaller padding */
        font-size: 0.9rem;     /* Readable font size */
        border-radius: 50px;   /* Pill shape looks better on sticky bars */
        flex: 1;               /* Both buttons take equal width */
        white-space: nowrap;   /* Prevent text wrapping */
    }
      .main-image-wrapper{
    padding: 20px;
  }
  .mfg-badge{
    top: 10px;
    left: 10px;
  }
  .section-header-row h2{
    font-size: 1.2rem;
  }
  .section-header-row{
    display: grid;
    grid-template-columns: 1fr 100px;
  
  }
  .book-3d img{
    height: 350px;
  }

  .mini-card img{
    height: 150px;
  }
.related-grid{
    grid-template-columns: 1fr 1fr;
}
.specs-table tr td{
    width: 100%;
}
.specs-table tr td:nth-child(2){
    padding-left: 5px;
}
.specs-table td:first-child{
    width: 50%;
}
.specs-table td{
    font-size: 12px;
}
.feature-list li{
     font-size: 12px; 
}
.t-time{
    font-size: 14px;
}
.t-label{
    font-size: 10PX;
}
    /* Optional: Hide the original location of buttons if needed, 
       but usually, we just move the class itself. 
       The code above effectively 'moves' the buttons visually. */
}