/* ============================================
   CUSTOM CATEGORY PAGE STYLES
   ============================================ */

/* CATEGORY HERO SECTION */
.custom-category-hero {
  text-align: center;
  padding: 60px 20px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.blog-home .container,
.blog-post .container {
  margin-top: 0px !important;
}

.custom-category-hero {
  text-align: center;
  padding: 60px 20px 20px;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  overflow-x: hidden !important; /* Prevent row overflow */
}

.blog-home .custom-category-hero,
.blog-post .custom-category-hero {
  padding-top: 60px !important;
}

.blog-home #column-right,
.blog-post #column-right {
  margin-top: 20px !important;
}

.custom-category-title {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 0.5px;
  margin: 0 0 25px;
  line-height: 1.2;
  /* Journal 3 ayarlarından renk alacak */
}

.custom-category-hero .blog-logo-title {
  width: 250px;
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

.custom-category-desc {
  margin-top: 20px;
}

.custom-category-desc-text {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 15px;
  max-height: 90px;
  overflow: hidden;
  transition: max-height 0.4s ease;
  /* Journal 3 ayarlarından renk alacak */
}

.custom-category-desc-text.expanded {
  max-height: 1000px !important;
}

.custom-read-more-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0 !important;
  text-decoration: none;
  transition: opacity 0.2s ease;
  user-select: none;

  /* User requested fonts and match category banner module */
  font-family: 'Gowun Dodum', sans-serif !important;
  font-weight: 400;
  font-size: 16px !important;
  color: #7F0B08 !important;
  /* Burgundy color from category banner */
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
}

.custom-read-more-btn:hover {
  opacity: 0.8 !important;
}

.custom-read-more-btn span {
  display: inline-block;
  /* Adjusted spacing for arrow */
  transition: transform 0.3s ease;
  vertical-align: middle;
  /* Ensure vertical alignment */
}

/* SUBCATEGORIES SECTION */
.custom-subcategories-wrapper {
  margin: 0 0 60px;
  padding: 0 15px;
}

