/* ===========================================
   BASE / RESET
=========================================== */
:root{
  --brand:#0d3160;
  --accent:#e66700;
  --muted:#6c757d;
  --card-bg:#ffffff;
  --page-bg:#f4f6f8;
}

*{box-sizing:border-box}
body{
    background:var(--page-bg);
    font-family:Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    color:#222;
    margin:0;
}

/* ===========================================
   TOPBAR
=========================================== */
.topbar{
  background:linear-gradient(90deg, var(--accent) 0%, #ff7f11 60%, var(--accent) 100%);
  padding:18px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 6px 18px rgba(0,0,0,0.15);
  border-bottom:4px solid #000;
  position:relative;
  z-index:100;
}
.header-logo{height:74px}
.site-title{font-weight:800;font-size:1.25rem;color:#fff;letter-spacing:0.6px}
.navbar-nav .nav-link{
  color:#fff!important;
  font-weight:700;
  padding:10px 18px;
}

/* ===========================================
   LAYOUT
=========================================== */
.main-wrapper{padding:28px 34px}
.row.g-0 > .sidebar-col { padding-right:24px; }

/* Sidebar columna desktop */
.sidebar-col{
    padding-left:0;
    padding-right:0;
    display:block;
}

/* ===========================================
   SIDEBAR
=========================================== */
.sidebar {
  background:var(--brand);
  color:#fff;
  border-radius:10px;
  min-height:calc(100vh - 180px);
  box-shadow:0 8px 20px rgba(13,49,96,0.08);
}

.sidebar .sidebar-brand { color:#fff; }
.sidebar-logo{height:48px}
.sidebar-nav{padding-top:8px}

.category-link{
  color:rgba(255,255,255,0.95);
  padding:12px 18px;
  display:block;
  border-left:4px solid transparent;
  text-decoration:none;
  transition:all .18s ease;
  font-weight:600;
}
.category-link:hover{
  background:rgba(255,255,255,0.03);
  border-left-color:var(--accent);
  padding-left:16px;
}

/* ===========================================
   MAIN CONTENT
=========================================== */
.content-col{ padding-left:28px; }

/* ===========================================
   HERO
=========================================== */
.hero-card{
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}

.hero-media{
  height:260px;
  background-size:cover;
  background-position:center;
  display:flex;
  align-items:center;
  padding:36px;
}

.hero-text{
  color:#fff;
  text-shadow:0 6px 22px rgba(0,0,0,0.45);
}
.hero-text h1{
  font-size:44px;
  margin:0 0 8px;
  font-weight:800;
  letter-spacing:-1px;
}
.hero-text p{ font-size:1rem; color:rgba(255,255,255,0.95); margin:0; }

/* ===========================================
   PRODUCT GRID
=========================================== */
.product-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:20px;
}

.product-card{
  background:var(--card-bg);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
  transition:transform .18s ease, box-shadow .18s ease;
  display:flex;
  flex-direction:column;
}
.product-card:hover{
  transform:translateY(-6px);
  box-shadow:0 12px 30px rgba(0,0,0,0.12);
}

.product-thumb img{
  width:100%;
  height:178px;
  object-fit:cover;
  display:block;
}

.product-body{
  padding:14px;
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.product-title{
  font-size:1.05rem;
  font-weight:700;
  margin-bottom:6px;
}
.product-sub{
  color:var(--muted);
  font-size:0.9rem;
}

/* ===========================================
   CATEGORY LIST
=========================================== */
.catalog-list { margin-top:8px; overflow:hidden; border-radius:10px; }
.catalog-list table { border-collapse:collapse;width:100%; }
.catalog-list thead th{
  border-bottom:1px solid #e9ecef;
  padding:12px 18px;
  text-align:left;
  font-weight:700;
}
.catalog-list tbody tr td{
  padding:14px 18px;
  border-bottom:1px solid #f1f3f5;
  vertical-align:middle;
}

/* ===========================================
   PRODUCT DETAIL
=========================================== */
.product-detail-card img{
  width:100%;
  border-radius:8px;
  box-shadow:0 8px 20px rgba(0,0,0,0.06);
}

.product-description{
  color:#444;
  margin-top:12px;
  line-height:1.5;
}

/* ===========================================
   FOOTER
=========================================== */
.site-footer{
    background: linear-gradient(180deg, rgba(10,10,10,0.85), rgba(10,10,10,0.92));
    color:#fff;
    margin-top:34px;
    border-radius:12px;
    overflow:hidden;
}

/* ===========================================
   RESPONSIVE
=========================================== */
@media(max-width:991px){
  .sidebar-col { display:none; }
  .content-col { padding-left:0; }
  .hero-text h1{ font-size:34px; }
}

@media(max-width:600px){
  .hero-media{ height:200px; padding:18px; }
  .hero-text h1{ font-size:24px; }
  .product-grid{ grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); }
}

/* ===========================================
   OFFCANVAS SIDEBAR (MOBILE)
=========================================== */
@media(max-width:768px){
    .sidebar{ display:none !important; }

    .sidebar-wrapper.inside-offcanvas{
        width:100% !important;
        padding:0 !important;
    }

    #mobileMenu .sidebar {
        display:block !important;
        min-height:auto !important;
        padding:1rem !important;
    }

    #mobileMenu .category-link{
        background:var(--brand);
        margin-bottom:10px;
        border-radius:8px;
        font-weight:500;
    }
}

