/**
 * Theme Components Stylesheet
 *
 * @package SecuDepo
 */

/* 0. SHARED SECTION HEADER (used on homepage rows and single-product related products) */
.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.home-section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--as-ink);
  line-height: 1.25;
  margin: 0;
}

.home-section-subtitle {
  font-size: 14px;
  color: var(--as-gray-600);
  margin: 6px 0 0;
}

.home-section-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.home-view-all {
  font-size: 14px;
  font-weight: 500;
  color: var(--as-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease;
}

.home-view-all:hover {
  color: var(--as-primary-dark);
}

@media (min-width: 768px) {
  .home-section-title {
    font-size: 24px;
  }

  .home-section-header {
    margin-bottom: 20px;
  }
}

@media (max-width: 639px) {
  .home-view-all {
    display: none;
  }
}

/* 0b. PRODUCT CAROUSEL — homepage rows and single-product related products */
.home-product-section {
  padding: 40px 0;
  background: var(--as-white);
}

.home-product-slider-wrap {
  position: relative;
}

.home-product-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.home-product-slider > li {
  flex: 0 0 45%;
  min-width: 0;
}

.home-trending-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-slider-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--as-border-light);
  border-radius: 50%;
  background: var(--as-white);
  color: var(--as-ink);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.home-slider-btn:hover {
  border-color: var(--as-primary);
  color: var(--as-primary);
}

.home-slider-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

@media (min-width: 640px) {
  .home-product-slider > li { flex-basis: 31%; }
  .home-trending-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .home-product-section { padding: 56px 0; }
  .home-product-slider > li { flex-basis: 23%; }
  .home-trending-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .home-product-slider > li { flex-basis: 18%; }
  .home-trending-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Empty-state message shown where a product/category loop found nothing */
.as-empty-loop {
  grid-column: 1 / -1;
  padding: 32px 20px;
  border: 1px dashed var(--as-border-medium);
  border-radius: var(--as-radius-card);
  background: var(--as-soft);
  text-align: center;
}

.as-empty-loop p {
  margin: 0;
  font-size: 14px;
  color: var(--as-gray-600);
}

/* 1. BUTTONS */
.as-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 46px;
  padding: 0 var(--space-5);
  font-family: var(--as-font-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--as-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 180ms ease;
  user-select: none;
  white-space: nowrap;
}

.as-btn-primary {
  background: var(--as-blue-600);
  color: var(--as-white);
  border-color: var(--as-blue-600);
  box-shadow: 0 8px 18px rgba(203, 114, 70, 0.18);
}

.as-btn-primary:hover {
  background: var(--as-blue-700);
  border-color: var(--as-blue-700);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(203, 114, 70, 0.24);
}

.as-btn-primary:active {
  transform: translateY(0);
}

.as-btn-secondary {
  background: var(--as-white);
  color: var(--as-navy-900);
  border: 1px solid var(--as-border-medium);
  box-shadow: var(--as-shadow-sm);
}

.as-btn-secondary:hover {
  background: var(--as-gray-50);
  border-color: var(--as-silver-500);
  color: var(--as-blue-700);
  transform: translateY(-1px);
}

.as-btn-whatsapp {
  background: var(--as-whatsapp);
  color: var(--as-white);
  border: 1px solid var(--as-whatsapp);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.22);
}

.as-btn-whatsapp:hover {
  background: var(--as-whatsapp-dark);
  border-color: var(--as-whatsapp-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.3);
}

.as-btn-danger {
  background: var(--as-danger);
  border-color: var(--as-danger);
  color: var(--as-white);
}

.as-btn-danger:hover {
  background: #be123c;
  border-color: #be123c;
  color: var(--as-white);
}

.as-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--as-radius-sm);
  border: 1px solid var(--as-border-light);
  background: var(--as-white);
  color: var(--as-navy-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 160ms ease;
  padding: 0;
}

.as-icon-btn:hover {
  border-color: var(--as-blue-600);
  color: var(--as-blue-600);
  box-shadow: var(--as-shadow-sm);
  transform: translateY(-1px);
}

