/* ============================================
   Instrumental Quirúrgico — Complete Redesign
   Clean, modern, medical-grade
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Noto+Sans:wght@400;500;700&display=swap');

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: #1e293b;
  background: #f1f5f9;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #2563eb; text-decoration: none; transition: color .2s; }
a:hover { color: #1d4ed8; text-decoration: underline; }
h1, h2, h3, h4 { font-family: 'Figtree', sans-serif; line-height: 1.3; color: #0f172a; }

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: #2563eb; color: #fff; padding: 12px 20px;
  border-radius: 8px; z-index: 10000; font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* --- Navigation --- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #fff; border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  height: 64px;
}

.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; height: 64px; gap: 32px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: 'Figtree', sans-serif;
  font-weight: 700; font-size: 1.1rem; color: #0f172a;
  flex-shrink: 0;
}
.nav-brand:hover { color: #2563eb; text-decoration: none; }
.nav-brand img { width: 32px; height: 32px; border-radius: 6px; }

.nav-menu {
  display: flex; align-items: center; gap: 4px; flex: 1;
}

.nav-menu a {
  padding: 8px 14px; font-size: .9rem; font-weight: 500;
  color: #475569; border-radius: 6px; transition: all .2s;
  text-decoration: none; white-space: nowrap;
}
.nav-menu a:hover { color: #2563eb; background: #dbeafe; }

.nav-dropdown { position: relative; }
.nav-dropdown > a::after {
  content: ''; display: inline-block;
  margin-left: 5px; vertical-align: middle;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
}
.dropdown-content {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.1);
  padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(6px); transition: all .2s; z-index: 1001;
}
.nav-dropdown:hover .dropdown-content,
.nav-dropdown:focus-within .dropdown-content {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-content a {
  display: block; padding: 10px 14px; border-radius: 6px;
  color: #475569; font-size: .9rem;
}
.dropdown-content a:hover { background: #dbeafe; color: #2563eb; }

.nav-toggle {
  display: none; background: none; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 8px 12px; cursor: pointer;
  font-size: 1.3rem; color: #475569; margin-left: auto;
}

/* --- Banner --- */
.site-banner {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #1d4ed8 100%);
  padding: 96px 20px 48px; margin-top: 64px; text-align: center;
}
.site-banner h1 {
  font-family: 'Figtree', sans-serif; font-size: 2.2rem; font-weight: 700;
  color: #fff; margin: 0; text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.site-banner p {
  color: rgba(255,255,255,.85); font-size: 1.1rem; margin-top: 8px; max-width: 600px; margin-left: auto; margin-right: auto;
}

/* --- Main Content --- */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

main {
  padding: 32px 0 48px;
}

.content-card {
  background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 40px; margin: -24px auto 32px; position: relative; z-index: 10;
}

.content-narrow { max-width: 800px; margin: 0 auto; }

/* --- Typography --- */
.content-card h2 {
  font-size: 1.5rem; margin: 32px 0 12px; color: #0f172a;
}
.content-card h2:first-child { margin-top: 0; }
.content-card h3 {
  font-size: 1.2rem; margin: 24px 0 8px; color: #1e293b;
}
.content-card p {
  font-size: 1.05rem; color: #475569; margin-bottom: 1rem; line-height: 1.8;
}
.content-card p:last-child { margin-bottom: 0; }

/* --- Images in Content --- */
.content-card img[width="900"] {
  width: 100%; border-radius: 10px; margin: 16px 0;
}

