/* Shared Digitalshayan header styles — only loaded on About/Contact pages. */
.cmshop-info-page {
  --green-primary: #ffa500;
  --green-primary-dark: #e08e00;
  --maroon: #8a4a00;
  --green-pale: #fff6ea;
  --red-badge: #e2432e;
  --price-red: #e2432e;
  --text-dark: #1a1a1a;
  --text-muted: #6b6f6c;
  --border-soft: #efe3d2;
  --white: #ffffff;
  --radius-md: 10px;
  --nav-accent: #ffa500;
  --nav-accent-dark: #e08e00;
  --logo-purple: #5b2a9e;
  --logo-purple-light: #7b3fc4;
  --whatsapp-green: #25d366;
  --whatsapp-green-dark: #1da851;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --shadow-card-hover: 0 14px 30px rgba(60, 40, 10, 0.16);
}
.cmshop-info-page .cmshop-header .container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* Replace Astra's header on these two pages only. */
.cmshop-info-page #masthead,
.cmshop-info-page .site-header {
  display: none !important;
}

/* ---------- Announcement Marquee Bar ---------- */
.cmshop-info-page .announce-bar {
  background: var(--maroon);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.cmshop-info-page .announce-track {
  display: inline-flex;
  gap: 0;
  animation: cmshop_info_marquee 28s linear infinite;
  padding: 9px 0;
}
.cmshop-info-page .announce-track span {
  padding: 0 22px;
  font-size: 13px;
  letter-spacing: .2px;
  border-right: 1px solid rgba(255,255,255,.25);
}
@keyframes cmshop_info_marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .cmshop-info-page .announce-track { animation: none; }
}

.cmshop-header { position: sticky; top: 0; z-index: 950; }

.cmshop-header-top { background: var(--white); border-bottom: 1px solid var(--border-soft); }
.cmshop-header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
}