/* 2. PRODUCT CARDS — mirrors the storefront <ProductCard /> */
.as-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  background: var(--as-white);
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-card);
  transition: box-shadow 200ms ease;
}

.as-product-card:hover {
  box-shadow: var(--as-shadow-lg);
}

/* Image panel: 4:3, contained, on the soft neutral */
.as-product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--as-radius-control);
  background: var(--as-soft);
}

.as-product-card__media img {
  width: 100%;
  height: 100%;
  padding: 16px;
  object-fit: contain;
  transition: transform 300ms ease;
}

.as-product-card:hover .as-product-card__media img {
  transform: scale(1.05);
}

/* Discount ribbon, notched into the left edge */
.as-product-card__ribbon {
  position: absolute;
  top: 12px;
  left: -4px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 0 var(--as-radius-pill) var(--as-radius-pill) 0;
  background: var(--as-danger);
  color: var(--as-white);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--as-shadow-sm);
}

.as-product-card__stock {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: var(--as-radius-pill);
  background: rgba(114, 115, 118, 0.8);
  color: var(--as-white);
  font-size: 10px;
  font-weight: 600;
}

/* Post/guide cards (archive, index, search) reuse the card shell with a
   cover-cropped 16:9 image rather than the contained product panel. */
.as-product-card__image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--as-radius-control);
  background: var(--as-soft);
  margin-bottom: 12px;
}

.as-product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.as-product-card:hover .as-product-card__image img {
  transform: scale(1.05);
}

.as-product-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin-top: 12px;
}

.as-product-card__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--as-gray-400);
  line-height: 1.4;
}

.as-product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.as-product-card__reviews {
  font-size: 11px;
  color: var(--as-gray-400);
}

.as-btn-whatsapp-hover:hover {
  background: var(--as-whatsapp) !important;
  border-color: var(--as-whatsapp) !important;
  color: var(--as-white) !important;
}

.as-product-card .button.ajax_add_to_cart.added::after {
  content: " \2713";
  font-weight: 700;
}

.as-star-rating {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--as-silver-300);
  font-size: 12px;
  line-height: 1;
}

.as-star-rating--large {
  font-size: 14px;
}

.as-star-rating .is-filled {
  color: var(--as-star);
}

.as-star-rating .is-half {
  color: var(--as-star);
  opacity: .7;
}

.as-star-rating .is-empty {
  color: var(--as-gray-300);
}

@keyframes as-pulse {
  0%, 100% { transform: scale(.9); opacity: .8; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Primary nav link styling lives in header.css (see .as-main-menu a). */

.as-trust-item span {
  margin-top: var(--space-1);
}

footer a {
  color: var(--as-silver-300);
  text-decoration: none;
}

footer a:hover {
  color: var(--as-white);
}

.as-dashboard-widget-card-hover:hover .widget-inner {
  transform: translateY(-2px);
  border-color: rgba(203, 114, 70, .2) !important;
  box-shadow: var(--as-shadow-md) !important;
}

.woocommerce-orders-table__row:hover {
  background: var(--as-gray-50);
}

.as-product-card__brand {
  font-size: var(--fs-xs);
  color: var(--as-gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.as-product-card__title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--as-ink);
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.as-product-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
}

.as-product-card:hover .as-product-card__title a {
  color: var(--as-primary);
}

.as-product-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--as-ink);
}

.as-product-card__price .woocommerce-Price-amount {
  white-space: nowrap;
}

.as-product-card__price del {
  font-size: 12px;
  font-weight: 400;
  color: var(--as-gray-400);
  text-decoration: line-through;
}

.as-product-card__price ins {
  text-decoration: none;
  color: var(--as-ink);
}

/* CTA stack: primary add-to-cart + WhatsApp quick order */
.as-product-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.as-product-card__cart,
.as-product-card__view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  border-radius: var(--as-radius-control);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.as-product-card__cart {
  background: var(--as-primary);
  border: 1px solid var(--as-primary);
  color: var(--as-white);
}