.custom-subcategories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.custom-subcat-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.custom-subcat-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.custom-subcat-link {
  display: flex !important;
  align-items: center;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.custom-subcat-image {
  flex: 0 0 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  background: #f5f5f5;
  margin-right: 25px;
}

.custom-subcat-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.custom-subcat-card:hover .custom-subcat-image img {
  transform: scale(1.05);
}

.custom-subcat-content {
  flex: 1;
  padding: 0;
  text-align: left;
}

.custom-subcat-name {
  font-size: 32px;
  font-weight: 300;
  color: #333;
  margin: 0 0 8px;
  line-height: 1.2;
}

.custom-subcat-cta {
  display: inline-block;
  font-size: 16px;
  color: #777;
  font-weight: 400;
  border-bottom: 1px dotted #999;
  padding-bottom: 2px;
  transition: all 0.3s ease;
}

.custom-subcat-card:hover .custom-subcat-cta {
  color: #333;
  border-bottom-color: #333;
}

/* ============================================================
   FILTER BAR - CLEAN & STRONG RESET
   ============================================================ */
#product-category .products-filter,
#product-manufacturer .products-filter,
.products-filter.custom-products-filter {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 15px 0 !important;
  margin: 0 0 30px !important;
  border: 0 none !important;
  border-top: 0 none !important;
  border-bottom: 0 none !important;
  box-shadow: none !important;
  background: transparent !important;
  gap: 15px !important;
}

#product-category .products-filter::before,
#product-category .products-filter::after,
#product-manufacturer .products-filter::before,
#product-manufacturer .products-filter::after,
.products-filter.custom-products-filter::before,
.products-filter.custom-products-filter::after {
  display: none !important;
  content: none !important;
  height: 0 !important;
  width: 0 !important;
}

/* Sol Bölüm - Sıralama ve Limit */
.products-filter.custom-products-filter .custom-left-section {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
}

.products-filter.custom-products-filter .select-group {
  display: flex !important;
  gap: 15px !important;
  align-items: center !important;
}

/* Seçim Kutuları (Sırala & Göster) - Strong Fix */
#product-category .products-filter.custom-products-filter .select-group select.form-control,
#product-manufacturer .products-filter.custom-products-filter .select-group select.form-control,
.products-filter.custom-products-filter select#input-sort,
.products-filter.custom-products-filter select#input-limit {
  border: 1px solid #F2F2F2 !important;
  border-radius: 12px !important;
  height: 40px !important;
  width: 115px !important;
  min-width: 115px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  color: #3D4550 !important;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%233D4550" d="M6 9L1 4h10z"/></svg>') no-repeat right 12px center !important;
  background-size: 10px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.products-filter.custom-products-filter .select-group .input-group-addon {
  background: transparent !important;
  border: none !important;
  color: #3D4550 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.products-filter.custom-products-filter .select-group .input-group {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
}

/* Sağ Bölüm - Sonuç Metni ve Butonlar */
.products-filter.custom-products-filter .custom-right-section {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 20px !important;
  margin-left: auto !important;
}

.products-filter.custom-products-filter .custom-results-text {
  font-size: 13px !important;
  color: #3D4550 !important;
  white-space: nowrap !important;
  line-height: normal !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.products-filter.custom-products-filter .grid-list {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

/* Görünüm Butonları - Circular Style */
.products-filter.custom-products-filter .grid-list .view-btn {
  width: 38px !important;
  height: 38px !important;
  background: #fff !important;
  border: 1px solid #E5E7EB !important; /* Light border */
  border-radius: 50% !important; /* Circular */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.products-filter.custom-products-filter .grid-list .view-btn::before {
  font-family: 'icomoon' !important;
  font-size: 16px !important;
  color: #374957 !important;
}

.products-filter.custom-products-filter .grid-list .view-btn.active {
  background: #f9fafb !important;
  border-color: #374957 !important;
}

.products-filter.custom-products-filter .grid-list .view-btn.active::before {
  color: #374957 !important; /* Keep icon color dark when active */
}

.products-filter.custom-products-filter .grid-list .compare-btn {
  margin-left: 10px !important;
  font-size: 13px !important;
  color: #3D4550 !important;
  text-decoration: none !important;
}


/* Pagination - Sadece Ortada */
.pagination-results {
  margin-top: 30px;
}

.pagination-results .text-center {
  display: flex;
  justify-content: center;
}

/* RESPONSIVE DESIGN */
@media (max-width: 991px) {

  #product-category .products-filter,
  #product-manufacturer .products-filter,
  .products-filter.custom-products-filter {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important; /* Change from space-between to prevent pushing right */
    align-items: center !important;
    gap: 10px !important;
    padding-bottom: 20px !important;
    overflow: hidden !important;
  }

  /* Left Section (Inputs) - Force LEFT */
  #product-category .products-filter .custom-left-section,
  #product-manufacturer .products-filter .custom-left-section,
  .products-filter.custom-products-filter .custom-left-section {
    order: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    margin-right: auto !important;
    /* Push siblings to the right */
    margin-left: 0 !important;
    /* Ensure no left margin */
    flex: 0 1 auto !important;
  }

  /* Right Section (Wrapper) - Unwrap */
  #product-category .products-filter .custom-right-section,
  #product-manufacturer .products-filter .custom-right-section,
  .products-filter.custom-products-filter .custom-right-section {
    display: contents !important;
  }

  /* Grid/List Buttons - Force RIGHT */
  #product-category .products-filter .custom-right-section .grid-list,
  #product-manufacturer .products-filter .custom-right-section .grid-list,
  .products-filter.custom-products-filter .custom-right-section .grid-list {
    order: 2 !important;
    display: flex !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #product-category .products-filter .custom-right-section .custom-results-text,
  #product-manufacturer .products-filter .custom-right-section .custom-results-text,
  .products-filter.custom-products-filter .custom-right-section .custom-results-text {
    order: 3 !important;
    width: 100% !important;
    text-align: left !important; /* Changed from center to left based on user request */
    margin-top: 10px !important;
    flex-basis: 100% !important;
  }

  /* Inner elements styling */
  #product-category .products-filter .select-group,
  #product-manufacturer .products-filter .select-group,
  .products-filter.custom-products-filter .select-group {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: center !important;
  }

  #product-category .products-filter .select-group .input-group,
  #product-manufacturer .products-filter .select-group .input-group,
  .products-filter.custom-products-filter .select-group .input-group {
    width: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  #product-category .products-filter .select-group .input-group-addon,
  #product-manufacturer .products-filter .select-group .input-group-addon,
  .products-filter.custom-products-filter .select-group .input-group-addon {
    display: none !important;
  }

  #product-category .products-filter .select-group .form-control,
  #product-manufacturer .products-filter .select-group .form-control,
  .products-filter.custom-products-filter .select-group .form-control {
    min-width: 90px !important;
    width: auto !important;
    padding: 0 5px !important;
    height: 35px !important;
  }
}

/* DESKTOP (992px+): Sonuç metnini ikonların soluna al */
@media (min-width: 992px) {
  .products-filter.custom-products-filter .custom-right-section .custom-results-text {
    order: 1 !important;
    width: auto !important;
    flex-basis: auto !important;
    margin-right: 15px !important;
    text-align: left !important;
    margin-top: 0 !important;
  }

  .products-filter.custom-products-filter .custom-right-section .grid-list {
    order: 2 !important;
    margin-left: 0 !important;
  }
}


/* RESPONSIVE DESIGN */
@media (max-width: 991px) {
  .custom-category-title {
    font-size: 38px;
  }

  .custom-subcategories-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .custom-category-hero {
    padding: 40px 15px 30px;
  }

  .custom-category-title {
    font-size: 32px;
  }

  .custom-category-desc-text {
    font-size: 15px;
  }

  .custom-subcategories-grid {
    grid-template-columns: 1fr;
  }

  .custom-subcat-image {
    flex: 0 0 100px;
    height: 100px;
    margin-right: 15px;
  }

  .custom-subcat-name {
    font-size: 20px;
  }

  .custom-breadcrumb {
    font-size: 11px;
  }
}

/* HIDE ORIGINAL ELEMENTS */
/* Breadcrumb'ı gizleme - artık kullanıyoruz */

/* Page title'ı gizle - custom hero'da gösteriyoruz */
#product-category .title.page-title,
#product-manufacturer .title.page-title,
#information-information .title.page-title,
#information-contact .title.page-title,
#information-sitemap .title.page-title,
[id^="account-"] .title.page-title,
#checkout-checkout .page-title,
#checkout-checkout .page-title-wrapper,
#checkout-checkout h1.page-title,
#checkout-cart .title.page-title,
.blog-home .title.page-title,
.blog-post .title.page-title,
#product-special .title.page-title,
.breadcrumbs+.title.page-title,
.breadcrumbs~.title.page-title {
  display: none !important;
}

/* ENSURE COMPATIBILITY */
#product-category .title.page-title:not(.custom-category-title),
#product-manufacturer .title.page-title:not(.custom-category-title),
#information-information .title.page-title:not(.custom-category-title) {
  display: none !important;
}

#product-manufacturer .seo_brand_desc,
#product-manufacturer .seo_brand_desc+hr {
  display: none !important;
}

.category-description:not(.custom-category-hero) {
  display: none !important;
}


/* ============================================
   SIDEBAR UNIFIED CARD STYLING
   ============================================ */

/* Make sidebar look like one unified card */
#product-manufacturer .column-left .grid-rows {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

/* Remove individual module box styling */
#product-manufacturer .column-left .grid-col {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

#product-manufacturer .column-left .grid-item {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin-bottom: 0 !important;
}

#product-manufacturer .column-left .module {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
}

/* Image module: padding around image */
#product-manufacturer .column-left .module-image .module-body {
  padding: 20px 20px 0;
}

#product-manufacturer .column-left .module-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Title module: padding */
#product-manufacturer .column-left .title-module .title-wrapper {
  padding: 16px 20px 20px;
}

