@charset "UTF-8";

/* ============ COMPONENTS ============ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95em 1.9em;
  border-radius: var(--r-full);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s, background 0.3s;
  white-space: nowrap;
}
.btn svg {
  width: 19px;
  height: 19px;
}
.btn-brass,
.btn-primary {
  background: linear-gradient(135deg, var(--brass-light), var(--brass) 60%, var(--brass-dark));
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.btn-brass:hover,
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(26,23,18,0.25);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: rgba(26,23,18,0.04);
}
.btn-ghost-ivory {
  background: rgba(251,246,236,0.14);
  color: var(--ivory);
  border: 1.5px solid rgba(251,246,236,0.35);
}
.btn-ghost-ivory:hover {
  background: rgba(251,246,236,0.24);
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Icon Buttons */
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform 0.3s ease;
}
.icon-btn:hover {
  transform: translateY(-2px);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  color: var(--forest);
}

/* Chips */
.chip-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.chip {
  padding: 0.7em 1.4em;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
  transition: all 0.3s ease;
  border: 1.5px solid transparent;
}
.chip.active, .chip:hover {
  background: var(--forest);
  color: var(--ivory);
  box-shadow: none;
}

/* Forms & Fields */
.form-block,
.form-group {
  margin-bottom: var(--sp-4, 18px);
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.94rem;
  margin-bottom: var(--sp-2, 8px);
  color: var(--ink);
}

.field,
.form-control {
  width: 100%;
  display: block;
  padding: 0.85em 1.15em;
  border-radius: var(--r-md, 12px);
  border: 1.5px solid rgba(26, 23, 18, 0.16);
  background: var(--ivory, #FDF8EF);
  color: var(--ink, #1A1712);
  font-size: 0.96rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.2s ease;
}

.field:focus,
.form-control:focus {
  outline: none;
  border-color: var(--brass, #C8954B);
  box-shadow: 0 0 0 4px rgba(200, 149, 75, 0.2);
  background: #ffffff;
}

.field::placeholder,
.form-control::placeholder {
  color: rgba(70, 63, 53, 0.45);
  font-size: 0.92rem;
}

.field:disabled,
.form-control:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: rgba(26, 23, 18, 0.05);
}

select.field,
select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23463F35' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 16px;
  padding-left: 40px;
  padding-right: 16px;
  line-height: 1.5;
}

textarea.field,
textarea.form-control {
  resize: vertical;
  min-height: 95px;
  line-height: 1.6;
}

/* Checkbox & Radio styling */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--forest, #355E1D);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Auth Box / Card */
.auth-box {
  background: var(--white, #ffffff);
  padding: 38px 34px;
  border-radius: var(--r-lg, 24px);
  box-shadow: 0 16px 40px -10px rgba(26, 23, 18, 0.08), 0 4px 12px rgba(26, 23, 18, 0.03);
  border: 1px solid rgba(26, 23, 18, 0.07);
  max-width: 580px;
  margin: 0 auto;
}

.auth-box h2 {
  font-family: 'Tajawal', sans-serif;
  color: var(--forest, #355E1D);
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 24px;
  text-align: center;
}

.auth-box h4 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--forest, #355E1D);
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(26, 23, 18, 0.08);
}

.btn-link {
  background: none;
  border: none;
  color: var(--brass, #C8954B);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.btn-link:hover {
  color: var(--forest, #355E1D);
}

.border-red-500 {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.18) !important;
}

/* Product Card */
.product-card {
  
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.35s ease, transform 0.12s ease-out;
  transform-style: preserve-3d;
  perspective: 700px;
  flex-direction: column;
}
.product-card.show {
  display: flex;
}
.product-card:hover { box-shadow: var(--shadow-lift); }

.pc-thumb {
  aspect-ratio: 1/0.85;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pc-thumb svg,
.pc-thumb-icon {
  width: 52% !important;
  height: 52% !important;
  color: rgba(255,255,255,0.95);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.22));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .pc-thumb svg,
.product-card:hover .pc-thumb-icon {
  transform: scale(1.08);
}
.pc-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.22), transparent 55%);
}

