/*
Theme Name: Targoweb Theme
Theme URI: https://sladkarnica-polidesi.com/
Author: r00t & Antigravity
Author URI: http://localhost:3000
Description: Официална реплика и стилизация на сладкарска тема с палитра на Сладкарница "Поли Деси". Включва автентични цветове, пастелни тонове, стил на Elementor Pro контейнери и пълна поддръжка за кастомизация.
Version: 1.0.0
Text Domain: targoweb-theme
Domain Path: /languages
*/
/* Fonts loaded with preconnect in header.php for optimal performance */

:root {
  --mrg-primary: #f35aa2;
  --mrg-primary-hover: #d83d86;
  --mrg-secondary: #4cb19e;
  --mrg-secondary-hover: #3b9181;
  --mrg-accent: #fcb0b1;
  --mrg-bg: #fffafd;
  --mrg-bg-soft: #fde5ea;
  --mrg-bg-card: #ffffff;
  --mrg-text: #150f11;
  --mrg-text-muted: #665b60;
  --mrg-text-light: #9c8e94;
  --mrg-border: #f3d4dc;
  
  --mrg-font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mrg-container-max: 1320px;
  --mrg-radius-sm: 8px;
  --mrg-radius-md: 16px;
  --mrg-radius-lg: 28px;
  --mrg-radius-pill: 9999px;
  
  --mrg-shadow-card: 0 10px 30px -10px rgba(243, 90, 162, 0.12), 0 4px 12px rgba(21, 15, 17, 0.04);
  --mrg-shadow-hover: 0 20px 40px -12px rgba(243, 90, 162, 0.22), 0 8px 18px rgba(21, 15, 17, 0.06);
  --mrg-shadow-header: 0 4px 20px rgba(21, 15, 17, 0.06);
  
  --mrg-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--mrg-font-family);
  background-color: var(--mrg-bg);
  color: var(--mrg-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--mrg-transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--mrg-text);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw + 0.5rem, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw + 0.2rem, 1.8rem); }
h4 { font-size: 1.3rem; }

p {
  margin-bottom: 1rem;
  color: var(--mrg-text-muted);
}

