/*
 Theme Name: Hello Elementor Child
 Template: hello-elementor
 Version: 1.0.0
 License: GPL-2.0-or-later
 Text Domain: hello-elementor-child
*/
.gift-header-trigger {
  cursor: pointer;
  padding: 0;
  border: none;
  background: transparent !important;
  color: #333;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  position: relative;
}
.gift-header-trigger:hover {
  transform: scale(1.1);
}
.gift-header-trigger:focus-visible {
  outline: none;
}
.gift-header-icon {
  font-size: 3rem;
  line-height: 1.5;
  color: #667eea;
}
.gift-header-count {
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  border: 2px solid white;
  position: absolute;
  top: -2px;
  right: -2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gift-header-dropdown-menu {
  font-family: var(--e-global-typography-primary-font-family) !important;
  position: absolute;
  top: calc(100% + 12px);
  z-index: 9999;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  width: 380px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.gift-dropdown-left {
  left: 0;
}
.gift-dropdown-right {
  right: 0;
}
.gift-header-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gift-dropdown-header {
  background-color: var(--e-global-color-secondary);
  border: 0;
  padding: 20px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gift-dropdown-header h4 {
  font-size: var(--e-global-typography-c083528-font-size);
  font-weight: var(--e-global-typography-c083528-font-weight);
  color: var(--e-global-color-100187b);
  margin: 0;
}

.gift-dropdown-close {
  /* Editable variables */
  --gift-x-size: 36px; /* overall button + X size */
  --gift-x-thickness: 2px; /* stroke thickness */
  border: 0 !important;
  position: relative;
  width: var(--gift-x-size);
  height: var(--gift-x-size);
  background: var(--e-global-color-secondary) !important;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0; /* hide any inner text like "A-" */
  overflow: hidden;
  transition: 0.2s;
}

/* Build the X using two lines */
.gift-dropdown-close::before,
.gift-dropdown-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--gift-x-size) * 0.6);
  height: var(--gift-x-thickness);
  background: var(--e-global-color-100187b);
  transform-origin: center;
  border-radius: 999px;
}
.gift-dropdown-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.gift-dropdown-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.gift-dropdown-close:hover::before,
.gift-dropdown-close:hover::after {
  background: var(--e-global-color-accent);
}

.gift-dropdown-content {
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}

.gift-dropdown-content::-webkit-scrollbar {
  width: 4px;
}

.gift-dropdown-content::-webkit-scrollbar-track {
  background: transparent;
}

.gift-dropdown-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

.gift-dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  gap: 16px;
  transition: 0.2s ease;
  border: none;
  background: var(--e-global-color-01231db);
}

.gift-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}
.gift-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-item-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #667eea;
  color: white;
  font-size: 1.5rem;
}

.gift-item-content {
  flex: 1;
  min-width: 0;
}
.gift-item-content h5 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--e-global-color-secondary);
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gift-item-button {
  font-family: var(--e-global-typography-primary-font-family) !important;
  background: var(--e-global-color-e4332de);
  color: var(--e-global-color-100187b) !important;
  text-decoration: none !important;
  box-shadow: 1px 5px 10px 2px rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  border-style: solid;
  border-width: 1px 2px 3px 2px;
  border-color: var(--e-global-color-c429cb0);
  padding: 10px 15px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.3s ease-out;
  cursor: pointer;
  flex-shrink: 0;
  text-transform: uppercase;
}
/* Smooth hover via transform so exit is also smooth */
.gift-item-button:where(:hover, :focus-visible) {
  transform: translateY(8px);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .gift-item-button {
    transition: none !important;
  }
  .gift-item-button:where(:hover, :focus-visible) {
    transform: none !important;
  }
}

.gift-dropdown-footer {
  padding: 16px 16px;
  background: var(--e-global-color-secondary);
}

