/* ----------------------------------------
   Local Candle Co – Simple Elegant Theme
   ---------------------------------------- */

/* Color palette */
:root {
  --lc-bg: #f8f5f1;
  --lc-bg-alt: #fdfaf6;
  --lc-border: #e2d9cc;
  --lc-primary: #6b4f3f;
  --lc-primary-dark: #543d31;
  --lc-accent: #b8865d;
  --lc-accent-dark: #9b714d;
  --lc-text-main: #3c3128;
  --lc-text-muted: #7b6b5d;
}

/* Global */
body {
  background: radial-gradient(circle at top, #fffdf8 0, var(--lc-bg) 55%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--lc-text-main);
}

/* Container width */
main.container {
  max-width: 1100px;
  padding-bottom: 3rem;
}

/* Headings */
h1, h2, h3, h4 {
  color: var(--lc-text-main);
  letter-spacing: 0.02em;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Navbar */
.navbar {
  background-color: var(--lc-bg-alt);
  border-bottom: 1px solid var(--lc-border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--lc-primary) !important;
}

.navbar a {
  color: var(--lc-text-main);
}

.navbar a:hover {
  color: var(--lc-primary-dark);
}

/* Messages (Django messages) */
.alert-info {
  background-color: #fff7ea;
  border-color: #f1e0c5;
  color: #5b4431;
  border-radius: 10px;
}

/* Buttons */
.btn {
  border-radius: 999px;
  font-weight: 500;
  padding-inline: 1.2rem;
}

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

.btn-primary:hover {
  background-color: var(--lc-primary-dark);
  border-color: var(--lc-primary-dark);
}

.btn-success {
  background-color: var(--lc-accent);
  border-color: var(--lc-accent);
}

.btn-success:hover {
  background-color: var(--lc-accent-dark);
  border-color: var(--lc-accent-dark);
}

.btn-outline-secondary {
  color: var(--lc-text-main);
  border-color: var(--lc-border);
}

.btn-outline-secondary:hover {
  background-color: var(--lc-bg-alt);
  border-color: var(--lc-primary);
  color: var(--lc-primary-dark);
}

.btn-outline-danger {
  border-color: #c8553d;
  color: #c8553d;
}

.btn-outline-danger:hover {
  background-color: #c8553d;
  color: #fff;
}

/* Links */
a {
  color: var(--lc-primary);
}

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

/* Cards (product, FAQ, etc.) */
.card {
  border-radius: 18px;
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  background-color: #fff;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.09);
}

/* Product card images */
.card-img-top {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
}

/* Product detail image */
.product-detail-image {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
}

/* Product titles & text */
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-body p {
  margin-bottom: 0.25rem;
}

/* Remove any border or stroke from the card header row */
.card-body .d-flex {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Larger View button to match text proportions */
.view-btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Hero / top section on product list */
.hero-section {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 2.2rem 2rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--lc-border);
  box-shadow: 0 16px 40px rgba(0,0,0,0.05);
}

.hero-section h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.hero-section p {
  color: var(--lc-text-muted);
  margin-bottom: 0;
}

/* Forms (general) */
form {
  max-width: 540px;
}

form .form-control {
  border-radius: 999px;
  border-color: var(--lc-border);
}

form .form-control:focus {
  box-shadow: 0 0 0 0.15rem rgba(107, 79, 63, 0.18);
  border-color: var(--lc-primary);
}

/* Newsletter strip */
main .row:last-of-type h5 {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

main .row:last-of-type p {
  color: var(--lc-text-muted);
  margin-bottom: 0.5rem;
}

/* Tables (cart, admin-like views) */
.table {
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.table > :not(caption) > * > * {
  padding-block: 0.75rem;
}

.table thead {
  background-color: var(--lc-bg-alt);
}

.table td,
.table th {
  vertical-align: middle;
}

/* FAQ accordion */
.accordion-item {
  border-radius: 14px !important;
  overflow: hidden;
  border: 1px solid var(--lc-border);
  margin-bottom: 0.75rem;
}

.accordion-button {
  background-color: #fff;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  color: var(--lc-primary-dark);
  background-color: #fff7ea;
}

/* Checkout summary text */
.lead {
  color: var(--lc-text-muted);
}

/* Small utility for centered sections (auth, contact, delete confirm, etc.) */
.section-center {
  max-width: 480px;
  margin: 2.5rem auto;
}

.section-center .hero-section {
  padding: 2rem 2rem 2.4rem;
}

.section-center .hero-section h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.section-center .hero-section p.text-muted {
  font-size: 0.95rem;
}

/* Tidy spacing for Django's form.as_p output */
.section-center .hero-section form p {
  margin-bottom: 0.9rem;
}

/* Labels and inputs (auth/contact forms) */
.section-center .hero-section label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--lc-text-main);
}

.section-center .hero-section input[type="text"],
.section-center .hero-section input[type="email"],
.section-center .hero-section input[type="password"] {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--lc-border);
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
}

/* Focus state */
.section-center .hero-section input[type="text"]:focus,
.section-center .hero-section input[type="email"]:focus,
.section-center .hero-section input[type="password"]:focus {
  outline: none;
  border-color: var(--lc-primary);
  box-shadow: 0 0 0 0.12rem rgba(107, 79, 63, 0.18);
}

/* Make main auth button stretch nicely */
.section-center .hero-section button.btn {
  width: 100%;
  justify-content: center;
}

/* Small footer links on auth pages */
.section-center .hero-section small.text-muted {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.section-center .hero-section small.text-muted a {
  text-decoration: underline;
}

/* Textarea styling for contact / long messages */
.section-center .hero-section textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--lc-border);
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  min-height: 140px;
  resize: vertical;
}