/* Layout Utilities */
.mrg-container {
  width: 100%;
  max-width: var(--mrg-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.mrg-section {
  padding: 80px 0;
  position: relative;
}

@media (max-width: 768px) {
  .mrg-section { padding: 48px 0; }
  .mrg-container { padding-left: 16px; padding-right: 16px; }
}

/* Category Selection Hub Cards */
.mrg-cat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

.mrg-category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #ffffff;
  border: 1.5px solid #ebd0d8;
  border-radius: 18px;
  padding: 18px 20px;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.25s ease,
              background 0.25s ease;
  box-shadow: 0 4px 15px rgba(93, 35, 101, 0.04);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.mrg-category-card:hover {
  transform: translateY(-4px);
  border-color: var(--mrg-primary, #c71d89);
  box-shadow: 0 12px 28px rgba(199, 29, 137, 0.15);
  background: #fffafa;
}

.mrg-category-card.active {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
  border-color: var(--mrg-primary, #c71d89);
  box-shadow: 0 8px 24px rgba(199, 29, 137, 0.2);
}

.mrg-category-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.mrg-category-card:hover .mrg-category-card-icon {
  transform: scale(1.15);
}

.mrg-category-card-title {
  font-family: var(--mrg-font-heading, 'Montserrat', sans-serif);
  font-size: 16px;
  font-weight: 800;
  color: #32133a;
  margin-bottom: 4px;
}

.mrg-category-card-desc {
  font-size: 12px;
  color: #806574;
  line-height: 1.4;
  flex: 1;
}

.mrg-category-card-badge {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mrg-primary, #c71d89);
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #f3d4dc;
  transition: all 0.25s ease;
}

.mrg-category-card.active .mrg-category-card-badge {
  background: var(--mrg-primary, #c71d89);
  color: #ffffff;
  border-color: var(--mrg-primary, #c71d89);
}

/* Top Announcement Bar - Moving Slider with Fade In & Fade Out */
.mrg-topbar {
  background: var(--mrg-bg-soft, #fff0dc);
  color: var(--mrg-text, #5d2365);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid rgba(93, 35, 101, 0.1);
  overflow: hidden;
  position: relative;
  z-index: 1001;
}

.mrg-topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 28px;
}

.mrg-topbar-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.mrg-topbar-slider {
  position: relative;
  overflow: hidden;
  height: 26px;
  flex: 1;
  min-width: 0;
  /* Visual Fade In & Fade Out gradient masks on both left and right edges */
  mask-image: linear-gradient(90deg, transparent 0%, black 18px, black calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 18px, black calc(100% - 18px), transparent 100%);
}

.mrg-topbar-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.mrg-topbar-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(36px, 0, 0);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.mrg-topbar-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  z-index: 2;
}

.mrg-topbar-slide.slide-out-left {
  opacity: 0;
  transform: translate3d(-36px, 0, 0);
  z-index: 1;
}

.mrg-topbar-slide.slide-in-right {
  opacity: 0;
  transform: translate3d(36px, 0, 0);
}

.mrg-topbar-slide.slide-out-right {
  opacity: 0;
  transform: translate3d(36px, 0, 0);
  z-index: 1;
}

.mrg-topbar-slide.slide-in-left {
  opacity: 0;
  transform: translate3d(-36px, 0, 0);
}

/* Subtle Arrows */
.mrg-topbar-arrow {
  background: transparent;
  border: 1px solid rgba(93, 35, 101, 0.18);
  color: currentColor;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  opacity: 0.65;
  flex-shrink: 0;
}

.mrg-topbar-arrow:hover {
  opacity: 1;
  background: rgba(199, 29, 137, 0.12);
  color: var(--mrg-primary, #c71d89);
  border-color: var(--mrg-primary, #c71d89);
  transform: scale(1.1);
}

.mrg-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Ticker mode option */
.mrg-topbar-slider[data-mode="ticker"] .mrg-topbar-track {
  display: inline-flex;
  width: max-content;
  animation: mrgTopMarquee 26s linear infinite;
}

.mrg-topbar-slider[data-mode="ticker"]:hover .mrg-topbar-track {
  animation-play-state: paused;
}

.mrg-topbar-slider[data-mode="ticker"] .mrg-topbar-slide {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  display: inline-flex;
  padding-right: 48px;
}

@keyframes mrgTopMarquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 768px) {
  .mrg-topbar-content {
    flex-direction: column;
    gap: 6px;
    padding: 2px 0;
  }
  .mrg-topbar-slider-wrap {
    width: 100%;
    justify-content: center;
  }
  .mrg-topbar-slide {
    justify-content: center;
    font-size: 12px;
  }
}

/* Sticky Header */
.mrg-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(243, 212, 220, 0.5);
  transition: var(--mrg-transition);
}

.mrg-header.scrolled {
  box-shadow: var(--mrg-shadow-header);
}

.mrg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
}

.mrg-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.mrg-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.mrg-nav a {
  font-weight: 600;
  font-size: 15px;
  color: var(--mrg-text);
  position: relative;
  padding: 8px 0;
}

.mrg-nav a:hover,
.mrg-nav a.active {
  color: var(--mrg-primary);
}

.mrg-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--mrg-primary);
  transition: var(--mrg-transition);
  border-radius: 2px;
}

.mrg-nav a:hover::after,
.mrg-nav a.active::after {
  width: 100%;
}

.mrg-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons */
.mrg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--mrg-radius-pill);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--mrg-transition);
  text-align: center;
}

