/*
Theme Name: Royal Dastar House Child
Theme URI: https://royaldastarhouse.com/
Description: Responsive Royal Dastar House header built on Astra Free.
Author: Royal Dastar House
Template: astra
Version: 1.0.0
Text Domain: royal-dastar-house-child
*/

:root {
  --rdh-ink: #24313b;
  --rdh-blue: #1599b4;
  --rdh-blue-dark: #087a96;
  --rdh-line: #e6eaed;
  --rdh-muted: #65717c;
}

/* Astra's header is replaced by the child theme header. The parent theme and
   its functions remain loaded, including its existing WooCommerce changes. */
#masthead { display: none !important; }
.rdh-header, .rdh-header * { box-sizing: border-box; }
.rdh-header { position: relative; z-index: 50; width: 100%; background: #fff; color: var(--rdh-ink); border-top: 3px solid #20272b; box-shadow: 0 2px 8px rgba(25, 43, 54, .06); font-family: inherit; }
.rdh-header a { color: inherit; text-decoration: none; }
.rdh-header a:hover, .rdh-header a:focus-visible { color: var(--rdh-blue-dark); }
.rdh-header-inner { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }
.rdh-topbar { min-height: 36px; border-bottom: 1px solid var(--rdh-line); background: #fbfcfc; font-size: 13px; }
.rdh-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 36px; }
.rdh-utility-links, .rdh-social-links { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.rdh-utility-links a { color: #44515b; }
.rdh-social-links { gap: 13px; }
.rdh-social-links a { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; color: var(--rdh-blue); }
.rdh-social-links svg { display: block; width: 16px; height: 16px; }
.rdh-main-row { border-bottom: 1px solid var(--rdh-line); }
.rdh-main-inner { display: grid; grid-template-columns: minmax(205px, 260px) minmax(260px, 1fr) auto; align-items: center; gap: clamp(18px, 3vw, 42px); min-height: 96px; padding-top: 6px; padding-bottom: 6px; }
.rdh-brand { display: inline-flex; align-items: center; min-width: 0; }
.rdh-brand img { display: block; width: 100%; max-width: 258px; height: auto; max-height: 74px; object-fit: contain; object-position: left center; }
.rdh-search { display: flex; width: 100%; min-width: 0; justify-content: center; }
.rdh-search > form { flex: 0 1 570px; }
.rdh-search form { position: relative; display: flex; width: 100%; max-width: 570px; height: 48px; margin: 0 auto; border: 1px solid #dce2e6; border-radius: 13px; background: #fff; box-shadow: 0 6px 18px rgba(30, 52, 65, .045); overflow: hidden; }
.rdh-search label { display: flex; flex: 1; min-width: 0; margin: 0; }
.rdh-search .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.rdh-search input.search-field { width: 100%; min-width: 0; height: 46px; padding: 0 16px; border: 0; background: transparent; box-shadow: none; color: var(--rdh-ink); font-size: 14px; }
.rdh-search input.search-field:focus { outline: 0; box-shadow: none; }
.rdh-search input.search-field::placeholder { color: #828b91; opacity: 1; }
.rdh-search button, .rdh-search input[type=submit] { display: inline-flex; flex: 0 0 48px; width: 48px; height: 46px; align-items: center; justify-content: center; padding: 0; border: 0; border-left: 1px solid #e0e5e8; border-radius: 0; background: #fff; color: var(--rdh-ink); font-size: 0; }
.rdh-search button:before, .rdh-search input[type=submit]:before { content: ''; }
.rdh-search button svg { width: 18px; height: 18px; }
.rdh-search button:hover, .rdh-search input[type=submit]:hover { background: #f6fbfc; color: var(--rdh-blue-dark); }
.rdh-actions { display: flex; align-items: stretch; justify-content: flex-end; gap: clamp(16px, 2vw, 32px); }
.rdh-action { display: flex; min-width: 76px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #34414a; text-align: center; font-size: 12px; line-height: 1.25; }
.rdh-action-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; }
.rdh-action-icon svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.rdh-cart-action { min-width: 94px; }
.rdh-cart-icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.rdh-cart-count { position: absolute; top: -8px; right: -11px; display: inline-flex; min-width: 17px; height: 17px; align-items: center; justify-content: center; padding: 0 4px; border-radius: 20px; background: var(--rdh-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.rdh-cart-total { color: var(--rdh-blue); font-size: 12px; font-weight: 700; white-space: nowrap; }
.rdh-cart-total .woocommerce-Price-amount { color: inherit; }
.rdh-nav-row { background: #fff; }
.rdh-nav-inner { display: flex; align-items: center; min-height: 52px; justify-content: center;}
.rdh-mobile-nav-toggle { display: none; }
.rdh-menu, .rdh-menu ul { display: flex; align-items: center; gap: clamp(17px, 2.15vw, 31px); margin: 0; padding: 0; list-style: none; }
.rdh-menu { width: 100%; }
.rdh-menu > li { position: relative; margin: 0; }
.rdh-menu > li > a { display: flex; min-height: 52px; align-items: center; color: #28333a; font-size: 12px; font-weight: 700; letter-spacing: .035em; line-height: 1.25; text-transform: uppercase; white-space: nowrap; }
.rdh-menu > li.current-menu-item > a, .rdh-menu > li.current-menu-ancestor > a { color: var(--rdh-blue-dark); }
.rdh-menu .sub-menu { position: absolute; top: 100%; left: 0; z-index: 60; display: none; min-width: 210px; padding: 8px 0; border: 1px solid var(--rdh-line); background: #fff; box-shadow: 0 8px 24px rgba(25, 43, 54, .12); }
.rdh-menu li:hover > .sub-menu, .rdh-menu li:focus-within > .sub-menu { display: block; }
.rdh-menu .sub-menu a { display: block; padding: 10px 15px; color: #34414a; font-size: 13px; text-transform: none; }
.rdh-menu .sub-menu a:hover, .rdh-menu .sub-menu a:focus-visible { background: #f5fafb; }
.rdh-header .rdh-menu-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.rdh-social-placeholder { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; color: var(--rdh-blue); }

@media (max-width: 1050px) {
  .rdh-main-inner { grid-template-columns: minmax(170px, 215px) minmax(220px, 1fr) auto; gap: 18px; }
  .rdh-brand img { max-width: 215px; }
  .rdh-actions { gap: 13px; }
  .rdh-action { min-width: 60px; }
  .rdh-cart-action { min-width: 78px; }
  .rdh-menu, .rdh-menu ul { gap: clamp(12px, 1.6vw, 20px); }
  .rdh-menu > li > a { font-size: 11px; }
}
@media (max-width: 780px) {
  .rdh-header-inner { width: min(100% - 28px, 620px); }
  .rdh-topbar, .rdh-topbar-inner { min-height: 34px; }
  .rdh-utility-links { gap: 15px; font-size: 12px; }
  .rdh-social-links { gap: 8px; }
  .rdh-main-inner { grid-template-columns: minmax(150px, 1fr) auto; gap: 13px 18px; min-height: 0; padding-top: 13px; padding-bottom: 14px; }
  .rdh-brand img { max-width: 205px; max-height: 62px; }
  .rdh-search { grid-column: 1 / -1; grid-row: 2; }
  .rdh-search form { max-width: none; height: 44px; }
  .rdh-search input.search-field { height: 42px; }
  .rdh-search button, .rdh-search input[type=submit] { height: 42px; }
  .rdh-actions { gap: 12px; }
  .rdh-action { min-width: 36px; gap: 2px; font-size: 10px; }
  .rdh-cart-action { min-width: 64px; }
  .rdh-action-icon, .rdh-action-icon svg { width: 19px; height: 19px; }
  .rdh-cart-total { font-size: 10px; }
  .rdh-nav-inner { position: relative; min-height: 45px; justify-content: flex-end; }
  .rdh-mobile-nav-toggle { display: inline-flex; min-height: 42px; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; color: var(--rdh-ink); font-size: 12px; font-weight: 700; text-transform: uppercase; }
  .rdh-mobile-nav-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
  .rdh-menu-container { position: absolute; top: 100%; right: -14px; left: -14px; z-index: 70; display: none; padding: 8px 14px 13px; border-top: 1px solid var(--rdh-line); background: #fff; box-shadow: 0 9px 18px rgba(25, 43, 54, .12); }
  .rdh-nav-row.is-open .rdh-menu-container { display: block; }
  .rdh-menu, .rdh-menu ul { display: block; }
  .rdh-menu > li { border-bottom: 1px solid #edf0f1; }
  .rdh-menu > li:last-child { border-bottom: 0; }
  .rdh-menu > li > a { min-height: 42px; white-space: normal; font-size: 14px; }
  .rdh-menu .sub-menu { position: static; display: block; min-width: 0; padding: 0 0 7px 12px; border: 0; background: transparent; box-shadow: none; }
  .rdh-menu .sub-menu a { padding: 8px 0; }
}
@media (max-width: 420px) {
  .rdh-header-inner { width: calc(100% - 22px); }
  .rdh-utility-links { gap: 11px; font-size: 11px; }
  .rdh-social-links { gap: 4px; }
  .rdh-social-links a { width: 19px; height: 19px; }
  .rdh-brand img { max-width: 170px; }
  .rdh-actions { gap: 8px; }
  .rdh-action { min-width: 31px; font-size: 9px; }
  .rdh-cart-action { min-width: 56px; }
  .rdh-cart-total { font-size: 9px; }
}
/* Draw the WooCommerce search icon without a third-party icon dependency. */
.rdh-search button { position: relative; }
.rdh-search button:before { content: ""; position: absolute; top: 14px; left: 15px; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; }
.rdh-search button:after { content: ""; position: absolute; top: 27px; left: 28px; width: 6px; height: 1.5px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
/* Mobile header: utility strip, then menu / centered brand / icon actions. */
@media (max-width: 780px) {
  .rdh-main-row { position: relative; }
  .rdh-main-inner { position: relative; display: block; width: calc(100% - 30px); min-height: 66px; height: 66px; padding: 0; }
  .rdh-brand { position: absolute; top: 50%; left: calc(50% + -27px); width: 160px; justify-content: center; transform: translate(-50%, -50%); }
  .rdh-brand img { width: 100%; max-width: 160px; max-height: 48px; object-position: center; }
  .rdh-search { position: absolute; top: 50%; right: 53px; z-index: 2; grid-column: auto; grid-row: auto; width: 38px; height: 38px; transform: translateY(-50%); }
  .rdh-search form { width: 38px; height: 38px; border-radius: 8px; box-shadow: none; }
  .rdh-search form label, .rdh-search input.search-field { display: none; }
  .rdh-search button, .rdh-search input[type=submit] { position: relative; flex-basis: 36px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; }
  .rdh-search button:before { top: 10px; left: 10px; }
  .rdh-search button:after { top: 23px; left: 23px; }
  .rdh-actions { position: absolute; top: 50%; right: 0; display: block; margin: 0; transform: translateY(-50%); }
  .rdh-actions > .rdh-action:not(.rdh-cart-action) { display: none; }
  .rdh-cart-action { display: flex; width: 38px; min-width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0; border: 1px solid #dce2e6; border-radius: 8px; }
  .rdh-cart-action > span:not(.rdh-cart-icon-wrap) { display: none; }
  .rdh-cart-icon-wrap { width: 20px; height: 22px; }
  .rdh-cart-count { top: -8px; right: -9px; min-width: 15px; height: 15px; font-size: 9px; }
  .rdh-nav-row { position: relative; height: 0; }
  .rdh-nav-inner { position: static; width: 100%; min-height: 0; }
  .rdh-mobile-nav-toggle { position: absolute; top: -52px; left: max(15px, calc((100% - 620px) / 2)); z-index: 3; width: 38px; min-height: 38px; height: 38px; justify-content: center; gap: 0; padding: 0; border: 1px solid #dce2e6; border-radius: 8px; background: #fff; }
  .rdh-mobile-nav-toggle span { display: none; }
  .rdh-menu-container { top: 0; right: 14px; left: 14px; }
}
@media (max-width: 420px) {
  .rdh-header-inner { width: calc(100% - 30px); }
  .rdh-utility-links { gap: 11px; font-size: 11px; }
  .rdh-social-links { gap: 4px; }
  .rdh-social-links a, .rdh-social-placeholder { width: 19px; height: 19px; }
  .rdh-brand { width: 145px; }
  .rdh-brand img { max-width: 145px; }
  .rdh-search { right: 50px; }
}@media (max-width: 780px) {
  .rdh-search.is-open { left: 46px; right: 53px; z-index: 5; width: auto; }
  .rdh-search.is-open form { width: 100%; }
  .rdh-search.is-open form label { display: flex; flex: 1; min-width: 0; }
  .rdh-search.is-open input.search-field { display: block; width: 100%; height: 36px; flex: 1; min-width: 0; padding: 0 10px; }
  .rdh-search.is-open button { flex: 0 0 36px; }
  .rdh-main-inner.search-open .rdh-brand { visibility: hidden; }
}
/* Keep the header pinned while allowing the utility bar to scroll away. */
.rdh-header { position: sticky; top: 0; z-index: 1000; }
.rdh-header.is-scrolled .rdh-topbar { display: none; }