.as-product-card__cart:hover {
  background: var(--as-primary-dark);
  border-color: var(--as-primary-dark);
  color: var(--as-white);
}

.as-product-card__cart.loading {
  opacity: 0.6;
  pointer-events: none;
}

.as-product-card__view {
  background: var(--as-white);
  border: 1px solid var(--as-border-light);
  color: var(--as-ink);
}

.as-product-card__view:hover {
  border-color: var(--as-primary);
  color: var(--as-primary);
}

.as-product-card__whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 16px;
  border: 1px solid rgba(37, 211, 102, 0.4);
  border-radius: var(--as-radius-control);
  background: rgba(37, 211, 102, 0.05);
  color: var(--as-whatsapp-dark);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.as-product-card__whatsapp svg {
  flex-shrink: 0;
}

.as-product-card__whatsapp:hover {
  background: var(--as-whatsapp);
  color: var(--as-white);
}

.as-quick-view-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--as-gray-700);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 160ms ease;
}

.as-product-card:hover .as-quick-view-btn,
.as-quick-view-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.as-quick-view-btn:hover {
  color: var(--as-blue-600);
  border-color: var(--as-blue-600);
  box-shadow: var(--as-shadow-sm);
}

/* 3. BADGES */
.as-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--as-radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.as-badge-stock {
  background: rgba(18, 183, 106, 0.1);
  color: var(--as-success-dark);
}

.as-badge-out {
  background: rgba(225, 29, 72, 0.1);
  color: var(--as-danger);
}

.as-badge-sale {
  background: rgba(225, 29, 72, 0.1);
  color: var(--as-danger);
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.as-badge-new {
  background: var(--as-blue-100);
  color: var(--as-blue-700);
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* 4. FORMS */
.as-input,
.as-select,
.as-textarea {
  width: 100%;
  border: 1px solid var(--as-border-medium);
  border-radius: var(--as-radius-sm);
  background: var(--as-white);
  color: var(--as-gray-900);
  font-size: 14px;
  font-family: var(--as-font-primary);
  min-height: 46px;
  padding: 0 14px;
  transition: all 160ms ease;
}

.as-textarea {
  min-height: 120px;
  padding-top: 12px;
  resize: vertical;
}

.as-input:focus,
.as-select:focus,
.as-textarea:focus {
  outline: none;
  border-color: var(--as-blue-600);
  box-shadow: 0 0 0 4px rgba(203, 114, 70, 0.12);
}

.as-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--as-gray-700);
  margin-bottom: 7px;
}

.as-input.is-error,
.as-select.is-error,
.as-textarea.is-error {
  border-color: var(--as-danger);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.10);
}

.as-field-error {
  color: var(--as-danger);
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}

/* 5. TOAST MESSAGING */
#as-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.as-toast {
  display: grid;
  grid-template-columns: 32px 1fr 24px;
  gap: 12px;
  align-items: start;
  width: 360px;
  padding: 14px;
  background: var(--as-white);
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-md);
  box-shadow: var(--as-shadow-lg);
  pointer-events: auto;
  animation: as-toast-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.as-toast.is-dismissing {
  animation: as-toast-out 200ms ease both;
}

.as-toast__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--as-gray-500);
}

.as-toast__content {
  display: flex;
  flex-direction: column;
}

.as-toast__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--as-gray-900);
  margin-bottom: 2px;
}

.as-toast__message {
  font-size: 13px;
  color: var(--as-gray-600);
  line-height: 1.4;
}

.as-toast__close {
  background: none;
  border: none;
  color: var(--as-gray-400);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.as-toast__close:hover {
  color: var(--as-gray-700);
}

.as-toast--success { border-left: 4px solid var(--as-success); }
.as-toast--success .as-toast__icon { color: var(--as-success); }

.as-toast--error { border-left: 4px solid var(--as-danger); }
.as-toast--error .as-toast__icon { color: var(--as-danger); }

.as-toast--warning { border-left: 4px solid var(--as-warning); }
.as-toast--warning .as-toast__icon { color: var(--as-warning); }

.as-toast--info { border-left: 4px solid var(--as-blue-600); }
.as-toast--info .as-toast__icon { color: var(--as-blue-600); }

.as-toast--whatsapp { border-left: 4px solid var(--as-whatsapp); }
.as-toast--whatsapp .as-toast__icon { color: var(--as-whatsapp); }

@keyframes as-toast-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes as-toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-12px) scale(.98); }
}