/* Hide divider and subtitle inside title module */
#product-manufacturer .column-left .title-divider,
#product-manufacturer .column-left .title-module .subtitle:empty {
  display: none !important;
}

/* Integrated socials inside title-wrapper */
.sidebar-socials-integrated {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f3f3f3;
}

.sidebar-socials-integrated {
  margin-bottom: 40px;
}

.sidebar-socials-integrated .manufacturer-socials__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: flex-start;
}

/* No extra margin needed here, handled by .sidebar-socials-integrated */

/* Hide original social module grid-col after integration */
.sidebar-socials-hidden {
  display: none !important;
}

/* Hide admin edit buttons in sidebar */
#product-manufacturer .column-left .admin-edit {
  display: none !important;
}

/* Sidebar Description Styling */
.custom-category-desc.sidebar-processed {
  margin-top: 15px;
  padding: 0 5px;
  text-align: left;
}

.custom-category-desc.sidebar-processed .custom-category-desc-text {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 10px;
  max-height: 120px;
  /* Slightly taller for sidebar */
}

/* Adjust read more button for sidebar */
.custom-category-desc.sidebar-processed .custom-read-more-btn {
  font-size: 13px;
  padding: 0;
}

/* Remove center alignment if inherited */
.column-left .custom-category-desc {
  text-align: left;
}

