/* Blox Fruits Delivery System - Main CSS */
:root {
  --primary: #4CAF50;
  --primary-dark: #388E3C;
  --secondary: #FF9800;
  --accent: #FF5722;
  --light: #F5F5F5;
  --dark: #333333;
  --gray: #757575;
  --light-gray: #E0E0E0;
  --white: #FFFFFF;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Poppins', 'Noto Sans Khmer', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
}

.fruit-loader {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  justify-content: center;
}

.fruit-loader i {
  font-size: 3rem;
  animation: bounce 1s infinite;
}

.fruit-loader i:nth-child(1) { color: var(--primary); }
.fruit-loader i:nth-child(2) { 
  color: var(--secondary);
  animation-delay: 0.2s;
}
.fruit-loader i:nth-child(3) { 
  color: var(--accent);
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.loading-progress {
  width: 300px;
  height: 6px;
  background: var(--light-gray);
  border-radius: 3px;
  margin: 20px auto;
  overflow: hidden;
}

.loading-progress .progress-bar {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* Header & Navigation */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.logo-icon {
  color: var(--primary);
  font-size: 2rem;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--gray);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-switcher {
  display: flex;
  background: var(--light);
  border-radius: 20px;
  padding: 4px;
}

.lang-btn {
  padding: 6px 16px;
  border: none;
  background: none;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--primary);
  color: var(--white);
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-login {
  background: var(--light);
  color: var(--dark);
}

.btn-login:hover {
  background: var(--light-gray);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* Main Content */
.main-content {
  margin-top: 80px;
}

.section {
  display: none;
  padding: 4rem 0;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

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

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.highlight {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.stat i {
  font-size: 2rem;
  color: var(--primary);
}

.stat h3 {
  font-size: 1.5rem;
  color: var(--dark);
}

.stat p {
  color: var(--gray);
  font-size: 0.9rem;
}

.hero-image {
  position: relative;
  height: 400px;
}

.fruit-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.fruit-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: var(--shadow-hover);
}

.fruit-card-large {
  top: 20%;
  left: 10%;
  width: 180px;
  z-index: 2;
}

.fruit-card-medium {
  top: 40%;
  right: 20%;
  width: 150px;
  z-index: 1;
}

.fruit-card-small {
  bottom: 10%;
  left: 30%;
  width: 120px;
}

.fruit-icon {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* Fruits Grid */
.fruits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.fruit-item {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.fruit-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.fruit-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fruit-image i {
  font-size: 4rem;
}

.fruit-info {
  padding: 1.5rem;
}

.fruit-price {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.fruit-stock {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Order Section */
.order-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.quantity-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--light-gray);
  background: var(--light);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

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

.order-summary {
  background: var(--light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 2rem 0;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-gray);
}

.summary-item.total {
  border-bottom: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-large {
  padding: 15px 30px;
  font-size: 1.1rem;
}

.order-preview {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.recent-orders {
  margin-bottom: 2rem;
}

.recent-order-item {
  padding: 1rem;
  border-bottom: 1px solid var(--light-gray);
}

.recent-order-item:last-child {
  border-bottom: none;
}

.order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.order-id {
  font-weight: 600;
  color: var(--primary);
}

.order-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.order-status.preparing {
  background: #FFF3CD;
  color: #856404;
}

.order-status.shipping {
  background: #D1ECF1;
  color: #0C5460;
}

.order-status.delivered {
  background: #D4EDDA;
  color: #155724;
}

.order-details {
  display: flex;
  justify-content: space-between;
  color: var(--gray);
}

.order-price {
  font-weight: 600;
  color: var(--dark);
}

.delivery-info {
  margin-top: 2rem;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--light-gray);
}

.info-card:last-child {
  border-bottom: none;
}

.info-card i {
  font-size: 1.5rem;
  color: var(--primary);
}

/* Tracking Section */
.tracking-container {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.tracking-input {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tracking-input input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.tracking-result {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--light);
  border-radius: var(--border-radius);
}

.tracking-details h4 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.tracking-info p {
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-description {
  color: var(--light-gray);
  margin: 1rem 0;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
  color: var(--light-gray);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-gray);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 500px;
  animation: slideUp 0.3s ease;
}

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

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
  padding: 4px;
  border-radius: 4px;
}

.modal-close:hover {
  background: var(--light-gray);
}

.modal-body {
  padding: 1.5rem;
}

.modal-text {
  text-align: center;
  margin-top: 1rem;
  color: var(--gray);
}

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

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 300px;
  z-index: 3000;
  animation: slideIn 0.3s ease;
}

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

.toast.success {
  border-left: 4px solid var(--primary);
}

.toast.error {
  border-left: 4px solid var(--accent);
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  margin-left: auto;
}

/* Cart Badge */
.cart-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 1000;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .order-container {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .btn {
    padding: 8px 16px;
  }
  
  .tracking-input {
    flex-direction: column;
  }
}
