/**
 * Mianguls shop skin — matches the new landing (React) header & footer.
 * Loaded by ciyashop-child on shop/cart/checkout (and all front-end pages).
 */

/* ---- Icon font (icomoon, reused from the landing) ---- */
@font-face {
  font-family: "icomoon";
  src: url("fonts/icomoon.woff") format("woff"),
       url("fonts/icomoon.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
.mg [class^="icon-"],
.mg [class*=" icon-"] {
  font-family: "icomoon" !important;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.icon-SVG-1:before { content: "\e900"; }
.icon-SVG-3:before { content: "\e902"; }
.icon-SVG-4:before { content: "\e903"; }

/* ---- Design tokens (from landing index.css) ---- */
:root {
  --mg-primary: #006ab8;
  --mg-primary-hover: #198ee6;
  --mg-gray-5e: #5e5e5e;
  --mg-gray-6b: #6b6b6b;
  --mg-gray-d0: #d0d0d0;
  --mg-gray-e5: #e5e5e5;
  --mg-gray-e7: #e7e7e7;
  --mg-max-web: 1200px;
  --spacing:0.25rem
}

/* Reset the theme chrome we are replacing.
   Font family matches the new landing design (Nunito Sans stack). */
body.mg,
body.mg .mg-header,
body.mg .mg-footer,
body.mg .mg-breadcrumb {
  font-family: "Nunito Sans", NunitoSansBlack, system-ui, Avenir, Helvetica, Arial, sans-serif;
  color: #333;
}

/* Sticky footer — keep the footer pinned to the bottom of the viewport
   even when the page content is too short to fill the screen. */
html { height: 100%; }
body.mg { display: flex; flex-direction: column; min-height: 100vh; }
body.mg .mg-main { flex: 1 0 auto; }
body.mg .mg-footer { flex-shrink: 0; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.mg-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  /* min-height: 64px; */
  padding: 0.625rem 2.5rem;
  min-height: calc(var(--spacing) * 16);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
}
.mg-header .mg-logo img { height: calc(var(--spacing) * 11); display: block; }
.mg-header-left { display: flex; align-items: center; gap: 32px; }
.mg-nav { display: flex; align-items: center; }
.mg-nav a.mg-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  height: 20px;
  padding: 0 20px;
  border-right: 1px solid var(--mg-gray-e7);
  font-size: 13px;
  font-weight: 600;
  color: var(--mg-gray-6b);
  text-decoration: none;
  transition: color 0.2s ease;
}
.mg-nav a.mg-nav-btn:hover { color: var(--mg-primary); }
.mg-nav a.mg-nav-btn.no-border { border-right: none; }
.mg-nav a.mg-nav-btn.active { color: var(--mg-primary); }

.mg-header-right { display: flex; align-items: center; }
.mg-cart {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--mg-primary);
  text-decoration: none;
}
.mg-cart svg { width: 22px; height: 22px; fill: currentColor; }
.mg-cart .mg-cart-count {
  position: absolute;
  top: -6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--mg-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.mg-account {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--mg-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.mg-account svg { width: 20px; height: 20px; fill: currentColor; }
.mg-account:hover { color: var(--mg-primary-hover); }

.mg-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding-block: calc(var(--spacing) * 1.5);
  padding-inline: calc(var(--spacing) * 5);
  border-radius: 4px;
  background: var(--mg-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.mg-hub:hover { background: var(--mg-primary-hover); color: #fff; }
.mg-hub .icon-SVG-1 { font-size: 0.875rem; }

/* Mobile menu toggle */
.mg-burger { display: none; cursor: pointer; color: var(--mg-primary); font-size: 22px; }
.mg-mobile-nav { display: none; flex-direction: column; background: #fff; border-top: 1px solid var(--mg-gray-e5); }
.mg-mobile-nav a {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border-bottom: 1px solid var(--mg-gray-e5);
  color: var(--mg-gray-6b);
  font-weight: 700;
  text-decoration: none;
}
.mg-mobile-nav.open { display: flex; }

@media (max-width: 1023px) {
  .mg-header { padding: 10px 16px; }
  .mg-header-left { gap: 16px; }
  .mg-nav { display: none; }
  .mg-burger { display: block; }
}

/* =========================================================
   MAIN CONTENT WRAPPER (holds the WooCommerce shop/cart)
   ========================================================= */
.mg-main { min-height: 60vh; background: #fff; }
/* Centered container for cart, checkout, account, posts. */
.mg-main .mg-container {
  max-width: var(--mg-max-web);
  margin: 0 auto;
  padding: 40px 20px 80px;
}
/* Wider container for the shop / product pages, which render their own
   sidebar (left) + catalog (right) grid inside. */
.mg-main .mg-container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}

/* Shop layout: filters sidebar LEFT, catalog RIGHT.
   Scoped to the top-level layout row only (not nested widget rows), so it
   does not introduce horizontal overflow. Overrides the theme's Bootstrap
   col-* widths, which are not fully loaded here. */
.mg-container-fluid > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 0;
}
.mg-container-fluid > .row > .shop-sidebar-widgets-overlay { display: none; }
.mg-container-fluid > .row > .sidebar { order: 1; }
.mg-container-fluid > .row > .content { order: 2; min-width: 0; } /* min-width:0 stops wide widgets overflowing */

@media (min-width: 992px) {
  .mg-container-fluid > .row > .sidebar { flex: 0 0 26%; max-width: 26%; padding-right: 30px; }
  /* Shop/category: catalog beside the sidebar (col-xl-9). */
  .mg-container-fluid > .row > .content.col-xl-9 { flex: 0 0 74%; max-width: 74%; }
  /* Single product (no sidebar, col-xl-12): use the full width. */
  .mg-container-fluid > .row > .content.col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 991px) {
  .mg-container-fluid > .row > .sidebar,
  .mg-container-fluid > .row > .content { flex: 0 0 100%; max-width: 100%; }
}

/* Single product summary: drop WooCommerce's default float:right / width:48%
   so it fills the theme's summary column instead. */
body.mg div.product .summary.entry-summary {
  float: none;
  width: auto;
}

/* =========================================================
   BREADCRUMB BAR (shop / product / category)
   Trail on the left, cart (moved from the header) on the right.
   ========================================================= */
.mg-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 2px 0 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--mg-gray-e5);
}
.mg-breadcrumb-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: #333;
}
.mg-breadcrumb-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto; /* keep the trail + cart on the right even when no title */
}
.mg-breadcrumb-trail,
.mg-breadcrumb .mg-bc-nav,
.mg-breadcrumb .woocommerce-breadcrumb {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mg-gray-6b);
}
.mg-breadcrumb .mg-bc-nav a,
.mg-breadcrumb .woocommerce-breadcrumb a { color: var(--mg-gray-6b); text-decoration: none; }
.mg-breadcrumb .mg-bc-nav a:hover,
.mg-breadcrumb .woocommerce-breadcrumb a:hover { color: var(--mg-primary); }
.mg-breadcrumb .mg-bc-sep { margin: 0 8px; color: #adadad; }

.mg-breadcrumb-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mg-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.mg-breadcrumb-cart svg { width: 20px; height: 20px; fill: currentColor; }
.mg-breadcrumb-cart:hover { color: var(--mg-primary-hover); }

/* Nudge WooCommerce buttons toward the brand colour */
.mg-main .woocommerce a.button,
.mg-main .woocommerce button.button,
.mg-main .woocommerce .button,
.mg-main .woocommerce #respond input#submit,
.mg-main .woocommerce a.button.alt,
.mg-main .woocommerce button.button.alt {
  background: var(--mg-primary);
  color: #fff;
  border-radius: 4px;
}
.mg-main .woocommerce a.button:hover,
.mg-main .woocommerce button.button:hover,
.mg-main .woocommerce a.button.alt:hover { background: var(--mg-primary-hover); }
.mg-main .woocommerce span.onsale,
.mg-main .woocommerce ul.products li.product .price,
.mg-main .woocommerce div.product p.price { color: var(--mg-primary); }

/* =========================================================
   FOOTER (matches landing footer.jsx)
   ========================================================= */
.mg-footer { background: var(--mg-primary); padding: 50px 40px 60px; }
.mg-footer .mg-container { max-width: var(--mg-max-web); margin: 0 auto; }
.mg-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #fff;
}
.mg-footer-brand { display: flex; flex-direction: column; gap: 16px; }
.mg-footer-brand img { max-width: 176px; }
.mg-footer-brand p { font-size: 10px; line-height: 14px; color: var(--mg-gray-d0); }
.mg-footer-cols { display: flex; flex: 1; justify-content: space-between; gap: 16px; }
.mg-footer-col { display: flex; flex-direction: column; gap: 8px; }
.mg-footer-col h4 { font-size: 14px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.mg-footer-col a { font-size: 14px; line-height: 16px; color: #fff; text-decoration: none; }
.mg-footer-col a:hover { text-decoration: underline; }

.mg-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
}
.mg-footer-legal { display: flex; align-items: center; }
.mg-footer-legal a {
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: #fff;
  text-decoration: none;
  padding: 0 12px;
  border-right: 1px solid #fff;
}
.mg-footer-legal a:first-child { padding-left: 0; }
.mg-footer-legal a:last-child { border-right: none; }
.mg-footer-contact { display: flex; align-items: center; gap: 24px; }
.mg-footer-contact .mg-fc { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; }
.mg-footer-contact .mg-fc .icon-SVG-3,
.mg-footer-contact .mg-fc .icon-SVG-4 { color: #fff; }
.mg-footer-social img { height: 24px; }

@media (max-width: 1023px) {
  .mg-footer { padding: 30px 16px 40px; }
  .mg-footer-top { flex-direction: column; }
  .mg-footer-cols { flex-wrap: wrap; gap: 24px; }
  .mg-footer-col { min-width: 40%; }
  .mg-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Hide any leftover ciyashop chrome that may still hook in */
.mg #ciyashop-preloader,
.mg .ciyashop-back-to-top,
.mg .page-title-wrapper,
.mg .site-breadcrumb { display: none !important; }

/* =========================================================
   SELECT2 DROPDOWNS (shop "Default sorting", category & rating filters)
   The theme renders the option list white-on-white and misaligned, which
   makes the dropdown look like it won't open. Make it readable & aligned.
   (Select2 appends the dropdown to <body>, so these are not .mg-scoped.)
   ========================================================= */
.select2-container { z-index: 9999; }
.select2-dropdown {
  background: #fff;
  border: 1px solid var(--mg-gray-e5, #e5e5e5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.select2-results__options { margin: 0; padding: 0; list-style: none; }
.select2-results__option {
  color: #333 !important;          /* was #fff — invisible on white */
  background: #fff;
  text-align: left !important;
  padding: 8px 15px !important;
  font-size: 14px;
  line-height: 1.4;
}
.select2-results__option--highlighted,
.select2-results__option--highlighted[aria-selected],
.select2-results__option[aria-selected="true"] {
  background: var(--mg-primary, #006ab8) !important;
  color: #fff !important;
}
/* Closed control: keep the current value dark and left-aligned */
.select2-container--default .select2-selection--single { display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #333;
  text-align: left;
}

/* WooCommerce "Default sorting": use the NATIVE <select>.
   Select2 double-binds focus/blur handlers on this control, which makes the
   dropdown open then immediately close on a mouse click. The native select is
   WooCommerce's default and has no such conflict. (JS destroys Select2 on it;
   this styles the resulting native control.) */
.mg .woocommerce-ordering select.orderby {
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-width: 210px;
  clip: auto !important;
  opacity: 1 !important;
  margin: 0;
  padding: 9px 34px 9px 14px;
  border: 1px solid var(--mg-gray-e5, #e5e5e5);
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
}

/* =========================================================
   YITH WISHLIST — remove the duplicate heart icon.
   The theme injects a legacy FontAwesome heart via ::before, while YITH also
   renders its own SVG heart, producing two hearts. Drop the ::before one.
   ========================================================= */
.mg a.add_to_wishlist::before,
.mg .yith-wcwl-add-button a::before,
.mg .yith-wcwl-wishlistaddedbrowse a::before,
.mg .yith-wcwl-wishlistexistsbrowse a::before {
  content: none !important;
  display: none !important;
  margin: 0 !important;
}
