/* ==========================================================================
   CrimeaDahlia — UI theme (Bootstrap 5)
   Goals: calmer typography, consistent spacing, readable UI, minimal overrides.
   ========================================================================== */

:root{
  --bg-1: #fbf7f8;
  --bg-2: #f6dde4;
  --surface: rgba(255,255,255,0.92);
  --surface-solid: #ffffff;

  --text: #2d2a2b;
  --muted: #6b6165;

  --accent: #af5166;
  --accent-2: #8d5d78;

  --border: rgba(45,42,43,0.14);
  --shadow: 0 10px 26px rgba(45,42,43,0.10);
  --shadow-sm: 0 6px 16px rgba(45,42,43,0.08);

  --radius: 14px;
  --radius-sm: 10px;
}

html, body{
  height: 100%;
}

body{
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  /* Variant B: neutral background + focus on content surfaces */
  background: linear-gradient(180deg, #f6f7f9, #f2f3f6);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover{
  color: var(--accent-2);
}

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

/* Typography helpers */
.navbar-brand-text,
.section-title{
  font-family: "Great Vibes", "Times New Roman", serif;
  letter-spacing: 0.2px;
}
.navbar-brand-text{
  font-size: 1.9rem;
  line-height: 1;
  color: var(--text);
}
.section-title{
  font-size: clamp(2.2rem, 1.7vw + 1.4rem, 3.0rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

/* Navbar */
.site-navbar{
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-navbar .nav-link{
  color: var(--text) !important;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.site-navbar .nav-link:hover{
  color: var(--accent) !important;
}
.site-navbar .navbar-toggler{
  border-color: var(--border);
}
.site-navbar .logo-img{
  filter: drop-shadow(0 6px 14px rgba(45,42,43,0.10));
}

/* Hero */
.hero-section{
  padding: 2.2rem 0 !important;
}
.hero-section .container{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.5rem;
}
.hero-section .form-label{
  font-weight: 600;
}

/* Cards */
.card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card.shadow-sm,
.card.shadow-lg{
  box-shadow: var(--shadow);
}
.card .card-img-top{
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

/* Category cards: keep image crisp */
.category-image img{
  transform: scale(1);
  transition: transform 220ms ease;
}
.card:hover .category-image img{
  transform: scale(1.03);
}

/* Buttons */
.btn{
  border-radius: 999px;
  font-weight: 600;
}
.save-edit,
.review-submit-btn,
.add-to-cart{
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.save-edit:hover,
.review-submit-btn:hover,
.add-to-cart:hover{
  background: var(--accent-2) !important;
  border-color: var(--accent-2) !important;
}
.back.btn,
.btn.back,
.btn-outline-dark.back,
.btn-outline-secondary.back{
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.back.btn:hover,
.btn.back:hover,
.btn-outline-dark.back:hover,
.btn-outline-secondary.back:hover{
  background: rgba(175,81,102,0.10) !important;
  border-color: var(--accent-2) !important;
  color: var(--accent-2) !important;
}

/* Price */
.price{
  color: var(--accent) !important;
  font-weight: 700;
}

/* Badges & tags */
.badge{
  border-radius: 999px;
}
.tags .badge{
  background: rgba(141,93,120,0.12) !important;
  color: var(--text) !important;
  border: 1px solid rgba(141,93,120,0.22);
}

/* Breadcrumbs */
.breadcrumb a{
  color: var(--accent);
}
.breadcrumb a:hover{
  color: var(--accent-2);
}

/* Pagination */
.pagination .page-link{
  border-radius: 999px !important;
  border: 1px solid var(--border);
  color: var(--text);
  padding: .55rem .95rem;
}
.pagination .page-link:hover{
  color: var(--accent);
  background: rgba(175,81,102,0.10);
  border-color: rgba(175,81,102,0.25);
}
.pagination .page-item.active .page-link{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Forms */
.form-control,
.form-select,
.input-group-text{
  border-radius: 12px;
  border-color: var(--border);
}
.form-control:focus,
.form-select:focus{
  border-color: rgba(175,81,102,0.45);
  box-shadow: 0 0 0 .2rem rgba(175,81,102,0.16);
}

/* Login/Register header */
.login-register{
  background: linear-gradient(135deg, rgba(175,81,102,0.22), rgba(141,93,120,0.16));
  border-bottom: 1px solid var(--border);
}
.login-register h3{
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Carousel */
.carousel-item{
  padding: 1rem 0;
}
.carousel-content.card{
  border-radius: var(--radius);
}
.carousel-control-prev-icon,
.carousel-control-next-icon{
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.25));
}

/* Footer */
.site-footer{
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.site-footer .footer-title{
  font-weight: 800;
  letter-spacing: 0.3px;
}
.social-link{
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255,255,255,0.65);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
  text-decoration: none;
}
.social-link:hover{
  transform: translateY(-1px);
  background: rgba(175,81,102,0.10);
  border-color: rgba(175,81,102,0.25);
  color: var(--accent);
}

/* Utility */
.object-fit-cover{
  object-fit: cover;
}

/* =========================
   Page-level components
   ========================= */

.page-header{
  padding: 22px 0 10px;
  background: transparent;
}

.page-header .container{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  padding: 18px 18px;
}

.page-title{
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
}

.page-subtitle{
  margin: .4rem 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.filter-card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
}

.filter-card .form-label{
  color: var(--muted);
  font-weight: 600;
}

/* Product cards */
.product-card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.product-card .product-image{
  position: relative;
}

.product-card .product-image img{
  transition: transform 220ms ease;
}

.product-card:hover .product-image img{
  transform: scale(1.03);
}

.product-badges{
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.badge-soft{
  background: rgba(255,255,255,0.82) !important;
  border: 1px solid var(--border);
  color: var(--text) !important;
  backdrop-filter: blur(8px);
}

.price-row{
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-current{
  font-weight: 800;
  color: var(--accent);
  font-size: 1.2rem;
}

.price-old{
  color: var(--muted);
  text-decoration: line-through;
}

.meta-row{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Empty state */
.empty-state{
  border: 1px dashed rgba(141,93,120,0.35);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.72);
  padding: 28px;
}

/* Tables */
.table-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table thead th{
  color: var(--muted);
  font-weight: 700;
}

/* Checkout */
.checkout-container{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 992px){
  .checkout-container{
    grid-template-columns: 1.35fr 0.65fr;
    align-items: start;
  }
}

.checkout-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.checkout-card .card-header{
  background: rgba(255,255,255,0.75);
}

.order-summary{
  position: sticky;
  top: 90px;
}

.payment-method-card{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.75);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.payment-method-card:hover{
  transform: translateY(-1px);
  border-color: rgba(175,81,102,0.28);
  box-shadow: 0 12px 26px rgba(22,10,38,0.10);
}

.payment-method-card .form-check{
  margin: 0;
}

.payment-method-card input[type="radio"]{
  margin-top: .2rem;
}

.payment-method-card input[type="radio"]:checked ~ label{
  color: var(--accent);
}

/* Cart */
.cart-item{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.75);
}

.cart-item + .cart-item{ margin-top: 12px; }

.cart-thumb{
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.divider-soft{
  height: 1px;
  background: rgba(141,93,120,0.14);
  border: 0;
}

/* ===== Catalog Filters / Search ===== */
.filter-card {
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
}

.filter-card .form-label {
  font-weight: 600;
  color: rgba(0,0,0,.75);
}

.filter-card .form-text {
  margin-top: .35rem;
}

.filter-card .form-control,
.filter-card .form-select,
.filter-card .input-group-text,
.filter-card .btn {
  min-height: 46px;
}

/* Inputs / selects: clean and consistent radius */
.filter-card .form-control,
.filter-card .form-select {
  border-radius: 12px;
  border-color: rgba(0,0,0,.12);
}

.filter-card .form-control::placeholder {
  color: rgba(0,0,0,.45);
}

/* Focus state: subtle, premium */
.filter-card .form-control:focus,
.filter-card .form-select:focus {
  border-color: rgba(0,0,0,.20);
  box-shadow: 0 0 0 .25rem rgba(0,0,0,.08);
}

/* Search group: icon + input + buttons */
.search-group .input-group-text {
  border-radius: 12px 0 0 12px;
  border-color: rgba(0,0,0,.12);
}

.search-group .form-control {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.search-group .btn {
  border-color: rgba(0,0,0,.12);
}

.search-group .btn.btn-dark {
  border-radius: 0 12px 12px 0;
}

.search-group .btn.btn-outline-secondary {
  border-radius: 0;
}

/* Accordion: make it look like a compact filter drawer */
#filtersAccordion .accordion-item {
  background: transparent;
}

#filtersAccordion .accordion-button {
  background: transparent;
  box-shadow: none;
  border: 0;
  font-weight: 600;
  color: rgba(0,0,0,.78);
  padding-top: .25rem;
  padding-bottom: .25rem;
}

#filtersAccordion .accordion-button::after {
  opacity: .65;
}

#filtersAccordion .accordion-button:focus {
  box-shadow: none;
}

#filtersAccordion .accordion-body {
  padding-top: .5rem;
}

/* Checkboxes: align and make slightly cleaner */
.filter-card .form-check-input {
  border-color: rgba(0,0,0,.22);
}

.filter-card .form-check-input:checked {
  border-color: rgba(0,0,0,.55);
}

/* Buttons: consistent radius */
.filter-card .btn {
  border-radius: 12px;
}

/* Optional: slightly tighter spacing on mobile */
@media (max-width: 575.98px) {
  .filter-card {
    border-radius: 14px;
    padding: 1rem !important;
  }
  .filter-card .form-control,
  .filter-card .form-select,
  .filter-card .input-group-text,
  .filter-card .btn {
    min-height: 44px;
  }
}

body {
    font-family: 'Montserrat', sans-serif;
}

.logo-text {
    font-family: 'Great Vibes', cursive;
}

/* Product gallery */
.product-gallery-main {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: contain;
  object-position: center;
  background: #f8f9fa;
}

.product-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.thumb-btn {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  line-height: 0;
  scroll-snap-align: start;
}

.thumb-img {
  display: block;
  width: 88px;
  height: 64px;
  object-fit: cover;
}

@media (max-width: 576px) {
  .product-gallery-main {
    height: 260px;
  }

  .thumb-img {
    width: 64px;
    height: 48px;
  }

  .product-thumbs {
    gap: 0.375rem;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 14%;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    background-size: 70% 70%;
  }
}