/* ==========================================================================
   TheraMen Nutrition - Main Stylesheet
   Modern, Clean, German E-Commerce Aesthetic
   ========================================================================== */

:root {
  /* Brand Palette */
  --primary-color: #0d5c46;
  --primary-hover: #0a4635;
  --primary-light: #e8f5e9;
  --secondary-color: #1e293b;
  --accent-color: #d97706;
  --accent-light: #fef3c7;
  --success-color: #10b981;
  --danger-color: #ef4444;
  
  /* Neutral Colors */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Shadows & Layout */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Announcement Bar */
.announcement-bar {
  background-color: var(--secondary-color);
  color: #ffffff;
  font-size: 0.85rem;
  padding: 8px 0;
  text-align: center;
  font-weight: 500;
}

.announcement-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement-items {
  display: flex;
  gap: 25px;
  margin: 0 auto;
}

.announcement-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.lang-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.lang-btn.active, .lang-btn:hover {
  background: #ffffff;
  color: var(--secondary-color);
}

/* Header & Nav */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}

.main-nav a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--primary-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-btn {
  background: var(--primary-light);
  color: var(--primary-color);
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  position: relative;
}

.cart-btn:hover {
  background: var(--primary-color);
  color: white;
}

.cart-badge {
  background: var(--accent-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0d5c46 0%, #06372a 100%);
  color: white;
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 30px;
  max-width: 520px;
}

.hero-cta-group {
  display: flex;
  gap: 15px;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background-color: #b45309;
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.hero-image-wrapper {
  position: relative;
  text-align: center;
}

.hero-img-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  margin: 0 auto;
}

.hero-img-card svg, .hero-img-card img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* Trust Badges Bar */
.trust-bar {
  background: var(--bg-card);
  padding: 30px 0;
  border-bottom: 1px solid var(--border-color);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.trust-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.trust-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.trust-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Section Common */
.section {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px;
}

.section-tag {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 30px;
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 92, 70, 0.3);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
}

.product-img-wrapper {
  aspect-ratio: 1/1;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.product-img-wrapper img, .product-img-wrapper svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-img-wrapper img,
.product-card:hover .product-img-wrapper svg {
  transform: scale(1.04);
}

.product-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 5px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.product-stars {
  letter-spacing: 2px;
}

.product-reviews-cnt {
  color: var(--text-light);
  font-size: 0.8rem;
}

.product-short-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.price-vat {
  font-size: 0.7rem;
  color: var(--text-light);
}

.add-cart-btn {
  background: var(--primary-color);
  color: white;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast);
}

.add-cart-btn:hover {
  background: var(--primary-hover);
}

/* Product Detail Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-container {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  padding: 30px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-main);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  background: #cbd5e1;
  color: var(--text-main);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.modal-img-box {
  background: #f8fafc;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1/1;
}

.modal-info h2 {
  font-size: 1.7rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.modal-highlights {
  background: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 15px 0;
  font-size: 0.9rem;
}

.modal-highlights ul {
  list-style-type: none;
  margin-top: 6px;
}

.modal-highlights li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.modal-highlights li::before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 15px;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-price-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 25px 0;
}

.modal-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  font-size: 1.1rem;
  font-weight: bold;
}

.qty-input {
  width: 45px;
  text-align: center;
  border: none;
  font-weight: 700;
  font-size: 1rem;
}

/* Cash on Delivery Badge */
.cod-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* Slide Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  z-index: 1001;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  right: 0;
}

.cart-drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-main);
}

.cart-drawer-title {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: #f1f5f9;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-color);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.remove-item-btn {
  background: transparent;
  color: var(--danger-color);
  font-size: 0.8rem;
  font-weight: 600;
}

.cart-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  display: block;
}

.checkout-btn:hover {
  background: var(--primary-hover);
  color: white;
}

/* Forms & Checkout */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
}

.form-card {
  background: white;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--secondary-color);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 92, 70, 0.15);
}

.payment-box {
  background: #f8fafc;
  border: 2px solid var(--primary-color);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.payment-box input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--primary-color);
}

.payment-box-text h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.payment-box-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Thank You Page (THX) */
.thx-container {
  max-width: 700px;
  margin: 60px auto;
  text-align: center;
  background: white;
  padding: 50px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.thx-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.thx-order-number {
  display: inline-block;
  background: #f1f5f9;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin: 15px 0 25px;
}

.manager-notice-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: left;
  margin: 25px 0;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.manager-notice-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.manager-notice-text h4 {
  font-size: 1rem;
  color: #166534;
  margin-bottom: 4px;
}

.manager-notice-text p {
  font-size: 0.9rem;
  color: #15803d;
}

/* Legal & Text Pages */
.page-content {
  background: white;
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-top: 30px;
  margin-bottom: 50px;
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-content h2 {
  font-size: 1.3rem;
  margin: 25px 0 10px;
  color: var(--secondary-color);
}

.page-content p, .page-content ul {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Footer */
.site-footer {
  background: var(--secondary-color);
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 2000;
}

.toast {
  background: var(--secondary-color);
  color: white;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  animation: slideUp 0.3s ease;
}

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

/* Responsive */
@media (max-width: 992px) {
  .hero-grid, .checkout-grid, .modal-grid {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .announcement-items {
    display: none;
  }
  .main-nav {
    display: none; /* Can add hamburger menu if needed */
  }
  .hero-title {
    font-size: 2rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