/* ===========================================
   CATEGORY TABLE → MOBILE
=========================================== */
@media(max-width:768px){

    .catalog-list{ display:none !important; }

    /* Mobile cards */
    .mobile-product-cards{
        display:grid;
        gap:18px;
        margin-top:20px;
    }

    .product-card-mobile{
        background:#fff;
        border-radius:12px;
        overflow:hidden;
        box-shadow:0 8px 18px rgba(0,0,0,0.08);
        display:flex;
        gap:14px;
        padding:12px;
    }

    .pcm-img{
        width:110px;
        height:110px;
        object-fit:cover;
        border-radius:10px;
    }

    .pcm-body{ flex:1; display:flex; flex-direction:column; justify-content:space-between; }
    .pcm-title{ font-size:1rem; font-weight:700; margin:0 0 6px; }
    .pcm-desc{ font-size:0.85rem; color:#555; margin:0 0 8px; line-height:1.3; }

    .pcm-body .btn{
        font-size:0.8rem;
        padding:6px 12px;
    }
}

/* ===========================================
   SWIPER FIX PRODUCT DETAIL
=========================================== */
@media(max-width:768px){
    .mySwiperMain .product-main-img{
        height:260px !important;
        object-fit:contain !important;
    }
    .mySwiperMain{ max-height:300px !important; overflow:hidden !important; }
    .mySwiperThumb img{ height:60px !important; object-fit:cover; }
    .product-detail-card img{ max-height:250px !important; object-fit:contain !important; }
}

/* ===========================================
   GLOBAL FIX FULL RESPONSIVE
=========================================== */
html, body{ overflow-x:hidden !important; }

@media(max-width:768px){
    .content-col{
        width:100%!important;
        max-width:100%!important;
        padding-left:0!important;
        padding-right:0!important;
    }
}

/* ===========================================
   UNIFICACIÓN FINAL:
   PRODUCTOS Y VENDIDOS MISMO TAMAÑO
=========================================== */

/* ESTILO GLOBAL PARA TODAS LAS CARDS */
.product-card img,
.product-thumb img,
.sold-card img{
    width:100% !important;
    object-fit:cover !important;
    display:block;
    background:#fff;
}

/* ALTURA EXACTA EN ESCRITORIO (PC) */
@media (min-width:769px){
    .product-card img,
    .product-thumb img,
    .sold-card img{
        height:178px !important;
    }
}

/* MÓVIL: imágenes fluidas */
@media(max-width:768px){
    .product-card img,
    .product-thumb img,
    .sold-card img{
        height:auto !important;
        max-height:260px;
        object-fit:contain !important;
    }
}

.aviso-importante {
    background: #c40000; /* Rojo fuerte */
    color: #fff;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.aviso-importante .titulo-aviso {
    color: #ffe600; /* Amarillo para resaltar */
    font-weight: 800;
    font-size: 17px;
    display: block;
    margin-bottom: 6px;
}

/* AVISO IMPORTANTE – DEMO C */
.aviso-box {
    width: 320px;
    background: #c40000; /* rojo */
    color: white;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    float: right;  /* LO PONE A LA DERECHA */
    box-shadow: 0 0 12px rgba(0,0,0,0.3);
    position: relative;
}

.aviso-header {
    font-weight: bold;
    font-size: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.aviso-close {
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 5px;
    transition: 0.2s;
}

.aviso-close:hover {
    background: rgba(255,255,255,0.2);
}

.aviso-body {
    font-size: 14px;
    line-height: 1.4;
}

/* MOBILE: el aviso se centra abajo del contenido */
@media (max-width: 768px) {
    .aviso-box {
        float: none;
        width: 100%;
    }
}
