:root {
  --bcrp-blue: #002856;
  --bcrp-blue-mid: #003e85;
  --bcrp-gold: #B68D40;
  --bcrp-gold-dark: #96712c;
  --bcrp-cream: #EFECE1;
  --bg-color: #F8FAFC;
  --card-bg: #FFFFFF;
  --text-dark: #2C3E50;
  --text-muted: #64748B;
  --stock-ok: #15803d;
  --stock-low: #b45309;
  --stock-out: #b91c1c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

#catalogo-container {
  flex-grow: 1;
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
}

.top-bar {
  background-color: var(--bcrp-blue);
  color: #e2e8f0;
  padding: 6px 5%;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header {
  background-color: white;
  padding: 1.2rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.brand-titles h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--bcrp-gold);
  line-height: 1.1;
}

.brand-titles p {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--bcrp-blue);
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.search-bar {
  position: relative;
  width: 310px;
}

.search-bar input {
  width: 100%;
  padding: 8px 36px 8px 16px;
  border-radius: 25px;
  border: 1.5px solid #94a3b8;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--bcrp-blue);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bcrp-blue);
  font-size: 0.95rem;
  pointer-events: none;
}

.header-links {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-links a {
  color: var(--text-dark);
  text-decoration: none;
  margin: 0 4px;
  font-weight: 500;
}

.header-links a.gold-link {
  color: var(--bcrp-gold-dark);
  font-weight: 700;
}

.main-nav {
  background-color: white;
  padding: 0 5%;
  display: flex;
  justify-content: center;
  gap: 28px;
  border-bottom: 3px solid var(--bcrp-gold);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
  background: none;
  border: none;
  padding: 14px 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bcrp-blue);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--bcrp-gold-dark);
  border-bottom-color: var(--bcrp-blue);
}

.hero-banner {
  position: relative;
  background-color: var(--bcrp-blue); 
  padding: 5.5rem 5%;
  min-height: 400px;
  display: flex;
  align-items: center;
  border-bottom: 4px solid var(--bcrp-gold);
  margin-bottom: 1rem;
  z-index: 1;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background-image: url('./assets/cnm-edificio.jpg');
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
  mask-image: linear-gradient(to right, transparent 0%, black 40%);
  z-index: -1;
}

@media (max-width: 768px) {
  .hero-banner::before {
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 70%);
    mask-image: linear-gradient(to right, transparent 0%, black 70%);
  }
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-text span {
  display: inline-block;
  background-color: var(--bcrp-gold);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-text h2 {
  font-family: 'Merriweather', serif;
  font-size: 2.2rem;
  color: white;
  margin-bottom: 12px;
  line-height: 1.25;
}

.hero-text p {
  font-size: 1.05rem;
  color: #e2e8f0; 
  line-height: 1.6;
  font-weight: 500;
}

@media (max-width: 768px) {
  .hero-banner::before {
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 70%);
    mask-image: linear-gradient(to right, transparent 0%, black 70%);
  }
}

.category-section {
  margin-bottom: 2.8rem;
}

.category-header {
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.category-title {
  font-family: 'Merriweather', serif;
  font-size: 1.35rem;
  color: var(--bcrp-blue);
  border-left: 5px solid var(--bcrp-gold);
  padding-left: 12px;
}

.ver-todos-btn {
  background-color: transparent;
  color: var(--bcrp-blue);
  border: 1.5px solid var(--bcrp-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ver-todos-btn:hover {
  background-color: var(--bcrp-blue);
  border-color: var(--bcrp-blue);
  color: white;
}

.carousel-wrapper {
  position: relative;
  padding: 0 5%;
}

.carousel-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px 16px 4px;
  scrollbar-width: none;
}

.carousel-row::-webkit-scrollbar {
  display: none;
}

.scroll-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bcrp-blue);
  color: white;
  border: 2px solid var(--bcrp-gold);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.scroll-btn:hover {
  background-color: var(--bcrp-gold);
}

.scroll-btn.left { left: 1.5%; }
.scroll-btn.right { right: 1.5%; }

.grid-view-container {
  padding: 1.5rem 5% 3rem 5%;
}

.grid-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.products-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  flex: 0 0 275px;
  width: 100%;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 22px rgba(0, 40, 86, 0.14);
  border-color: var(--bcrp-gold);
}