.section-center .hero-section textarea:focus {
  outline: none;
  border-color: var(--lc-primary);
  box-shadow: 0 0 0 0.12rem rgba(107, 79, 63, 0.18);
}

/* Reviews section layout */
section h2 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Contact form wrapper spacing */
.contact-form-wrapper {
  max-width: 540px;
  margin-inline: auto;
}

.contact-form-wrapper form p {
  margin-bottom: 0.9rem;
}

/* ----------------------------------------
   Wishlist page
   ---------------------------------------- */

.wishlist-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card container for each wishlist item */
.wishlist-item {
  background-color: #fff;
  border: 1px solid var(--lc-border);
  border-radius: 18px;
  padding: 1.3rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* Left side: thumbnail + text */
.wishlist-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Thumbnail image */
.wishlist-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 16px;
  background-color: #f4ece1;
  flex-shrink: 0;
}

/* Name + price block */
.wishlist-text {
  text-align: left;
}

.wishlist-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.wishlist-price {
  margin-bottom: 0;
  color: var(--lc-text-muted);
}

/* Right side: buttons */
.wishlist-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 140px;
}

/* Mobile layout */
@media (max-width: 576px) {
  .wishlist-item {
    flex-direction: column;
    align-items: stretch;
  }

  .wishlist-main {
    justify-content: flex-start;
  }

  .wishlist-actions {
    width: 100%;
  }
}


/* ----------------------------------------
   Cart layout polish
   ---------------------------------------- */

.cart-table-wrap {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 1.5rem 2rem;
}

/* Ensure table fills area with nice padding */
.cart-table-wrap table {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

/* Increase padding inside all table cells */
.cart-table-wrap table td,
.cart-table-wrap table th {
  padding: 1.25rem 2rem;
}

/* Product column, quantity, totals, remove widths */
.cart-table-wrap table td:first-child {
  width: 45%;
}

.cart-table-wrap table td:nth-child(2) {
  width: 25%;
}

.cart-table-wrap table td:nth-child(3) {
  width: 20%;
}

.cart-table-wrap table td:last-child {
  width: 10%;
}

.cart-table td {
  vertical-align: middle;
}

/* Cart product thumbnail */
.cart-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background-color: #f4ece1;
}