/* Manufacturer List SVG Styling */
.image-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  height: 100%;
}

.image-card img {
  margin-bottom: 10px;
}

.manufacturer-desc-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin-top: auto;
}

.manufacturer-desc-container span:first-child {
  flex-grow: 0;
  text-align: center;
  font-weight: 600;
}

/* Göz ikonu gizle */
.manufacturer-arrow-icon {
  display: none !important;
}

/* Mobile Title Visibility Force */
@media (min-width: 1025px) {
  #product-manufacturer .custom-category-hero[data-manufacturer] .custom-category-title {
    display: none !important;
    /* Hide on desktop as it is in sidebar likely */
  }
}

/* Hero Manufacturer Image & Socials (Tablet/Mobile) */
.hero-manufacturer-image {
  display: block;
  margin: 0 auto 20px;
  max-width: 180px;
}

@media (min-width: 1025px) {
  .hero-manufacturer-image,
  .hero-socials {
    display: none !important;
  }
}

/* Hide sidebars on manufacturer page for Tablet/Mobile */
@media (max-width: 1024px) {
  #product-manufacturer {
    overflow-x: hidden !important;
  }

  #product-manufacturer .column-left,
  #product-manufacturer .column-right,
  #product-manufacturer aside.side-column,
  #product-manufacturer #column-left {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
  }

  #product-manufacturer #content.col-sm-9,
  #product-manufacturer #content.col-sm-6 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-right: 30px !important;
    overflow-x: hidden !important;
  }
}

.hero-manufacturer-image img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  border: 1px solid #f0f0f0;
}

/* Hero Socials (Mobile/Tablet - cloned from sidebar) */
.hero-socials {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f1f1f1;
}

.hero-socials .manufacturer-socials__list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: flex-start;
}



/* ============================================
   CUSTOM OVERLAY BUTTONS (GRID VIEW)
   ============================================ */

/* Sepete ekle ve favoriler hover butonları kapalı */
.custom-overlay-buttons,
#product-category .custom-overlay-buttons,
#product-category .product-thumb:hover .custom-overlay-buttons {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Hide original buttons wrapper in grid view */
#product-category .product-layout.product-grid .buttons-wrapper,
#product-manufacturer .product-layout.product-grid .buttons-wrapper {
  display: none !important;
}

/* Hide extra-group if needed */
#product-category .product-layout.product-grid .extra-group,
#product-manufacturer .product-layout.product-grid .extra-group {
  display: none !important;
}

/* ============================================
   CUSTOM PAGINATION STYLES
   ============================================ */

/* Target the 'Next' link specifically 
   Since it's the last li in the ul (only Next button remains)
   or use text content selector if needed, but last-child is safer here.
   Note: Pagination structure is ul.pagination > li > a
*/

/* Target the 'Next' link specifically */
.pagination>li>a,
.pagination>li>span {
  border-radius: 50% !important;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 5px;
  border: 1px solid #374957 !important;
  color: #374957 !important;
  background: transparent !important;
  font-family: 'icomoon', sans-serif !important;
  /* In case arrows need icon font, but we use html entity */
  font-size: 14px !important;
  line-height: normal !important;
}

.pagination>li.active>span {
  background-color: #374957 !important;
  color: #fff !important;
  border-color: #374957 !important;
}

/* Specific fix for the Next button if it has a different class or is last */
.pagination>li:last-child>a {
  border-radius: 50% !important;
  border: 1px solid #374957 !important;
}

/* Remove default background on hover and apply ours */
.pagination>li>a:hover {
  background-color: #f5f5f5 !important;
  color: #374957 !important;
}

/* ============================================
   AUTO CAROUSEL BULLET PAGINATION
   ============================================ */

/* Hide Original Journal3 Carousel Controls (Arrows & Bar) Only on Category Pages */
body.product-category .auto-carousel-controls,
body.product-category .auto-carousel-bar,
body.product-category .auto-carousel-buttons {
  display: none !important;
}

/* Bullet Pagination Container */
.auto-carousel-bullets {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  width: 100%;
}