.cmshop-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--logo-purple); }
.cmshop-logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--logo-purple) 0%, var(--logo-purple-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cmshop-logo-dot { background: none; -webkit-text-fill-color: var(--green-primary); color: var(--green-primary); }

.cmshop-search-form {
  flex: 1;
  max-width: 640px;
  display: flex;
  border: 1.5px solid var(--nav-accent);
  border-radius: 999px;
  overflow: hidden;
}
.cmshop-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 18px;
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--white);
  min-width: 0;
}
.cmshop-search-submit {
  border: none;
  background: var(--nav-accent);
  color: var(--white);
  padding: 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmshop-search-submit:hover { background: var(--nav-accent-dark); }

.cmshop-header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cmshop-nav-toggle {
  display: none;
  border: none;
  background: none;
  color: var(--text-dark);
  padding: 6px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cmshop-search-toggle {
  display: none;
  border: none;
  background: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 6px;
}
.cmshop-header-nav { background: var(--nav-accent); }
.cmshop-header-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cmshop-header-nav-inner::-webkit-scrollbar { display: none; }
.cmshop-nav-categories {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-shrink: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmshop-nav-categories li a {
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.92;
}
.cmshop-nav-categories li a:hover,
.cmshop-nav-categories li.is-active a { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.cmshop-nav-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.cmshop-social-links { display: flex; align-items: center; gap: 10px; }
.cmshop-social-icon {
  color: var(--white);
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmshop-social-icon:hover { opacity: 1; }

.btn-order-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--whatsapp-green);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
}
.btn-order-whatsapp:hover { background: var(--whatsapp-green-dark); }

/* ---------- Header: responsive ---------- */
@media (max-width: 1080px) {
  .cmshop-search-form { max-width: 460px; }
  .cmshop-nav-categories { gap: 18px; }
}
@media (max-width: 860px) {
  .cmshop-header-top-inner { position: relative; gap: 14px; }
  .cmshop-search-form { display: none; }
  .cmshop-search-form.is-open {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-width: none;
    margin-top: 8px;
    background: var(--white);
    box-shadow: var(--shadow-card-hover);
    z-index: 5;
  }
  .cmshop-search-toggle { display: flex; }
  .cmshop-nav-toggle { display: flex; }

  /* Proper mobile menu panel — was just un-hiding the same
     horizontal desktop bar before, which is why it looked like it
     "repeated" the header instead of behaving like a real menu. */
  .cmshop-header-nav { display: none; }
  .cmshop-header-nav.is-open { display: block; }
  .cmshop-header-nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 16px;
    overflow-x: visible;
  }
  .cmshop-nav-categories {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }
  .cmshop-nav-categories li { border-bottom: 1px solid rgba(255, 255, 255, .18); }
  .cmshop-nav-categories li a { display: block; padding: 14px 20px; }

  /* Parent items with children (a real WP menu can add these) —
     expand/collapse in place instead of a hover flyout. */
  .cmshop-nav-categories .sub-menu { display: none; list-style: none; margin: 0; padding: 0 0 6px; background: rgba(0, 0, 0, .08); }
  .cmshop-nav-categories li.menu-item-has-children.is-expanded > .sub-menu { display: block; }
  .cmshop-nav-categories .sub-menu li { border-bottom: none; }
  .cmshop-nav-categories .sub-menu li a { padding: 10px 20px 10px 34px; font-size: 13px; }
  .cmshop-submenu-toggle {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 34px;
    height: 34px;
    border: none;
    background: none;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cmshop-nav-categories li.menu-item-has-children { position: relative; }
  .cmshop-nav-categories li.is-expanded .cmshop-submenu-toggle svg { transform: rotate(180deg); }

  .cmshop-nav-right { flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px 20px 4px; }
}
@media (max-width: 640px) {
  .cmshop-logo-text { font-size: 19px; }
  .cmshop-header-top-inner { gap: 10px; }
  .cmshop-header-actions { gap: 10px; }
  .btn-order-whatsapp span { display: none; }
  .btn-order-whatsapp { padding: 9px 12px; }
  .cmshop-social-links { gap: 7px; }
  .cmshop-nav-categories li a { font-size: 13px; }
}
@media (max-width: 420px) {
  .cmshop-logo svg { width: 24px; height: 24px; }
  .cmshop-logo-text { font-size: 16px; }
  .cmshop-header-top-inner { padding: 10px 0; }
  .cmshop-nav-categories li a { font-size: 12.5px; }
  .cmshop-social-links { gap: 6px; }
}

.cmshop-cart-trigger {
  position: relative;
  border: none;
  background: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cmshop-cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--nav-accent);
  color: var(--white);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.cmshop-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 4, 0.45);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cmshop-cart-overlay.is-visible { opacity: 1; }

.cmshop-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 92vw);
  background: var(--green-pale);
  z-index: 1000;
  box-shadow: -8px 0 30px rgba(20, 14, 4, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.cmshop-cart-drawer.is-open { transform: translateX(0); }
body.cmshop-info-page.cmshop-drawer-open { overflow: hidden; }

.cmshop-cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--white);
}
.cmshop-cart-drawer-head h3 { margin: 0; font-size: 17px; color: var(--text-dark); }
.cmshop-cart-close {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

#cmshop-cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cmshop-cart-empty { text-align: center; padding: 40px 10px; color: var(--text-muted); }
.cmshop-cart-empty p { margin: 0 0 16px; }

.cmshop-cart-items { list-style: none; margin: 0; padding: 0; }
.cmshop-cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: opacity 0.15s ease;
}
.cmshop-cart-item.is-updating { opacity: 0.5; pointer-events: none; }
.cmshop-cart-item-thumb img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  display: block;
}
.cmshop-cart-item-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  margin-bottom: 6px;
  line-height: 1.3;
}
.cmshop-cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cmshop-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmshop-qty-value { font-size: 13px; font-weight: 600; min-width: 16px; text-align: center; }
.cmshop-cart-item-price { font-size: 13px; font-weight: 700; color: var(--price-red); }
.cmshop-cart-item-remove {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.cmshop-cart-item-remove:hover { color: var(--red-badge); }

.cmshop-cart-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border-soft);
  background: var(--white);
}
.cmshop-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 12px;
}
.cmshop-cart-subtotal strong { color: var(--text-dark); font-size: 16px; }
.btn-view-cart, .btn-checkout {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.btn-view-cart {
  background: var(--white);
  border: 1px solid var(--text-dark);
  color: var(--text-dark);
}
.btn-checkout {
  background: var(--green-primary);
  border: 1px solid var(--green-primary);
  color: #1a1200;
  margin-bottom: 0;
}
.btn-checkout:hover { background: var(--green-primary-dark); }


/* Final About/Contact header isolation:
   keep the mini-cart as a true off-canvas drawer and never let its
   contents enter normal page flow while closed. */
.cmshop-info-page .cmshop-nav-categories {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.cmshop-info-page .cmshop-cart-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(380px, 92vw) !important;
  max-width: 380px !important;
  display: flex !important;
  flex-direction: column !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(100%) !important;
  z-index: 1000 !important;
}

.cmshop-info-page .cmshop-cart-drawer.is-open {
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(0) !important;
}

.cmshop-info-page .cmshop-cart-overlay[hidden] {
  display: none !important;
}

.cmshop-info-page .cmshop-cart-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999 !important;
}

.cmshop-info-page .cmshop-cart-close {
  border: none !important;
  background: none !important;
  padding: 0 !important;
  width: auto !important;
  min-height: 0 !important;
  color: var(--text-muted) !important;
}

/* About/Contact header spacing alignment: match the established custom header dimensions. */
.cmshop-info-page .cmshop-header-top-inner { padding-top: 27px; padding-bottom: 27px; }
.cmshop-info-page .cmshop-header-nav-inner { padding-top: 29px; padding-bottom: 29px; }
@media (max-width: 860px) {
  .cmshop-info-page .cmshop-header-top-inner { padding-top: 12px; padding-bottom: 12px; }
  .cmshop-info-page .cmshop-header-nav-inner { padding-top: 6px; padding-bottom: 16px; }
}
