/* Main Styles for TOMATO LAB Layout */
@import url('./variables.css');

/* Layout Helpers */
.mobile-only-br {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.container--center {
  text-align: center;
  --modal-bg: #ffffff;
  --modal-overlay: rgba(0, 0, 0, 0.5);
}

/* Custom Modal Alert Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-content {
  background: #ffffff;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  transform: scale(0.9);
  transition: all 0.2s ease-out;
}

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

.modal-icon {
  width: 60px;
  height: 60px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
}

.modal-message {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 25px;
  word-break: keep-all;
}

.modal-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.section {
  padding: var(--spacing-lg) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section__title {
  font-size: var(--font-size-xxl);
  font-weight: 800;
  margin-bottom: var(--spacing-xs);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section__description {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 80px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-secondary);
  letter-spacing: -1px;
}

.logo-red {
  color: var(--color-primary);
}

.header-nav ul {
  display: flex;
  gap: var(--spacing-md);
}

.header-nav a {
  font-weight: 600;
  color: var(--color-secondary);
}

.header-nav a:hover {
  color: var(--color-primary);
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* User Action Buttons */
.btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn--sm {
  padding: 6px 16px;
}

.btn--primary {
  background: #ff4d4d; /* Use solid color instead of gradient if preferred, but gradient was requested before, I'll stick to solid red for 'clean' feel if needed, or just remove shadow */
  color: var(--color-white);
  box-shadow: none !important;
}

.btn--primary:hover {
  transform: translateY(-1px);
  background: #e63939;
}

.btn--outline {
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
}

.btn--outline:hover {
  background: var(--color-secondary);
  color: var(--color-white);
}

.btn--text {
  color: var(--color-secondary);
}

.btn--text:hover {
  color: var(--color-primary);
}

.user-action-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credit-display {
    background-color: var(--color-bg);
    padding: 2px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
}

.credit-label {
    color: var(--color-text-muted);
}

.credit-amount {
    font-weight: 700;
    color: var(--color-primary);
}

.icon-btn {
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

.icon-btn:hover {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  background: radial-gradient(circle at top right, rgba(255, 77, 77, 0.05) 0%, transparent 60%);
}

.hero__title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

.hero__subtitle {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

.hero__cta {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.product-card {
  padding: var(--spacing-md);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.product-card__icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Or center if you prefer */
}

.product-card__img {
  height: 80px; /* Consistent height for logo/device images */
  width: auto;
  object-fit: contain;
  margin-bottom: var(--spacing-xs);
}

.product-card__title {
  font-size: 1.4rem;
  margin-bottom: var(--spacing-xs);
  font-weight: 700;
}

.product-card__desc {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.product-card__link {
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
}

/* Banner */
.banner {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
}

.banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.banner__text h3 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

/* Footer Section */
footer {
  background: #fff;
  color: var(--color-text);
  padding: 80px 0 40px;
  border-top: 1px solid #eee;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--spacing-md);
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 30px;
  color: #333;
}

.footer-info {
  width: 100%;
  padding: 0 var(--spacing-sm);
}

.footer-business-details {
  color: #777;
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-business-details p {
  margin-bottom: 2px;
}

.footer-business-details br {
  content: "";
  display: block;
  margin-bottom: 8px;
}

.footer-contact-highlight {
  margin-top: 30px;
  text-align: center;
}

.contact-label {
  color: #d63384; /* Purple/Pink color from the image */
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 15px;
}

.contact-phone {
  font-size: 2.2rem;
  font-weight: 400; /* Lighter weight for the phone number */
  color: #333;
  letter-spacing: 1px;
}

.footer-bottom {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.footer-bottom-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: #999;
}

.copyright {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.policy-links a {
  color: #777;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

/* --- Mobile Responsiveness --- */

/* Menu Toggle Button */
.menu-toggle {
  display: none;
  background: transparent;
  font-size: 1.5rem;
  color: var(--color-secondary);
}

@media (max-width: 992px) {
  .hero__title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .mobile-only-br {
    display: block;
  }
  
  /* Header & Navigation Mobile */
  .menu-toggle {
    display: block;
  }
  
  .header-nav, .header-user-actions {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: none; /* Initially hidden */
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 999;
  }
  
  .header-user-actions {
    top: 175px; /* Adjusted from 220px to sit closer after menu removal */
    padding-top: 10px;
    padding-bottom: 25px;
    box-shadow: var(--shadow-lg); /* Move shadow to the bottom-most element */
    border-top: none;
  }
  
  .header-nav {
    box-shadow: none; /* Combine with user-actions shadow */
  }

  .header-nav.active, .header-user-actions.active {
    display: flex;
  }
  
  .header-nav ul {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  /* Hero Section Mobile */
  .hero {
    padding: 140px 0 60px;
    text-align: center;
  }
  
  .hero__title {
    font-size: 2.2rem;
    line-height: 1.2;
  }
  
  .hero__subtitle {
    font-size: 1.1rem;
    line-height: 1.5;
  }
  
  .hero__cta {
    flex-direction: column;
    gap: 10px;
  }
  
  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* Section Padding */
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .section__header {
    margin-bottom: var(--spacing-md);
  }
  
  .section__title {
    font-size: 1.4rem;
    white-space: nowrap; /* Force one line */
  }

  /* Product Grid Mobile */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Banner Mobile */
  .banner__content {
    flex-direction: column;
    text-align: center;
    padding: var(--spacing-sm);
    gap: 20px;
  }
  
  .banner__text h3 {
    font-size: 1.3rem;
    word-break: keep-all;
    line-height: 1.4;
    white-space: normal;
  }

  /* Footer Mobile */
  .footer-logo {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  .contact-phone {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.8rem;
  }
  
  .section__title {
    font-size: 1.2rem;
  }

  .footer-business-details {
    font-size: 0.75rem;
  }
}
