/* ===== Matrubai Silks theme — deep maroon & gold, tuned for a silk saree boutique ===== */

:root {
  --maroon: #7b1e3a;
  --maroon-dark: #5c1329;
  --maroon-darker: #3f0c1c;
  --gold: #c9a227;
  --gold-light: #e8c766;
  --gold-dark: #a3801d;
  --ivory: #fdf8f0;
  --ivory-deep: #f7ecd9;

  --radius: 0.9rem;
  --radius-sm: 0.6rem;
  --radius-lg: 1.25rem;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Alex Brush', cursive;
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  font-family: var(--font-body);
  background-color: var(--ivory);
  color: #3a2a2a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#pageContentArea {
  flex: 1 0 auto;
}

body > footer {
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
}

.font-brand {
  font-family: var(--font-brand);
  font-size: 2rem;
  line-height: 1;
}

a {
  color: var(--maroon);
}

a:hover {
  color: var(--maroon-dark);
}

/* ===== Brand surfaces ===== */

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

.hero-banner {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 55%, var(--maroon-darker) 100%);
}

.category-nav-bar {
  background-color: var(--ivory-deep) !important;
}

header.sticky-top {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.category-nav .nav-link {
  color: var(--maroon-dark);
  font-weight: 600;
}

.category-nav .nav-link:hover {
  color: var(--gold-dark);
}

.category-tile {
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  border: 1px solid rgba(123, 30, 58, 0.1);
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(123, 30, 58, 0.15) !important;
}

/* ===== Buttons ===== */

.btn {
  border-radius: var(--radius-sm);
}

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

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

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

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--maroon) !important;
  border-color: var(--maroon) !important;
}

.btn-gold {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #3a2408;
  font-weight: 700;
}

.btn-gold:hover,
.btn-gold:focus {
  background-color: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #241503;
}

.btn-link {
  color: var(--maroon);
}

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

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

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

/* ===== Rounded corners, everywhere ===== */

.card,
.alert,
.modal-content,
.dropdown-menu,
.list-group,
.toast,
.accordion-item,
.input-group,
.table-responsive,
.hero-banner,
.admin-sidebar,
.kpi-card {
  border-radius: var(--radius) !important;
}

.card-img-top {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.form-control,
.form-select,
.form-check-input,
select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="date"],
textarea {
  border-radius: var(--radius-sm) !important;
}

.form-check-input {
  border-radius: 0.3em !important;
}

.btn-close,
.page-link,
.badge:not(.rounded-pill),
img:not(.card-img-top),
.thumb-image {
  border-radius: var(--radius-sm);
}

.list-group-item:first-child {
  border-top-left-radius: var(--radius) !important;
  border-top-right-radius: var(--radius) !important;
}

.list-group-item:last-child {
  border-bottom-left-radius: var(--radius) !important;
  border-bottom-right-radius: var(--radius) !important;
}

.table-responsive table {
  margin-bottom: 0;
}

/* ===== Links, focus states, pagination, badges ===== */

.form-control:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.25);
}

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

.page-link {
  color: var(--maroon);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--maroon);
}

.nav-pills .nav-link.active {
  background-color: var(--maroon);
}

.list-group-item.active {
  background-color: var(--maroon);
  border-color: var(--maroon);
}

.nav-tabs .nav-link.active {
  color: var(--maroon);
  border-color: #dee2e6 #dee2e6 #fff;
  font-weight: 600;
}

/* ===== Product cards ===== */

.product-card {
  transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(123, 30, 58, 0.15);
  transform: translateY(-2px);
}

.product-card .card-img-top {
  height: 200px;
  object-fit: contain;
  background: var(--ivory-deep);
  padding: 1rem;
}

.price-strike {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.9em;
}

.price-effective {
  font-weight: 700;
  font-size: 1.15em;
  color: var(--maroon);
}

.added-to-cart-panel {
  position: fixed;
  top: calc(var(--header-height, 90px) + 0.5rem);
  right: 1rem;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.2);
  padding: 1rem;
  z-index: 1090;
  transform: translateX(120%);
  transition: transform 0.25s ease-out;
}

.added-to-cart-panel.show {
  transform: translateX(0);
}