.cat-groceries { background: linear-gradient(150deg, var(--forest-light), var(--forest)); }
.cat-home { background: linear-gradient(150deg, var(--brass-light), var(--brass-dark)); }
.cat-health { background: linear-gradient(150deg, #4DB3DE, var(--sky-dark)); }
.cat-baby { background: linear-gradient(150deg, var(--wine-light), var(--wine)); }
.cat-tech { background: linear-gradient(150deg, #F59E0B, #B45309); }
.cat-beauty { background: linear-gradient(150deg, #F472B6, #DB2777); }

.pc-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-full);
}
.pc-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.pc-body h4 { font-family: 'Tajawal', sans-serif; font-weight: 700; font-size: 1rem; }
.pc-body .pc-cat { font-size: 0.78rem; color: var(--ink-soft); }
.pc-price { font-weight: 800; color: var(--forest); font-size: 1.08rem; display: flex; align-items: baseline; gap: 6px; }
.pc-old-price { font-weight: 400; color: #8c857b; font-size: 0.82rem; text-decoration: line-through; opacity: 0.85; }
.pc-add {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--forest-pale);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex: none;
}
.pc-add:hover { background: var(--forest); color: var(--ivory); transform: rotate(90deg); }
.pc-add svg { width: 18px; height: 18px; }
.pc-add.added { background: var(--brass); color: var(--ink); }

/* Upload Box */
.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: 2px dashed rgba(26,23,18,0.2);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.upload-box:hover, .upload-box.drag {
  border-color: var(--wine);
  background: var(--wine-pale);
}
.upload-box svg { width: 24px; height: 24px; color: var(--wine-light); }
.upload-box input { display: none; }

/* ============ INSTALL APP BUTTON & MODAL ============ */

/* 1. Header Install Button (Desktop) */
.header-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--forest-light), var(--forest));
  color: var(--ivory);
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: var(--r-full);
  box-shadow: 0 4px 12px rgba(53, 94, 29, 0.25);
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.header-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(53, 94, 29, 0.35);
}
@media (max-width: 768px) {
  .header-install-btn {
    display: none !important;
  }
}

/* 2. Mobile Drawer Menu Install Button */
.mobile-menu-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: var(--sp-4);
  padding: 12px 18px;
  background: var(--forest);
  color: var(--ivory);
  border-radius: var(--r-md);
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

/* 3. Fixed Floating Install Pill */
.fixed-install-pill {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 940;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(253, 248, 239, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(194, 101, 14, 0.3);
  border-radius: var(--r-full);
  padding: 8px 16px 8px 12px;
  box-shadow: 0 12px 28px -6px rgba(26, 23, 18, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  user-select: none;
}
.fixed-install-pill:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 36px -8px rgba(26, 23, 18, 0.35);
  border-color: var(--brass);
}
.fip-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brass-light), var(--brass));
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(240, 130, 30, 0.35);
}
.fip-text-box {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.fip-title {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--forest);
}
.fip-desc {
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.fip-close-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  padding: 4px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  opacity: 0.6;
  transition: opacity 0.2s, background-color 0.2s;
}
.fip-close-btn:hover {
  opacity: 1;
  background-color: rgba(26, 23, 18, 0.08);
}

/* التموضع الدقيق لشاشات الموبايل: فوق شريط الموبايل بـ 12 بكسل تماماً */
@media (max-width: 768px) {
  .fixed-install-pill {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px) + 12px);
    left: 16px;
    padding: 6px 14px 6px 10px;
  }
  .fip-desc {
    display: none;
  }
  .fip-icon-box {
    width: 32px;
    height: 32px;
  }
  .fip-icon-box svg {
    width: 18px;
    height: 18px;
  }
}

/* 4. Install Guide Modal (iOS & Desktop) */
.install-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 18, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.install-modal-card {
  background: var(--ivory);
  border-radius: var(--r-xl);
  max-width: 440px;
  width: 100%;
  padding: 32px 24px;
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
  text-align: center;
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.install-modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(26, 23, 18, 0.06);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}
.install-modal-close:hover {
  background: rgba(26, 23, 18, 0.12);
}
.install-modal-header h3 {
  font-family: 'Tajawal', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--forest);
  margin: 12px 0 6px;
}
.install-modal-header p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.install-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--forest-pale);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 18px -4px rgba(53, 94, 29, 0.2);
}
.install-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: right;
  margin-bottom: 28px;
  background: var(--white);
  padding: 18px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}
.install-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brass);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-desc {
  display: flex;
  flex-direction: column;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}
.step-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.4;
}
.install-modal-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--r-full);
}

