/* Pardis Gifts — Global Mobile-First Responsive Layer (Approved Design A v3) */
.pg-mob-search-toggle { display: none; }
.pg-mob-bottom-nav { display: none; }
.pg-mm-drawer { display: none; }

@media (max-width: 960px) {
  body {
    padding-bottom: 72px !important;
    font-size: 14.5px !important;
    line-height: 1.85 !important;
  }
  html, body { overflow-x: clip !important; max-width: 100% !important; }
  p, li, .pg-cp-seo-text, .pg-art-body, .pg-pd-desc-body, .pg-corp-txt {
    font-size: 14.5px !important;
    line-height: 1.85 !important;
  }
  h1, .pg-cp-h1 { font-size: 20px !important; line-height: 1.45 !important; }
  h2 { font-size: 17.5px !important; line-height: 1.5 !important; }
  h3 { font-size: 15.5px !important; line-height: 1.5 !important; }
  input, select, textarea, button { font-size: 14px !important; }

  /* Hide old duplicate header nav & action bars */
  .pgt-mobile-bottom-nav, .pgt-mobile-actions, .pgt-tier2-left-cluster, .pgt-tier3-navbar, #pgt-mobile-drawer-overlay, #pgt-nav-drawer-overlay {
    display: none !important;
  }

  /* Redesigned Mobile Top Announcement Banner (Proper Top/Bottom Breathing Room) */
  .pgt-header-root .pgt-tier1-banner-wrap .pgt-smart-top-banner {
    height: auto !important;
    min-height: 50px !important;
    padding: 10px 14px !important;
    gap: 10px !important;
    line-height: 1.65 !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .pgt-smart-top-banner__txt {
    font-size: 12.5px !important;
    line-height: 1.6 !important;
    padding-bottom: 1px !important;
  }
  .pgt-smart-top-banner__cta {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    flex-shrink: 0 !important;
  }

  /* Centered Mobile Header: Hamburger (Right) | Logo (Center) | Search (Left) */
  .pgt-header-root { position: relative !important; z-index: 99950 !important; overflow: visible !important; }
  .pgt-header-root .pgt-tier2-mainbar {
    position: relative !important;
    top: auto !important;
    z-index: 99955 !important;
    min-height: 60px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow: visible !important;
  }
  .pgt-tier2-inner, .pgt-tier2-right-cluster {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  #pgt-test-header .pgt-brand-cluster, .pgt-brand-cluster {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 44px !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #pgt-hamburger-btn.pgt-hamburger-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }
  .pgt-logo-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    height: 42px !important;
  }
  .pgt-logo-img {
    height: 36px !important;
    width: auto !important;
    max-width: 150px !important;
    display: block !important;
    margin: 0 !important;
    object-fit: contain !important;
  }
  .pg-mob-search-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f3d3e !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Fix Search Dropdown Going Under Header */
  .pgt-search-wrap {
    display: none !important;
    width: 100% !important;
    margin-top: 10px !important;
    position: relative !important;
    z-index: 999990 !important;
    overflow: visible !important;
  }
  .pgt-search-wrap.is-mob-open { display: block !important; }
  .pgt-search-form, .pgt-custom-type-select {
    overflow: visible !important;
    position: relative !important;
  }
  .pgt-type-menu-dropdown, #pgt-type-menu-dropdown, .pgt-m-type-dropdown, #pgt-m-type-dropdown {
    z-index: 9999999 !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
  }
  #pgt-mobile-search-modal {
    z-index: 9999995 !important;
  }
  #pgt-mobile-search-modal .pgt-m-search-header {
    overflow: visible !important;
    z-index: 9999998 !important;
  }

  /* Two-Tab Digikala-Style Mobile MegaMenu Drawer (Approved Design A) */
  .pg-mm-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(15, 23, 42, 0.55);
    direction: rtl;
  }
  .pg-mm-drawer.is-open { display: flex; }
  .pg-mm-drawer__panel {
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -8px 0 28px rgba(15,23,42,.25);
  }
  .pg-mm-drawer__top {
    background: #0f3d3e;
    color: #fff;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .pg-mm-drawer__top strong { font-size: 15px; font-weight: 800; }
  .pg-mm-drawer__close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 0;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
  }
  .pg-mm-drawer__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    padding: 6px;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
  }
  .pg-mm-tab-btn {
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-size: 13px !important;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
  }
  .pg-mm-tab-btn.is-active {
    background: #ffffff;
    color: #0f3d3e;
    box-shadow: 0 2px 6px rgba(15,23,42,.08);
  }
  .pg-mm-tab-body { flex: 1; overflow: hidden; display: none; }
  .pg-mm-tab-body.is-active { display: flex; flex-direction: column; }
  .pg-mm-cat-split { display: grid; grid-template-columns: 122px 1fr; height: 100%; overflow: hidden; }
  .pg-mm-rail { background: #f8fafc; border-left: 1px solid #e2e8f0; overflow-y: auto; }
  .pg-mm-rail-btn {
    width: 100%;
    text-align: right;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    padding: 12px 10px;
    font-size: 12px !important;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
  }
  .pg-mm-rail-btn.is-active {
    background: #fff;
    color: #0f3d3e;
    border-right: 3px solid #f97316;
    font-weight: 800;
  }
  .pg-mm-subwrap { overflow-y: auto; padding: 12px; }
  .pg-mm-subpane { display: none; flex-direction: column; gap: 8px; }
  .pg-mm-subpane.is-active { display: flex; }
  .pg-mm-all-cat {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #0f3d3e;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
  }
  .pg-mm-sublink {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
  }
  .pg-mm-mainlist { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
  .pg-mm-mainlink {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
  }
  .pg-mm-mainlink--cta { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }

  /* Sticky Bottom Thumb-Zone Navigation */
  .pg-mob-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99990;
    background: #ffffff;
    border-top: 1px solid #cbd5e1;
    box-shadow: 0 -4px 16px rgba(15,23,42,.1);
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
    direction: rtl;
  }
  .pg-mob-bottom-nav.has-filter { grid-template-columns: repeat(6, 1fr); }
  .pg-mob-bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    font-size: 11px !important;
    font-weight: 700;
    color: #475569;
    text-decoration: none !important;
    background: transparent;
    border: 0;
    padding: 2px;
    cursor: pointer;
    font-family: inherit;
  }
  .pg-mob-bnav-item.is-active { color: #0f3d3e; font-weight: 800; }
  .pg-mob-bnav-item--filter { color: #0284c7; font-weight: 800; }
  .pg-mob-bnav-item--call { color: #ea580c; font-weight: 800; }
  .pg-mob-bnav-item--wa { color: #16a34a; font-weight: 800; }

  /* Catalog & Category Bottom Sheet Filters */
  .pg-cl-mob-btn, .pg-cp-mobile-filter-btn { display: none !important; }
  .pg-cl-sidebar.is-open, .pg-cp-sidebar.is-open {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: auto !important;
    bottom: 58px !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 78vh !important;
    overflow-y: auto !important;
    background: #fff !important;
    padding: 16px !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -10px 30px rgba(15,23,42,.24) !important;
    z-index: 99985 !important;
  }

  /* Category Page Subcategories: Compact 2-Column Rows (No excessive scrolling) */
  .pg-cp-subcats-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }
  .pg-cp-subcat-card {
    padding: 8px !important;
    gap: 8px !important;
    border-radius: 10px !important;
  }
  .pg-cp-subcat-card img { width: 38px !important; height: 38px !important; border-radius: 8px !important; }
  .pg-cp-subcat-card strong { font-size: 12px !important; line-height: 1.4 !important; }
  .pg-cp-subcat-card span { font-size: 10.5px !important; }

  /* Homepage Mobile Hero Carousel: Centered Text After Image */
  .pg-hp-slide {
    grid-template-columns: 1fr !important;
    padding: 16px 42px 34px !important;
    min-height: auto !important;
    gap: 14px !important;
    text-align: center !important;
  }
  .pg-hp-slide-img { order: -1; height: 195px !important; }
  .pg-hp-slide h1, .pg-hp-slide h2 { font-size: 18px !important; text-align: center !important; }
  .pg-hp-slide p { font-size: 13.5px !important; line-height: 1.75 !important; margin-bottom: 12px !important; text-align: center !important; }
  .pg-hp-slide-badge { margin-left: auto; margin-right: auto; }
  .pg-hp-slide-btns { justify-content: center !important; }
  .pg-hp-car-btn { width: 34px !important; height: 34px !important; }
  .pg-hp-car-btn--prev { right: 6px !important; }
  .pg-hp-car-btn--next { left: 6px !important; }

  .pg-hp-cats-dk {
    display: flex !important;
    overflow-x: auto !important;
    gap: 10px !important;
    padding-bottom: 8px !important;
    scroll-snap-type: x mandatory;
  }
  .pg-hp-cat-dk { flex: 0 0 105px !important; scroll-snap-align: start; padding: 10px 6px !important; }
  .pg-hp-cat-dk__circle { width: 48px !important; height: 48px !important; }

  /* Redesigned 2-Column Mobile Product Cards (All Pages: Home, Catalog, Category) */
  .pg-hp-prod-5, .pg-ba-grid-4, .pg-cl-grid, .pg-cp-grid, .pg-cp-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .pg-card--base-v1 { border-radius: 12px !important; }
  .pg-card--base-v1 .pg-card__body { padding: 10px 9px !important; gap: 6px !important; }
  .pg-card--base-v1 .pg-card__meta { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; font-size: 10.5px !important; }
  .pg-card--base-v1 .pg-card__meta > span:first-child { display: none !important; }
  .pg-card--base-v1 .pg-card__minorder { font-size: 10.5px !important; padding: 2px 7px !important; }
  .pg-card--base-v1 .pg-card__title {
    font-size: 13px !important;
    line-height: 1.6 !important;
    min-height: 41px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .pg-card--base-v1 .pg-card__footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    padding-top: 7px !important;
  }
  .pg-card--base-v1 .pg-price { font-size: 13px !important; }
  .pg-card--base-v1 .pg-cta-text { font-size: 11.5px !important; align-self: flex-end; }
  .pg-card--base-v1 .pg-pill--occasion { font-size: 9.5px !important; padding: 2px 6px !important; }
  .pg-card--base-v1 .pg-card__sku { font-size: 9.5px !important; padding: 2px 6px !important; }

  .pg-footer-root, #colophon, footer { padding-bottom: 24px !important; }
}

@media (max-width: 960px) {
  .pg-cp-sidebar:not(.is-open) { display: none !important; }
  .pg-cp-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
}


/* v4 Fixes: Logo Animation + Perfect Vertical Centering on Header 1 & 2 + Category Filter Close Btn */
@keyframes pgLogoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(249,115,22,0)); }
  50% { transform: scale(1.045); filter: drop-shadow(0 2px 8px rgba(249,115,22,0.28)); }
}
.pgt-logo-img {
  animation: pgLogoPulse 3.6s ease-in-out infinite;
  will-change: transform;
}

