:root {
  --primary: #89324b;
  --primary-light: #9d3957;
  --primary-dark: #752b3f;
  --secondary: #C19434;
  --secondary-light: #d3a84c;
  --secondary-dark: #a17a2b;
  --accent: #9B2915;
  --accent-light: #b8321a;
  --accent-dark: #7e2112;
  --success: #2E7D32;
  --danger: #D32F2F;
  --warning: #FFA000;
  --info: #0288D1;
  --light: #f8f9fa;
  --dark: #1f2937;
  --gray: #6c757d;
  --gray-light: #f8f9fa;
  --gray-dark: #343a40;
}

/* Bootstrap Overrides */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.btn-primary:active {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

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

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

/* Typography */
body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

.form-label {
  font-weight: 500;
}

/* Layout */
.w-30 {
  width: 30% !important;
}

/* Card Styles */
.card {
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-header {
  border-bottom: none;
}

.hover-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Dress Card */
.dress-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
}

.dress-img-placeholder {
  width: 100%;
  height: 240px;
}

.dress-detail-img {
  height: 400px;
  object-fit: cover;
  object-position: center;
}

.dress-detail-img-placeholder {
  height: 400px;
}

/* QR Print Styles */
.qr-print-container {
  max-width: 500px;
  margin: 0 auto;
}

.qr-label {
  border: 1px solid #ddd;
  border-radius: 8px;
  max-width: 350px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.table tbody tr {
  animation: fadeIn 0.3s ease-in-out;
}

.alert {
  animation: fadeIn 0.3s ease-in-out;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .dress-img, .dress-img-placeholder {
    height: 180px;
  }
  
  .dress-detail-img, .dress-detail-img-placeholder {
    height: 300px;
  }
}

/* Moroccan-inspired decorative elements */
.card-header {
  position: relative;
}

.card-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(193,148,52,0.7) 30%, 
    rgba(193,148,52,1) 50%, 
    rgba(193,148,52,0.7) 70%, 
    rgba(255,255,255,0) 100%
  );
}

/* Form styling */
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(26, 54, 93, 0.25);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Modal Fixes */
.modal {
  z-index: 1050;
}

.modal-backdrop {
  z-index: 1040;
}

.modal-dialog {
  margin: 1.75rem auto;
}

.modal-open {
  overflow: auto !important;
  padding-right: 0 !important;
}

.modal-content {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Make sure modals appear on top of everything else */
.modal-dialog {
  max-width: 500px;
  margin: 1.75rem auto;
  transition: transform 0.3s ease-out;
}

/* Ensure modal-backdrop doesn't interfere with clicking */
.modal-backdrop {
  opacity: 0.5 !important;
}

/* Adjust modal animation */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

/* Comprehensive Modal Fixes */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1060 !important; /* Higher z-index */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.modal-open {
  padding-right: 0 !important;
  overflow: auto !important;
}

/* Modal background */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050 !important;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal-backdrop.show {
  opacity: 0.5 !important;
}

.modal.show .modal-dialog {
  transform: none !important;
}

.modal-dialog {
  position: relative;
  pointer-events: auto;
  max-width: 500px;
  margin: 1.75rem auto;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3.5rem);
}

.modal-content {
  position: relative;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
  outline: 0;
}

.modal-header {
  border-top-left-radius: calc(0.3rem - 1px);
  border-top-right-radius: calc(0.3rem - 1px);
}

/* Override any other styles that might interfere */
body.modal-open {
  overflow: auto !important;
}