.card-image-box {
  width: 100%;
  height: 210px;
  background: radial-gradient(circle, #ffffff 0%, #eef2f6 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.product-code-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background-color: rgba(15, 30, 84, 0.9);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 2;
}

.card-image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.14));
  transition: transform 0.3s ease;
}

.product-card:hover .card-image-box img {
  transform: scale(1.06);
}

.card-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  gap: 10px;
}

.card-title-price {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.product-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--bcrp-blue);
  line-height: 1.35;
  flex: 1;
}

.product-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bcrp-gold-dark);
  background-color: #fcf9f2;
  border: 1px solid #eaddc5;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.product-stock {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.stock-ok { color: var(--stock-ok); }
.stock-ok .stock-dot { background-color: var(--stock-ok); }

.stock-low { color: var(--stock-low); }
.stock-low .stock-dot { background-color: var(--stock-low); }

.stock-out { color: var(--stock-out); }
.stock-out .stock-dot { background-color: var(--stock-out); }

.detail-title-banner {
  background-color: var(--bcrp-cream);
  padding: 2.2rem 5%;
  text-align: center;
  border-bottom: 1px solid #e2dec9;
  margin-bottom: 2.2rem;
  margin-top: -2.5rem;
}

.detail-title-banner h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.detail-layout {
  max-width: 1220px;
  margin: 0 auto 3.5rem auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
}

.detail-sidebar h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bcrp-blue);
  margin-bottom: 12px;
}

.sidebar-cat-list {
  list-style: none;
  margin-bottom: 2.2rem;
  border-top: 1px solid #e2e8f0;
}

.sidebar-cat-list li {
  border-bottom: 1px solid #e2e8f0;
}

.sidebar-cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar-cat-list a:hover,
.sidebar-cat-list a.active-cat {
  color: var(--bcrp-gold-dark);
  padding-left: 8px;
}

.sidebar-cat-list a span.arrow {
  color: var(--bcrp-gold);
  font-weight: 700;
}

.related-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: #475569;
  margin-bottom: 14px;
  line-height: 1.3;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.related-item:hover {
  background-color: #f1f5f9;
}

.related-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 4px;
}

.related-info h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  text-transform: uppercase;
  margin-bottom: 4px;
  line-height: 1.25;
}

.related-info p {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bcrp-blue);
}

.detail-top-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 35px;
  align-items: start;
  margin-bottom: 2.5rem;
}

.detail-img-wrapper {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.detail-img-wrapper img {
  max-width: 100%;
  max-height: 290px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.detail-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-info-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
  margin-top: 20px;
}

.price-badge-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: var(--bcrp-blue);
  border: 3px solid var(--bcrp-gold);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 40, 86, 0.2);
  text-align: center;
  padding: 6px;
}

.price-badge-circle .price-num {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 3px;
  margin-bottom: 3px;
  width: 85%;
}

.price-badge-circle .price-label {
  font-size: 0.6rem;
  font-weight: 500;
  line-height: 1.1;
  color: #e2e8f0;
}

.detail-meta-list {
  list-style: none;
  margin-bottom: 20px;
}

.detail-meta-list li {
  font-size: 0.86rem;
  color: #64748b;
  margin-bottom: 8px;
  line-height: 1.4;
}

.detail-meta-list li strong {
  color: #334155;
  font-weight: 700;
}

.detail-meta-list li .inst-highlight {
  color: var(--bcrp-gold-dark);
  font-weight: 700;
  text-transform: uppercase;
}

.btn-contactar {
  display: inline-block;
  background-color: var(--bcrp-gold);
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  margin-bottom: 18px;
  transition: background-color 0.2s, transform 0.15s;
}

.btn-contactar:hover {
  background-color: var(--bcrp-blue);
  transform: translateY(-2px);
}

.detail-tabs-wrapper {
  margin-top: 10px;
}

