/**
 * Global styles
 */

html {
  background-color: #f5f5f5;
}

body {
  font-family: var(--font-primary);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-4xl);
}
h2 {
  font-size: var(--font-size-3xl);
}
h3 {
  font-size: var(--font-size-2xl);
}
h4 {
  font-size: var(--font-size-xl);
}
h5 {
  font-size: var(--font-size-lg);
}
h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Typography utility classes */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

/* Font size utilities */
.text-xs {
  font-size: var(--font-size-xs);
}
.text-sm {
  font-size: var(--font-size-sm);
}
.text-base {
  font-size: var(--font-size-base);
}
.text-lg {
  font-size: var(--font-size-lg);
}
.text-xl {
  font-size: var(--font-size-xl);
}
.text-2xl {
  font-size: var(--font-size-2xl);
}
.text-3xl {
  font-size: var(--font-size-3xl);
}
.text-4xl {
  font-size: var(--font-size-4xl);
}

/* Font weight utilities */
.font-light {
  font-weight: var(--font-weight-light);
}
.font-normal {
  font-weight: var(--font-weight-normal);
}
.font-medium {
  font-weight: var(--font-weight-medium);
}
.font-semibold {
  font-weight: var(--font-weight-semibold);
}
.font-bold {
  font-weight: var(--font-weight-bold);
}

/* Color utilities */
.text-primary {
  color: var(--primary-color);
}
.text-secondary {
  color: var(--secondary-color);
}
.text-gray {
  color: var(--text-secondary);
}
.text-muted {
  color: var(--text-muted);
}

.bg-primary {
  background-color: var(--primary-color);
  color: var(--white);
}
.bg-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}
.bg-light {
  background-color: var(--gray-100);
}
.bg-dark {
  background-color: var(--gray-900);
  color: var(--white);
}

.mb-0 {
  margin-bottom: 0;
}
.mb-sm {
  margin-bottom: var(--spacing-sm);
}
.mb-md {
  margin-bottom: var(--spacing-md);
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}
.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.no-padding-button {
  padding-bottom: 0px !important;
}

.checkout-page-title {
  display: none;
}

/* =================================
   PROGRESS STEPS
   ================================= */
.tp-checkout-progress {
  background: white;
  padding: 2rem 0;
  margin-bottom: 1rem;
  box-shadow: var(--tp-shadow-md);
  border-radius: 5px;
}

.tp-progress-container {
  max-width: 600px;
  margin: 0 auto;
}

.tp-progress-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.tp-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 2;
}

.tp-step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

@media (max-width: 468px) {
  .tp-checkout-progress {
    padding: 1.25rem 0;
  }
  .tp-step-circle {
    width: 40px;
    height: 40px;
  }
}

.tp-progress-step.active .tp-step-circle {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.tp-progress-step.current .tp-step-circle {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.tp-step-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-align: center;
}

.tp-progress-step.active .tp-step-label {
  color: #374151;
  font-weight: 600;
}

.tp-progress-line {
  position: absolute;
  top: 25px;
  height: 2px;
  background: #e5e7eb;
  z-index: 1;
  transition: background-color 0.3s ease;
}

.tp-progress-line.active {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.tp-progress-steps .tp-progress-line:first-of-type {
  left: 16.666%;
  width: 33.333%;
}

.tp-progress-steps .tp-progress-line:last-of-type {
  right: 16.666%;
  width: 33.333%;
}

/* ================================================
   TANPHAT BUTTON SYSTEM
   ================================================ */

/* Base Button Class */
.tp-button {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: normal;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 44px;
  box-sizing: border-box;
}

/* Button Variants */
.tp-button--primary {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.tp-button--primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 64, 42, 0.3);
  color: white;
}

.tp-button--secondary {
  background-color: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}

.tp-button--secondary:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tp-button--outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--gray-300);
}

.tp-button--outline:hover {
  background-color: var(--gray-100);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tp-button--outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.tp-button--outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 64, 42, 0.2);
}

.tp-button--success {
  background-color: var(--success-color);
  color: var(--white);
  border-color: var(--success-color);
}

