/* Global Styles for Project Anupam */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #FFF7F5;
  --light-color: #FFFDFB;
  --dark-color: #BB726B;
  --text-dark: #3A2F2B;
  --border-muted: #F1D6CF;
  --white: #FFFFFF;
}

body {
  font-family: 'Georgia', serif;
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--light-color) 0%, var(--primary-color) 100%) fixed;
  overflow-x: hidden;
  font-size: 0.95rem;
}

/* Typography */
h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Logo Bar */
.single-logo-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}

.single-logo {
  max-width: 100%;
  width: 100%;
  border-radius: 15px;
}

/* Navigation */
.navbar {
  background-color: var(--primary-color);
  border-bottom: 2px solid var(--dark-color);
  padding: 0.75rem 0;
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-dark) !important;
  letter-spacing: 1px;
}

.navbar-nav .nav-link {
  color: var(--text-dark) !important;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0.4rem;
  letter-spacing: 0.5px;
  padding: 0.5rem 0.7rem !important;
  font-weight: 600;
}

.navbar-nav .nav-link:hover {
  color: var(--white) !important;
  background: var(--dark-color);
  border-radius: 5px;
}

.cart-icon {
  position: relative;
  font-size: 1.1rem;
  color: var(--text-dark) !important;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--dark-color);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--dark-color);
  color: var(--white);
  border: none;
  padding: 10px 30px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
}

.btn-primary-custom:hover {
  background-color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(238, 241, 241, 0.3);
  color: black;
  border: 2px solid var(--dark-color);
}

.btn-main {
  background: var(--dark-color);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  transition: all 0.3s;
}

.btn-main:hover {
  background: var(--light-color);
  color: black;
  transform: translateY(-2px);
  border: 2px solid var(--dark-color);
}

/* Cards */
.section-title {
  font-size: 1.75rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 2px;
  font-weight: bold;
}

.page-header {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  text-align: center;
}

.page-header h1 {
  color: var(--dark-color);
  font-size: 2rem;
  margin: 0;
  font-weight: bold;
}

/* Product Cards */
.product-card {
  background: var(--white);
  /*border: 2px solid var(--border-muted);*/
  /*padding: 1.25rem;*/
  margin-bottom: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  border-radius: 10px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(234, 240, 240, 0.3);
  border-color: var(--dark-color);
}

.product-img {
  width: 100%;
  height: 350px;
  background: var(--light-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.product-img i {
  font-size: 2.5rem;
  color: var(--dark-color);
}

.product-title {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
  flex-grow: 1;
  font-weight: bold;
}

.product-price {
  font-size: 1.05rem;
  color: var(--dark-color);
  font-weight: bold;
  margin-bottom: 1rem;
}

/* ================================
   PRODUCT DETAIL MODAL
   ================================ */

#productDetailModal .modal-dialog {
  max-width: 1200px;
  width: 95%;
}

#productDetailModal .modal-body {
  max-height: 75vh;
  overflow-y: auto;
}

/*
 * Single clean block — no duplicates.
 * Used only for the legacy single-image (non-carousel) path.
 */
.product-detail-img {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
}

.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
  transform-origin: center center;
  border-radius: 12px;
}

/* Modal text */
.product-detail-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.product-detail-price {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 10px 0;
}

.product-detail-info-item {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 6px;
}

.product-detail-description {
  font-size: 1.0rem;
  font-weight: normal;
  margin-top: 10px;
  line-height: 1.6;
  color: var(--text-dark);
}

.btn-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #ccc;
  border-color: #ccc;
}

/* ===== IMAGE ZOOM OVERLAY (ABOVE MODAL) ===== */

.image-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  /* MUST be higher than Bootstrap modal */
  cursor: zoom-out;
}

.image-zoom-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.zoom-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  z-index: 100000;
}

/* Add-to-cart button */
.btn-add-to-cart-modal {
  margin-top: 50px;
  width: 100%;
  padding: 14px 0;
  background: var(--dark-color);
  color: white;
  border-radius: 14px;
  border: 2px solid var(--dark-color);
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-add-to-cart-modal:hover {
  background: var(--light-color);
  color: var(--text-dark);
  box-shadow: 0 6px 20px rgba(187, 114, 107, 0.4);
  transform: translateY(-2px);
}

.btn-add-to-cart-modal i {
  margin-right: 8px;
}

.btn-add-to-cart-modal:disabled,
.btn-add-to-cart-modal[aria-disabled="true"] {
  background-color: #d1d1d1 !important;
  border-color: #d1d1d1 !important;
  color: #6c6c6c !important;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}

.btn-add-to-cart-modal:disabled i {
  color: #6c6c6c;
}

.btn-cart {
  background-color: var(--dark-color);
  color: white;
  border: none;
  padding: 8px 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  border-radius: 5px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: bold;
}

.btn-cart:hover {
  background-color: var(--light-color);
  box-shadow: 0 5px 15px rgba(234, 240, 240, 0.3);
  border: 2px solid var(--dark-color);
  color: var(--text-dark);
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 40px 20px 20px;
  margin-top: 5px;
}

.footer h5 {
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: 1px;
  font-weight: bold;
  font-size: 1rem;
}

.footer p,
.footer li {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--light-color);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--white);
}

.footer ul {
  list-style: none;
  padding-left: 0;
}

.social-icons a {
  color: white;
  font-size: 1.3rem;
  margin-right: 1rem;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--light-color);
}

/* Forms */
.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-control,
.form-select {
  min-width: 110px;
  border: 2px solid var(--dark-color);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--dark-color);
  box-shadow: 0 0 0 0.2rem rgba(230, 184, 174, 0.25);
}

