/* ===== GIFT CHECKOUT PAGE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rubik', sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
}

.checkout-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
}

/* ===== ЛІВА ЧАСТИНА - ФОРМА ===== */
.checkout-form-section {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.back-link:hover {
  color: #ff6b9d;
}

.checkout-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.checkout-title i {
  color: #ff6b9d;
}

.delivery-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #2e7d32;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 30px;
}

.delivery-type-badge.offline {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  color: #e65100;
}

/* ===== СЕКЦІЇ ФОРМИ ===== */
.form-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.section-number {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ff6b9d, #ff8a80);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== FORM GROUPS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ff6b9d;
  box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #bbb;
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e8e8e8;
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.autocomplete-dropdown.active {
  display: block;
}

.autocomplete-item {
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f5f5f5;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: #fff5f8;
}

.autocomplete-item .item-main {
  font-weight: 500;
  color: #333;
}

.autocomplete-item .item-sub {
  font-size: 0.85rem;
  color: #999;
  margin-top: 2px;
}

.input-loader {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #ff6b9d;
}

/* ===== ПАКУВАННЯ ===== */
.packaging-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.packaging-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 2px solid #e8e8e8;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.packaging-card input {
  display: none;
}

.packaging-card .fa-check {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ff6b9d;
  opacity: 0;
  transition: opacity 0.3s;
}

.packaging-card.active {
  border-color: #ff6b9d;
  background: #fff5f8;
}

.packaging-card.active .fa-check {
  opacity: 1;
}

.packaging-card:hover:not(.active) {
  border-color: #ffcce0;
}

.packaging-preview {
  width: 70px;
  height: 70px;
  border-radius: 10px;
}

