/* TIN MA WHOLESALE - Custom Styles */

/* ========================================
   CSS Variables
======================================== */
:root {
  --primary: #8B7355;
  --primary-dark: #6D5A43;
  --primary-light: #A68B6C;
  --secondary: #D4C4B5;
  --secondary-light: #E8DDD4;
  --text: #2D2D2D;
  --text-light: #6B6B6B;
  --background: #F9F7F5;
  --white: #FFFFFF;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

/* ========================================
   Base Styles
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ========================================
   Header
======================================== */
.header {
  background: var(--white);
  box-shadow: 0 1px 3px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo img {
  height: 48px;
  width: auto;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
}

.header-logo-text .company-name-zh {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.header-logo-text .company-name-en {
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.header-logo-text .company-tagline {
  font-size: 0.6875rem;
  color: var(--primary);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.header-logo-text .company-tagline .tagline-zh::after {
  content: " · ";
}

/* Mobile optimization for tagline */
@media (max-width: 640px) {
  .header-logo-text .company-tagline {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
    font-size: 0.625rem;
  }
  
  .header-logo-text .company-tagline .tagline-zh::after {
    content: none;
  }
}

  color: var(--text-light);

  letter-spacing: 0.5px;

}

.header-contact-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-block;
}

.header-contact-btn:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* ========================================
   Hero Section
======================================== */
.hero {
  background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero-title-zh {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hero-title-en {
  font-size: 1.25rem;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}
.hero-tagline {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.875rem 2rem;
  border-radius: 2.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.hero-cta:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

/* ========================================
   Category Section
======================================== */
.category-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  cursor: default;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-count {
  background: var(--secondary);
  color: var(--text);
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
}

.category-content {
  overflow: visible;
  max-height: none;
  opacity: 1;
  display: block;
}

/* ========================================
   Product Grid
======================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   Product Card
======================================== */
.product-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-card * {
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-hover);
}

.product-card-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: transparent;
}

.product-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-card-info {
  padding: 1rem;
}

.product-card-model {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.product-card-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 2.625rem;
}

.product-card-price {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

/* ========================================
   Product Detail Page
======================================== */
.product-detail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.product-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

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

.product-detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .product-detail-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Product Images */
.product-images-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Static Image */
.product-images.static {
  width: 100%;
}

.product-images.static img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

/* Swiper Slider */
.swiper {
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  border-radius: 1rem;
  overflow: hidden;
}

.swiper-wrapper {
  align-items: center;
}

.swiper-slide {
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.swiper-slide img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  display: block;
}

/* Swiper Pagination */
.swiper-pagination-bullet {
  background: #2D2D2D;
  opacity: 0.4;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.swiper-pagination-bullet:hover {
  opacity: 0.7;
}

.swiper-pagination-bullet-active {
  background: var(--primary);
  opacity: 1;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 1);
}

.swiper-pagination {
  bottom: 10px;
}

.swiper-pagination-bullets {
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* Mobile Optimization */
@media (max-width: 640px) {
  .swiper-slide img {
    max-height: 400px;
  }
  
  .product-detail {
    padding: 1.5rem 1rem;
  }
  
  .product-detail-content {
    gap: 1.5rem;
  }
}

/* Product Info */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-header {
  border-bottom: 1px solid var(--secondary-light);
  padding-bottom: 1.5rem;
}

.product-model {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.product-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.product-contact-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  text-decoration: none;
}

@media (min-width: 768px) {
  .product-contact-btn {
    width: auto;
  }
}

.product-contact-btn:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

/* Product Sections */
.product-section {
  border-top: 1px solid var(--secondary-light);
  padding-top: 1.5rem;
}

.product-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-section-content {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-line;
}

.product-section-content p {
  margin-bottom: 1rem;
}

/* ========================================
   Contact Page
======================================== */
.contact-page {
  min-height: calc(100vh - 200px);
  padding: 3rem 1.5rem;
  background: var(--background);
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-title-zh {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-title-en {
  font-size: 1.25rem;
  color: var(--text-light);
  font-weight: 400;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.contact-card {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 4px 16px var(--shadow);
}

.contact-company {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--secondary-light);
}

.contact-company-zh {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-company-en {
  font-size: 1rem;
  color: var(--text-light);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.contact-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
}

.contact-details {
  flex: 1;
}

.contact-label-zh {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.contact-label-en {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.contact-text-zh {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

.contact-text-en {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 0.5rem;
}

.contact-text {
  font-size: 1rem;
  color: var(--text);
}

.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border-radius: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
}

.contact-btn.call {
  background: var(--primary);
  color: var(--white);
  width: 100%;
}

.contact-btn.call:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.contact-map {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 16px var(--shadow);
  align-self: start;
}

@media (max-width: 767px) {
  .contact-title-zh {
    font-size: 2rem;
  }
  
  .contact-card {
    padding: 2rem;
  }
  
  .contact-page {
    padding: 2rem 1rem;
  }
}

/* ========================================
   Footer
======================================== */
.footer {
  background: #2D2D2D;
  color: var(--white);
  padding: 1.5rem;
  margin-top: 2rem;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-content {
  display: block;
  
}

.footer-bottom {
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ========================================
/* ========================================
   Contact Modal
======================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

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

.modal {
  background: var(--white);
  border-radius: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--secondary-light);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--secondary-light);
  color: var(--text);
}

.modal-content {
  padding: 1.5rem;
}

.modal-company {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-company-zh {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.modal-company-en {
  font-size: 0.875rem;
  color: var(--text-light);
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.modal-info-icon {
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
  width: 1.5rem;
}

.modal-info-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.modal-info-text {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
}

.modal-info-text-en {
  font-size: 0.8125rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 0.25rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.modal-action-btn.call {
  background: var(--primary);
  color: var(--white);
  width: 100%;
}

.modal-action-btn.call:hover {
  background: var(--primary-dark);
  color: var(--white);
}

   Utilities
======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Animations
======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* ========================================
   Loading State
======================================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--secondary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Force Swiper Constraints
======================================== */
.product-images-container .swiper {
  max-width: 100% !important;
  width: 100% !important;
}

.product-images-container .swiper-slide {
  max-width: 100% !important;
}

.product-detail-content .swiper {
  max-width: 100%;
}

@media (max-width: 768px) {
  .product-detail-content .swiper {
    max-width: 100%;
  }
}