.mrg-btn-primary {
  background: var(--mrg-primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(243, 90, 162, 0.35);
}

.mrg-btn-primary:hover {
  background: var(--mrg-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 90, 162, 0.45);
}

.mrg-btn-outline {
  background: transparent;
  border-color: var(--mrg-primary);
  color: var(--mrg-primary);
}

.mrg-btn-outline:hover {
  background: var(--mrg-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.mrg-btn-secondary {
  background: var(--mrg-secondary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(76, 177, 158, 0.35);
}

.mrg-btn-secondary:hover {
  background: var(--mrg-secondary-hover);
  transform: translateY(-2px);
}

.mrg-btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

/* Cart Icon Button */
.mrg-cart-btn {
  position: relative;
  background: var(--mrg-bg-soft);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--mrg-primary);
  transition: var(--mrg-transition);
}

.mrg-cart-btn:hover {
  background: var(--mrg-primary);
  color: #ffffff;
}

.mrg-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--mrg-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.mrg-cart-btn:hover .mrg-cart-count {
  background: var(--mrg-secondary);
}

/* Badges */
.mrg-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--mrg-radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mrg-badge-pink {
  background: var(--mrg-bg-soft);
  color: var(--mrg-primary);
}

.mrg-badge-green {
  background: #e8f7f4;
  color: var(--mrg-secondary);
}

/* Footer */
.mrg-footer {
  background: #ffffff;
  border-top: 1px solid var(--mrg-border);
  padding: 70px 0 30px;
  color: var(--mrg-text);
}

.mrg-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 50px;
}

@media (max-width: 992px) {
  .mrg-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
  .mrg-footer-grid { grid-template-columns: 1fr; }
}

.mrg-footer h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--mrg-text);
  position: relative;
  display: inline-block;
}

.mrg-footer h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--mrg-primary);
  margin-top: 6px;
  border-radius: 2px;
}

.mrg-footer ul {
  list-style: none;
}

.mrg-footer ul li {
  margin-bottom: 12px;
}

.mrg-footer ul li a {
  color: var(--mrg-text-muted);
  font-size: 14px;
}

.mrg-footer ul li a:hover {
  color: var(--mrg-primary);
  padding-left: 4px;
}

.mrg-footer-bottom {
  border-top: 1px solid var(--mrg-border);
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--mrg-text-light);
}

.mrg-social-links {
  display: flex;
  gap: 12px;
}

.mrg-social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--mrg-bg-soft);
  color: var(--mrg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--mrg-transition);
}

.mrg-social-icon:hover {
  background: var(--mrg-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Mobile Nav Toggle */
.mrg-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mrg-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--mrg-text);
  margin: 5px 0;
  transition: var(--mrg-transition);
}

@media (max-width: 992px) {
  .mrg-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 24px;
    box-shadow: var(--mrg-shadow-card);
    border-top: 1px solid var(--mrg-border);
  }
  .mrg-nav.active { display: flex; }
  .mrg-burger { display: block; }
}

/* ==========================================================================
   PORTRAIT CATEGORY SHOWCASE (/torti/)
   ========================================================================== */
.mrg-torti-hero-section {
  background: linear-gradient(135deg, #fff2f7 0%, #fff8fb 50%, #ffffff 100%);
  padding: 55px 0 70px 0;
  border-bottom: 1px solid var(--mrg-border);
}

.mrg-torti-header-box {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 45px auto;
}

.mrg-torti-page-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--mrg-text);
  margin: 12px 0 16px 0;
  letter-spacing: -0.5px;
}

.mrg-torti-page-subtitle {
  font-size: 17px;
  color: var(--mrg-text-muted);
  line-height: 1.65;
  margin: 0;
}

.mrg-portrait-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.mrg-portrait-cat-card {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 440px;
  border-radius: 26px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(20, 5, 25, 0.08);
  border: 2px solid transparent;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mrg-portrait-cat-card:hover,
.mrg-portrait-cat-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 22px 48px rgba(199, 29, 137, 0.22);
  border-color: rgba(199, 29, 137, 0.45);
  outline: none;
}

.mrg-portrait-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}

.mrg-portrait-cat-card:hover .mrg-portrait-card-bg {
  transform: scale(1.08);
}

.mrg-portrait-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 5, 25, 0.04) 0%, rgba(20, 5, 25, 0.35) 45%, rgba(15, 2, 20, 0.94) 100%);
  z-index: 2;
  transition: background 0.35s ease;
}

.mrg-portrait-cat-card:hover .mrg-portrait-card-overlay {
  background: linear-gradient(180deg, rgba(20, 5, 25, 0.02) 0%, rgba(20, 5, 25, 0.3) 40%, rgba(15, 2, 20, 0.96) 100%);
}

.mrg-portrait-card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
}

.mrg-count-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #c71d89;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.2px;
}

.mrg-portrait-card-content {
  position: relative;
  z-index: 3;
  padding: 28px 24px;
  color: #ffffff;
}

.mrg-portrait-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.mrg-portrait-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  line-height: 1.25;
}

