@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Poiret+One&display=swap');
@import url('./theme-brown.css');

body {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poiret One', cursive;
}

.main-content {
  flex: 1;
}

/* Header Overrides */
.header {
  padding: 0;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1030;
  /* Ensure header stays above other content and has a high z-index */
}

.navbar-toggler {
  z-index: 1031;
  /* Ensure toggler is above the header if needed */
}

.announcement-bar {
  --announcement-height: 44px;
  font-size: 0.9rem;
  padding: 0 !important;
}

.announcement-bar .container {
  min-height: var(--announcement-height);
  gap: 0.75rem;
}

.announcement-bar .announcement-bar-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--announcement-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-bar .announcement-message {
  display: block;
  width: 100%;
  line-height: 1.2;
  max-height: calc(var(--announcement-height) - 8px);
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.announcement-bar-right-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: 0.25rem;
}



.main-header .header-right-icons {
  justify-content: flex-end;
}

.main-header .social-icons a,
.main-header .header-right-icons a {
  font-size: 1.1rem;
}

.main-header .logo a {
  font-family: 'Poiret One', cursive;
  text-decoration: none;
}

.header-right-icons .dropdown-toggle::after {
  display: none;
  /* Hide default bootstrap dropdown arrow */
}

.header-right-icons .dropdown-menu {
  border-radius: 0;
  border: 1px solid;
  /* Default non-color border */
}

.cart-count-badge {
  font-size: 0.8em;
  /* Increased font size */
  padding: 0.2em 0.4em;
  /* Added some padding back for better appearance */
  /* top: -0.5em !important; Removed */
  /* right: -0.5em !important; Removed */
  display: none;
  /* Hidden by default, shown by JS if count > 0 */
}

.menu-bar {
  border-top: 1px solid;
  /* Default non-color border */
  border-bottom: 1px solid;
  /* Default non-color border */
}

