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

:root,
[data-bs-theme="light"] {
  --primary-color: #c5a880;
  --secondary-color: #e6d3be;
  --bg-color: #fdfbf7;
  --text-color: #12151c;
  --card-bg: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08);

  --hero-bg: radial-gradient(circle at center, #fbf8f3 0%, #f4ece1 100%);
  --hero-text: #1e293b;
  --hero-subtitle: #64748b;
  --hero-badge-bg: rgba(197, 168, 128, 0.15);
  --hero-badge-border: rgba(197, 168, 128, 0.35);
  --hero-search-bg: rgba(255, 255, 255, 0.95);
  --hero-search-border: rgba(197, 168, 128, 0.3);

  --bs-primary: #c5a880 !important;
  --bs-primary-rgb: 197, 168, 128 !important;
  --bs-link-color: #12151c;
  --bs-link-hover-color: #9f805a;
  --bs-body-color: #12151c;
  --bs-body-bg: #fdfbf7;
}

[data-bs-theme="dark"] {
  --primary-color: #c5a880;
  --secondary-color: #e6d3be;
  --bg-color: #0c0f17;
  --text-color: #ffffff;
  --card-bg: #131722;
  --glass-bg: rgba(12, 15, 23, 0.92);
  --glass-border: rgba(255, 255, 255, 0.08);

  --hero-bg: radial-gradient(circle at center, #171b26 0%, #0a0c10 100%);
  --hero-text: #ffffff;
  --hero-subtitle: #94a3b8;
  --hero-badge-bg: rgba(197, 168, 128, 0.15);
  --hero-badge-border: rgba(197, 168, 128, 0.4);
  --hero-badge-text: #c5a880;
  --hero-search-bg: rgba(255, 255, 255, 0.06);
  --hero-search-border: rgba(197, 168, 128, 0.25);
  
  --bs-primary: #c5a880;
  --bs-primary-rgb: 197, 168, 128;
  --bs-link-color: #c5a880;
  --bs-link-hover-color: #e6d3be;
  --bs-body-color: #f1f5f9;
  --bs-body-bg: #0c0f17;
}

html {
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, 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: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-title span {
  background: linear-gradient(135deg, #e6d3be 0%, #c5a880 50%, #9f805a 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: #c5a880 !important;
}

[data-bs-theme="dark"] a:not(.btn):hover {
  color: #e6d3be !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;
}

.form-floating > .form-control::placeholder {
  color: transparent !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: #c5a880 !important;
}
.bg-primary-blue {
    background-color: #c5a880 !important;
    color: #121620 !important;
}
.btn-primary-blue {
    background: linear-gradient(135deg, #d4af37, #c5a880);
    color: #121620 !important;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    padding: 0.45rem 1.2rem;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.btn-primary-blue:hover {
    background: linear-gradient(135deg, #e6d3be, #d4af37);
    color: #121620 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.35);
}
.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;
}