.mrg-portrait-desc {
  font-size: 13.5px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 18px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mrg-portrait-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffb8e4;
  transition: transform 0.25s ease, color 0.25s ease;
}

.mrg-portrait-action .mrg-arrow {
  transition: transform 0.25s ease;
}

.mrg-portrait-cat-card:hover .mrg-portrait-action {
  color: #ffffff;
}

.mrg-portrait-cat-card:hover .mrg-portrait-action .mrg-arrow {
  transform: translateX(6px);
}

/* ==========================================================================
   TORTI PRODUCTS SECTION & ACTIVE BAR
   ========================================================================== */
.mrg-torti-products-section {
  background: var(--mrg-bg);
  padding: 45px 0 80px 0;
  animation: mrgFadeIn 0.35s ease;
}

.mrg-category-active-bar {
  background: #ffffff;
  border-radius: 22px;
  padding: 22px 28px;
  margin-bottom: 35px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--mrg-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mrg-back-to-cats-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fbf0f6;
  color: #c71d89;
  border: 1px solid #f6d2e6;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mrg-back-to-cats-btn:hover {
  background: #c71d89;
  color: #ffffff;
  border-color: #c71d89;
  transform: translateX(-4px);
}

.mrg-active-cat-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.mrg-active-cat-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--mrg-text);
  margin: 0;
}

.mrg-active-cat-count {
  font-size: 14px;
  font-weight: 700;
  color: #c71d89;
  background: #fbf0f6;
  padding: 4px 12px;
  border-radius: 999px;
}

.mrg-quick-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mrg-quick-pill {
  background: #f5f5f7;
  border: 1px solid transparent;
  color: var(--mrg-text);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mrg-quick-pill:hover {
  background: #eee;
  transform: translateY(-1px);
}

.mrg-quick-pill.active {
  background: #c71d89;
  color: #ffffff;
  border-color: #c71d89;
}

.mrg-torti-custom-banner {
  margin-top: 65px;
  background: linear-gradient(135deg, #fff0f6 0%, #ffeaf3 100%);
  border-radius: 24px;
  padding: 45px 35px;
  text-align: center;
  border: 1px solid #f6c8de;
}

.mrg-custom-banner-content h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--mrg-text);
  margin: 0 0 12px 0;
}

.mrg-custom-banner-content p {
  max-width: 640px;
  margin: 0 auto 26px auto;
  font-size: 16px;
  color: var(--mrg-text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   PRODUCT ZOOM-IN MODAL (SPRING EFFECT)
   ========================================================================== */
.mrg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 5, 22, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.mrg-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mrg-product-modal {
  background: #ffffff;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
  position: relative;
  overflow: hidden;
  transform: scale(0.82) translateY(24px);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.26s ease;
}

.mrg-modal-overlay.active .mrg-product-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.mrg-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f3f6;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #444;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mrg-modal-close:hover {
  background: #c71d89;
  color: #ffffff;
  transform: rotate(90deg) scale(1.08);
}

.mrg-modal-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  max-height: 90vh;
  overflow-y: auto;
}

.mrg-modal-image-col {
  background: #fbf8fa;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--mrg-border);
}

.mrg-modal-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  margin-bottom: 22px;
}

.mrg-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mrg-modal-img:hover {
  transform: scale(1.06);
}

.mrg-modal-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.mrg-modal-trust-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.mrg-modal-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #f0e6ec;
}

.mrg-trust-icon {
  font-size: 20px;
}

.mrg-modal-trust-item strong {
  display: block;
  font-size: 13px;
  color: var(--mrg-text);
}

.mrg-modal-trust-item small {
  font-size: 11.5px;
  color: var(--mrg-text-muted);
}

.mrg-modal-info-col {
  padding: 36px 32px 32px 32px;
  display: flex;
  flex-direction: column;
}

.mrg-modal-cat-tag {
  font-size: 13px;
  font-weight: 700;
  color: #c71d89;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.mrg-modal-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--mrg-text);
  margin: 0 0 12px 0;
  line-height: 1.25;
}

.mrg-modal-desc {
  font-size: 15px;
  color: var(--mrg-text-muted);
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.mrg-modal-field-group {
  margin-bottom: 22px;
}

.mrg-modal-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mrg-text);
  margin-bottom: 10px;
}