/* 6. MODALS */
.as-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(21, 23, 28, 0.6);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.as-modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.as-modal {
  width: min(100%, 760px);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  background: var(--as-white);
  border-radius: var(--as-radius-lg);
  box-shadow: var(--as-shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(.98);
  opacity: 0;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.as-modal-overlay.is-active .as-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.as-modal__header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--as-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.as-modal__title {
  margin: 0;
  font-size: var(--fs-lg);
}

.as-modal__close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--as-gray-500);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background 150ms ease;
}

.as-modal__close:hover {
  background: var(--as-gray-100);
  color: var(--as-gray-900);
}

.as-modal__body {
  padding: 24px;
  overflow-y: auto;
}

.as-modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--as-border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  background: var(--as-gray-50);
  border-bottom-left-radius: var(--as-radius-lg);
  border-bottom-right-radius: var(--as-radius-lg);
}

body.as-modal-open {
  overflow: hidden;
}

.as-quick-view-modal {
  width: min(100%, 860px);
}

.as-confirm-modal {
  width: min(100%, 460px);
}

.woocommerce-notices-wrapper:empty {
  display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  position: relative;
  margin: 0 0 var(--space-5);
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--as-border-light);
  border-left-width: 4px;
  border-radius: var(--as-radius-xs);
  background: var(--as-white);
  color: var(--as-gray-700);
  font-size: var(--fs-sm);
  list-style: none;
}

.woocommerce-message {
  border-left-color: var(--as-success);
}

.woocommerce-info {
  border-left-color: var(--as-info);
}

.woocommerce-error {
  border-left-color: var(--as-danger);
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  position: absolute;
  top: 13px;
  left: 16px;
  font-weight: 800;
}

.woocommerce-message::before { content: "\2713"; color: var(--as-success-dark); }
.woocommerce-info::before { content: "i"; color: var(--as-info); }
.woocommerce-error::before { content: "!"; color: var(--as-danger); }

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
  float: right;
  margin-left: var(--space-3);
}

.as-quick-view-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.15fr);
  gap: var(--space-6);
}

.as-quick-view-media {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--as-gray-50);
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-sm);
  overflow: hidden;
}

.as-quick-view-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.as-quick-view-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.as-quick-view-content h3 {
  font-size: var(--fs-xl);
  margin: var(--space-2) 0;
}