.tab-header {
  display: inline-block;
  padding: 12px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bcrp-blue);
  background-color: white;
  border: 1px solid #cbd5e1;
  border-bottom: 3px solid var(--bcrp-gold);
  border-radius: 6px 6px 0 0;
}

.tab-content-box {
  background-color: white;
  border: 1px solid #cbd5e1;
  padding: 28px;
  margin-top: -1px;
}

.tab-content-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.tab-content-box p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 20px;
}

footer {
  background-color: var(--bcrp-blue);
  color: #cbd5e1;
  text-align: center;
  padding: 1.8rem 5%;
  font-size: 0.85rem;
  border-top: 3px solid var(--bcrp-gold);
}

@media (max-width: 1024px) {
  .products-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
  .header-right {
    align-items: center;
    width: 100%;
  }
  .search-bar {
    width: 100%;
  }
  .main-nav {
    flex-wrap: wrap;
    gap: 10px;
  }
  .products-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-top-grid {
    grid-template-columns: 1fr;
  }
  
  
}

@media (max-width: 480px) {
  .products-grid-4 {
    grid-template-columns: 1fr;
  }
}

.contact-person{
    padding:18px 0;
    border-bottom:1px solid #e2e8f0;
}

.contact-person:last-child{
    border-bottom:none;
}

.contact-person p{
    display:flex;
    align-items:center;
    gap:12px;
    margin:8px 0;
    color:#334155;
    font-size:0.9rem;
    line-height:1.5;
}

.contact-person strong{
    color:var(--bcrp-blue);
    font-size:0.95rem;
    font-weight:700;
}

.contact-icon{
    width:22px;
    height:22px;
    min-width:22px;
    color:var(--bcrp-blue);
    display:flex;
    align-items:center;
    justify-content:center;
}

.contact-icon svg{
    width:20px;
    height:20px;
    display:block;
}

.contact-person a{
    color:var(--bcrp-blue);
    text-decoration:none;
    transition:all .2s ease;
}

.contact-person a:hover{
    color:var(--bcrp-gold-dark);
    text-decoration:underline;
}

.tab-content-box h4{
    color:var(--bcrp-blue);
    font-size:1.05rem;
    font-weight:700;
    margin-bottom:10px;
}

.tab-content-box p{
    color:#475569;
}

.contact-person{
    background:#ffffff;
    border:1px solid #e2e8f0;
    border-left:4px solid var(--bcrp-gold);
    border-radius:8px;
    padding:16px 18px;
    margin-bottom:15px;
    box-shadow:0 2px 8px rgba(0,0,0,.04);
    transition:.2s ease;
}

.contact-person:hover{
    border-left-color:var(--bcrp-blue);
    box-shadow:0 6px 16px rgba(0,40,86,.08);
}

.detail-img-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-zoom-container {
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-zoom-container img {
  transition: transform 0.1s ease-out;
  max-width: 100%;
  max-height: 290px;
  object-fit: contain;
}

.btn-maximize {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: var(--bcrp-blue);
  color: white;
  border: 2px solid var(--bcrp-gold);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background-color 0.2s, transform 0.2s;
}

.btn-maximize:hover {
  background-color: var(--bcrp-gold);
  transform: scale(1.08);
}

.detail-carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.detail-carousel-btn {
  background-color: var(--bcrp-blue);
  color: white;
  border: 1px solid var(--bcrp-gold);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-carousel-btn.active, .detail-carousel-btn:hover {
  background-color: var(--bcrp-gold);
  color: var(--bcrp-blue);
}

.img-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.img-modal-content {
  background-color: white;
  padding: 24px;
  border-radius: 12px;
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 4px solid var(--bcrp-gold);
}

.img-modal-content img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.img-modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bcrp-blue);
  cursor: pointer;
}

.modal-zoom-container {
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-zoom-container img {
  transition: transform 0.1s ease-out;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.clear-icon {
  position: absolute;
  right: 35px;
  font-size: 1.3rem;
  color: #94a3b8;
  cursor: pointer;
  display: none; 
  line-height: 1;
}

.clear-icon:hover {
  color: #334155;
}