.tp-button--success:hover {
  background-color: var(--success-dark);
  border-color: var(--success-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tp-button--danger {
  background-color: var(--danger-color);
  color: var(--white);
  border-color: var(--danger-color);
}

.tp-button--danger:hover {
  background-color: var(--danger-dark);
  border-color: var(--danger-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.tp-button--warning {
  background-color: var(--warning-color);
  color: var(--white);
  border-color: var(--warning-color);
}

.tp-button--warning:hover {
  background-color: var(--warning-dark);
  border-color: var(--warning-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Button Sizes */
.tp-button--small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.tp-button--medium {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  min-height: 44px;
}

.tp-button--large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  min-height: 52px;
}

.tp-button--full {
  width: 100%;
}

/* Button States */
.tp-button:disabled,
.tp-button--disabled {
  background-color: var(--gray-300) !important;
  color: var(--gray-500) !important;
  border-color: var(--gray-300) !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.tp-button--loading {
  pointer-events: none;
  position: relative;
}

.tp-button--loading:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: tp-button-spin 1s linear infinite;
}

@keyframes tp-button-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Button Groups */
.tp-button-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tp-button-group--centered {
  justify-content: center;
}

.tp-button-group--right {
  justify-content: flex-end;
}

.tp-button-group--space-between {
  justify-content: space-between;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .tp-button-group {
    flex-direction: column;
  }

  .tp-button {
    width: 100%;
  }

  .tp-button-group--mobile-stack .tp-button {
    width: 100%;
  }
}

/* Dark Mode Support */
.dark .tp-button--outline {
  color: var(--gray-300);
  border-color: var(--gray-600);
}

.dark .tp-button--outline:hover {
  background-color: var(--gray-800);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ================================================
   PAGINATION - TAILWIND STYLE
   ================================================ */

/* WooCommerce Pagination Override */
.woocommerce-pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0 0 0;
  padding: 0;
}

.woocommerce-pagination .page-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-pagination .page-numbers li {
  margin: 0;
  padding: 0;
}

/* Page Number Links & Current Page */
.woocommerce-pagination .page-number,
.woocommerce-pagination .page-numbers .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  background: white;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

/* Hover State */
.woocommerce-pagination .page-number:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
  transform: translateY(-1px);
}

/* Current/Active Page */
.woocommerce-pagination .page-numbers .current,
.woocommerce-pagination .page-number.current {
  background: var(--tp-primary);
  border-color: var(--tp-primary);
  color: white;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Previous/Next Arrows */
.woocommerce-pagination .prev,
.woocommerce-pagination .next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  background: white;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.woocommerce-pagination .prev:hover,
.woocommerce-pagination .next:hover {
  background-color: var(--tp-primary);
  border-color: var(--tp-primary);
  color: white;
  transform: translateY(-1px);
}

/* Icon styling */
.woocommerce-pagination .prev i,
.woocommerce-pagination .next i {
  font-size: 14px;
  top: 0px;
  line-height: normal;
}

/* Dots/Ellipsis */
.woocommerce-pagination .dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #9ca3af;
  font-weight: 600;
  cursor: default;
}

/* Responsive Design */
@media (max-width: 480px) {
  .woocommerce-pagination .page-number,
  .woocommerce-pagination .page-numbers .current,
  .woocommerce-pagination .prev,
  .woocommerce-pagination .next {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .woocommerce-pagination .page-numbers {
    gap: 0.125rem;
  }
}

/* ================================================
   BREADCRUMB SECTION
   ================================================ */
.product-breadcrumb-section {
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  background-color: var(--tp-gray-100);
}

.breadcrumb-tanphat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--tp-gray-600);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.breadcrumb-tanphat .breadcrumb-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.breadcrumb-tanphat .breadcrumb-item a {
  color: var(--tp-gray-600);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.breadcrumb-tanphat .breadcrumb-item a:hover {
  color: var(--tp-primary);
  background: var(--tp-gray-200);
}

.breadcrumb-tanphat .breadcrumb-item:last-child {
  color: var(--tp-gray-900);
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}
/* ================================================
   PRODUCT CARD
   ================================================ */

/* Custom Product Card - Tailwind Style */
.product-actions .tp-button {
  width: 100%;
}

.product-card {
  position: relative;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.product-card:hover {
  border-color: var(--tp-primary);
}

.product-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-image {
  padding-top: 95%;
  position: relative;
  overflow: hidden;
  height: 0;
}

.product-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.product-img {
  position: absolute;
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

/* Product Badges */
.product-discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  gap: 2px;
}

.product-discount-badge::before {
  content: "-";
  font-size: 10px;
  font-weight: 900;
}

.product-stock-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.product-stock-badge.out-of-stock {
  background: rgba(17, 24, 39, 0.9);
  color: white;
  border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Product Content */
.product-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 40px;
}

.product-title-link {
  color: var(--tp-gray-700);
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title-link:hover {
  color: var(--tp-primary);
}

.product-card .product-price-wrapper {
  display: flex;
  gap: 4px;
  align-items: center;
}

.product-card .product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--tp-primary);
  line-height: 1.2;
}

.product-card .product-price .woocommerce-Price-amount {
  color: var(--tp-primary);
}

.product-card .price-note {
  font-size: 14px;
  color: var(--tp-primary);
  font-weight: 500;
  line-height: 1.2;
}

/* Contact Price Button - Archive */
.contact-price-btn {
  font-size: 14px;
  font-weight: 600;
}

.product-contact-wrapper {
  line-height: 1.2;
  display: flex;
}

/* ================================================
   INPUT
   ================================================ */
input[type="email"]::placeholder,
input[type="number"]::placeholder,
input[type="search"]::placeholder,
input[type="tel"]::placeholder,
input[type="text"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
  font-size: 16px;
}
input[type="email"]::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  font-size: 16px;
}

input[type="email"]:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  font-size: 16px;
}
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
select,
textarea {
  box-shadow: none;
  margin-bottom: 0px;
  border-radius: 5px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  font-size: 16px !important;
  background-color: white;
  height: auto;
}
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
/* ================================================
   FORMIDABLE FORM
   ================================================ */
.with_frm_style .frm-show-form {
  margin-bottom: 0px;
}
.with_frm_style fieldset {
  padding-bottom: 0px !important;
}
.with_frm_style input[type="text"],
.with_frm_style input[type="password"],
.with_frm_style input[type="email"],
.with_frm_style input[type="number"],
.with_frm_style input[type="url"],
.with_frm_style input[type="tel"],
.with_frm_style input[type="file"],
.with_frm_style input[type="search"],
.with_frm_style select,
.with_frm_style .frm-card-element.StripeElement {
  box-shadow: none;
  border-radius: 5px;
  border-color: rgb(209, 213, 219);
  padding: 8px 16px;
  height: auto;
}
.frm_style_formidable-style.with_frm_style
  .frm_compact
  .frm_dropzone.dz-clickable
  .dz-message,
.frm_style_formidable-style.with_frm_style input[type="submit"],
.frm_style_formidable-style.with_frm_style .frm_submit input[type="button"],
.frm_style_formidable-style.with_frm_style .frm_submit button,
.frm_form_submit_style,
.frm_style_formidable-style.with_frm_style .frm-edit-page-btn {
  all: unset;
  background: var(--primary-color);
  color: #fff;
  padding: 8px 16px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
}
.frm_style_formidable-style.with_frm_style
  .form-field
  input:not([type="file"]):not([type="range"]):not([readonly]):focus,
.frm_style_formidable-style.with_frm_style select:focus,
.frm_style_formidable-style.with_frm_style .form-field textarea:focus,
.frm_style_formidable-style.with_frm_style .frm_focus_field input[type="text"],
.frm_style_formidable-style.with_frm_style
  .frm_focus_field
  input[type="password"],
.frm_style_formidable-style.with_frm_style .frm_focus_field input[type="email"],
.frm_style_formidable-style.with_frm_style
  .frm_focus_field
  input[type="number"],
.frm_style_formidable-style.with_frm_style .frm_focus_field input[type="url"],
.frm_style_formidable-style.with_frm_style .frm_focus_field input[type="tel"],
.frm_style_formidable-style.with_frm_style
  .frm_focus_field
  input[type="search"],
.frm_form_fields_active_style,
.frm_style_formidable-style.with_frm_style
  .frm_focus_field
  .frm-card-element.StripeElement {
  box-shadow: none;
}
.frm_style_formidable-style.with_frm_style
  .frm_submit
  .frm_button_submit::after {
  content: "";
  font-family: "Font Awesome 5 Pro";
  font-weight: 900;
  margin-left: 8px;
  font-size: 0.9em;
}
/* ================================================
   FOOTER STYLE
   ================================================ */
.absolute-footer {
  border-top: 1px solid #e5e7eb;
}
.footer-section {
  padding-bottom: 0px !important;
}
#footer p {
  font-size: 0.8rem;
}
#footer ul li {
  margin-left: 0px;
  list-style: none;
  font-size: 0.8rem;
}
#footer ul li a {
  color: var(--text-primary);
}
#footer .section-title-container {
  margin-bottom: 0px;
}
#footer .section-title-normal {
  border-bottom: none;
}
#footer .section-title-main {
  font-size: 1rem;
  border-bottom: none;
}