/* ──────────────────────────────────────────────
   vanphucmusic - Main Stylesheet
   ────────────────────────────────────────────── */

/* ── Variables ────────────────────────────────── */
:root {
  /* Colors */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-secondary: #64748b;
  --color-accent: #f59e0b;
  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-danger: #ef4444;

  /* Neutrals */
  --color-white: #ffffff;
  --color-black: #0f172a;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;

  /* Typography */
  --font-primary: "Inter", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Layout */
  --container-max: 1200px;
  --container-padding: 1rem;

  /* Border */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Transition */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

table.variations,
.woocommerce-variation.single_variation {
  display: none !important;
}
body.admin-bar header {
  top: 32px !important;
}

.woocommerce p.stars-raiting a {
  position: relative;
  height: 1em;
  width: 1em;
  text-indent: -999em;
  display: inline-block;
  text-decoration: none;
}

.woocommerce p.stars-raiting a::before {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 1em;
  height: 1em;
  line-height: 1;
  font-family: WooCommerce;
  text-indent: 0;
}

.woocommerce p.stars-raiting.selected a.active ~ a::before,
.woocommerce p.stars-raiting a::before {
  content: "\e020";
  font-size: 30px;
  color: #cfcfcf;
}

div#reviews.woocommerce-Reviews {
  max-width: 100%;
}

.woocommerce p.stars-raiting:hover a::before {
  color: #db0002;
}

.open-raiting {
  min-height: 30px;
}

.woocommerce p.stars-raiting a:hover ~ a::before {
  content: "\e020";
  color: #cfcfcf;
}

.woocommerce p.stars-raiting a {
  width: 30px;
}

.woocommerce p.stars-raiting.selected a:not(.active)::before,
.woocommerce p.stars-raiting.selected a.active::before {
  color: #db0002;
}

/* ── Product Filter Tags ─────────────────────── */
.product-filter__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.product-filter__tags:empty {
  display: none;
}

.product-filter__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-gray-100, #f1f5f9);
  border: 1px solid var(--color-gray-200, #e2e8f0);
  border-radius: var(--radius-full, 9999px);
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--color-gray-700, #334155);
  transition: all var(--transition-fast, 150ms ease);
}

.product-filter__tag:hover {
  background: var(--color-gray-200, #e2e8f0);
}

.product-filter__tag-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-gray-400, #94a3b8);
  font-size: 10px;
  transition: color var(--transition-fast, 150ms ease);
}

.product-filter__tag-close:hover {
  color: var(--color-danger, #ef4444);
}

.product-filter__clear {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--color-danger, #ef4444);
  font-weight: 500;
  transition: opacity var(--transition-fast, 150ms ease);
}

.product-filter__clear:hover {
  opacity: 0.7;
}

/* ── Filter Panel Active State ───────────────── */
.product-filter__panel li.is-active a {
  font-weight: 600;
  color: var(--color-primary, #2563eb);
}

/* ── Product Grid Loading State ──────────────── */
.js-products-wrapper {
  position: relative;
  transition: opacity var(--transition-base, 300ms ease);
}

.js-products-wrapper.is-loading {
  opacity: 0.4;
  pointer-events: none;
}

.js-products-wrapper.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-gray-200, #e2e8f0);
  border-top-color: var(--color-primary, #2563eb);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* NOTIFICATION */

/* CSS cho thông báo - Giữ nguyên như phiên bản JS thuần */

#status-notifications-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
  /* Adjust as needed */
}

.status-notification {
  background-color: #fff;
  border-left: 5px solid;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  position: relative;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInSlideIn 0.3s forwards;
}

.status-notification.hiding {
  animation: fadeOutSlideOut 0.3s forwards;
}

/* Loại thông báo */

.status-notification.success {
  border-color: #28a745;
  /* Green */
}

.status-notification.error {
  border-color: #dc3545;
  /* Red */
}

.status-notification.warning {
  border-color: #ffc107;
  /* Yellow */
}

.status-notification.info {
  border-color: #17a2b8;
  /* Blue */
}

.status-notification .icon {
  margin-right: 15px;
  font-size: 24px;
  line-height: 1;
  /* Aligns icon vertically */
}

.status-notification.success .icon {
  color: #28a745;
}

.status-notification.error .icon {
  color: #dc3545;
}

.status-notification.warning .icon {
  color: #ffc107;
}

.status-notification.info .icon {
  color: #17a2b8;
}

.status-notification .content {
  flex-grow: 1;
}

.status-notification .title {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
}
.product-item .added_to_cart {
  display: none;
}
.status-notification .description {
  font-size: 0.9em;
  color: #666;
}

.status-notification .close-btn {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #aaa;
  margin-left: 15px;
  padding: 0;
  line-height: 1;
}

.status-notification .close-btn:hover {
  color: #666;
}

.woocommerce-variation-price .price {
  display: none;
}

/* Animations */

@keyframes fadeInSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ========== CTA Floating Button ========== */
.cms-cta-wrapper {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cms-cta-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6cb917 0%, #4a9e0a 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(108, 185, 23, 0.45);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  z-index: 9999;
  animation: cms-cta-pulse 2s infinite;
}

.cms-cta-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(108, 185, 23, 0.6);
}

.cms-cta-button svg {
  width: 26px;
  height: 26px;
  color: #fff;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.cms-cta-icon-close {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg);
}

.cms-cta-wrapper.active .cms-cta-icon-open {
  opacity: 0;
  transform: rotate(90deg);
}

.cms-cta-wrapper.active .cms-cta-icon-close {
  opacity: 1;
  transform: rotate(0deg);
}

.cms-cta-wrapper.active .cms-cta-button {
  animation: none;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.45);
}