.mrg-modal-portion-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mrg-modal-portion-btn {
  background: #f8f8fa;
  border: 2px solid #e8e8ed;
  border-radius: 14px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--mrg-text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mrg-modal-portion-btn:hover {
  border-color: #c71d89;
  background: #fff;
  transform: translateY(-2px);
}

.mrg-modal-portion-btn.active {
  background: linear-gradient(135deg, #c71d89 0%, #a0136c 100%);
  color: #ffffff;
  border-color: #c71d89;
  box-shadow: 0 4px 14px rgba(199, 29, 137, 0.35);
}

.mrg-modal-qty-control {
  display: inline-flex;
  align-items: center;
  background: #f8f8fa;
  border: 1px solid #e0e0e8;
  border-radius: 999px;
  padding: 4px;
}

.mrg-modal-qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #ddd;
  font-size: 18px;
  font-weight: 800;
  color: var(--mrg-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.mrg-modal-qty-btn:hover {
  background: #c71d89;
  color: #fff;
  border-color: #c71d89;
}

.mrg-modal-qty-val {
  width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
  color: var(--mrg-text);
}

.mrg-modal-hint {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

.mrg-modal-footer {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--mrg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mrg-modal-price-box {
  display: flex;
  flex-direction: column;
}

.mrg-modal-price-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mrg-text-muted);
}

.mrg-modal-price-main {
  font-size: 26px;
  font-weight: 900;
  color: var(--mrg-primary);
  line-height: 1.1;
}

.mrg-modal-price-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--mrg-secondary);
}

.mrg-modal-submit-btn {
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(199, 29, 137, 0.3);
  cursor: pointer;
  white-space: nowrap;
}

/* Card Zoom Overlay styling */
.mrg-product-card {
  cursor: pointer;
}

.mrg-card-img-wrap {
  position: relative;
  overflow: hidden;
}

.mrg-card-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 5, 25, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 4;
}

.mrg-product-card:hover .mrg-card-zoom-overlay {
  opacity: 1;
}

.mrg-card-zoom-btn {
  background: #ffffff;
  color: #c71d89;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(10px) scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mrg-product-card:hover .mrg-card-zoom-btn {
  transform: translateY(0) scale(1);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .mrg-portrait-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mrg-modal-grid {
    grid-template-columns: 1fr;
  }
  .mrg-modal-image-col {
    border-right: none;
    border-bottom: 1px solid var(--mrg-border);
    padding: 24px;
  }
  .mrg-modal-info-col {
    padding: 24px;
  }
}

@media (max-width: 600px) {
  .mrg-portrait-cats-grid {
    grid-template-columns: 1fr;
  }
  .mrg-torti-page-title {
    font-size: 30px;
  }
  .mrg-category-active-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .mrg-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .mrg-modal-submit-btn {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   COMPACT CATEGORY SHOWCASE (/torti/) - 2 ROWS OF 3 BOXES ON 1 SCREEN
   ========================================================================== */
.mrg-torti-compact-section {
  padding: 24px 0 28px 0;
  background: linear-gradient(135deg, #fff2f7 0%, #fffbfd 50%, #ffffff 100%);
  min-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mrg-torti-header-compact {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 20px auto;
}

.mrg-torti-title-compact {
  font-size: 32px;
  font-weight: 800;
  color: var(--mrg-text);
  margin: 4px 0 6px 0;
  letter-spacing: -0.4px;
}

.mrg-torti-sub-compact {
  font-size: 14.5px;
  color: var(--mrg-text-muted);
  line-height: 1.5;
  margin: 0 auto;
}

.mrg-compact-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mrg-compact-cat-box {
  position: relative;
  height: 205px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(20, 5, 25, 0.07);
  border: 2px solid transparent;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.mrg-compact-cat-box:hover,
.mrg-compact-cat-box:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(199, 29, 137, 0.22);
  border-color: rgba(199, 29, 137, 0.45);
  outline: none;
}

.mrg-compact-box-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}

.mrg-compact-cat-box:hover .mrg-compact-box-bg {
  transform: scale(1.08);
}

.mrg-compact-box-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 2, 20, 0.12) 0%, rgba(15, 2, 20, 0.42) 40%, rgba(15, 2, 20, 0.92) 100%);
  z-index: 2;
  transition: background 0.3s ease;
}