.added-to-cart-body {
  display: flex;
  gap: 0.75rem;
}

.added-to-cart-body img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--ivory-deep);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

header.sticky-top {
  z-index: 1035;
}

.cart-sidebar {
  position: fixed;
  top: calc(var(--header-height, 90px) + 0.5rem);
  right: 1rem;
  width: 280px;
  z-index: 1030;
}

.cart-sidebar-box {
  max-height: calc(100vh - var(--header-height, 90px) - 1.5rem);
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
  padding: 1rem;
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cart-sidebar-item {
  display: flex;
  gap: 0.6rem;
}

.cart-sidebar-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--ivory-deep);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.cart-sidebar-summary {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .page-content-area.container,
  .page-content-area.container-fluid {
    max-width: calc(100% - 310px);
    margin-right: 310px;
    margin-left: auto;
  }
}

@media (max-width: 767.98px) {
  .cart-sidebar {
    display: none !important;
  }
}

.mobile-cart-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.3);
  z-index: 1045;
  text-decoration: none;
}

.mobile-cart-fab:hover,
.mobile-cart-fab:focus {
  color: #fff;
  background: var(--maroon-dark);
}

.mobile-cart-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.7rem;
}

.badge-discount {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: var(--gold) !important;
  color: #3a2408;
}

.star-rating {
  color: var(--gold-dark);
}

.variant-swatch-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 1px #fff inset;
}

.variant-swatch-row {
  min-height: 20px;
}

/* ===== Admin ===== */

.admin-sidebar {
  min-height: calc(100vh - 56px);
  background: var(--maroon-darker);
}

.js-category-row.dragging {
  opacity: 0.4;
}

.js-category-row {
  transition: background-color 0.1s ease-in-out;
}

.admin-sidebar .nav-link {
  color: #e8cfd6;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.kpi-card {
  border-left: 4px solid var(--gold);
}

.order-status-badge {
  font-size: 0.85em;
}

.filter-sidebar .form-check-label {
  cursor: pointer;
}

.filter-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.filter-toggle:hover {
  color: var(--maroon);
}

.filter-toggle .bi-chevron-down {
  transition: transform 0.2s ease-in-out;
}

.filter-toggle:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

footer a {
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ===== Product listing: grid / carousel view toggle ===== */

.view-toggle.active {
  background-color: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}

.product-view .carousel-item {
  padding-bottom: 0.25rem;
}

.carousel-control-prev,
.carousel-control-next {
  width: 3rem;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  height: 3rem;
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--maroon);
  border-radius: 50%;
  padding: 1.4rem;
  background-size: 1.1rem;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
  background-color: var(--maroon-dark);
}

/* Single, larger item per carousel slide */
.carousel-single .card-img-top {
  height: 420px;
}

.carousel-single .card-body {
  padding: 1.5rem;
}

.carousel-single .card-title,
.carousel-single h6 {
  font-size: 1.3rem;
}

/* Reserve a fixed 2-line height for the title so slide/card height never jumps
   when one product's name wraps to a second line and another's doesn't. */
.carousel-single .card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.7rem;
  height: 3.4rem;
  margin-bottom: 0.25rem;
}

.carousel-single .card {
  height: 100%;
}

.carousel-single .carousel-item {
  min-height: 620px;
}

.carousel-single .price-effective {
  font-size: 1.6em;
}

.carousel-single .price-strike {
  font-size: 1.1em;
}

.carousel-indicators-light [data-bs-target] {
  background-color: var(--maroon);
  opacity: 0.35;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: none;
}

.zoom-container {
  position: relative;
}

.zoom-container #mainImage {
  cursor: crosshair;
}

.img-zoom-lens {
  position: absolute;
  pointer-events: none;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background-color: rgba(255, 255, 255, 0.35);
  display: none;
}

.img-zoom-result {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 20px;
  width: 420px;
  height: 420px;
  background-color: #fff;
  background-repeat: no-repeat;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1040;
  display: none;
}

@media (max-width: 991.98px) {
  .img-zoom-lens,
  .img-zoom-result {
    display: none !important;
  }

  .zoom-container #mainImage {
    cursor: default;
  }
}

.carousel-indicators-light [data-bs-target].active {
  opacity: 1;
  background-color: var(--gold);
}