.as-product-panel__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--as-gray-500);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.as-quick-view-price {
  color: var(--as-navy-950);
  font-size: var(--fs-xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
}

.as-quick-view-description {
  color: var(--as-gray-700);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.as-stock-status {
  color: var(--as-success-dark);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.as-quick-view-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: auto;
}

.as-quick-view-details {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--as-blue-700);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.as-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.as-breadcrumb {
  margin-bottom: var(--space-5);
  color: var(--as-gray-400);
  font-size: 12px;
}

.as-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.as-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.as-breadcrumb li:not(:last-child)::after {
  content: "\203A";
  color: var(--as-gray-400);
}

.as-breadcrumb a {
  color: var(--as-gray-400);
  text-decoration: none;
  transition: color 150ms ease;
}

.as-breadcrumb a:hover {
  color: var(--as-primary);
}

.as-breadcrumb [aria-current="page"] {
  color: var(--as-ink);
}

.as-page-hero--compact {
  padding-block: 32px !important;
}

.as-page-featured-image {
  margin: 0 0 var(--space-8);
  overflow: hidden;
  border-radius: var(--as-radius-xs);
}

.as-page-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

.as-content .alignwide {
  width: min(1160px, calc(100vw - 32px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.as-content .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.as-article-layout--no-toc {
  grid-template-columns: 1fr !important;
}

.as-blog-sidebar a {
  display: block;
  color: var(--as-gray-600);
  text-decoration: none;
  line-height: 1.4;
}

.as-blog-sidebar a:hover {
  color: var(--as-blue-700);
}

.as-blog-sidebar .as-toc-level-3 a {
  padding-left: 12px;
}

.as-article-content h2,
.as-article-content h3 {
  scroll-margin-top: 96px;
}

.as-author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.as-related-content,
.as-article-products {
  margin-top: var(--space-10);
}

.as-related-content > h2,
.as-article-products > h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-4);
}

.as-related-content__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.as-related-content__grid article {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-xs);
  background: var(--as-white);
}

.as-related-content__grid a {
  color: var(--as-gray-900);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.as-related-content__grid span {
  color: var(--as-gray-500);
  font-size: 11px;
}

.as-article-products > .as-product-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.as-article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-top: var(--space-10);
  padding: var(--space-6);
  border-left: 4px solid var(--as-blue-600);
  background: var(--as-gray-50);
}

.as-article-cta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.as-article-cta span {
  color: var(--as-gray-600);
  font-size: 13px;
}

.as-widget {
  padding: 18px;
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-xs);
  background: var(--as-white);
}

.as-widget__title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--as-border-light);
  color: var(--as-gray-700);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.as-popular-posts ol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.as-popular-posts li {
  padding-left: 4px;
}

.as-popular-posts a,
.as-popular-posts span {
  display: block;
}

.as-popular-posts a {
  color: var(--as-gray-900);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.as-popular-posts span {
  margin-top: 3px;
  color: var(--as-gray-500);
  font-size: 10px;
}

@media (max-width: 767px) {
	.as-article-layout {
	  grid-template-columns: 1fr !important;
	}

	.as-blog-sidebar {
	  position: static !important;
	}

	.as-related-content__grid {
	  grid-template-columns: 1fr;
	}

	.as-article-cta {
	  align-items: stretch;
	  flex-direction: column;
	}

  .as-modal-overlay {
    align-items: end;
    padding: 12px;
  }

  .as-modal {
    max-height: calc(100dvh - 24px);
  }

  .as-quick-view-grid {
    grid-template-columns: 1fr;
  }

  .as-quick-view-media {
    max-height: 280px;
  }

  .as-quick-view-actions {
    flex-direction: column;
  }
}

/* 7. LOADERS & PROGRESS BARS */
.as-page-loader {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--as-blue-600), var(--as-whatsapp));
  box-shadow: 0 0 12px rgba(203, 114, 70, 0.45);
  transition: width 260ms ease, opacity 250ms ease;
  opacity: 1;
}

/* Spinner for elements */
.as-btn.is-loading {
  pointer-events: none;
  opacity: .82;
  position: relative;
  color: transparent !important;
}

.as-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--as-white);
  border-right-color: transparent;
  animation: as-spin 700ms linear infinite;
  left: calc(50% - 9px);
  top: calc(50% - 9px);
}

.as-btn-secondary.is-loading::after {
  border-color: var(--as-blue-600);
  border-right-color: transparent;
}

@keyframes as-spin {
  to { transform: rotate(360deg); }
}

/* Skeletons */
.as-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--as-gray-100);
  border-radius: var(--as-radius-sm);
}

.as-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.72),
    transparent
  );
  animation: as-shimmer 1.25s infinite;
}

@keyframes as-shimmer {
  100% { transform: translateX(100%); }
}

.as-product-card-skeleton {
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-md);
  padding: 14px;
  background: var(--as-white);
  display: flex;
  flex-direction: column;
}

.as-skeleton-img { aspect-ratio: 1 / 1; }
.as-skeleton-line { height: 12px; margin-top: 12px; }
.as-skeleton-line.short { width: 50%; }
.as-skeleton-line.medium { width: 75%; }
.as-skeleton-btn { height: 42px; margin-top: 14px; }

