.cpc-container{max-width:1700px;margin:30px auto;padding:0 14px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial}
.cpc-header{margin-bottom:16px}
.cpc-header h1{margin:6px 0 2px;font-size:28px}
.cpc-sub{margin:0;color:#666}
.cpc-back{display:inline-block;margin-bottom:6px;text-decoration:none;color:#2271b1; font-size: large;}
.cpc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.cpc-card{display:block;border:1px solid #e5e5e5;border-radius:10px;padding:14px;text-decoration:none;background:#fff}
.cpc-card:hover{border-color:#cdd7e1}
.cpc-card-title{font-weight:700;color:#111}
.cpc-card-meta{margin-top:6px;color:#666;font-size:12px}
.cpc-toolbar{display:flex;justify-content:flex-start;margin:10px 0 14px}
.cpc-filter{display:flex;gap:8px;align-items:center}
.cpc-filter select{padding:6px}
.cpc-list{display:flex;flex-direction:column;gap:10px}
.cpc-item{display:flex;gap:12px;border:1px solid #e5e5e5;border-radius:10px;background:#fff;padding:10px}
.cpc-item-img{width:120px;flex:0 0 120px;display:flex;align-items:center;justify-content:center; }
.cpc-item-img img{max-width:100%;height:auto;object-fit:contain}
.cpc-img-placeholder{font-size:12px;color:#777}
.cpc-item-title{font-weight:700;margin:2px 0 6px}
.cpc-item-meta{display:flex;flex-wrap:wrap;gap:10px;color:#444;font-size:13px}
/* Model cards with image (Prasco-like) */
.cpc-card--marca, .cpc-card--modelo { padding: 0; overflow: hidden; }
.cpc-card-img {
  background: #eef2f6;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cpc-card-img img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  display: block;
}
.cpc-card-body { padding: 12px 14px; }



/* Single pieza page (WooCommerce-like) */
.cpc-product {  margin: 0 auto; }
.cpc-product-top { display: grid; grid-template-columns: 420px 1fr; gap: 28px; align-items: start; }

.cpc-product-gallery {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 16px;
}
.cpc-product-mainimg { width: 100%; height: 360px; object-fit: contain; display:block; }
.cpc-product-noimg { height: 360px; display:flex; align-items:center; justify-content:center; background:#f5f6f7; border-radius: 8px; }

.cpc-product-summary { background: #fff; border: 1px solid #e6e6e6; border-radius: 10px; padding: 18px; }
.cpc-product-title { margin: 0 0 10px 0; font-size: 26px; line-height: 1.2; }
.cpc-product-meta > div { margin: 6px 0; color: #333; }
.cpc-product-actions { margin-top: 14px; }

.cpc-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #d7d7d7;
  text-decoration: none;
}

.cpc-product-tabs { margin-top: 22px; display:grid; gap: 14px; }
.cpc-tab { background:#f5f5f5; border:1px solid #e6e6e6; border-radius: 10px; padding: 16px; }
.cpc-tab h3 { margin: 0 0 10px 0; }

.cpc-specs { list-style:none; padding:0; margin:0; }
.cpc-specs li {
  display:flex; justify-content:space-between; gap:16px;
  padding: 10px 0; border-bottom:1px solid #eee;
}
.cpc-specs li:last-child { border-bottom:0; }

@media (max-width: 900px) {
  .cpc-product-top { grid-template-columns: 1fr; }
  .cpc-product-mainimg, .cpc-product-noimg { height: 280px; }
}




.cpc-item--link { display:flex; gap:14px; text-decoration:none; color:inherit; }
.cpc-item--link:hover { background: #fafafa; }

.cpc-item-action { margin-top: 10px; }
.cpc-btn--small { padding: 6px 10px; border-radius: 8px; border: 1px solid #d7d7d7; display:inline-block; }





/* Layout with left sidebar */
.cpc-layout { display:flex; gap:22px; align-items:flex-start; }
.cpc-sidebar { width: 280px; flex: 0 0 280px; }
.cpc-main { flex: 1 1 auto; min-width: 0; }

.cpc-side-block {
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:10px;
  padding:14px;
  margin-bottom:14px;
}
.cpc-side-title { font-weight:700; margin-bottom:10px; letter-spacing:.4px; }
.cpc-side-label { display:block; font-size:12px; margin-bottom:6px; opacity:.8; }

.cpc-side-select {
  width:100%;
  padding:10px;
  border:1px solid #d7d7d7;
  border-radius:8px;
  background:#fff;
}

.cpc-side-marcas { display:flex; flex-direction:column; gap:8px; }
.cpc-side-marca {
  display:block;
  padding:10px 12px;
  border-radius:8px;
  background:#f6f7f8;
  text-decoration:none;
  color:inherit;
  font-weight:600;
}
.cpc-side-marca.is-active { outline:2px solid #d7d7d7; background:#fff; }

@media (max-width: 980px) {
  .cpc-layout { flex-direction: column; }
  .cpc-sidebar { width:100%; flex: 0 0 auto; }
}






/* =========================
   PIEZAS GRID
   ========================= */

.cpc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Grid item */
.cpc-item {
  display: flex;
  flex-direction: column;
  
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}

.cpc-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

/* Image */
.cpc-item-img {
  width: 100%;
  /* aspect-ratio: 4 / 3; */
  background: #ffffff;
  overflow: hidden;
}

.cpc-item-img img {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
  display: block;
}



/* Body */
.cpc-item-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cpc-item-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
}

/* Meta */
.cpc-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: #555;
}

.cpc-item-meta span {
  white-space: nowrap;
}

/* Button */
.cpc-item-action {
  margin-top: auto;
}

.cpc-btn--small {
  display: inline-block;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #d7d7d7;
  background: #fff;
}

/* Make entire card clickable */
.cpc-item--link {
  text-decoration: none;
  color: inherit;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .cpc-item-img {
    height: 150px;
  }
}






.cpc-side-tags { display:flex; flex-wrap:wrap; gap:8px; }
.cpc-tag {
  display:inline-block;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid #d7d7d7;
  background:#fff;
  text-decoration:none;
  color:inherit;
  font-size:12px;
}
.cpc-tag.is-active { background:#f6f7f8; border-color:#bdbdbd; }
.cpc-tag--clear { opacity:.8; }







.cpc-livebox{
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.cpc-livebox-row{
  display:flex;
  justify-content: space-between;
  gap: 12px;
}

.cpc-livebox--login{
  opacity: .85;
}

.cpc-livebox-details summary{
  cursor: pointer;
  margin-top: 6px;
  font-weight: 600;
}

.cpc-livebox-details ul{
  margin: 8px 0 0 18px;
}



.cpc-side-search {
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.cpc-side-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
}

.cpc-side-search-btn {
  padding: 10px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}




.cpc-related-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
  margin-top:12px;
}

.cpc-related-card{
  display:block;
  text-decoration:none;
  color:inherit;
  border:1px solid #e6e6e6;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  transition:box-shadow .2s ease, transform .2s ease;
}

.cpc-related-card:hover{
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  transform:translateY(-2px);
}

.cpc-related-img{
  width:100%;
  aspect-ratio:4 / 3;
  background:#f6f7f8;
  overflow:hidden;
}

.cpc-related-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.cpc-related-body{
  padding:12px;
}

.cpc-related-title{
  font-weight:700;
  font-size:14px;
  line-height:1.3;
  margin-bottom:8px;
}

.cpc-related-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
  color:#555;
}


/* Make .cpc-tem-img behave like the single product gallery */
.cpc-item-img{
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 16px; 
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
 /* min-width: 300px; */
 min-height: 300px;
}

/* Make the image inside behave like .cpc-product-mainimg */
.cpc-item-img img{
  width: 100%;
  /* height: 360px; */
  object-fit: contain;
  display: block;
}

@media (max-width: 900px){
  .cpc-item-img img{
    height: 280px;
  }
}



.cpc-card-img--text{
  display:flex;
  align-items:center;
  justify-content:center;
  height:120px; /* o el alto que uses */
  background:#f7f7f7;
  border-radius:8px;
  text-align:center;
  padding:10px;
}

.cpc-card-img--text span{
  font-weight:600;
  font-size:16px;
  color:#111;
}


/* Header search */
.cpc-header-search{
  width: 100%;
  margin: 0 0 20px;
}

.cpc-header-search-inner{
  max-width: 100%;
  height: 300px;
  margin: 0 auto;
  padding: 24px 14px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cpc-header-search-inner::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.30);
  z-index: 0;
}

.cpc-header-search-form{
  position: relative;
  z-index: 1;

  max-width: 650px;
  width: 100%;
  height: 58px;
  margin: 0;

  display: flex;
  align-items: stretch;

  background: #fff;
  border: 1px solid #d9d9d9;
  /* border-radius: 10px; */
  overflow: hidden;

  line-height: 0; /* important */
}

.cpc-header-search-input{
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;

  display: block;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin: 0;
  padding: 0 18px;

  font-size: 16px;
  line-height: 1;
  outline: none;
  box-shadow: none;
  background: #fff;
  vertical-align: top; /* important */
}

.cpc-header-search-btn{
  flex: 0 0 72px;
  width: 72px;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-left: 1px solid #d9d9d9;
  margin: 0;
  padding: 0;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.cpc-header-search-btn:hover{
  background: #f8f8f8;
}

@media (max-width: 767px){
  .cpc-header-search-inner{
    height: 220px;
    padding: 16px 12px;
  }

  .cpc-header-search-form{
    max-width: 100%;
    height: 50px;
  }

  .cpc-header-search-input{
    font-size: 15px;
  }

  .cpc-header-search-btn{
    flex-basis: 58px;
    width: 58px;
    font-size: 20px;
  }
}


/* Productos relacionados - 2 columns */
.cpc-related-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}

.cpc-related-col{
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:12px;
  padding:16px;
  min-width:0;
}

.cpc-related-col h4{
  margin:0 0 12px;
  font-size:18px;
  line-height:1.3;
}

.cpc-related-list{
  list-style:none;
  margin:0;
  padding:0;
}

.cpc-related-item{
  border-top:1px solid #eee;
  padding:12px 0;
}

.cpc-related-item:first-child{
  border-top:0;
  padding-top:0;
}

.cpc-related-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  text-decoration:none;
  color:inherit;
}

.cpc-related-row:hover .cpc-related-title{
  color:#2271b1;
}

/* thumbnail left */
.cpc-related-thumb{
  width:64px;
  height:64px;
  flex:0 0 64px;
  border:1px solid #e5e5e5;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.cpc-related-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.cpc-thumb-placeholder{
  font-size:12px;
  color:#999;
  text-align:center;
  padding:4px;
}

/* text block */
.cpc-related-content{
  flex:1;
  min-width:0;
}

.cpc-related-title{
  display:block;
  margin:0 0 6px;
  font-weight:600;
  color:#111;
  line-height:1.35;
  word-break:break-word;
}

.cpc-related-list-meta{
  margin-top:0;
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  font-size:13px;
  line-height:1.4;
  color:#666;
}

.cpc-related-list-meta code{
  font-size:12px;
}

@media (max-width: 767px){
  .cpc-related-columns{
    grid-template-columns:1fr;
  }

  .cpc-related-thumb{
    width:56px;
    height:56px;
    flex:0 0 56px;
  }
}


/*lightbox*/
.cpc-product-mainimg-link{
  display:block;
}

.cpc-related-thumb a{
  display:flex;
  width:100%;
  height:100%;
  align-items:center;
  justify-content:center;
}

.cpc-related-thumb a img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}


/*logos cetificacion*/
.cpc-item-cert-logo{
  margin-top: 10px;
}

.cpc-item-cert-logo img{
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.cpc-product-cert-logo{
  margin: 12px 0 16px;
}

.cpc-product-cert-logo img{
  max-height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.cpc-related-cert-logo{
  margin-top: 8px;
}

.cpc-related-cert-logo img{
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

.all_colors{
  background-color: #ffffff !important;
}


/*fibo live search*/
.cpc-live-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.cpc-header-search-inner {
    position: relative;
    overflow: visible;
}

.cpc-header-search-form {
    position: relative;
    z-index: 20;
    overflow: visible;
}

.cpc-live-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.cpc-live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 999999;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-height: 520px;
    overflow-y: auto;
}
.cpc-live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-height: 520px;
    overflow-y: auto;
}

.cpc-live-panel {
    padding: 8px 0;
}

.cpc-live-group {
    padding: 4px 0;
}

.cpc-live-group + .cpc-live-group {
    border-top: 1px solid #eee;
}

.cpc-live-group-title {
    padding: 9px 16px 7px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #777;
    background: #fafafa;
}

.cpc-live-item {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #111;
    transition: background 0.15s ease;
}

.cpc-live-item:hover,
.cpc-live-item.is-active {
    background: #f4f7fb;
    color: #111;
}

.cpc-live-thumb {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    background: #f2f2f2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpc-live-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cpc-live-thumb.has-error::after {
    content: "Sin imagen";
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    color: #999;
    padding: 4px;
}

.cpc-live-no-image {
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    color: #999;
    padding: 4px;
}

.cpc-live-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cpc-live-name {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cpc-live-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cpc-live-badge {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    background: #f0f0f0;
    border-radius: 999px;
    padding: 5px 8px;
    white-space: nowrap;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cpc-live-view-all {
    display: block;
    padding: 13px 16px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    background: #fafafa;
}

.cpc-live-view-all:hover {
    background: #f1f1f1;
    color: #111;
}

.cpc-live-loading,
.cpc-live-empty {
    padding: 18px 16px;
    font-size: 14px;
    color: #666;
    background: #fff;
}

.cpc-header-search-input.is-open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

@media (max-width: 768px) {
    .cpc-live-search-results {
        max-height: 420px;
        left: -8px;
        right: -58px;
    }

    .cpc-live-item {
        grid-template-columns: 48px 1fr;
    }

    .cpc-live-thumb {
        width: 48px;
        height: 48px;
    }

    .cpc-live-badge {
        display: none;
    }

    .cpc-live-name {
        font-size: 14px;
    }

    .cpc-live-subtitle {
        font-size: 12px;
    }
}


.cpc-live-thumb-text {
    background: #f4f5f7;
    border: 1px solid #e5e7eb;
}

.cpc-live-thumb-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 6px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    color: #333;
    text-align: center;
    text-transform: uppercase;
    word-break: break-word;
}

.cpc-live-group-footer {
    display: block;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.cpc-live-group-footer:hover {
    color: #111;
    background: #f1f1f1;
}

.cpc-live-name {
    display: block;
    color: #111 !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.cpc-live-subtitle {
    display: block;
    color: #666 !important;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 3px;
}


/*cart*/
/* Catalog cart / stock */
.cpc-stock-box {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.cpc-stock-table {
    width: 100%;
    border-collapse: collapse;
}

.cpc-stock-table th,
.cpc-stock-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.cpc-stock-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 7px;
}

.cpc-stock-dot.is-green {
    background: #16a34a;
}

.cpc-stock-dot.is-red {
    background: #dc2626;
}

.cpc-stock-qty,
.cpc-cart-qty {
    width: 80px;
    max-width: 100%;
    padding: 7px 9px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.cpc-add-to-cart-btn,
.cpc-cart-checkout-btn,
.cpc-clear-cart,
.cpc-cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 9px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.cpc-add-to-cart-btn,
.cpc-cart-checkout-btn {
    background: #111827;
    color: #fff;
}

.cpc-add-to-cart-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.cpc-cart-remove,
.cpc-clear-cart {
    background: #f3f4f6;
    color: #111827;
}

.cpc-cart-empty {
    padding: 24px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #fff;
}

.cpc-cart-summary {
    margin-top: 20px;
    padding: 18px;
    border-radius: 14px;
    background: #f9fafb;
}


.cpc-cart-warehouses {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.cpc-cart-warehouses h3 {
    margin: 0 0 10px;
}

.cpc-cart-warehouse-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cpc-cart-warehouse-badge,
.cpc-cart-item-warehouse {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
    font-size: 12px;
}

.cpc-cart-warehouses-note {
    margin: 12px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.cpc-cart-table-wrap {
    overflow-x: auto;
}

.cpc-cart-item-brand {
    display: block;
    margin-top: 4px;
    color: #6b7280;
}

.geimex-mini-cart-item-warehouse {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.2;
}

.geimex-mini-cart-item-warehouse strong {
    color: #374151;
    font-size: inherit;
}

/*checkout*/
.cpc-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.cpc-checkout-card {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.cpc-form-row {
    margin-bottom: 16px;
}

.cpc-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.cpc-form-row input[type="text"],
.cpc-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
}

.cpc-form-row small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
}

.cpc-checkbox-row label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cpc-checkout-total {
    font-size: 18px;
}

.cpc-checkout-message {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
}

.cpc-checkout-message.is-success {
    background: #dcfce7;
    color: #166534;
}

.cpc-checkout-message.is-error {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 900px) {
    .cpc-checkout-grid {
        grid-template-columns: 1fr;
    }
}


.cpc-checkout-multi-warehouse-note {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: #f0f9ff;
    color: #0c4a6e;
}

.cpc-checkout-multi-warehouse-note p {
    margin: 6px 0 0;
}

.cpc-checkout-warehouse-card {
    overflow: hidden;
}

.cpc-checkout-warehouse-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.cpc-checkout-warehouse-header h2 {
    margin: 0;
}

.cpc-checkout-warehouse-header h2 span {
    color: #6b7280;
    font-size: 14px;
}

.cpc-checkout-warehouse-header p {
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.cpc-checkout-warehouse-total {
    flex-shrink: 0;
    color: #111827;
    font-size: 16px;
}

.cpc-checkout-table-wrap {
    overflow-x: auto;
}

.cpc-checkout-sidebar-warehouses {
    display: grid;
    gap: 7px;
    margin: 14px 0;
}

.cpc-checkout-sidebar-warehouse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 12px;
}

.cpc-checkout-sidebar-warehouse strong {
    white-space: nowrap;
}


.cpc-checkout-message.is-warning {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.cpc-order-api-list,
.cpc-order-warehouse-list {
    display: grid;
    gap: 6px;
}

.cpc-order-api-item {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.cpc-order-api-item span {
    min-width: 26px;
    padding: 2px 5px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.cpc-order-api-item em {
    color: #b91c1c;
    font-size: 12px;
}

.cpc-order-warehouse-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 11px;
}

.cpc-order-albaran-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    text-decoration: none;
}

.cpc-order-albaran-link:hover {
    opacity: .88;
    color: #fff;
}

.cpc-order-shipments {
    display: grid;
    gap: 18px;
}

.cpc-order-shipment {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.cpc-order-shipment--legacy {
    margin-top: 18px;
    background: #f9fafb;
}

.cpc-order-shipment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.cpc-order-shipment-header h4 {
    margin: 0 0 7px;
}

.cpc-order-shipment-header h4 span {
    color: #6b7280;
    font-size: 13px;
}

.cpc-order-shipment-header p {
    margin: 3px 0;
    color: #4b5563;
    font-size: 13px;
}

.cpc-order-shipment-total {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 15px;
}

/*ver carrito*/
.cpc-stock-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.cpc-stock-header-main {
    flex: 1;
}

.cpc-stock-header-actions {
    flex-shrink: 0;
}

.cpc-view-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 9px;
    background: #f3f4f6;
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

.cpc-view-cart-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.cpc-after-add-cart-link {
    display: inline-flex;
    margin-left: 10px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 700px) {
    .cpc-stock-header {
        flex-direction: column;
    }
}



/*novedades*/

.cpc-product-gallery,
.cpc-related-card-image,
.cpc-related-thumb {
    position: relative;
}

.cpc-badge-novedad {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #d71920;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.cpc-related-thumb .cpc-badge-novedad {
    top: 4px;
    left: 4px;
    padding: 3px 5px;
    font-size: 8px;
}

.cpc-card-image {
    position: relative;
}

.cpc-card-modelo {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.cpc-card-modelo a {
    color: inherit;
    text-decoration: none;
}

.cpc-card-modelo a:hover {
    text-decoration: underline;
}

.cpc-cert-logo {
    margin-top: 10px;
}

.cpc-cert-logo img {
    max-height: 28px;
    width: auto;
    display: block;
}

.cpc-empty {
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    color: #555;
}



/*mini cart*/

/* Geimex mini cart */


.geimex-mini-cart {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 999;
}

.geimex-mini-cart-link {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.geimex-mini-cart-icon {
    line-height: 1;
}

.geimex-mini-cart-count {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.geimex-mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    padding-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .18s ease;
    pointer-events: none;
    z-index: 99999;
}

.geimex-mini-cart:hover .geimex-mini-cart-dropdown,
.geimex-mini-cart:focus-within .geimex-mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.geimex-mini-cart-dropdown-inner {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
    overflow: hidden;
}

.geimex-mini-cart-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.geimex-mini-cart-header strong {
    color: #0ea5e9;
    font-size: 16px;
}

.geimex-mini-cart-total {
    color: #111827;
    font-weight: 700;
}

.geimex-mini-cart-items {
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
}

.geimex-mini-cart-empty {
    padding: 18px 16px;
    color: #6b7280;
}

/* Item row */
.geimex-mini-cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

.geimex-mini-cart-item-main {
    min-width: 0;
}

.geimex-mini-cart-item-main strong {
    display: block;
    color: #0ea5e9;
    font-size: 15px;
    line-height: 1.25;
}

.geimex-mini-cart-item-main small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
    text-transform: uppercase;
}

.geimex-mini-cart-item-side {
    flex-shrink: 0;
    text-align: right;
    font-size: 13px;
    min-width: 72px;
}

.geimex-mini-cart-item-unit {
    display: none;
}

.geimex-mini-cart-item-total {
    display: block;
    color: #0ea5e9;
    font-weight: 700;
    white-space: nowrap;
}

/* Controls: one line, no label text */
.geimex-mini-cart-controls {
    display: grid;
    grid-template-columns: 1fr 32px;
    align-items: start;
    gap: 10px;
    margin-top: 10px;
    max-width: 225px;
}

.geimex-mini-cart-controls label {
    display: block;
    margin: 0;
    font-size: 0;
    line-height: 0;
}

.geimex-mini-cart-qty {
    width: 100%;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-size: 13px;
    line-height: 1;
    box-shadow: none;
}

.geimex-mini-cart-qty:focus {
    outline: none;
    border-color: #9ca3af;
    background: #e5e7eb !important;
}

.geimex-mini-cart-remove {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.geimex-mini-cart-remove:hover {
    background: #fecaca;
}

/* Footer buttons smaller */
.geimex-mini-cart-footer {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.geimex-mini-cart-button {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #e5e7eb;
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
}

.geimex-mini-cart-button--dark {
    background: #111827;
    color: #0ea5e9;
}

.geimex-mini-cart-button:hover {
    opacity: .9;
    text-decoration: none;
}

.cpc-cart-item-link,
.geimex-mini-cart-item-link {
    color: #0ea5e9;
    text-decoration: none;
}

.cpc-cart-item-link:hover,
.geimex-mini-cart-item-link:hover {
    text-decoration: underline;
}

.geimex-mini-cart-item-link strong {
    color: #0ea5e9;
}




/* Modern related products */
.cpc-related-modern {
    margin-top: 36px;
    overflow: hidden;
    padding:16px;
}

.cpc-related-modern-section {
    margin-top: 34px;
}

.cpc-related-modern-head {
    margin-bottom: 16px;
}

.cpc-related-modern-head h3 {
    margin: 0;
    font-size: 24px;
}

.cpc-related-modern-head p {
    margin: 6px 0 0;
    color: #6b7280;
}

.cpc-related-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 18px;
}

.cpc-related-slider .cpc-related-card {
    flex: 0 0 245px;
    scroll-snap-align: start;
}

.cpc-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.cpc-related-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease;
}

.cpc-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(15, 23, 42, .08);
}

.cpc-related-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 155px;
    padding: 14px;
    background: #f9fafb;
    text-decoration: none;
}

.cpc-related-card-image img {
    max-width: 100%;
    max-height: 125px;
    object-fit: contain;
}

.cpc-related-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px;
}

.cpc-related-card-title {
    min-height: 42px;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.25;
}

.cpc-related-card-title:hover {
    color: #0ea5e9;
}

.cpc-related-card-ref,
.cpc-related-card-section {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}

.cpc-related-card-cert {
    margin-top: 10px;
}

.cpc-related-card-cert img {
    max-height: 26px;
    max-width: 80px;
}

.cpc-related-add-to-cart {
    margin-top: auto;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cpc-related-open-stock-modal{
   margin-top: auto;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cpc-related-add-to-cart:hover {
    opacity: .9;
}

.cpc-related-add-to-cart:disabled {
    opacity: .55;
    cursor: wait;
}

@media (max-width: 1100px) {
    .cpc-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .cpc-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .cpc-related-grid {
        grid-template-columns: 1fr;
    }

    .cpc-related-slider .cpc-related-card {
        flex-basis: 80%;
    }
}


/*modal css*/
.cpc-stock-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.cpc-stock-modal.is-open {
    display: block;
}

.cpc-stock-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .58);
}

.cpc-stock-modal-dialog {
    position: relative;
    width: min(960px, calc(100vw - 32px));
    max-height: calc(100vh - 56px);
    margin: 28px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    overflow: auto;
}

.cpc-stock-modal-close {
    position: sticky;
    top: 12px;
    float: right;
    z-index: 3;
    width: 34px;
    height: 34px;
    margin: 12px 12px 0 0;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cpc-stock-modal-content {
    padding: 24px;
    clear: both;
}

.cpc-stock-modal-loading,
.cpc-stock-modal-error {
    padding: 24px;
    border-radius: 12px;
    background: #f9fafb;
    color: #111827;
    font-weight: 600;
}

.cpc-stock-modal-error {
    background: #fee2e2;
    color: #991b1b;
}

.cpc-stock-modal .cpc-stock-box {
    margin-top: 0;
    border: 0;
    padding: 0;
}


/*toggle lines*/
.cpc-order-toggle {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
    font-weight: 800;
    cursor: pointer;
}

.cpc-order-toggle:hover {
    background: #d1d5db;
}

.cpc-order-lines-row td {
    background: #f9fafb;
}

.cpc-order-lines-box {
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.cpc-order-lines-box h3 {
    margin-top: 0;
}

.cpc-order-lines-table {
    width: 100%;
    border-collapse: collapse;
}

.cpc-order-lines-table th,
.cpc-order-lines-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.cpc-order-albaran-link {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.cpc-order-albaran-link:hover {
    opacity: .9;
    color: #fff;
}


/*mi cuenta*/
/* =========================================================
   Dedicated Geimex account area
   ========================================================= */

.cpc-account {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    margin: 30px 0;
}

.cpc-account-sidebar {
    align-self: start;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
}

.cpc-account-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: #f5f7f8;
    border-bottom: 1px solid #e1e5e8;
}

.cpc-account-avatar img {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.cpc-account-user-info {
    min-width: 0;
}

.cpc-account-user-info strong,
.cpc-account-user-info span {
    display: block;
}

.cpc-account-user-info span {
    margin-top: 4px;
    color: #6a747b;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cpc-account-navigation a {
    display: block;
    padding: 14px 16px;
    color: #343d43;
    text-decoration: none;
    border-bottom: 1px solid #edf0f2;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cpc-account-navigation a:last-child {
    border-bottom: 0;
}

.cpc-account-navigation a:hover,
.cpc-account-navigation a.is-active {
    color: #087fae;
    background: #edf8fc;
}

.cpc-account-content {
    min-width: 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
}

.cpc-account-content .cpc-account-orders-header {
    margin-bottom: 22px;
}

.cpc-account-form {
    max-width: 820px;
}

.cpc-account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.cpc-account-field--full {
    grid-column: 1 / -1;
}

.cpc-account-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.cpc-account-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cbd4d9;
    border-radius: 4px;
}

.cpc-account-field input:focus {
    border-color: #119fd6;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(17, 159, 214, 0.14);
}

.cpc-account-field input:disabled {
    background: #f2f4f5;
}

.cpc-account-field small {
    display: block;
    margin-top: 6px;
    color: #6a747b;
}

.cpc-account-notice {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 4px;
}

.cpc-account-notice.is-success {
    color: #26643c;
    background: #e8f8ed;
    border: 1px solid #b6dfc0;
}

.cpc-account-notice.is-error {
    color: #892929;
    background: #fff0f0;
    border: 1px solid #efc2c2;
}

.cpc-account-login-required {
    max-width: 650px;
    margin: 40px auto;
    padding: 30px;
    text-align: center;
    background: #fff;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
}

@media (max-width: 950px) {
    .cpc-account {
        grid-template-columns: 1fr;
    }

    .cpc-account-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cpc-account-navigation a {
        border-right: 1px solid #edf0f2;
    }
}

@media (max-width: 620px) {
    .cpc-account-content {
        padding: 16px;
    }

    .cpc-account-navigation,
    .cpc-account-form-grid {
        grid-template-columns: 1fr;
    }
}


/*api orders*/
.cpc-api-orders-section {
    margin-top: 36px;
}

.cpc-api-orders-header h2 {
    margin-bottom: 6px;
}

.cpc-api-orders-header p {
    margin-top: 0;
    color: #6b7280;
}

.cpc-api-orders-search-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.cpc-api-orders-field {
    display: grid;
    gap: 5px;
}

.cpc-api-orders-field label {
    font-size: 13px;
    font-weight: 700;
}

.cpc-api-orders-field input {
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.cpc-api-orders-search-btn {
    min-height: 40px;
    padding: 8px 16px;
}

.cpc-api-orders-message {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
}

.cpc-api-orders-message.is-success {
    background: #dcfce7;
    color: #166534;
}

.cpc-api-orders-message.is-error {
    background: #fee2e2;
    color: #991b1b;
}

.cpc-api-orders-placeholder,
.cpc-api-orders-empty {
    padding: 18px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
}

.cpc-api-orders-table-wrap {
    overflow-x: auto;
}

.cpc-api-order-toggle {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    font-weight: 800;
    cursor: pointer;
}

.cpc-api-order-lines-row td {
    background: #f9fafb;
}

.cpc-api-order-lines-box {
    padding: 16px;
}

.cpc-api-order-lines-box h4 {
    margin-top: 0;
}

.cpc-api-albaran-links {
    display: grid;
    gap: 5px;
}

.cpc-api-albaran-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 7px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.cpc-api-albaran-link:hover {
    opacity: .88;
    color: #fff;
}


/* =========================================================
   MY ORDERS — BASE / DESKTOP
   ========================================================= */

.cpc-my-orders-table-wrap,
.cpc-api-orders-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.cpc-my-orders-table,
.cpc-api-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.cpc-my-orders-table th,
.cpc-my-orders-table td,
.cpc-api-orders-table th,
.cpc-api-orders-table td {
    vertical-align: middle;
}

.cpc-order-row td,
.cpc-api-order-row td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.cpc-order-lines-box,
.cpc-api-order-lines-box {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cpc-order-lines-table {
    width: 100%;
    border-collapse: collapse;
}

.cpc-order-lines-table th,
.cpc-order-lines-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.cpc-order-lines-table th {
    white-space: nowrap;
}

.cpc-order-api-list,
.cpc-order-warehouse-list,
.cpc-api-albaran-links {
    min-width: 0;
}

.cpc-order-api-item,
.cpc-order-warehouse-badge,
.cpc-api-albaran-link {
    max-width: 100%;
}


/* =========================================================
   TABLET — RETAIN TABLES WITH HORIZONTAL SCROLL
   ========================================================= */

@media (max-width: 1100px) {

    .cpc-my-orders-table {
        min-width: 980px;
    }

    .cpc-api-orders-table {
        min-width: 1080px;
    }

    .cpc-order-lines-table {
        min-width: 680px;
    }

    .cpc-api-orders-search-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        align-items: end;
        gap: 12px;
    }

    .cpc-api-orders-field,
    .cpc-api-orders-field input {
        min-width: 0;
        width: 100%;
    }
}


/* =========================================================
   MOBILE — CONVERT TOP-LEVEL ORDER ROWS INTO CARDS
   ========================================================= */

@media (max-width: 767px) {

    .cpc-header h1 {
        font-size: 25px;
    }

    .cpc-header .cpc-sub {
        font-size: 14px;
    }

    .cpc-checkout-card {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .cpc-my-orders-table-wrap,
    .cpc-api-orders-table-wrap {
        overflow: visible;
    }

    .cpc-my-orders-table,
    .cpc-api-orders-table {
        display: block;
        min-width: 0;
        border: 0;
        background: transparent;
    }

    .cpc-my-orders-table > thead,
    .cpc-api-orders-table > thead {
        display: none;
    }

    .cpc-my-orders-table > tbody,
    .cpc-api-orders-table > tbody {
        display: grid;
        gap: 14px;
    }

    .cpc-my-orders-table > tbody > .cpc-order-row,
    .cpc-api-orders-table > tbody > .cpc-api-order-row {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        overflow: hidden;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td,
    .cpc-api-orders-table > tbody > .cpc-api-order-row > td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        width: auto;
        padding: 10px 14px;
        border: 0;
        border-bottom: 1px solid #f0f1f3;
        text-align: right;
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:last-child,
    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:last-child {
        border-bottom: 0;
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td::before,
    .cpc-api-orders-table > tbody > .cpc-api-order-row > td::before {
        flex: 0 0 42%;
        color: #6b7280;
        font-size: 12px;
        font-weight: 700;
        text-align: left;
    }


    /* Local order table labels */

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(1)::before {
        content: "";
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(2)::before {
        content: "Fecha";
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(3)::before {
        content: "Su pedido";
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(4)::before {
        content: "Pedidos Geimex";
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(5)::before {
        content: "Almacenes";
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(6)::before {
        content: "Estado";
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(7)::before {
        content: "Total";
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td:nth-child(8)::before {
        content: "Albarán";
    }


    /* API historical order table labels */

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(1)::before {
        content: "";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(2)::before {
        content: "Fecha";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(3)::before {
        content: "Nº pedido";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(4)::before {
        content: "Su pedido";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(5)::before {
        content: "Almacén";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(6)::before {
        content: "Dirección";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(7)::before {
        content: "Estado";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(8)::before {
        content: "Total";
    }

    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:nth-child(9)::before {
        content: "Albaranes";
    }


    /* Expand button row */

    .cpc-my-orders-table > tbody > .cpc-order-row > td:first-child,
    .cpc-api-orders-table > tbody > .cpc-api-order-row > td:first-child {
        justify-content: flex-end;
        padding: 9px 12px;
        background: #f9fafb;
    }

    .cpc-order-toggle,
    .cpc-api-order-toggle {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
    }


    /* Expanded local/API detail rows */

    .cpc-order-lines-row,
    .cpc-api-order-lines-row {
        display: none;
    }

    .cpc-order-lines-row[style*="table-row"],
    .cpc-api-order-lines-row[style*="table-row"] {
        display: block !important;
        overflow: hidden;
        margin-top: -8px;
        border: 1px solid #e5e7eb;
        border-top: 0;
        border-radius: 0 0 14px 14px;
        background: #fff;
    }

    .cpc-order-lines-row > td,
    .cpc-api-order-lines-row > td {
        display: block;
        width: auto;
        padding: 12px;
        border: 0;
    }

    .cpc-order-lines-box,
    .cpc-api-order-lines-box {
        padding: 8px 2px 2px;
    }

    .cpc-order-lines-box h3,
    .cpc-api-order-lines-box h4 {
        margin-top: 0;
        font-size: 16px;
    }

    .cpc-order-lines-table {
        min-width: 640px;
    }


    /* Shipment blocks inside expanded local order */

    .cpc-order-shipments {
        display: grid;
        gap: 12px;
    }

    .cpc-order-shipment {
        padding: 12px;
        border-radius: 10px;
    }

    .cpc-order-shipment-header {
        display: grid;
        gap: 8px;
    }

    .cpc-order-shipment-total {
        font-size: 15px;
    }


    /* Search form */

    .cpc-api-orders-section {
        margin-top: 28px;
    }

    .cpc-api-orders-search-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .cpc-api-orders-field,
    .cpc-api-orders-field input,
    .cpc-api-orders-search-btn {
        width: 100%;
    }

    .cpc-api-orders-search-btn {
        justify-content: center;
    }

    .cpc-api-albaran-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .cpc-my-orders-table > tbody > .cpc-order-row > td,
    .cpc-api-orders-table > tbody > .cpc-api-order-row > td {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
        text-align: left;
    }

    .cpc-my-orders-table > tbody > .cpc-order-row > td::before,
    .cpc-api-orders-table > tbody > .cpc-api-order-row > td::before {
        flex-basis: auto;
    }

    .cpc-api-albaran-links {
        justify-content: flex-start;
    }
}


.cpc-table-scroll-hint {
    display: none;
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 12px;
}

@media (min-width: 768px) and (max-width: 1100px) {
    .cpc-table-scroll-hint {
        display: block;
    }
}


/*direcciones envio dropdown*/
.cpc-form-row select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
}

.cpc-form-row select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}


/*zoom */
.cpc-product-top {
    position: relative;
}

.cpc-product-gallery {
    position: relative;
}

.cpc-product-zoom-wrap {
    position: relative;
    display: block;
}

.cpc-product-mainimg {
    display: block;
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

.cpc-product-zoom-pane {
    position: relative;
    width: 100%;
    height: 420px;
    margin-bottom: 24px;
    display: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.cpc-product-zoom-pane.is-active {
    display: block;
}

.cpc-product-zoom-pane .drift-zoom-pane {
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.cpc-product-zoom-pane .drift-zoom-pane img {
    max-width: none !important;
}

.cpc-product-gallery .drift-bounding-box {
    z-index: 10000;
}

@media (max-width: 768px) {
    .cpc-product-zoom-pane {
        display: none !important;
    }
}




/* =========================================================
   Mobile filters drawer
   ========================================================= */

.cpc-mobile-filters-btn,
.cpc-sidebar-close,
.cpc-sidebar-overlay {
    display: none;
}

/* Desktop sidebar stays normal */
.cpc-sidebar {
    flex: 0 0 280px;
}

/* Mobile / tablet */
@media (max-width: 900px) {

    .cpc-mobile-filters-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        min-height: 42px;
        padding: 10px 18px;
        margin: 0 0 14px 0;
        border: 0;
        border-radius: 8px;
        background: #111827;
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
    }

    .cpc-mobile-filters-btn::before {
        content: "☰";
        font-size: 16px;
        line-height: 1;
    }

    .cpc-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 99999;
        width: min(86vw, 340px);
        max-width: 340px;
        height: 100vh;
        padding: 58px 16px 20px;
        overflow-y: auto;
        background: #fff;
        box-shadow: 12px 0 35px rgba(0, 0, 0, 0.18);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        flex: none;
    }

    body.cpc-filters-open .cpc-sidebar {
        transform: translateX(0);
    }

    .cpc-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 99998;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    body.cpc-filters-open .cpc-sidebar-overlay {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .cpc-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 14px;
        right: 14px;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 50%;
        background: #f3f4f6;
        color: #111827;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    .cpc-sidebar-close:hover {
        background: #e5e7eb;
    }

    .cpc-side-block--marcas {
        display: none;
    }

    body.cpc-filters-open {
        overflow: hidden;
    }

    .cpc-layout {
        display: block;
    }
}



/* Mobile marcas grid: 2 columns */
@media (max-width: 767px) {
    .cpc-grid--marcas {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .cpc-grid--marcas .cpc-card--marca {
        min-width: 0;
    }

    .cpc-grid--marcas .cpc-card-img--text {
        height: 105px;
        min-height: 105px;
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .cpc-grid--marcas .cpc-card-img--text span {
        font-size: 14px;
        line-height: 1.2;
        word-break: normal;
        overflow-wrap: anywhere;
    }
}


/* =========================================================
   Modelos page - mobile 2 columns
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-modelos .cpc-grid--modelos {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .cpc-page-modelos .cpc-card--modelo {
        width: 100% !important;
        min-width: 0 !important;
        display: block;
    }

    .cpc-page-modelos .cpc-card--modelo .cpc-card-img {
        height: 120px;
        min-height: 120px;
        overflow: hidden;
        background: #eef3f7;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cpc-page-modelos .cpc-card--modelo .cpc-card-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        display: block;
    }

    .cpc-page-modelos .cpc-card--modelo .cpc-card-body {
        padding: 10px;
    }

    .cpc-page-modelos .cpc-card--modelo .cpc-card-title {
        font-size: 13px;
        line-height: 1.25;
        font-weight: 700;
    }

    .cpc-page-modelos .cpc-card--modelo .cpc-card-meta {
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.35;
    }
}


/* =========================================================
   Piezas page - mobile 2 columns
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-piezas .cpc-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .cpc-page-piezas .cpc-item {
        width: 100% !important;
        min-width: 0 !important;
        display: block !important;
        padding: 10px !important;
    }

    .cpc-page-piezas .cpc-item-img {
        width: 100% !important;
        height: 125px !important;
        min-height: 125px !important;
        margin: 0 0 10px 0 !important;
        padding: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    .cpc-page-piezas .cpc-item-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        display: block !important;
    }

    .cpc-page-piezas .cpc-item-body {
        padding: 0 !important;
    }

    .cpc-page-piezas .cpc-item-title {
        font-size: 12px !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
        margin-bottom: 8px !important;
    }

    .cpc-page-piezas .cpc-item-meta {
        display: block !important;
        font-size: 10.5px !important;
        line-height: 1.35 !important;
    }

    .cpc-page-piezas .cpc-item-meta span {
        display: block !important;
        margin: 0 0 4px 0 !important;
    }

    .cpc-page-piezas .cpc-item-meta code {
        font-size: 10.5px !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    .cpc-page-piezas .cpc-item-oem {
        word-break: break-word !important;
    }

    .cpc-page-piezas .cpc-item-cert-logo {
        margin-top: 8px !important;
    }

    .cpc-page-piezas .cpc-item-cert-logo img {
        max-height: 24px !important;
        width: auto !important;
    }

    .cpc-page-piezas .cpc-item-action {
        margin-top: 10px !important;
    }

    .cpc-page-piezas .cpc-btn--small {
        padding: 7px 9px !important;
        font-size: 11px !important;
    }

    .cpc-page-piezas .cpc-badge-novedad {
        top: 6px !important;
        left: 6px !important;
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
}

@media (max-width: 420px) {

    .cpc-page-piezas .cpc-list {
        gap: 10px !important;
    }

    .cpc-page-piezas .cpc-item {
        padding: 8px !important;
    }

    .cpc-page-piezas .cpc-item-img {
        height: 105px !important;
        min-height: 105px !important;
    }

    .cpc-page-piezas .cpc-item-title {
        font-size: 11px !important;
    }

    .cpc-page-piezas .cpc-item-meta {
        font-size: 10px !important;
    }

    .cpc-page-piezas .cpc-item-meta code {
        font-size: 10px !important;
    }
}


/* =========================================================
   Single pieza page - mobile layout
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-pieza {
        overflow-x: hidden;
    }

    .cpc-page-pieza .cpc-main {
        min-width: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .cpc-page-pieza .cpc-product {
        width: 100%;
        overflow-x: hidden;
    }

    .cpc-page-pieza .cpc-product-top {
        display: block !important;
        width: 100%;
    }

    .cpc-page-pieza .cpc-product-gallery,
    .cpc-page-pieza .cpc-product-summary {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .cpc-page-pieza .cpc-product-gallery {
        margin-bottom: 18px;
    }

    .cpc-page-pieza .cpc-product-zoom-wrap {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 260px;
        padding: 12px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cpc-page-pieza .cpc-product-mainimg {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        object-fit: contain !important;
        object-position: center !important;
        display: block;
    }

    .cpc-page-pieza .cpc-product-title {
        font-size: 22px !important;
        line-height: 1.2 !important;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .cpc-page-pieza .cpc-product-meta {
        font-size: 13px;
        line-height: 1.45;
        word-break: break-word;
    }

    .cpc-page-pieza .cpc-oem-list {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 4px;
        max-width: 100%;
    }

    .cpc-page-pieza .cpc-oem-code {
        white-space: normal;
        word-break: break-word;
    }
}



/* =========================================================
   Stock table - mobile cards
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-pieza .cpc-stock-box {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 14px;
    }

    .cpc-page-pieza .cpc-stock-header {
        display: block !important;
    }

    .cpc-page-pieza .cpc-stock-header-main {
        width: 100%;
    }

    .cpc-page-pieza .cpc-stock-header-actions {
        margin-top: 12px;
    }

    .cpc-page-pieza .cpc-stock-price {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 10px;
        font-size: 13px;
    }

    .cpc-page-pieza .cpc-stock-table {
        display: block;
        width: 100%;
        border: 0;
    }

    .cpc-page-pieza .cpc-stock-table thead {
        display: none;
    }

    .cpc-page-pieza .cpc-stock-table tbody {
        display: block;
        width: 100%;
    }

    .cpc-page-pieza .cpc-stock-table tr {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #fff;
    }

    .cpc-page-pieza .cpc-stock-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 7px 0;
        border: 0;
        font-size: 13px;
        text-align: right;
    }

    .cpc-page-pieza .cpc-stock-table td::before {
        flex: 0 0 auto;
        font-weight: 700;
        color: #111827;
        text-align: left;
    }

    .cpc-page-pieza .cpc-stock-table td:nth-child(1)::before {
        content: "Almacén";
    }

    .cpc-page-pieza .cpc-stock-table td:nth-child(2)::before {
        content: "Estado";
    }

    .cpc-page-pieza .cpc-stock-table td:nth-child(3)::before {
        content: "Cantidad";
    }

    .cpc-page-pieza .cpc-stock-table td:nth-child(4)::before {
        content: "Acción";
    }

    .cpc-page-pieza .cpc-stock-table td strong,
    .cpc-page-pieza .cpc-stock-table td small {
        display: block;
    }

    .cpc-page-pieza .cpc-stock-qty {
        width: 72px;
        max-width: 72px;
    }

    .cpc-page-pieza .cpc-add-to-cart-btn {
        width: auto;
        min-width: 120px;
        padding: 8px 10px;
        font-size: 12px;
        white-space: normal;
    }

    .cpc-page-pieza .cpc-view-cart-btn {
        display: inline-flex;
        width: 100%;
        justify-content: center;
    }
}


/* =========================================================
   Single pieza - related products mobile 2 columns
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-pieza .cpc-related-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .cpc-page-pieza .cpc-related-card {
        width: 100% !important;
        min-width: 0 !important;
        overflow: hidden;
    }

    .cpc-page-pieza .cpc-related-card-image {
        height: 120px !important;
        min-height: 120px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .cpc-page-pieza .cpc-related-card-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        display: block;
    }

    .cpc-page-pieza .cpc-related-card-body {
        padding: 10px !important;
    }

    .cpc-page-pieza .cpc-related-card-title {
        font-size: 12px !important;
        line-height: 1.25 !important;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

    .cpc-page-pieza .cpc-related-card-ref,
    .cpc-page-pieza .cpc-related-card-oem,
    .cpc-page-pieza .cpc-related-card-section {
        font-size: 10.5px !important;
        line-height: 1.35 !important;
        word-break: break-word;
    }

    .cpc-page-pieza .cpc-related-open-stock-modal {
        width: 100%;
        padding: 8px 8px;
        font-size: 11px;
        white-space: normal;
    }
}

/* =========================================================
   Single pieza - compatible modelos mobile 2 columns
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-pieza .cpc-grid--modelos {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .cpc-page-pieza .cpc-grid--modelos .cpc-card--modelo {
        width: 100% !important;
        min-width: 0 !important;
        display: block;
    }

    .cpc-page-pieza .cpc-grid--modelos .cpc-card-img {
        height: 115px;
        min-height: 115px;
        overflow: hidden;
        background: #eef3f7;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cpc-page-pieza .cpc-grid--modelos .cpc-card-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        display: block;
    }

    .cpc-page-pieza .cpc-grid--modelos .cpc-card-body {
        padding: 10px;
    }

    .cpc-page-pieza .cpc-grid--modelos .cpc-card-title {
        font-size: 12px;
        line-height: 1.25;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

    .cpc-page-pieza .cpc-grid--modelos .cpc-card-meta {
        margin-top: 6px;
        font-size: 10.5px;
        line-height: 1.35;
    }
}


@media (max-width: 420px) {

    .cpc-page-pieza .cpc-product-zoom-wrap {
        min-height: 230px;
    }

    .cpc-page-pieza .cpc-product-mainimg {
        max-height: 250px !important;
    }

    .cpc-page-pieza .cpc-product-title {
        font-size: 20px !important;
    }

    .cpc-page-pieza .cpc-related-card-image,
    .cpc-page-pieza .cpc-grid--modelos .cpc-card-img {
        height: 100px !important;
        min-height: 100px !important;
    }

    .cpc-page-pieza .cpc-related-grid,
    .cpc-page-pieza .cpc-grid--modelos {
        gap: 10px !important;
    }
}



/* =========================================================
   Checkout page - mobile layout
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-checkout {
        overflow-x: hidden;
    }

    .cpc-page-checkout .cpc-layout,
    .cpc-page-checkout .cpc-main,
    .cpc-page-checkout .cpc-checkout-form,
    .cpc-page-checkout .cpc-checkout-grid,
    .cpc-page-checkout .cpc-checkout-main,
    .cpc-page-checkout .cpc-checkout-sidebar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .cpc-page-checkout .cpc-checkout-grid {
        display: block !important;
    }

    .cpc-page-checkout .cpc-checkout-sidebar {
        margin-top: 18px;
    }

    .cpc-page-checkout .cpc-header h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    .cpc-page-checkout .cpc-header .cpc-sub {
        font-size: 13px;
        line-height: 1.4;
    }

    .cpc-page-checkout .cpc-checkout-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 14px;
        overflow-x: hidden;
    }

    .cpc-page-checkout .cpc-checkout-card h2 {
        font-size: 22px;
        line-height: 1.2;
    }

    .cpc-page-checkout .cpc-form-row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .cpc-page-checkout input[type="text"],
    .cpc-page-checkout input[type="number"],
    .cpc-page-checkout select,
    .cpc-page-checkout textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        font-size: 14px;
    }

    .cpc-page-checkout select {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cpc-page-checkout textarea {
        min-height: 110px;
        resize: vertical;
    }

    .cpc-page-checkout .cpc-checkbox-row label {
        display: flex;
        align-items: center;
        gap: 8px;
        line-height: 1.3;
    }

    .cpc-page-checkout .cpc-checkbox-row input {
        flex: 0 0 auto;
    }

    .cpc-page-checkout .cpc-checkout-warehouse-header {
        display: block !important;
    }

    .cpc-page-checkout .cpc-checkout-warehouse-header h2 {
        font-size: 22px;
        line-height: 1.2;
        word-break: break-word;
    }

    .cpc-page-checkout .cpc-checkout-warehouse-header h2 span {
        font-size: 13px;
    }

    .cpc-page-checkout .cpc-checkout-warehouse-header p {
        font-size: 13px;
        line-height: 1.4;
    }

    .cpc-page-checkout .cpc-checkout-warehouse-total {
        display: block;
        margin-top: 10px;
        font-size: 18px;
    }
}


/* =========================================================
   Checkout table - mobile cards
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-checkout .cpc-checkout-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .cpc-page-checkout .cpc-checkout-table {
        display: block;
        width: 100%;
        border: 0;
    }

    .cpc-page-checkout .cpc-checkout-table thead {
        display: none;
    }

    .cpc-page-checkout .cpc-checkout-table tbody {
        display: block;
        width: 100%;
    }

    .cpc-page-checkout .cpc-checkout-table tr {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #fff;
    }

    .cpc-page-checkout .cpc-checkout-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 7px 0;
        border: 0;
        font-size: 13px;
        line-height: 1.35;
        text-align: right;
        word-break: break-word;
    }

    .cpc-page-checkout .cpc-checkout-table td::before {
        flex: 0 0 88px;
        font-weight: 700;
        color: #111827;
        text-align: left;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.03em;
    }

    .cpc-page-checkout .cpc-checkout-table td:nth-child(1)::before {
        content: "Referencia";
    }

    .cpc-page-checkout .cpc-checkout-table td:nth-child(2)::before {
        content: "Descripción";
    }

    .cpc-page-checkout .cpc-checkout-table td:nth-child(3)::before {
        content: "Cantidad";
    }

    .cpc-page-checkout .cpc-checkout-table td:nth-child(4)::before {
        content: "Neto";
    }

    .cpc-page-checkout .cpc-checkout-table td:nth-child(5)::before {
        content: "Total";
    }

    .cpc-page-checkout .cpc-checkout-table td strong,
    .cpc-page-checkout .cpc-checkout-table td a {
        word-break: break-word;
    }

    .cpc-page-checkout .cpc-cart-item-link {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}


/* =========================================================
   Checkout summary - mobile
   ========================================================= */

@media (max-width: 767px) {

    .cpc-page-checkout .cpc-checkout-sidebar-warehouses {
        width: 100%;
        max-width: 100%;
    }

    .cpc-page-checkout .cpc-checkout-sidebar-warehouse {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .cpc-page-checkout .cpc-checkout-sidebar-warehouse span,
    .cpc-page-checkout .cpc-checkout-sidebar-warehouse strong {
        display: block;
        width: 100%;
        word-break: break-word;
    }

    .cpc-page-checkout .cpc-checkout-sidebar-warehouse strong {
        margin-top: 4px;
    }

    .cpc-page-checkout .cpc-checkout-total {
        font-size: 18px;
    }

    .cpc-page-checkout .cpc-place-order-btn,
    .cpc-page-checkout .cpc-cart-checkout-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .cpc-page-checkout .cpc-checkout-message {
        width: 100%;
        max-width: 100%;
        word-break: break-word;
    }
}


@media (max-width: 420px) {

    .cpc-page-checkout .cpc-checkout-card {
        padding: 12px;
    }

    .cpc-page-checkout .cpc-checkout-card h2 {
        font-size: 20px;
    }

    .cpc-page-checkout .cpc-checkout-table tr {
        padding: 10px;
    }

    .cpc-page-checkout .cpc-checkout-table td {
        font-size: 12px;
    }

    .cpc-page-checkout .cpc-checkout-table td::before {
        flex-basis: 78px;
        font-size: 10px;
    }
}