/* Individual Bullet */
.auto-carousel-bullet {
  width: 9px;
  height: 9px;
  background-color: #E5E7EB;
  /* Light grey */
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Active Bullet */
.auto-carousel-bullet.active {
  background-color: #475569;
  /* Dark grey like the screenshot */
  transform: scale(1.1);
}

/* Hover effect for inactive bullets */
.auto-carousel-bullet:not(.active):hover {
  background-color: #CBD5E1;
}

/* Snap Items to prevent partial cut-offs */
body.product-category .auto-grid-items {
  scroll-snap-type: x mandatory;
}

body.product-category .auto-grid-items>* {
  scroll-snap-align: start;
}

/* ============================================
   CATEGORY PAGE - TÜM HOVER BUTONLARI KAPAT
   (Sepete Ekle, Favoriler, Karşılaştır, Quickview)
   ============================================ */

/* Journal3 native product thumb hover butonları */
#product-category .product-thumb .buttons-wrapper,
#product-category .product-thumb .button-group,
#product-category .product-thumb .product-action,
#product-category .product-thumb .product-buttons,
#product-category .product-thumb .btn-cart,
#product-category .product-thumb .btn-wishlist,
#product-category .product-thumb .btn-compare,
#product-category .product-thumb .btn-quickview,
#product-category .product-thumb .product-extra-group,
#product-category .product-thumb .extra-group,
#product-category .product-thumb [class*="btn-overlay"],
#product-category .product-thumb .product-overlay .buttons {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Hover durumunda da gizli kalsın */
#product-category .product-thumb:hover .buttons-wrapper,
#product-category .product-thumb:hover .button-group,
#product-category .product-thumb:hover .product-action,
#product-category .product-thumb:hover .product-buttons,
#product-category .product-thumb:hover .btn-cart,
#product-category .product-thumb:hover .btn-wishlist,
#product-category .product-thumb:hover .btn-compare,
#product-category .product-thumb:hover .btn-quickview,
#product-category .product-thumb:hover .product-extra-group,
#product-category .product-thumb:hover .extra-group,
#product-category .product-thumb:hover [class*="btn-overlay"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ============================================
   MANUFACTURER INFO MODAL (POPUP)
   ============================================ */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-modal-container {
  background: #fff;
  width: 95%;
  max-width: 820px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.custom-modal-overlay.active .custom-modal-container {
  transform: translateY(0);
}

.custom-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #374151;
  cursor: pointer;
  z-index: 10;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.custom-modal-close:hover {
  opacity: 1;
}

.custom-modal-content {
  display: flex;
  flex-direction: row;
  min-height: 400px;
}

.custom-modal-left {
  flex: 0 0 42%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 40px 40px;
}

.modal-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.custom-modal-right {
  flex: 1;
  padding: 40px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-manufacturer-title {
  font-family: 'Gowun Dodum', sans-serif !important;
  font-size: 26px !important;
  color: #000 !important;
  margin: 0 0 15px 0 !important;
  font-weight: 500 !important;
  line-height: 1.2;
}

.modal-manufacturer-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #6B7280;
  margin-bottom: 25px;
  flex-grow: 1;
  overflow-y: auto;
  max-height: 250px;
  padding-right: 15px;
}

.modal-manufacturer-socials {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.modal-manufacturer-socials a,
.modal-manufacturer-socials i,
.modal-manufacturer-socials em {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  border: 1px solid #F3F4F6 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #374151 !important;
  font-size: 18px !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  background: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
}

.modal-manufacturer-socials a:hover {
  border-color: #7F0B08 !important;
  color: #7F0B08 !important;
  background: #fdf2f2 !important;
}

/* Modal Açıkken Sayfa Scroll Engelleme */
body.modal-open {
  overflow: hidden;
}

/* RESPONSIVE - Mobil Popup */
@media (max-width: 767px) {
  .custom-modal-overlay {
    align-items: flex-end;
  }

  .custom-modal-container {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .custom-modal-overlay.active .custom-modal-container {
    transform: translateY(0);
  }

  .custom-modal-overlay .custom-modal-container {
    transform: translateY(100%);
  }

  .custom-modal-close {
    position: sticky;
    top: 0;
    right: 0;
    align-self: flex-end;
    z-index: 10;
    padding: 12px 16px;
    font-size: 28px;
    background: transparent;
  }

  .custom-modal-content {
    flex-direction: column;
    min-height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }

  .custom-modal-left {
    flex: 0 0 auto;
    padding: 0 24px;
  }

  .modal-image-wrapper {
    width: 140px;
    height: 140px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
  }

  .custom-modal-right {
    padding: 20px 24px 24px;
    text-align: center;
  }

  .modal-manufacturer-title {
    font-size: 22px !important;
    margin: 0 0 12px 0 !important;
  }

  .modal-manufacturer-desc {
    font-size: 14px;
    line-height: 1.65;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    margin-bottom: 20px;
    text-align: left;
  }

  .modal-manufacturer-socials {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f1f1;
  }

  .modal-manufacturer-socials a {
    width: 44px !important;
    height: 44px !important;
  }

  .modal-manufacturer-socials .social-svg {
    width: 44px !important;
    height: 44px !important;
  }
}
/* ============================================
   OFF-CANVAS DESKTOP FILTER
   ============================================ */
/* Off-Canvas Filter Panel (Desktop + Mobile) */
.desktop-filter-wrapper {
  position: fixed !important;
  top: 0 !important;
  left: -100% !important;
  width: 400px !important;
  height: 100% !important;
  min-height: 100vh !important;
  background: #fff !important;
  z-index: 9999999 !important;
  box-shadow: 2px 0 15px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow-y: auto;
  padding: 30px 25px !important;
  margin: 0 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 2px solid #4F6031 !important;
}

.desktop-filter-wrapper.active {
  left: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Circular Filter Trigger Button */
.desktop-filter-trigger {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  outline: none !important;
}

.desktop-filter-trigger i {
  font-size: 16px !important;
  color: #374957 !important;
  margin: 0 !important;
}

.desktop-filter-trigger:hover {
  background: #f9fafb !important;
  border-color: #374957 !important;
  transform: translateY(-2px);
}

/* Backdrop */
.filter-sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 9999998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.filter-sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scroll when filter is open */
body.custom-filter-sidebar-active {
  overflow: hidden !important;
}

/* REINFORCE LAYOUT FLOW */
@media (min-width: 992px) {
  #product-category #content {
    display: block !important;
  }

  .main-products-wrapper,
  .grid-cols-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    flex: none !important;
  }
}

/* Mobile: narrower panel */
@media (max-width: 991px) {
  .desktop-filter-wrapper {
    width: 345px !important;
  }

  .desktop-filter-trigger {
    width: 34px !important;
    height: 34px !important;
  }

  .desktop-filter-trigger i {
    font-size: 14px !important;
  }
}

/* Filter Header & Close Button */
.desktop-filter-wrapper .module-title {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    font-size: 20px !important;
  	color: #333 !important;
}

.desktop-filter-wrapper .module-title .filter-title-text {
    font-weight: 500 !important;
}

.desktop-filter-wrapper .module-title .x {
    display: block !important;
    width: 24px;
    height: 24px;
    position: relative;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.desktop-filter-wrapper .module-title .x:hover {
    opacity: 1;
}

.desktop-filter-wrapper .module-title .x::before,
.desktop-filter-wrapper .module-title .x::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: #333;
}

.desktop-filter-wrapper .module-title .x::before { transform: translate(-50%, -50%) rotate(45deg); }
.desktop-filter-wrapper .module-title .x::after { transform: translate(-50%, -50%) rotate(-45deg); }


/* Styling for when manufacturer socials are missing */
.no-socials-grid.grid-item.grid-module-column-left-1-2-1 {
    margin-bottom: 50px !important;
    padding-bottom: 50px !important;
}
/* Breadcrumb separator fix for account, cart and checkout */
.account-page .breadcrumb li + li::before,
.cart-page .breadcrumb li + li::before,
.checkout-page .breadcrumb li + li::before,
[id^="account-"] .breadcrumb li + li::before,
#checkout-cart .breadcrumb li + li::before,
#checkout-checkout .breadcrumb li + li::before {
  content: "/" !important;
}

/* Checkout coupon/voucher/reward input-button height alignment */
#checkout-checkout .section-cvr .input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

#checkout-checkout .section-cvr .input-group .form-control,
#checkout-checkout .section-cvr .input-group .input-group-btn,
#checkout-checkout .section-cvr .input-group .input-group-btn .btn,
#checkout-checkout .section-cvr .input-group .input-group-btn input.btn {
  height: 40px;
}

#checkout-checkout .section-cvr .input-group .form-control {
  flex: 1 1 auto;
}

#checkout-checkout .section-cvr .input-group .input-group-btn {
  display: flex;
  flex: 0 0 104px;
  width: 104px;
}

#checkout-checkout .section-cvr .input-group .input-group-btn .btn,
#checkout-checkout .section-cvr .input-group .input-group-btn input.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
  white-space: nowrap;
}

/* Only the title stays centered within its hero section */
.custom-category-hero {
    text-align: center !important;
    width: 100% !important;
}

.custom-category-title {
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    text-align: center !important;
}