/* Modals */
.modal-content {
  border-radius: 15px;
  border: 3px solid var(--primary-color);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--light-color));
  border-bottom: 2px solid var(--dark-color);
  border-radius: 12px 12px 0 0;
}

.modal-title {
  color: var(--text-dark);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Login Link */
.login-link {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--dark-color);
  color: white;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 5px 15px rgba(112, 112, 112, 0.4);
  transition: all 0.3s;
  z-index: 1000;
  text-decoration: none;
}

.login-link:hover {
  background: white;
  transform: scale(1.1);
  color: black;
}

/* Badges */
.badge-active {
  background: #28a745;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  margin-right: 5px;
}

.badge-inactive {
  background: #6c757d;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  margin-right: 5px;
}

.badge-pending {
  background: #ffc107;
  color: #000;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  margin-right: 5px;
}

.badge-approved {
  background: #28a745;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  margin-right: 5px;
}

.badge-rejected {
  background: #dc3545;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  margin-right: 5px;
}

/* ===== Dashboard Order Item Image (Global) ===== */
.dashboard-order-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
}

.dashboard-order-item-image {
  width: 55px;
  height: 55px;
  border-radius: 8px;
  background: var(--light-color);
  border: 1.5px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.dashboard-order-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.dashboard-order-item-image i {
  font-size: 1.4rem;
  color: var(--dark-color);
}

/* Remove bullets & left indentation for order item lists */
.order-card ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.order-card li {
  list-style: none;
}

/* Responsive */
@media (max-width: 992px) {
  .logo-container {
    flex-direction: column;
    gap: 15px;
  }

  .logo-item {
    text-align: center !important;
  }

  .logo-placeholder {
    margin: 0 auto !important;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 0.9rem;
  }

  p {
    font-size: 0.9rem;
  }

  .navbar-nav .nav-link {
    font-size: 0.75rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .btn-cart {
    padding: 6px 12px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }
}

/* =====================================================================
   Product Variant & Image Refactor
   ===================================================================== */

/* ─────────────────────────────────────────────
   IMAGE CAROUSEL  (.pa-carousel)
───────────────────────────────────────────── */
.pa-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--light-color);
  user-select: none;
}

.pa-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.pa-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.3s;
  display: inline-block;
}

.pa-carousel-dot.active {
  background: var(--dark-color);
}

/* ── Card carousel wrapper: perfect square on every card ── */
.product-card>.pa-carousel,
.product-img .pa-carousel {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto !important;
  /* defeat any leftover inline height */
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  margin-bottom: 1rem;
  background: var(--light-color);
  overflow: hidden;
}

.product-card>.pa-carousel>div,
.product-img .pa-carousel>div {
  height: 100%;
}

/* Card: cover fills square; center top keeps product in frame */
.product-card>.pa-carousel img,
.product-img .pa-carousel img {
  object-fit: cover;
  object-position: center top;
  width: 100%;
  height: 100%;
  display: block;
}

/* Modal: contain so full product is always visible */
#productDetailModal .pa-carousel img,
#modalImageCol .pa-carousel img {
  object-fit: contain;
  object-position: center center;
  width: 100%;
  height: 100%;
  padding: 8px;
  background: var(--light-color);
  cursor: zoom-in;
}

/* ─────────────────────────────────────────────
   VARIANT SELECTOR  (.pa-variant-selector)
───────────────────────────────────────────── */
.pa-variant-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.pa-variant-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 2px solid var(--dark-color);
  background: white;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
  line-height: 1.4;
}

.pa-variant-pill:hover:not(:disabled) {
  background: var(--dark-color);
  color: white;
}

.pa-variant-pill.active,
.pa-variant-pill.selected {
  background: var(--dark-color);
  color: white;
}

.pa-variant-pill.out-of-stock,
.pa-variant-pill:disabled {
  border-color: #ccc;
  color: #aaa;
  cursor: not-allowed;
  background: #f8f8f8;
  text-decoration: line-through;
}

/* ─────────────────────────────────────────────
   VARIANT TAG  — track order, order history
───────────────────────────────────────────── */
.variant-tag {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-dark);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  padding: 1px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────
   PRICE RANGE DISPLAY  (min-max across variants)
───────────────────────────────────────────── */
.product-price-range {
  font-size: 1.05rem;
  color: var(--dark-color);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* ─────────────────────────────────────────────
   PRODUCT CARD — variant pills on card
───────────────────────────────────────────── */
.product-card-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  justify-content: center;
}

.product-card-variants .pa-variant-pill {
  font-size: 0.72rem;
  padding: 3px 10px;
}

/* ─────────────────────────────────────────────
   MULTI-IMAGE UPLOAD PREVIEW GRID
   (student dashboard product form)
───────────────────────────────────────────── */
.image-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.image-preview-item {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-muted);
  flex-shrink: 0;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.image-preview-item .img-remove-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-item .primary-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark-color);
  color: white;
  font-size: 0.6rem;
  text-align: center;
  padding: 2px 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─────────────────────────────────────────────
   VARIANT ROWS  (student dashboard product form)
───────────────────────────────────────────── */
.variant-row {
  background: var(--light-color);
  border: 1.5px solid var(--border-muted);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
}

.variant-row .variant-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.variant-row .variant-delete-btn:hover {
  background: #b02a37;
}

/* ─────────────────────────────────────────────
   BADGE — sale
───────────────────────────────────────────── */
.badge-sale {
  background: var(--dark-color);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}