/* ===========================================
   WEBSHOP STYLES - Modern & Professional
   =========================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #198754;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
}

/* ===========================================
   HERO SECTION
   =========================================== */

.hero-section {
  min-height: 400px;
  display: flex;
  align-items: center;
  padding: 40px 0;
  position: relative;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-features {
  color: rgba(255, 255, 255, 0.8);
}

.hero-features small {
  display: flex;
  align-items: center;
}

.hero-image {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
}

#heroImageContainer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-image {
    max-height: 200px;
    margin-top: 20px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    min-height: 300px;
    padding: 30px 0;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-image {
    max-height: 150px;
  }
}

.hero-btn-primary {
  font-weight: 600;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-btn-secondary {
  font-weight: 600;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 40px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-features {
    flex-wrap: wrap;
    gap: 0.75rem !important;
  }
}

/* ===========================================
   USP BAR
   =========================================== */

.usp-bar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.usp-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.usp-icon {
  font-size: 1.75rem;
  color: var(--primary-color);
}

/* ===========================================
   SECTION STYLES
   =========================================== */

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

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===========================================
   PRODUCT CARDS
   =========================================== */

.products-section {
  background-color: white;
}

.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-img-top {
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.card-img-top.loaded {
  opacity: 1;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

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

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

/* ===========================================
   FEATURE CARDS
   =========================================== */

.features-section {
  background-color: var(--bg-light);
}

.feature-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 1rem;
}

.feature-icon-wrapper.text-success {
  background: rgba(25, 135, 84, 0.1);
}

.feature-icon-wrapper.text-info {
  background: rgba(13, 202, 240, 0.1);
}

/* ===========================================
   NEWSLETTER SECTION
   =========================================== */

.newsletter-section {
  background: var(--primary-gradient);
}

.newsletter-form .form-control {
  border-radius: 8px 0 0 8px;
  border: none;
  padding: 0.75rem 1rem;
}

.newsletter-form .btn {
  border-radius: 0 8px 8px 0;
  font-weight: 600;
}

/* ===========================================
   TESTIMONIALS
   =========================================== */

.testimonials-section {
  background-color: var(--bg-light);
}

.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  margin-right: 1rem;
}

/* ===========================================
   CART OFFCANVAS
   =========================================== */

.offcanvas {
  width: 400px !important;
}

@media (max-width: 576px) {
  .offcanvas {
    width: 100% !important;
  }
}

.offcanvas-body {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

/* ===========================================
   BUTTONS
   =========================================== */

.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 8px;
  font-weight: 500;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* ===========================================
   MISC
   =========================================== */

.badge.bg-danger {
  min-width: 1.6rem;
}

.text-primary {
  color: var(--primary-color) !important;
}

/* Smooth scroll offset for fixed navbar */
[id] {
  scroll-margin-top: 80px;
}

/* Welcome section */
.welcome-section {
  background-color: white;
}

/* Promo section */
.promo-section {
  background-color: var(--bg-light);
}

/* ===========================================
   INLINE EDITING (ADMIN)
   =========================================== */

.inline-edit-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  border-radius: 999px;
  padding: 0.6rem 1rem;
}

.inline-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  gap: 4px;
  align-items: center;
  z-index: 1000;
}

/* ===========================================
   MODERN MODAL STYLING
   =========================================== */
#inlineEditModal .modal-dialog {
  max-width: 520px;
}

#inlineEditModal .modal-content {
  background: #ffffff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

#inlineEditModal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: none;
  padding: 1.25rem 1.5rem;
}

#inlineEditModal .modal-title {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

#inlineEditModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

#inlineEditModal .modal-header .btn-close:hover {
  opacity: 1;
}

#inlineEditModal .modal-body {
  padding: 1.5rem;
}

#inlineEditModal .modal-body .form-label {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}

#inlineEditModal .modal-body .form-control,
#inlineEditModal .modal-body .form-select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#inlineEditModal .modal-body .form-control:focus,
#inlineEditModal .modal-body .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

#inlineEditModal .modal-body .form-control::placeholder {
  color: #9ca3af;
}

#inlineEditModal .modal-body .form-text,
#inlineEditModal .modal-body .text-muted {
  font-size: 0.8rem;
  color: #6b7280 !important;
}

#inlineEditModal .modal-body .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  border-radius: 1rem;
}

#inlineEditModal .modal-body .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

#inlineEditModal .modal-body .input-group .btn {
  border-radius: 0 8px 8px 0;
}

#inlineEditModal .modal-body .mb-3 {
  margin-bottom: 1.25rem !important;
}

#inlineEditModal .modal-footer {
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
  padding: 1rem 1.5rem;
  gap: 0.5rem;
}

#inlineEditModal .modal-footer .btn {
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  font-size: 0.9rem;
}

#inlineEditModal .modal-footer .btn-secondary {
  background: white;
  border: 1px solid #e5e7eb;
  color: #374151;
}

#inlineEditModal .modal-footer .btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

#inlineEditModal .modal-footer .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

#inlineEditModal .modal-footer .btn-primary:hover {
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
}

/* Backdrop styling */
body.edit-mode .modal-backdrop.show {
  opacity: 0.4;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
}

/* Animation */
#inlineEditModal.fade .modal-dialog {
  transform: scale(0.95) translateY(-20px);
  transition: transform 0.2s ease-out;
}

#inlineEditModal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

.edit-mode .inline-edit-btn {
  display: inline-flex;
}

.hero-section,
.welcome-section,
.products-section,
.newsletter-section {
  position: relative;
}