/* 8. PAGINATION */
.as-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-10);
  margin-bottom: var(--space-10);
}

.as-pagination a,
.as-pagination span {
  min-width: 42px;
  height: 42px;
  border-radius: var(--as-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--as-border-light);
  background: var(--as-white);
  color: var(--as-gray-700);
  font-weight: 600;
  transition: all 150ms ease;
  font-size: 14px;
  user-select: none;
}

.as-pagination a:hover {
  border-color: var(--as-blue-600);
  color: var(--as-blue-600);
}

.as-pagination .current {
  background: var(--as-blue-600);
  color: var(--as-white);
  border-color: var(--as-blue-600);
}
.as-pagination .dots {
  border-color: transparent;
  background: transparent;
}
.as-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
  margin-bottom: 34px;
}

/* 9. LIVE SEARCH */
.as-search-container {
  position: relative;
}

.as-search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 999;
  display: none;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--as-white);
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-card);
  box-shadow: 0 25px 50px -12px rgba(21, 23, 28, 0.25);
}

.as-search-results-dropdown.is-active {
  display: block;
}

.as-search-state {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  padding: var(--space-6) var(--space-3);
  color: var(--as-gray-500);
  text-align: center;
  font-size: 13px;
}

.as-search-state strong {
  color: var(--as-gray-900);
  font-size: 14px;
}

.as-search-state .as-btn {
  height: 36px;
  margin-top: var(--space-2);
  font-size: 12px;
}

.as-search-state--error {
  color: var(--as-danger);
}

.as-search-state {
  padding: 24px 16px;
}

.as-search-list {
  display: flex;
  flex-direction: column;
}

.as-search-result-link {
  color: var(--as-gray-700);
}

.as-search-result-link:hover,
.as-search-result-link.is-active {
  background: var(--as-soft);
}

/* One result row: 48px thumb | name + category | price */
.as-search-product {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  transition: background 150ms ease;
}

.as-search-product__image {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--as-soft);
  border: 1px solid var(--as-border-light);
  border-radius: var(--as-radius-control);
}

.as-search-product__image img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.as-search-product__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.as-search-product__title {
  color: var(--as-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.as-search-product__category {
  color: var(--as-gray-400);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fixed-width, never-wrapping price column — a wrapping price is what
   collapsed the title column before. */
.as-search-product__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

.as-search-product__amount {
  color: var(--as-ink);
  font-size: 14px;
  font-weight: 600;
}

.as-search-product__sale {
  color: var(--as-primary);
  font-size: 12px;
  font-weight: 500;
}

.as-search-footer {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid var(--as-border-light);
  color: var(--as-primary);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.as-search-footer:hover {
  background: var(--as-primary);
  color: var(--as-white);
}

@media (max-width: 767px) {
  .as-search-results-dropdown {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 110px);
  }

  .as-search-product {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .as-search-product__image {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   RESPONSIVE — components that were still rigid below tablet
   ========================================================================== */
@media (max-width: 1023px) {
  /* Three tiles is too tight inside a 90vw mega-menu panel */
  .as-mega-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .as-related-content__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Toasts span the viewport instead of a fixed 360px */
  .as-toast {
    width: auto;
    max-width: calc(100vw - 32px);
  }

  .home-section-header {
    align-items: flex-start;
    gap: 12px;
  }

  .as-empty-loop {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  /* Two cards per row stays readable; one is too tall to scan */
  .home-product-slider > li {
    flex-basis: 62%;
  }
}

@media (max-width: 374px) {
  .as-related-content__grid {
    grid-template-columns: 1fr;
  }

  .home-product-slider > li {
    flex-basis: 78%;
  }

  .as-product-card {
    padding: 10px;
  }

  .as-product-card__cart,
  .as-product-card__view {
    font-size: 13px;
    padding: 8px 10px;
  }

  .as-product-card__whatsapp {
    font-size: 11px;
  }

  .home-section-title {
    font-size: 18px;
  }
}