.gift-view-all-btn {
  width: 100%;
  background: var(--e-global-color-100187b) !important;
  color: var(--e-global-color-secondary) !important;
  font-family: var(--e-global-typography-primary-font-family) !important;
  border: none !important;
  padding: 15px;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gift-view-all-btn:hover {
  background: var(--e-global-color-b3c35c2) !important;
}

.gift-widget-container {
  margin: 20px 0;
}

.gift-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.gift-modal.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
  animation: gift-modal-fadeIn 0.4s ease;
}
@keyframes gift-modal-fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.gift-modal-content {
  background: var(--e-global-color-secondary);
  border-radius: 16px;
  max-width: 95%;
  max-height: 95%;
  width: 900px;
  overflow: hidden;
  animation: gift-modal-slideIn 0.5s ease;
}
@keyframes gift-modal-slideIn {
  from {
    transform: scale(0.8) translateY(-30px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.gift-modal-header {
  background: var(--e-global-color-secondary);
  color: var(--e-global-color-100187b);
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gift-modal-header h3 {
  margin: 0;
  font-size: 1.6rem;
  font-family: var(--e-global-typography-primary-font-family);
  font-weight: 700;
}

.gift-modal-close {
  cursor: pointer;
  --gift-x-size: 36px; /* overall button + X size */
  --gift-x-thickness: 2px; /* stroke thickness */
  border: 0 !important;
  position: relative;
  width: var(--gift-x-size);
  height: var(--gift-x-size);
  background: var(--e-global-color-secondary) !important;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0; /* hide any inner text like "A-" */
  overflow: hidden;
  transition: 0.2s;
}
.gift-modal-close::before,
.gift-modal-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--gift-x-size) * 0.6);
  height: var(--gift-x-thickness);
  background: var(--e-global-color-100187b);
  transform-origin: center;
  border-radius: 999px;
}
.gift-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.gift-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.gift-modal-close:hover::before,
.gift-modal-close:hover::after {
  background: var(--e-global-color-accent);
}

.gift-modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
  background-color: var(--e-global-color-primary);
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

.offer-item {
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
}

.offer-image {
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.no-image {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 4rem;
}

.offer-content {
  padding: 25px;
  background: var(--e-global-color-secondary);
}

.offer-content h4 {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  font-family: var(--e-global-typography-primary-font-family);
  color: var(--e-global-color-100187b);
  font-weight: 700;
}

.offer-button {
  font-family: var(--e-global-typography-primary-font-family) !important;
  background-color: var(--e-global-color-ca0fbc6);
  color: var(--e-global-color-100187b) !important;
  text-decoration: none !important;
  box-shadow: 1px 5px 10px 2px rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  border-style: solid;
  border-width: 1px 2px 3px 2px;
  border-color: var(--e-global-color-c429cb0);
  padding: 10px 15px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.3s ease-out;
  cursor: pointer;
  text-transform: uppercase;
}
.offer-button:where(:hover, :focus-visible) {
  background-color: var(--e-global-color-544cd4e);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .gift-modal-content {
    width: 95%;
  }
  .offers-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .gift-header-dropdown-menu {
    width: 320px;
    right: auto !important;
    transform: translateX(-50%) translateY(-10px);
  }
  .gift-header-dropdown-menu.active {
    transform: translateX(-50%) translateY(0);
  }
  .gift-header-dropdown-menu::before {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) rotate(45deg);
  }
  .gift-dropdown-item {
    padding: 15px;
    gap: 12px;
  }
  .gift-item-image {
    width: 50px;
    height: 50px;
  }
  .gift-dropdown-header,
  .gift-dropdown-footer {
    padding: 15px;
  }
  .gift-header-count {
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
  }
}
@media (max-width: 480px) {
  .gift-header-dropdown-menu {
    width: 300px;
  }
}
/* Accessibility */
.gift-header-dropdown-menu[aria-hidden='true'] {
  pointer-events: none;
}
.gift-header-dropdown-menu[aria-hidden='false'] {
  pointer-events: auto;
}
.gift-header-trigger:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
.gift-item-button:focus,
.gift-view-all-btn:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}
body.gift-modal-open {
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .gift-count {
    animation: none;
  }
  .gift-header-trigger,
  .gift-header-dropdown-menu,
  .gift-modal,
  .gift-modal-content,
  .offer-item,
  .offer-button,
  .gift-item-button {
    transition: none;
  }
}