/* --- Highlight Box --- */
.highlight-box {
  background: #dbeafe; border-left: 4px solid #2563eb;
  padding: 20px 24px; border-radius: 0 10px 10px 0;
  margin: 20px 0;
}
.highlight-box p { margin: 0; color: #1e293b; }
.highlight-box a { font-weight: 600; }

/* --- LetPrompt Cross-link --- */
.prompt-card {
  background: #f0fdf4; border: 1px solid #86efac;
  border-radius: 12px; padding: 20px 24px; margin: 24px 0;
}
.prompt-card p { margin: 0; font-size: .95rem; }
.prompt-card a { color: #059669; font-weight: 600; }
.prompt-card a:hover { color: #047857; }

/* --- Category Grid --- */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; margin: 20px 0;
}
.cat-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; overflow: hidden;
  transition: all .3s; text-decoration: none; display: block;
}
.cat-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-3px);
  text-decoration: none; border-color: #93c5fd;
}
.cat-card img {
  width: 100%; height: 200px; object-fit: cover;
}
.cat-card .cat-label {
  padding: 14px 18px; font-family: 'Figtree', sans-serif;
  font-weight: 600; font-size: 1.05rem; color: #0f172a;
  text-align: center;
}
.cat-card:hover .cat-label { color: #2563eb; }

/* --- New Images Grid --- */
.img-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin: 20px 0;
}
.img-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; overflow: hidden;
  transition: all .2s; text-decoration: none; display: block;
}
.img-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px);
  text-decoration: none;
}
.img-card img {
  width: 100%; height: 160px; object-fit: cover;
}
.img-card .img-label {
  padding: 10px 14px; font-size: .9rem; font-weight: 500;
  color: #1e293b; text-align: center;
}
.img-card:hover .img-label { color: #2563eb; }

/* --- Amazon Product Grid --- */
.amazon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px; margin: 20px 0;
}
.amazon-card {
  border: 1px solid #e2e8f0; border-radius: 12px;
  overflow: hidden; transition: all .3s;
  background: #fff; display: flex; flex-direction: column;
}
.amazon-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-3px);
  border-color: transparent;
}
.amazon-card .prod-img {
  padding: 20px; text-align: center; flex: 1;
  display: flex; align-items: center; justify-content: center;
}
.amazon-card .prod-img img {
  height: 140px; width: auto; object-fit: contain;
}
.amazon-card .prod-info {
  padding: 0 14px 14px; text-align: center;
}
.amazon-card .prod-title {
  font-size: .85rem; color: #1e293b; font-weight: 500;
  display: block; margin-bottom: 6px; line-height: 1.4;
}
.amazon-card .prod-price {
  font-weight: 700; color: #059669; font-size: 1.05rem;
}
.amazon-card .prod-price .old-price {
  text-decoration: line-through; color: #94a3b8;
  font-weight: 400; font-size: .85rem; margin-right: 6px;
}
.amazon-card .prod-price .sale-price { color: #dc2626; }
.amazon-card:hover .prod-title { color: #2563eb; }

/* --- AdSense --- */
.adsense-block {
  margin: 24px 0; text-align: center;
}

/* --- Social Share --- */
.share-bar {
  padding: 24px 0 8px; border-top: 1px solid #e2e8f0;
  margin-top: 32px; text-align: center;
}
.share-bar p { font-size: .9rem; color: #64748b; margin-bottom: 12px; }
.share-bar .a2a_kit { display: inline-flex; gap: 8px; }

/* --- Footer --- */
.site-footer {
  background: #0f172a; padding: 40px 20px; text-align: center;
  margin-top: 48px;
}
.site-footer p { color: #64748b; font-size: .85rem; margin: 0; }
.site-footer a { color: #93c5fd; }
.site-footer a:hover { color: #fff; }

/* --- Back to Top --- */
#toTop {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; background: #2563eb; color: #fff;
  border: none; border-radius: 50%; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  display: none; align-items: center; justify-content: center;
  font-size: 1.3rem; z-index: 999;
  transition: all .2s;
}
#toTop:hover { background: #1d4ed8; transform: translateY(-2px); }

/* --- Messages / Errors (hidden) --- */
.messages, #messages-console, .error { display: none !important; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
    padding: 12px; flex-direction: column; gap: 0;
  }
  .nav-menu.active { display: flex; }
  .nav-menu a { width: 100%; padding: 12px 16px; }
  .dropdown-content {
    position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none; border: none;
    padding: 0 0 0 16px; min-width: auto;
  }
  .nav-toggle { display: block; }

  .site-banner { padding: 80px 16px 32px; }
  .site-banner h1 { font-size: 1.5rem; }
  .site-banner p { font-size: .95rem; }

  .content-card { padding: 24px; margin-top: -16px; border-radius: 10px; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

  .cat-grid { grid-template-columns: 1fr; }
  .img-grid { grid-template-columns: repeat(2, 1fr); }
  .amazon-grid { grid-template-columns: repeat(2, 1fr); }

  #toTop { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .img-grid { grid-template-columns: 1fr; }
  .amazon-grid { grid-template-columns: 1fr; }
  .content-card { padding: 16px; }
  .site-banner h1 { font-size: 1.3rem; }
}

@media print {
  .site-header, #toTop, .adsense-block, .site-footer, .share-bar { display: none !important; }
}

/* --- Amazon Affiliate Cards --- */
.af-section {
  margin: 40px 0; padding: 32px; background: #f8fafc;
  border-radius: 14px; border: 1px solid #e2e8f0;
}
.af-heading { font-size: 1.3rem; margin: 0 0 6px; }
.af-desc { color: #64748b; font-size: .9rem; margin: 0 0 20px; }
.af-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.af-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  overflow: hidden; transition: all .3s;
}
.af-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-3px); border-color: transparent; }
.af-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.af-link:hover { text-decoration: none; }
.af-img { padding: 20px; text-align: center; display: flex; align-items: center; justify-content: center; }
.af-img img { height: 140px; width: auto; object-fit: contain; }
.af-body { padding: 0 16px 16px; flex: 1; display: flex; flex-direction: column; }
.af-title { font-size: .85rem; margin: 0 0 6px; color: #1e293b; line-height: 1.4; font-weight: 500; }
.af-card:hover .af-title { color: #2563eb; }
.af-price { font-weight: 700; color: #059669; font-size: 1.05rem; margin: 0 0 6px; }
.af-badge { display: inline-block; background: #fef3c7; color: #92400e; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; align-self: flex-start; }
.af-cta { display: block; text-align: center; background: #2563eb; color: #fff !important; padding: 8px 0; border-radius: 6px; font-size: .85rem; font-weight: 600; margin-top: auto; transition: background .2s; }
.af-cta:hover { background: #1d4ed8; }
.af-disclosure { font-size: .8rem; color: #94a3b8; margin: 16px 0 0; text-align: center; }
@media (max-width: 768px) { .af-section { padding: 20px; } .af-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .af-grid { grid-template-columns: 1fr; } }

/* --- IA para Cirujanos - Prompt Cards --- */
.prompt-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.prompt-card-big {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 24px; transition: all .3s;
  display: flex; flex-direction: column;
}
.prompt-card-big:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); border-color: #93c5fd; }
.prompt-header { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.prompt-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
}
.prompt-badge.json { background: #dbeafe; color: #1d4ed8; }
.prompt-badge.text { background: #f0fdf4; color: #15803d; }
.prompt-badge.popular { background: #fef3c7; color: #92400e; }
.prompt-card-big h3 { font-size: 1.1rem; margin: 0 0 10px; color: #0f172a; }
.prompt-card-big p { font-size: .92rem; color: #475569; line-height: 1.6; margin: 0 0 12px; flex: 1; }
.prompt-tip {
  background: #fffbeb; border-left: 3px solid #f59e0b;
  padding: 10px 14px; border-radius: 0 6px 6px 0; margin-bottom: 16px;
  font-size: .85rem; color: #78350f; line-height: 1.5;
}
.prompt-btn {
  display: inline-block; background: #2563eb; color: #fff !important;
  padding: 10px 20px; border-radius: 8px; font-weight: 600;
  font-size: .9rem; text-align: center; text-decoration: none !important;
  transition: background .2s; align-self: flex-start;
}
.prompt-btn:hover { background: #1d4ed8; color: #fff !important; }

/* --- FAQ --- */
.faq-item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #e2e8f0; }
.faq-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.faq-item h3 { font-size: 1rem; margin: 0 0 8px; color: #0f172a; cursor: pointer; }
.faq-item h3:hover { color: #2563eb; }
.faq-item p { font-size: .92rem; color: #475569; line-height: 1.7; margin: 0; }

@media (max-width: 768px) {
  .prompt-grid { grid-template-columns: 1fr; }
  .prompt-card-big { padding: 18px; }
}

/* ============================================
   AMAZON PRODUCT CARDS — Modern Glow-up
   Overrides Drupal amazon-my-grid styles
   ============================================ */

/* Grid container */
.amazon-my-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 20px !important;
  margin: 28px 0 !important;
}

.amazon-my-item {
  width: 100% !important;
  padding: 0 !important;
}

.amazon-my-item .thumbnail {
  background: #fff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.amazon-my-item .thumbnail:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 40px rgba(37,99,235,0.12), 0 4px 12px rgba(0,0,0,0.08) !important;
  border-color: #93c5fd !important;
}

/* Product image area */
.amazon-my-item .producto {
  padding: 24px 20px 16px !important;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
}

.amazon-my-item .producto img {
  height: 150px !important;
  width: auto !important;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.06));
}

.amazon-my-item .thumbnail:hover .producto img {
  transform: scale(1.08);
}

/* Price styling */
.amazon-my-item .price {
  margin-top: 10px;
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.amazon-my-item .price.rebaja {
  color: #059669;
}

.amazon-my-item .sin-rebaja {
  text-decoration: line-through;
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.85rem;
}

.amazon-my-item .con-rebaja {
  color: #dc2626;
  font-weight: 700;
  font-size: 1.3rem;
  background: #fef2f2;
  padding: 2px 10px;
  border-radius: 6px;
}

/* Caption / title area */
.amazon-my-item .caption {
  padding: 12px 16px 20px !important;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.amazon-my-item .caption a {
  text-decoration: none !important;
}

.amazon-my-item .caption h4 {
  font-family: 'Figtree', sans-serif;
  font-size: 0.88rem !important;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.5;
  margin: 0 0 12px !important;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.amazon-my-item .thumbnail:hover .caption h4 {
  color: #2563eb;
}

/* Add a "Ver en Amazon" button via CSS on the caption link */
.amazon-my-item .caption::after {
  content: "Ver en Amazon →";
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 10px 0;
  border-radius: 8px;
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: auto;
  transition: all 0.25s;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.amazon-my-item .thumbnail:hover .caption::after {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}

/* Sale badge */
.amazon-my-item .thumbnail::before {
  display: none; /* We'll use an inline approach */
}

/* Responsive */
@media (max-width: 768px) {
  .amazon-my-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .amazon-my-item .producto {
    padding: 16px 12px 10px !important;
    min-height: 140px;
  }
  .amazon-my-item .producto img {
    height: 110px !important;
  }
  .amazon-my-item .price {
    font-size: 1rem;
  }
  .amazon-my-item .con-rebaja {
    font-size: 1.1rem;
  }
  .amazon-my-item .caption h4 {
    font-size: 0.82rem !important;
  }
}

@media (max-width: 480px) {
  .amazon-my-grid {
    grid-template-columns: 1fr !important;
  }
  .amazon-my-item .producto {
    min-height: 180px;
  }
  .amazon-my-item .producto img {
    height: 130px !important;
  }
}

/* Remove old Drupal Amazon styles that conflict */
.amazon-my-item .thumbnail.fullsize {
  border-radius: 14px !important;
}

/* Star rating placeholder */
.amazon-my-item .thumbnail::after {
  content: "★★★★★";
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  color: #f59e0b;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.3s;
}

.amazon-my-item .thumbnail:hover::after {
  opacity: 1;
}

/* Smooth entrance animation */
.amazon-my-grid .amazon-my-item {
  animation: amazonFadeIn 0.5s ease-out both;
}

.amazon-my-grid .amazon-my-item:nth-child(1) { animation-delay: 0.05s; }
.amazon-my-grid .amazon-my-item:nth-child(2) { animation-delay: 0.1s; }
.amazon-my-grid .amazon-my-item:nth-child(3) { animation-delay: 0.15s; }
.amazon-my-grid .amazon-my-item:nth-child(4) { animation-delay: 0.2s; }
.amazon-my-grid .amazon-my-item:nth-child(5) { animation-delay: 0.25s; }
.amazon-my-grid .amazon-my-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes amazonFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Amazon section heading (for pages that have them) */
h2[id*="comprar"],
h3[id*="comprar"],
h2:contains("Comprar"),
h2:contains("compra") {
  font-family: 'Figtree', sans-serif;
  color: #0f172a;
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

h2[id*="comprar"]::after,
h3[id*="comprar"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #059669);
  border-radius: 2px;
}

/* --- AdSense Block --- */
.adsense-block {
  margin: 32px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
}

/* ============================================
   IMAGE INDEX — Modern Card Grid
   Overrides Drupal views-bootstrap-grid
   ============================================ */

/* The main index image grid */
.views-bootstrap-grid-plugin-style .row,
.page-wrap .views-bootstrap-grid-plugin-style .row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 16px !important;
  margin: 20px 0 !important;
}

.views-bootstrap-grid-plugin-style .row > div {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 !important;
}

.views-bootstrap-grid-plugin-style .row > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  border-color: #93c5fd;
}

.views-bootstrap-grid-plugin-style .row > div a {
  display: block;
  text-decoration: none !important;
}

.views-bootstrap-grid-plugin-style img {
  width: 100% !important;
  height: 160px !important;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  transition: transform 0.4s;
}

.views-bootstrap-grid-plugin-style .row > div:hover img {
  transform: scale(1.05);
}

.views-bootstrap-grid-plugin-style .caption {
  padding: 12px 14px 14px !important;
  text-align: center;
}

.views-bootstrap-grid-plugin-style .caption h3 {
  font-family: 'Figtree', sans-serif;
  font-size: 0.88rem !important;
  font-weight: 500;
  color: #1e293b;
  margin: 0 !important;
  line-height: 1.4;
}

.views-bootstrap-grid-plugin-style .caption h3 a {
  color: #1e293b !important;
  text-decoration: none !important;
}

.views-bootstrap-grid-plugin-style .row > div:hover .caption h3 {
  color: #2563eb;
}

/* ============================================
   BOOK REVIEW CARDS
   ============================================ */
.books-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin: 24px 0;
}

.book-card {
  display: flex;
  gap: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  transition: all 0.3s;
}

.book-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  border-color: #93c5fd;
}

.book-cover {
  flex-shrink: 0;
  width: 160px;
  display: flex;
  align-items: flex-start;
}

.book-cover img {
  width: 140px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transition: transform 0.3s;
}

.book-card:hover .book-cover img {
  transform: scale(1.03);
}

.book-body {
  flex: 1;
  min-width: 0;
}

.book-body h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: #0f172a;
}

.book-body .book-author {
  font-size: .88rem;
  color: #64748b;
  margin: 0 0 8px;
}

.book-body .book-desc {
  font-size: .93rem;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 12px;
}

.book-body .book-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: .85rem;
  color: #64748b;
}

.book-body .book-meta span {
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 6px;
}

.book-body .book-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 12px;
}

.book-body .book-price .old {
  text-decoration: line-through;
  color: #94a3b8;
  font-weight: 400;
  font-size: .9rem;
  margin-right: 8px;
}

.book-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none !important;
  transition: all .25s;
  box-shadow: 0 4px 12px rgba(37,99,235,.25);
}

.book-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 20px rgba(37,99,235,.35);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .book-card {
    flex-direction: column;
  }
  .book-cover {
    width: 100%;
    justify-content: center;
  }
  .book-cover img {
    width: 120px;
  }
  .views-bootstrap-grid-plugin-style .row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .views-bootstrap-grid-plugin-style .row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .views-bootstrap-grid-plugin-style img {
    height: 120px !important;
  }
}

/* ============================================
   UNIVERSAL GALLERY CARDS
   Applies to ALL gallery types across the site
   ============================================ */

/* --- Category Thumbnail Grid (views-bootstrap-thumbnail) --- */
.views-bootstrap-thumbnail-plugin-style > .row,
div[class*="views-bootstrap-thumbnail"] .row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 20px !important;
  margin: 20px 0 !important;
}

.views-bootstrap-thumbnail-plugin-style .thumbnail {
  background: #fff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  margin: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.views-bootstrap-thumbnail-plugin-style .thumbnail:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 14px 32px rgba(37,99,235,0.1), 0 4px 12px rgba(0,0,0,.06) !important;
  border-color: #93c5fd !important;
}

.views-bootstrap-thumbnail-plugin-style .thumbnail img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover;
  border-radius: 14px 14px 0 0 !important;
  transition: transform 0.4s;
}

.views-bootstrap-thumbnail-plugin-style .thumbnail:hover img {
  transform: scale(1.06);
}

.views-bootstrap-thumbnail-plugin-style .caption {
  padding: 16px 18px 18px !important;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.views-bootstrap-thumbnail-plugin-style .caption h3 {
  font-family: 'Figtree', sans-serif;
  font-size: 1rem !important;
  font-weight: 600;
  color: #0f172a;
  margin: 0 !important;
  line-height: 1.4;
}

.views-bootstrap-thumbnail-plugin-style .caption h3 a {
  color: #0f172a !important;
  text-decoration: none !important;
}

.views-bootstrap-thumbnail-plugin-style .thumbnail:hover .caption h3 a {
  color: #2563eb !important;
}

/* --- Image Grid (views-bootstrap-grid) - Enhanced --- */
.views-bootstrap-grid-plugin-style .row > div {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.views-bootstrap-grid-plugin-style .row > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  border-color: #93c5fd;
}

.views-bootstrap-grid-plugin-style img {
  width: 100% !important;
  height: 170px !important;
  object-fit: cover;
  transition: transform 0.4s;
}

.views-bootstrap-grid-plugin-style .row > div:hover img {
  transform: scale(1.06);
}

.views-bootstrap-grid-plugin-style .caption {
  padding: 12px 14px 14px !important;
  text-align: center;
}

.views-bootstrap-grid-plugin-style .caption h3 {
  font-family: 'Figtree', sans-serif;
  font-size: 0.88rem !important;
  font-weight: 500;
  margin: 0 !important;
  line-height: 1.4;
}

.views-bootstrap-grid-plugin-style .caption h3 a {
  color: #1e293b !important;
  text-decoration: none !important;
}

.views-bootstrap-grid-plugin-style .row > div:hover .caption h3 {
  color: #2563eb;
}

/* Ensure no conflicting float/grid from Bootstrap */
.views-bootstrap-thumbnail-plugin-style .row,
.views-bootstrap-grid-plugin-style .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.views-bootstrap-thumbnail-plugin-style [class*="col-"],
.views-bootstrap-grid-plugin-style [class*="col-"] {
  width: 100% !important;
  padding: 0 !important;
  float: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .views-bootstrap-thumbnail-plugin-style > .row,
  div[class*="views-bootstrap-thumbnail"] .row {
    grid-template-columns: 1fr !important;
  }
  .views-bootstrap-grid-plugin-style .row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .views-bootstrap-thumbnail-plugin-style .thumbnail img {
    height: 180px !important;
  }
  .views-bootstrap-grid-plugin-style img {
    height: 140px !important;
  }
}

@media (max-width: 480px) {
  .views-bootstrap-grid-plugin-style .row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .views-bootstrap-grid-plugin-style img {
    height: 120px !important;
  }
}
