@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #6c5ce7;
  --secondary-color: #a29bfe;
  --bg-color: #f8f9fa;
  --text-color: #2d3436;
  --card-bg: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.18);

  --hero-bg: radial-gradient(circle at center, #f5f3ff 0%, #ede9fe 100%);
  --hero-text: #1e293b;
  --hero-subtitle: #64748b;
  --hero-badge-bg: rgba(99, 102, 241, 0.1);
  --hero-badge-border: rgba(99, 102, 241, 0.2);
  --hero-badge-text: #4f46e5;
  --hero-search-bg: rgba(255, 255, 255, 0.9);
  --hero-search-border: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] {
  --primary-color: #a29bfe;
  --secondary-color: #6c5ce7;
  --bg-color: #1e1e2d;
  --text-color: #f1f2f6;
  --card-bg: #2b2b40;
  --glass-bg: rgba(43, 43, 64, 0.85);
  --glass-border: rgba(255, 255, 255, 0.05);

  --hero-bg: radial-gradient(circle at center, #1a1b41 0%, #0d1117 100%);
  --hero-text: #ffffff;
  --hero-subtitle: #8b949e;
  --hero-badge-bg: rgba(99, 102, 241, 0.15);
  --hero-badge-border: rgba(99, 102, 241, 0.3);
  --hero-badge-text: #818cf8;
  --hero-search-bg: rgba(255, 255, 255, 0.05);
  --hero-search-border: rgba(255, 255, 255, 0.1);
}

html {
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* Glassmorphism Navbar */
.glass-navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Navbar Toggler Fix (Hamburger menu) */
.navbar-toggler {
  border-color: var(--glass-border) !important;
  background-color: rgba(0, 0, 0, 0.05);
}
[data-bs-theme="dark"] .navbar-toggler {
  background-color: rgba(255, 255, 255, 0.05);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
[data-bs-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Cards & Micro-animations */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--glass-border);
}

/* Pagination styles */
.pagination {
  margin-bottom: 0;
}

.page-link {
  color: var(--primary-color);
  background-color: var(--card-bg);
  border-color: var(--glass-border);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.page-link:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Custom Hero Styles */
.hero-section {
  background: var(--hero-bg);
  border-radius: 1rem;
  padding: 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.hero-badge {
  display: inline-block;
  background-color: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  color: var(--hero-badge-text);
  padding: 0.5rem 1.25rem;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.hero-title {
  color: var(--hero-text);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--hero-subtitle);
  font-size: 1.125rem;
  max-width: 48rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-search-wrapper {
  position: relative;
  max-width: 32rem;
  width: 100%;
  margin: 0 auto;
}

.hero-search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  border-radius: 50rem;
  background-color: var(--hero-search-bg);
  border: 1px solid var(--hero-search-border);
  color: var(--hero-text);
  font-size: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.hero-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--hero-badge-border);
  border-color: var(--hero-badge-text);
}

.hero-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hero-subtitle);
  font-size: 1.2rem;
}

/* Collection Cards */
.collection-card {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.collection-card img {
  transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
  width: 100%;
}

.collection-card:hover img {
  transform: scale(1.08);
}

.collection-card .collection-desc {
  transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
}

.collection-card:hover .collection-desc {
  max-height: 100px;
  opacity: 1;
  margin-top: 0.5rem;
}

.collection-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  transform: translateY(-8px);
}

.hover-scale {
  transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.hover-scale:hover {
  transform: scale(1.05);
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

[data-bs-theme="dark"] .btn-primary {
  color: #1e1e2d !important;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
  transform: scale(1.02);
}

[data-bs-theme="dark"] .btn-primary:hover {
  color: #1e1e2d !important;
}

/* Text Overrides for Dark Mode */
[data-bs-theme="dark"] .text-dark {
  color: #f1f2f6 !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #2b2b40 !important;
}

[data-bs-theme="dark"] .table-light {
  background-color: #1e1e2d !important;
  color: #f1f2f6;
}

[data-bs-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd)>* {
  color: #f1f2f6;
}

/* General Dark Mode Fixes for Text Readability */
[data-bs-theme="dark"] a:not(.btn) {
  color: #a29bfe !important;
}

[data-bs-theme="dark"] a:not(.btn):hover {
  color: #c7c4ff !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td {
  color: #f1f2f6 !important;
}

[data-bs-theme="dark"] .form-control {
  background-color: #2b2b40 !important;
  color: #f1f2f6 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

[data-bs-theme="dark"] .form-control:focus {
  background-color: #2b2b40 !important;
  color: #f1f2f6 !important;
  box-shadow: 0 0 0 0.25rem rgba(162, 155, 254, 0.25) !important;
}

[data-bs-theme="dark"] .form-floating label {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-bs-theme="dark"] select,
[data-bs-theme="dark"] .form-select {
  background-color: #2b2b40 !important;
  color: #f1f2f6 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Theme Toggle Button */
#bd-theme {
  color: var(--text-color);
  font-size: 1.2rem;
}

/* Product Cards & Redesign */
.product-card {
    border-radius: 1.25rem;
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.product-img-container {
    background-color: rgba(0, 0, 0, 0.02);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.product-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.badge-soft-primary {
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 600;
}
.badge-soft-secondary {
    background-color: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    font-weight: 600;
}
[data-bs-theme="dark"] .badge-soft-secondary {
    color: #9ca3af;
}
.text-primary-blue {
    color: #2563eb !important;
}
.bg-primary-blue {
    background-color: #2563eb !important;
}
.btn-primary-blue {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
}
.btn-primary-blue:hover {
    background-color: #1d4ed8;
    color: white;
}
.icon-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    border: none;
    transition: background-color 0.2s;
}
.icon-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
.btn-add-cart {
    background-color: #2563eb;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: background-color 0.2s;
}
.btn-add-cart:hover {
    background-color: #1d4ed8;
    color: white;
}

/* Modal Details */
.modal-rounded .modal-content {
    border-radius: 1.5rem;
    border: none;
}
.availability-box {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 1rem;
    padding: 1rem;
}

/* Payment selection */
.payment-card {
    border: 2px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
}
.payment-card.active {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.05);
    color: #2563eb;
}
.payment-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input styles */
.form-control-rounded {
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    background-color: var(--card-bg);
    color: var(--hero-text);
}

/* Order Timeline */
.timeline-step {
    position: relative;
}
.active-danger .step-icon {
    box-shadow: 0 0 0 8px rgba(220, 53, 69, 0.1) !important;
}