.packaging-preview.pink-lime {
  background: linear-gradient(135deg, #ff6b9d 50%, #c4e538 50%);
}

.packaging-preview.orange-blue {
  background: linear-gradient(135deg, #ff9f43 50%, #54a0ff 50%);
}

.packaging-preview.pink-orange {
  background: linear-gradient(135deg, #ff6b9d 50%, #ff9f43 50%);
}

.packaging-preview.lime-blue {
  background: linear-gradient(135deg, #c4e538 50%, #54a0ff 50%);
}

.packaging-card span {
  font-size: 0.85rem;
  color: #333;
  text-align: center;
}

/* ===== МЕТОДИ ДОСТАВКИ ===== */
.delivery-methods {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.delivery-method {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.delivery-method input {
  display: none;
}

.delivery-method i {
  font-size: 1.4rem;
  color: #999;
  transition: color 0.3s;
}

.delivery-method span {
  font-size: 0.85rem;
  color: #666;
}

.delivery-method.active {
  border-color: #ff6b9d;
  background: #fff5f8;
}

.delivery-method.active i {
  color: #ff6b9d;
}

.delivery-method:hover:not(.active) {
  border-color: #ffcce0;
}

/* ===== ОПЛАТА ===== */
.payment-method-display {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 14px;
}

.payment-method-display img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.payment-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-name {
  font-weight: 600;
  color: #333;
}

.payment-desc {
  font-size: 0.85rem;
  color: #999;
}

.payment-method-display .fa-lock {
  color: #4CAF50;
  font-size: 1.2rem;
}

/* ===== SUBMIT BUTTON ===== */
.submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, #ff6b9d, #ff8a80);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

.submit-price {
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 20px;
}

/* ===== ПРАВА ЧАСТИНА - SUMMARY ===== */
.checkout-summary-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 40px;
  height: fit-content;
}

.summary-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.summary-card h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.summary-product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.product-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ff6b9d, #ff8a80);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.summary-product:nth-child(2) .product-icon {
  background: linear-gradient(135deg, #ff9f43, #ffb347);
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-name {
  font-weight: 600;
  color: #333;
}

.product-duration {
  font-size: 0.85rem;
  color: #999;
}

.product-price {
  font-weight: 700;
  color: #333;
}

.summary-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 16px 0;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
}

.summary-total {
  color: #ff6b9d;
}

.summary-features {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: #666;
}

.feature-item i {
  color: #4CAF50;
}

/* ===== HELP CARD ===== */
.help-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.help-card i {
  font-size: 1.5rem;
  color: #ff6b9d;
}

.help-card span {
  font-size: 0.85rem;
  color: #999;
}

.help-card a {
  display: block;
  color: #ff6b9d;
  text-decoration: none;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .checkout-container {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .checkout-summary-section {
    position: static;
    order: -1;
  }
  
  .checkout-form-section {
    padding: 24px;
  }
  
  .packaging-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .delivery-methods {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .checkout-title {
    font-size: 1.4rem;
  }
  
  .packaging-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .packaging-card {
    padding: 12px;
  }
  
  .packaging-preview {
    width: 50px;
    height: 50px;
  }
}
/* ===== GIFT SECTION ===== */
.gift-section {
  padding: 80px 0;
  background: var(--bg, #FDF7F7);
}

.gift-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 60px;
  align-items: start;
}

/* ===== GIFT INFO (ліва частина) ===== */
.gift-info {
  display: flex;
  flex-direction: column;
}

.gift-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FF4E99;
  color: white;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  width: fit-content;
  margin-bottom: 24px;
}

.gift-text-rotator {
  position: relative;
  min-height: 160px;
  perspective: 1000px;
  margin-bottom: 32px;
}

.gift-text-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: rotateX(90deg);
  transform-origin: center center;
  transition: all 0.6s ease;
  backface-visibility: hidden;
  pointer-events: none;
}

.gift-text-item.active {
  opacity: 1;
  transform: rotateX(0deg);
  pointer-events: auto;
}

.gift-text-item.exit {
  opacity: 0;
  transform: rotateX(-90deg);
}

.gift-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--black, #131010);
  margin: 0 0 14px 0;
  line-height: 1.2;
}

.gift-description {
  font-size: 1.15rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.gift-features {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gift-feature {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gift-feature i {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f8e8;
  color: var(--lime, #C6DF2B);
  border-radius: 12px;
  font-size: 1.2rem;
}

.gift-feature span {
  font-size: 1.05rem;
  color: #333;
}

/* ===== GIFT CARD (права частина - ШИРША) ===== */
.gift-card {
  background: white;
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 500px;
}

.gift-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.gift-card-header i {
  font-size: 1.6rem;
  color: #FF4E99;
}

.gift-card-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* ===== TOGGLE ОНЛАЙН/ОФЛАЙН ===== */
.gift-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.gift-type-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gift-type-btn i {
  font-size: 1.5rem;
  color: #bbb;
  transition: color 0.3s;
}

.type-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.type-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #333;
}

.gift-type-btn small {
  font-size: 0.8rem;
  color: #999;
}

.gift-type-btn.active {
  border-color: #FF4E99;
  background: #fff5f8;
}

.gift-type-btn.active i {
  color: #FF4E99;
}

.gift-type-btn:hover:not(.active) {
  border-color: #ffcce0;
}

/* ===== ВИБІР ПЛАНУ ===== */
.gift-plan-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.gift-plan-btn {
  padding: 20px;
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-align: center;
}

.gift-plan-btn .plan-duration {
  display: block;
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 6px;
}

.gift-plan-btn .plan-price {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange, #FF9F00);
}

.gift-plan-btn .plan-save {
  position: absolute;
  top: -12px;
  right: 12px;
  background: #FF4E99;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.gift-plan-btn.active {
  border-color: #FF4E99;
  background: #fff5f8;
}

.gift-plan-btn:hover:not(.active) {
  border-color: #ffcce0;
}

/* ===== ОНЛАЙН ФОРМА ===== */
.gift-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gift-input-group {
  margin-bottom: 18px;
  position: relative;
}

.gift-input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}

.gift-input-group .optional {
  color: #999;
  font-weight: 400;
}

.gift-input-group input,
.gift-input-group textarea {
  width: 100%;
  padding: 16px 18px;
  border: 2px solid #e8e8e8;
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.gift-input-group input:focus,
.gift-input-group textarea:focus {
  outline: none;
  border-color: #FF4E99;
  box-shadow: 0 0 0 4px rgba(255, 78, 153, 0.1);
}

.gift-input-group input::placeholder,
.gift-input-group textarea::placeholder {
  color: #bbb;
}

/* ===== OPTIONAL TOGGLES ===== */
.optional-toggle {
  margin-bottom: 14px;
}

.toggle-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-checkbox input {
  display: none;
}

.checkmark {
  width: 24px;
  height: 24px;
  border: 2px solid #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.checkmark::after {
  content: '✓';
  color: white;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}

.toggle-checkbox input:checked + .checkmark {
  background: #FF4E99;
  border-color: #FF4E99;
}

.toggle-checkbox input:checked + .checkmark::after {
  opacity: 1;
}

.toggle-label {
  font-size: 0.95rem;
  color: #555;
}

.optional-field {
  margin-top: 10px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ПІДСУМОК ===== */
.gift-summary {
  background: #f9f9f9;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
  color: #666;
}

.summary-line.total {
  border-top: 1px solid #e0e0e0;
  margin-top: 10px;
  padding-top: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #333;
}

.summary-line.offline-price {
  color: #FF9F00;
}

/* ===== КНОПКИ ===== */
.gift-submit-btn,
.gift-checkout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  background: #FF4E99;
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.gift-submit-btn:hover,
.gift-checkout-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 78, 153, 0.35);
}

.btn-price {
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.95rem;
}

.gift-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: #999;
}

.gift-note i {
  color: #4CAF50;
}

/* ===== PREVIEW ПРОМОКОДУ ===== */
.gift-preview {
  text-align: center;
  padding: 20px 0;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #4CAF50;
  font-size: 1.3rem;
  font-weight: 600;
}

.preview-header i {
  font-size: 1.5rem;
}

.promo-code-display {
  margin-bottom: 24px;
}

.promo-label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.promo-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f5f5f5;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 2px;
}

.copy-btn {
  background: #FF4E99;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.copy-btn:hover {
  background: #e8458a;
  transform: scale(1.05);
}

.preview-actions {
  margin-bottom: 20px;
}

.download-certificate-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--lime, #C6DF2B);
  color: var(--black, #131010);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.download-certificate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 223, 43, 0.4);
}

.preview-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #666;
  margin-top: 16px;
}

.preview-note i {
  color: #FF4E99;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .gift-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .gift-card {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .gift-card {
    padding: 24px;
  }
  
  .gift-type-toggle,
  .gift-plan-selector {
    grid-template-columns: 1fr;
  }
  
  .gift-title {
    font-size: 1.6rem;
  }
  
  .promo-code-box {
    font-size: 1.1rem;
    padding: 14px 18px;
  }
}