.mrg-compact-cat-box:hover .mrg-compact-box-overlay {
  background: linear-gradient(180deg, rgba(15, 2, 20, 0.08) 0%, rgba(15, 2, 20, 0.38) 35%, rgba(15, 2, 20, 0.95) 100%);
}

.mrg-compact-box-top {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
}

.mrg-compact-count-badge {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #c71d89;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.mrg-compact-box-bottom {
  position: relative;
  z-index: 3;
  color: #ffffff;
}

.mrg-compact-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.mrg-compact-icon {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.mrg-compact-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.mrg-compact-desc {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mrg-compact-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #ffcaea;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mrg-compact-cat-box:hover .mrg-compact-action {
  color: #ffffff;
}

.mrg-compact-cat-box:hover .mrg-compact-action .mrg-arrow {
  transform: translateX(5px);
}

.mrg-torti-compact-footer-link {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--mrg-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mrg-torti-compact-footer-link a {
  color: var(--mrg-primary);
  font-weight: 700;
  text-decoration: none;
}

.mrg-torti-compact-footer-link a:hover {
  text-decoration: underline;
}

/* Single Product Specific Styling */
.mrg-single-product-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
}

.mrg-single-portion-btn {
  background: #f8f8fa;
  border: 2px solid #e8e8ed;
  border-radius: 14px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--mrg-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mrg-single-portion-btn:hover {
  border-color: #c71d89;
  background: #fff;
  transform: translateY(-2px);
}

.mrg-single-portion-btn.active {
  background: linear-gradient(135deg, #c71d89 0%, #a0136c 100%);
  color: #ffffff;
  border-color: #c71d89;
  box-shadow: 0 4px 14px rgba(199, 29, 137, 0.35);
}

@media (max-width: 992px) {
  .mrg-compact-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mrg-single-product-grid {
    grid-template-columns: 1fr;
  }
  .mrg-single-product-media {
    border-right: none !important;
    border-bottom: 1px solid var(--mrg-border);
  }
}

@media (max-width: 600px) {
  .mrg-compact-cats-grid {
    grid-template-columns: 1fr;
  }
  .mrg-compact-cat-box {
    height: 180px;
  }
}

/* ==========================================================================
   TORTI PAGE: LARGE PORTRAIT CATEGORY CARDS (MONTSERRAT & SCREENSHOT STYLE)
   ========================================================================== */
.mrg-torti-hero-section {
  padding: 40px 0 80px 0;
  background: transparent;
}

.mrg-torti-page-title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 38px;
  font-weight: 800;
  color: #1e131d;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.mrg-torti-page-sub {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 16px;
  color: var(--mrg-text-muted, #75626e);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

.mrg-categories-hero-grid {
  display: grid;
  grid-template-columns: repeat(var(--cat-cols, 3), 1fr);
  gap: 28px;
  width: 100%;
  margin-top: 32px;
}

.mrg-cat-hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-decoration: none !important;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  box-shadow: 0 8px 24px rgba(220, 100, 140, 0.08);
  border: 1px solid rgba(240, 205, 215, 0.5);
  box-sizing: border-box;
}

.mrg-cat-hero-card:hover,
.mrg-cat-hero-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 20px 42px rgba(210, 70, 120, 0.2);
  border-color: rgba(220, 120, 160, 0.6);
  outline: none;
}

.mrg-cat-hero-img-container {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.mrg-cat-hero-img {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mrg-cat-hero-card:hover .mrg-cat-hero-img {
  transform: scale(1.05);
}

.mrg-cat-hero-name-wrap {
  width: 100%;
  padding: 0 16px 28px 16px;
  text-align: center;
  box-sizing: border-box;
}

.mrg-cat-hero-name {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.mrg-cat-hero-card:hover .mrg-cat-hero-name {
  color: #c71d89 !important;
}

@media (max-width: 1360px) {
  .mrg-categories-hero-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media (max-width: 960px) {
  .mrg-categories-hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 580px) {
  .mrg-categories-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .mrg-cat-hero-card {
    height: 380px !important;
  }
}