/* Quantity form row */
.cart-qty-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 230px;
}

.cart-qty-input {
  width: 70px !important;
  min-width: 70px !important;
  height: 38px;
  border-radius: 12px;
  padding: 0.35rem 0.5rem;
  text-align: center;
  color: var(--lc-text-main);
  background-color: #fff;
  border: 1px solid var(--lc-border);
}

.cart-qty-update {
  white-space: nowrap;
}

/* Remove button */
.cart-table a.btn-outline-danger {
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
}

/* Cart total row emphasis */
.cart-total-row {
  font-weight: 600;
  font-size: 1.05rem;
}

/* Cart summary area */
.cart-summary {
  margin-top: 0.5rem;
}

.cart-summary .btn {
  min-width: 180px;
}

/* Right-align cart totals */
.cart-table td:last-child,
.cart-table th:last-child {
  text-align: right !important;
}

.cart-total-row {
  text-align: right !important;
}

/* Mobile adjustments for cart */
@media (max-width: 768px) {
  .cart-table-wrap table td,
  .cart-table-wrap table th {
    padding: 0.75rem;
  }
}

@media (max-width: 576px) {
  .cart-qty-form {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile: hide thumbnails only in the cart table, not wishlist */
@media (max-width: 576px) {
  .cart-table-wrap table .cart-thumb {
    display: none;
  }
}

/* Extra small screens: soften cart padding */
@media (max-width: 576px) {
  .cart-table-wrap {
    padding: 1rem 1rem;
  }
}

/* Extra mobile tweaks for cart */
@media (max-width: 576px) {
  /* Reduce outer padding around the card on very small screens */
  .cart-table-wrap {
    padding: 1rem 0.75rem;
  }

  /* Reduce cell padding and font size a bit */
  .cart-table-wrap table td,
  .cart-table-wrap table th {
    padding: 0.5rem 0.5rem;
    font-size: 0.9rem;
    white-space: normal;
  }

  /* Let columns auto-size instead of forcing wide percentages */
  .cart-table-wrap table td:first-child,
  .cart-table-wrap table td:nth-child(2),
  .cart-table-wrap table td:nth-child(3),
  .cart-table-wrap table td:last-child {
    width: auto;
  }
}

/* Mobile app-like cart item cards */
.cart-item-card {
  background-color: #fff;
  border-radius: 18px;
  border: 1px solid var(--lc-border);
  padding: 1rem 1.2rem;
}

/* Tighten spacing in mobile cards */
.cart-item-card .cart-qty-form {
  max-width: 100%;
}

/* Footer */
.lc-footer {
  background: var(--lc-bg-alt);
  border-top: 1px solid var(--lc-border);
  margin-top: 4rem;
}

.lc-footer h5 {
  color: var(--lc-text-main);
}

.footer-link {
  color: var(--lc-primary);
  font-weight: 500;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--lc-primary-dark);
  text-decoration: underline;
}

/* ----------------------------------------
   Navbar button polish
   ---------------------------------------- */

.navbar .btn-primary,
.navbar .btn-success,
.navbar .btn-outline-primary {
  color: #fff !important;
}

.navbar .btn-primary:hover,
.navbar .btn-success:hover {
  color: #fff !important;
}

/* Outline buttons on navbar */
.navbar .btn-outline-primary {
  background-color: var(--lc-primary);
  border-color: var(--lc-primary);
}

.navbar .btn-outline-primary:hover {
  background-color: var(--lc-primary-dark);
  border-color: var(--lc-primary-dark);
  color: #fff !important;
}

/* Accessibility: high-contrast Cart button */
.cart-btn {
  background-color: #4a2f25;      
  color: #ffffff !important;      
  border-color: #4a2f25;
}

