/* ===================================================================================
   Archivo: assets/css/woocommerce-custom.css
   Desarrollador: INTIC GLOBAL - ALEX I. GARCIA B.
   Descripción: Sistema visual de alto impacto prediseñado para ClipERP Storefront.
   =================================================================================== */

/* === RESET Y TIPOGRAFÍA GLOBAL === */
body.cliperp-storefront-active {
  color: #334155;
  background-color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

.site-content {
  padding-top: 25px;
  padding-bottom: 50px;
}

.col-full {
  max-width: 1280px !important;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* === 1. CABECERA (HEADER) Y TOPBAR === */
.cliperp-topbar {
  background: #0f172a;
  color: #f1f5f9;
  font-size: 0.85rem;
  padding: 8px 0;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cliperp-topbar .col-full {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.site-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}

/* Buscador de la cabecera */
.site-search {
  margin-top: 0 !important;
}

.site-search .widget_product_search form {
  position: relative;
  display: flex;
}

.site-search input[type="search"] {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 9999px !important;
  padding: 10px 45px 10px 18px !important;
  font-size: 0.9rem !important;
  background-color: #f8fafc !important;
  color: #1e293b !important;
  transition: all 0.2s ease;
  width: 100% !important;
}

.site-search input[type="search"]:focus {
  border-color: var(--cliperp-primary-color, #0d6efd) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15) !important;
  outline: none;
}

.site-search button[type="submit"] {
  position: absolute !important;
  right: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: var(--cliperp-primary-color, #0d6efd) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Carrito en cabecera */
.site-header-cart .cart-contents {
  background: #f1f5f9;
  padding: 8px 16px !important;
  border-radius: 9999px;
  display: inline-flex !important;
  align-items: center;
  font-weight: 600;
  color: #0f172a !important;
  transition: all 0.2s ease;
}

.site-header-cart .cart-contents:hover {
  background: #e2e8f0;
}

.site-header-cart .cart-contents .count {
  background: var(--cliperp-primary-color, #0d6efd);
  color: #ffffff;
  border-radius: 9999px;
  padding: 2px 7px;
  font-size: 0.75rem;
  margin-left: 8px;
}

/* === 2. SECCIÓN HERO (BANNER PRINCIPAL PREDISEÑADO) === */
.cliperp-section-hero {
  padding: 10px 0 30px 0;
}

.cliperp-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0d6efd 100%);
  border-radius: 14px;
  padding: 60px 50px;
  gap: 40px;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}

.cliperp-hero-inner::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cliperp-hero-content {
  flex: 1.2;
  z-index: 1;
}

.cliperp-hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px 0;
  color: #ffffff !important;
  letter-spacing: -0.03em;
}

.cliperp-hero-subtitle {
  font-size: 1.2rem;
  color: #e2e8f0;
  margin: 0 0 30px 0;
  max-width: 580px;
  line-height: 1.5;
}

.cliperp-hero-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.cliperp-hero-btn {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
  padding: 14px 30px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
  display: inline-flex;
  align-items: center;
  transition: all 0.25s ease !important;
}

.cliperp-hero-btn:hover {
  transform: translateY(-2px);
  background: #f1f5f9 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

.cliperp-hero-media {
  flex: 0.9;
  text-align: right;
  z-index: 1;
}

.cliperp-hero-media img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* === 3. SECCIÓN VENTAJAS COMERCIALES (PERKS) === */
.cliperp-section-perks {
  padding: 20px 0 40px 0;
}

.cliperp-perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.cliperp-perk-item {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.cliperp-perk-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.cliperp-perk-icon {
  background: rgba(13, 110, 253, 0.1);
  color: var(--cliperp-primary-color, #0d6efd);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cliperp-perk-icon .dashicons {
  font-size: 26px;
  width: 26px;
  height: 26px;
}

.cliperp-perk-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.cliperp-perk-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

/* === 4. TARJETAS DE PRODUCTO EN CATÁLOGO Y HOME (PRODUCT CARDS) === */
ul.products {
  margin: 0 -12px 30px -12px !important;
}

ul.products li.product {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 16px !important;
  margin-bottom: 24px !important;
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: hidden !important;
}

ul.products li.product:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 24px -5px rgba(0, 0, 0, 0.1) !important;
  border-color: #cbd5e1 !important;
}

ul.products li.product img {
  border-radius: 6px !important;
  margin-bottom: 14px !important;
  transition: transform 0.3s ease;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

ul.products li.product:hover img {
  transform: scale(1.03);
}

/* Título de producto en tarjeta */
ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  margin-bottom: 8px !important;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SKU en tarjeta */
.cliperp-loop-sku {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

/* Precios en tarjeta */
ul.products li.product .price {
  font-size: 1.15rem !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  margin-bottom: 14px !important;
  display: block;
}

ul.products li.product .price del {
  color: #94a3b8 !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  margin-right: 6px;
}

ul.products li.product .price ins {
  text-decoration: none !important;
  color: var(--cliperp-primary-color, #0d6efd) !important;
}

/* Botón Añadir al carrito en tarjeta */
ul.products li.product .button {
  background: var(--cliperp-primary-color, #0d6efd) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  padding: 10px 16px !important;
  text-align: center !important;
  margin-top: auto !important;
  width: 100% !important;
  display: block !important;
  border: none !important;
  transition: all 0.2s ease !important;
}

ul.products li.product .button:hover {
  filter: brightness(0.92);
}

/* Badges de Oferta y Ahorro */
.onsale,
.cliperp-badge-discount {
  background: #e11d48 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 4px 8px !important;
  min-height: auto !important;
  line-height: 1.2 !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  position: absolute !important;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(225, 29, 72, 0.3) !important;
}

/* Badges de Stock */
.cliperp-badge-stock {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  text-transform: uppercase;
}

.cliperp-badge-stock.low-stock {
  background: #f59e0b;
  color: #ffffff;
}

.cliperp-badge-stock.out-of-stock {
  background: #64748b;
  color: #ffffff;
}

/* === 5. SECCIÓN CATEGORÍAS DESTACADAS === */
.cliperp-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.cliperp-category-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: all 0.25s ease;
  display: block;
  text-decoration: none !important;
}

.cliperp-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
  border-color: var(--cliperp-primary-color, #0d6efd);
}

.cliperp-category-img-wrap {
  height: 140px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cliperp-category-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cliperp-category-card:hover .cliperp-category-img-wrap img {
  transform: scale(1.05);
}

.cliperp-category-info {
  padding: 14px 10px;
}

.cliperp-category-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 3px 0;
  color: #0f172a;
}

.cliperp-category-count {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

/* === 6. FICHA INDIVIDUAL DE PRODUCTO (SINGLE PRODUCT) === */
.product .summary {
  padding-left: 20px;
}

.product .product_title {
  font-size: 2.1rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
  margin-bottom: 10px !important;
}

.product .price {
  font-size: 1.6rem !important;
  color: var(--cliperp-primary-color, #0d6efd) !important;
  font-weight: 800 !important;
  margin-bottom: 20px !important;
}

.product .sku_wrapper {
  display: inline-block;
  font-size: 0.85rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 15px;
}

.single_add_to_cart_button {
  background: var(--cliperp-primary-color, #0d6efd) !important;
  padding: 14px 30px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}

/* Trust box en ficha de producto */
.cliperp-product-trust-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 24px;
}

.cliperp-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #334155;
  margin-bottom: 10px;
}

.cliperp-trust-item:last-child {
  margin-bottom: 0;
}

.cliperp-trust-item .dashicons {
  color: #16a34a;
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* === 7. PIE DE PÁGINA (FOOTER) === */
.site-footer {
  background: #0f172a !important;
  color: #94a3b8 !important;
  padding: 45px 0 25px 0 !important;
  border-top: none !important;
}

.site-footer a {
  color: #cbd5e1 !important;
}

.site-footer a:hover {
  color: #ffffff !important;
}

.cliperp-footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cliperp-custom-copyright {
  font-size: 0.88rem;
  color: #94a3b8;
}

.cliperp-erp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 9999px;
  font-weight: 500;
}

.cliperp-erp-tag .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
  color: #38bdf8;
}

/* === RESPONSIVIDAD MÓVIL === */
@media (max-width: 768px) {
  .cliperp-hero-inner {
    flex-direction: column;
    padding: 35px 25px;
    text-align: center;
  }

  .cliperp-hero-title {
    font-size: 2.1rem;
  }

  .cliperp-hero-actions {
    justify-content: center;
  }

  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .product .summary {
    padding-left: 0;
    margin-top: 20px;
  }
}