.menu-bar .nav-link {
  padding: 0.8rem 1.2rem;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.main-header .main-nav-links .nav-link {
  color: #5C3D2E;
  padding: 0.8rem 1.2rem;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.main-header .main-nav-links .nav-link:hover {
  color: #C0A080;
}

/* Product Card Styles */
.product-card {
  border: none;
  transition: box-shadow 0.3s ease-in-out;
}



.product-card .card-title {
  font-family: 'Poiret One', cursive;
  font-size: 1.5rem;
}

.product-title-link {
  text-decoration: none;
  color: inherit;
  /* Ensure the color is inherited from parent or theme */
}

.product-image-link {
  text-decoration: none;
  /* Remove underline from image link */
}

/* Cart Sidebar Styles */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  /* Increased width */
  height: 100%;
  transform: translateX(100%);
  /* Hidden by default */
  transition: transform 0.3s ease-in-out;
  z-index: 1050;
  /* Above Bootstrap modals */
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-sidebar-body {
  flex-grow: 1;
  overflow-y: auto;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  z-index: 1040;
  /* Below sidebar, above main content */
  backdrop-filter: blur(5px);
  /* Moved from theme-brown.css */
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-item {
  position: relative;
  padding-right: 30px;
  /* Space for delete button */
}

.cart-item .remove-item-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
}

.footer {
  padding: 2rem 0;
  margin-top: auto;
  font-size: calc(1rem - 3px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Footer Links */
.footer__links a {
  text-decoration: none;
}

.footer__links a:hover {
  text-decoration: underline;
}

/* Product Card Image Container */
.product-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-container .add-to-cart-btn {
  position: absolute;
  bottom: -50px;
  /* Start hidden below the container */
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  opacity: 0;
  visibility: hidden;
  width: 80%;
}

.product-image-container:hover .add-to-cart-btn {
  bottom: 10px;
  /* Slide in from the bottom */
  opacity: 1;
  visibility: visible;
}

/* Mobile: Always show add-to-cart button on tablets and phones */
@media (max-width: 992px) {
  .product-image-container .add-to-cart-btn {
    bottom: 10px;
    opacity: 1;
    visibility: visible;
  }
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  /* Hidden by default */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  z-index: 1000;
  transition: opacity 0.3s, visibility 0.3s;
}

/* Featured Products Slider */
.featured-products-slider {
  padding: 0 50px;
  /* Add some padding for the navigation buttons */
}

.featured-products-slider .swiper-button-next,
.featured-products-slider .swiper-button-prev {
  top: 50%;
  transform: translateY(-50%);
}

/* Image Showcase Section */
.image-showcase-section {
  width: 100%;
}

.image-zoom-container {
  overflow: hidden;
}

.image-showcase-section img {
  width: 100%;
  /* Responsive width */
  height: 300px;
  /* Short and wide */
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.image-zoom-container:hover img {
  transform: scale(1.05);
}

/* Discount Badge */
.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 5px;
}

/* Price Container */
.price-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Product Detail Page Images and Video */
.product-images-stacked img,
.product-video-container video {
  width: 100%;
  height: 500px;
  /* Consistent height for images and video */
  object-fit: cover;
  /* Ensure content covers the area */
}

/* Product Info Sticky Column */
.product-info-sticky-col {
  position: sticky;
  top: 0;
  /* Stick right at the top of the viewport */
  align-self: flex-start;
  /* Ensures it sticks to the top of its flex container */
  max-height: calc(100vh - 0px);
  /* Constrain height to full viewport height */
  overflow-y: auto;
  /* Enable scrolling for long content */
}

/* Ensure parent row has height for sticky to work within its bounds */
.product-detail-page .row {
  align-items: flex-start;
  /* Align items to the top */
}

/* Product Detail Page - Full Width Container */
.product-detail-page .container {
  max-width: 100%;
  padding-left: 30px;
  padding-right: 30px;
}

/* Product Detail Page - Typography Adjustments */
.product-detail-page h1 {
  margin-bottom: 1rem;
}

.product-detail-page h3 {
  margin-bottom: 1.5rem;
}

.product-detail-page h4 {
  margin-top: 1.5rem;
}

.product-detail-page .lead {
  font-size: calc(1rem - 4px);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.product-detail-page ul li {
  font-size: calc(0.95rem - 4px);
  margin-bottom: 0.5rem;
}

.product-detail-page .product-usage-content {
  font-size: calc(0.95rem - 4px);
  line-height: 1.6;
  text-align: justify;
}

.original-price {
  text-decoration: line-through;
  opacity: 0.6;
}

.current-price {
  font-weight: bold;
}

/* Payment Tabs */
.nav-tabs .nav-link {
  color: #5C3D2E;
  background-color: #EAE0D5;
  border-color: #EAE0D5 #EAE0D5 #C0A080;
}

.nav-tabs .nav-link.active {
  color: #FFFFFF;
  background-color: #C0A080;
  border-color: #C0A080 #C0A080 #C0A080;
}

.nav-tabs {
  border-bottom-color: #C0A080;
}

.btn-secondary {
  background-color: #EAE0D5 !important;
  border-color: #EAE0D5 !important;
  color: #5C3D2E !important;
}

.btn-secondary:hover {
  background-color: #D4C7BD !important;
  /* Slightly darker shade for hover */
  border-color: #D4C7BD !important;
}

.announcement-bar-right-icons a {
  color: #5C3D2E;
}

/* Ensure search and cart icons have the correct color */
.navbar .search-icon-btn,
.navbar .cart-icon-btn {
  color: #5C3D2E;
}

/* Image Lightbox Modal */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.image-lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  transition: transform 0.3s ease;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s ease;
  padding: 0;
  line-height: 1;
}

.lightbox-close:hover {
  color: #C0A080;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(192, 160, 128, 0.8);
  border: none;
  color: #fff;
  font-size: 30px;
  padding: 15px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10000;
  border-radius: 5px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(192, 160, 128, 1);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 15px 25px;
  border-radius: 30px;
  position: relative;
  z-index: 10002;
  /* Ensure controls stay above zoomed image */
}

.zoom-btn {
  background-color: #C0A080;
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.zoom-btn:hover {
  background-color: #5C3D2E;
  transform: scale(1.1);
}

.image-counter {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  margin-left: 10px;
  min-width: 60px;
  text-align: center;
}

/* Responsive adjustments for lightbox */
@media (max-width: 768px) {

  .lightbox-prev,
  .lightbox-next {
    font-size: 24px;
    padding: 10px 15px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 32px;
  }

  .lightbox-controls {
    padding: 10px 15px;
    gap: 10px;
  }

  .zoom-btn {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .image-counter {
    font-size: 14px;
  }
}

.product-image-link {
  text-decoration: none;
  display: block;
  /* Ensure link takes full width of card */
}

/* Discount Badge & Price Styles */
.product-image-container,
.product-image-wrapper {
  position: relative;
  overflow: hidden;
  /* Restore overflow hidden to constraint images */
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #5C3D2E;
  /* Theme Dark Brown */
  color: #fff;

  /* Square Box Styles */
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;

  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 2px;
  z-index: 2;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.current-price {
  font-weight: bold;
  color: #5C3D2E;
  /* Theme color */
}

.original-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 0.5rem;
  font-size: 0.9em;
}

.price-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Personalized Note Placeholder - Lighter Color */
#personalized-note::placeholder {
  color: #bbb;
  opacity: 1;
}

#personalized-note::-webkit-input-placeholder {
  color: #bbb;
  opacity: 1;
}

#personalized-note::-moz-placeholder {
  color: #bbb;
  opacity: 1;
}

#personalized-note:-ms-input-placeholder {
  color: #bbb;
  opacity: 1;
}

/* Personalized Note - Font Size Match with Description */
#personalized-note,
label[for="personalized-note"] {
  font-size: calc(1rem - 4px);
}


.main-content .text-center .lead {
  font-size: calc(1.25rem - 7px);
}

/* Product Cards in Featured Products */
.featured-products .product-card .card-title {
  font-size: calc(1.5rem - 9px);
}

.featured-products .product-card .card-text {
  font-size: calc(1rem - 3px);
}

.featured-products .product-card .btn {
  font-size: calc(1rem - 3px);
}

/* Products Page - Product Card Descriptions */
.product-card .card-text {
  font-size: calc(1rem - 3px);
}

/* Products Page - Product Card Titles */
.product-card .card-title {
  font-size: calc(1.5rem - 9px);
}

/* Image Showcase Section - Match Product Card Title Size */
.image-showcase-section h5 {
  font-size: calc(1.5rem - 9px);
}

.image-showcase-section p {
  font-size: calc(1rem - 3px);
}

/* Heading Topography Fix */
h1 {
  font-size: 1.475rem;
  font-weight: 700;
}

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

h3 {
  font-size: 1.2rem;
  font-weight: 500;
}

h4 {
  font-size: 1rem;
  font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .announcement-bar {
    --announcement-height: 40px;
  }

  .announcement-bar .container {
    padding-left: 12px;
    padding-right: 12px;
    gap: 0.5rem;
  }

  .announcement-bar .announcement-message {
    font-size: 0.8rem;
  }

  .announcement-bar-right-icons {
    gap: 0.35rem;
  }

  .announcement-bar-right-icons a {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.375rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  h4 {
    font-size: 0.95rem;
  }

  /* Fix currency dropdown in mobile navbar */
  .currency-dropdown-mobile .dropdown-menu {
    min-width: 145px !important;
    max-width: 145px !important;
    right: 0 !important;
    left: auto !important;
  }

  .currency-dropdown-mobile .dropdown-menu .dropdown-item {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  /* Add horizontal padding to main content on mobile */
  .main-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Center logo on mobile */
  .navbar .container {
    justify-content: center;
  }

  .navbar-brand {
    flex-grow: 0;
    margin: 0 auto;
  }

  /* Fix cart sidebar width on mobile */
  .cart-sidebar {
    width: 85% !important;
    max-width: 350px !important;
  }

  /* Fix language dropdown in mobile navbar - match currency dropdown styling */
  .language-dropdown-mobile .dropdown-menu {
    min-width: 145px !important;
    max-width: 145px !important;
    right: 0 !important;
    left: auto !important;
  }

  .language-dropdown-mobile .dropdown-menu .dropdown-item {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  /* Fix toast notifications on mobile */
  .position-fixed.top-0.end-0 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.5rem !important;
  }

  .toast {
    width: 100% !important;
    max-width: calc(100vw - 1rem) !important;
    font-size: 0.85rem !important;
  }

  .toast-body {
    padding: 0.5rem !important;
    word-wrap: break-word !important;
  }
}

@media (max-width: 380px) {
  .announcement-bar-right-icons {
    display: none;
  }
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: white;
  z-index: 1050;
  transition: top 0.3s ease;
  overflow-y: auto;
}

.search-modal.active {
  top: 0;
}

.search-modal-content {
  max-width: 800px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.search-modal-body {
  flex: 1;
  overflow-y: auto;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  display: none;
}

.search-overlay.active {
  display: block;
}

/* Search Results */
.search-result-item {
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.search-result-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.search-result-price {
  font-size: 0.9rem;
}