@keyframes cms-cta-pulse {
  0% {
    box-shadow: 0 4px 16px rgba(108, 185, 23, 0.45);
  }
  50% {
    box-shadow:
      0 4px 24px rgba(108, 185, 23, 0.7),
      0 0 0 10px rgba(108, 185, 23, 0.1);
  }
  100% {
    box-shadow: 0 4px 16px rgba(108, 185, 23, 0.45);
  }
}

/* Popup */
.cms-cta-popup {
  position: absolute;
  bottom: 70px;
  left: 0;
  min-width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  overflow: hidden;
}

.cms-cta-wrapper.active .cms-cta-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.cms-cta-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #6cb917 0%, #4a9e0a 100%);
  color: #fff;
}

.cms-cta-popup-header span {
  font-weight: 600;
  font-size: 15px;
}

.cms-cta-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.cms-cta-close:hover {
  opacity: 1;
}

.cms-cta-popup-list {
  padding: 8px 0;
  max-height: 320px;
  overflow-y: auto;
}

.cms-cta-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease;
  opacity: 0;
  transform: translateX(20px);
}

.cms-cta-wrapper.active .cms-cta-option {
  opacity: 1;
  transform: translateX(0);
  transition:
    background 0.2s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.cms-cta-wrapper.active .cms-cta-option:nth-child(1) {
  transition-delay: 0.05s;
}
.cms-cta-wrapper.active .cms-cta-option:nth-child(2) {
  transition-delay: 0.1s;
}
.cms-cta-wrapper.active .cms-cta-option:nth-child(3) {
  transition-delay: 0.15s;
}
.cms-cta-wrapper.active .cms-cta-option:nth-child(4) {
  transition-delay: 0.2s;
}
.cms-cta-wrapper.active .cms-cta-option:nth-child(5) {
  transition-delay: 0.25s;
}
.cms-cta-wrapper.active .cms-cta-option:nth-child(6) {
  transition-delay: 0.3s;
}

.cms-cta-option:hover {
  background: #f0f9e8;
}

.cms-cta-option-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f5f5f5;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.cms-cta-option:hover .cms-cta-option-icon {
  background: #e4f5d4;
}

.cms-cta-option-icon img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
}

.cms-cta-option-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

/* Overlay */
.cms-cta-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.cms-cta-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Brand */
.section-brand {
  padding: 40px 0;
}
.section-brand .brand-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 20px;
  margin: 0 -10px;
}
.section-brand .brand-item {
  flex: 0 0 25%;
  max-width: 25%;
  padding: 0 10px;
}
.section-brand .brand-item-inner {
  width: 100%;
  max-width: 100%;
  text-align: center;
}
.section-brand .brand-item-image {
  width: 100%;
  max-width: 100%;
  text-align: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px 0;
}
.section-brand .brand-item-image img {
  max-width: 160px;
  height: 60px;
  object-fit: contain;
}
.section-brand .brand-item-name {
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
/* ========== Mobile Adjustments ========== */
@media (max-width: 480px) {
  .cms-cta-wrapper {
    bottom: 16px;
    left: 16px;
  }
  .cms-cta-button {
    width: 50px;
    height: 50px;
  }
  .cms-cta-button svg {
    width: 22px;
    height: 22px;
  }
  .cms-cta-popup {
    min-width: 260px;
    left: -8px;
  }
  .section-brand .brand-list {
    margin: 0 -5px;
    row-gap: 10px;
  }
  .section-brand .brand-list .brand-item {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 5px;
  }
}