.pg-cp-mob-close { display: none; }

@media (max-width: 960px) {
  /* Tier 1 Top Banner: Remove icon clutter, vertically centered text + button */
  .pgt-header-root .pgt-tier1-banner-wrap .pgt-smart-top-banner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 46px !important;
    height: auto !important;
    padding: 8px 12px !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }
  .pgt-smart-top-banner__txt {
    display: flex !important;
    align-items: center !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .pgt-smart-top-banner__cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Tier 2 Header: Force exact vertical center for Hamburger, Logo, Search */
  .pgt-header-root .pgt-tier2-mainbar {
    height: 60px !important;
    min-height: 60px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
  }
  .pgt-header-root .pgt-tier2-inner,
  .pgt-header-root .pgt-tier2-right-cluster {
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
  }
  #pgt-test-header .pgt-brand-cluster,
  .pgt-brand-cluster {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 60px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #pgt-hamburger-btn.pgt-hamburger-btn,
  #pgt-mob-search-toggle.pg-mob-search-toggle,
  #pgt-test-header .pgt-logo-link,
  .pgt-logo-link {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    align-self: center !important;
  }
  #pgt-test-header .pgt-logo-link,
  .pgt-logo-link {
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #pgt-test-header .pgt-logo-img,
  .pgt-logo-img {
    height: 36px !important;
    width: auto !important;
    margin: 0 !important;
    display: block !important;
  }

  /* Category Filter Bottom Sheet Close Button */
  .pg-cp-sidebar.is-open .pg-cp-mob-close,
  .pg-cl-sidebar.is-open .pg-cl-mob-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 13px !important;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 10px;
  }
}


/* v5 Fixes: Grid Centered Logo, 154px MegaMenu Rail, 1-Row Catalog Chips/Sorts, Full-Bleed Carousel */
@media (max-width: 960px) {
  #pgt-test-header .pgt-brand-cluster,
  .pgt-brand-cluster {
    display: grid !important;
    grid-template-columns: 42px 1fr 42px !important;
    align-items: center !important;
    height: 60px !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #pgt-hamburger-btn.pgt-hamburger-btn { grid-column: 1 !important; justify-self: start !important; }
  #pgt-test-header .pgt-logo-link, .pgt-logo-link { grid-column: 2 !important; justify-self: center !important; margin: 0 !important; }
  #pgt-mob-search-toggle.pg-mob-search-toggle { grid-column: 3 !important; justify-self: end !important; }

  /* Harmonized 2-Column Mobile MegaMenu (154px Rail + Subcategories) */
  .pg-mm-cat-split { grid-template-columns: 154px 1fr !important; }
  .pg-mm-rail-btn { font-size: 12.5px !important; padding: 13px 10px !important; line-height: 1.5 !important; }

  /* Full-bleed Carousel Image without white borders */
  .pg-hp-slide-img {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    height: auto !important; max-height: 280px !important;
    overflow: hidden !important;
  }
  .pg-hp-slide-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    height: auto !important;
    max-height: 270px !important;
    transform: none !important;
    border-radius: 14px;
    display: block !important;
  }

  /* Smart Catalog /product/ Mobile First Box: 1-row Horizontal Scroll Chips & Sorts */
  .pg-cl-hero { padding: 14px !important; }
  .pg-cl-hero h1 { font-size: 18px !important; margin-bottom: 4px !important; }
  .pg-cl-search-box { max-width: 100% !important; width: 100% !important; }
  .pg-cl-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 6px !important;
    -webkit-overflow-scrolling: touch;
  }
  .pg-cl-chip { flex: 0 0 auto !important; white-space: nowrap !important; }
  .pg-cl-toolbar { padding: 10px 12px !important; }
  .pg-cl-sorts {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    width: 100% !important;
    padding-bottom: 4px !important;
  }
  .pg-cl-sort-btn { flex: 0 0 auto !important; white-space: nowrap !important; }
}


@media (max-width: 960px) {
  #pgt-test-header .pgt-brand-cluster, .pgt-brand-cluster {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 60px !important;
  }
  #pgt-test-header .pgt-logo-link, .pgt-logo-link {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 2 !important;
  }
}


@media (max-width: 960px) {
  .pg-cl-layout, .pg-cl-layout > div, .pg-cl-hero, .pg-cl-toolbar {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .pg-cl-hero-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .pg-cl-search-box {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Y1 Banner Hover White Contrast */
.pgt-smart-top-banner:hover, .pgt-smart-top-banner:hover .pgt-smart-top-banner__txt {
  color: #ffffff !important;
}


@media (max-width: 960px) {
  .pgt-tier1-banner-wrap {
    height: auto !important;
    min-height: 52px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .pgt-header-root .pgt-tier1-banner-wrap .pgt-smart-top-banner {
    height: auto !important;
    padding: 10px 12px !important;
  }
}


@media (max-width: 960px) {
  .pgt-header-root .pgt-tier1-banner-wrap {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    z-index: 25 !important;
  }
  .pgt-header-root .pgt-tier2-mainbar {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
  }
}
