/* theme.css — رنگ‌بندی iPhone 18 (Burgundy) و بهبودهای ظاهری فون 2؛ بعد از app.css لود می‌شود */
:root {
  --p2-50: #fdf2f5;
  --p2-100: #fbe4ea;
  --p2-200: #f6cdd7;
  --p2-400: #d66e8a;
  --p2-500: #a42c4c;
  --p2-600: #861e3a;
  --p2-700: #6e1830;
  --p2-900: #3d0d1b;
  --p2-grad: linear-gradient(120deg, #3d0d1b 0%, #6e1830 45%, #a42c4c 100%);
  --p2-card-shadow: 0 1px 2px rgba(61, 13, 27, .06), 0 8px 24px -12px rgba(61, 13, 27, .18);
  --p2-card-shadow-hover: 0 18px 36px -14px rgba(110, 24, 48, .38);
  --swiper-theme-color: #861e3a;
}
::selection { background: var(--p2-200); color: var(--p2-900); }
html { scroll-behavior: smooth; }
body { background-color: #fbf8f9; }
.dark body, body.dark { background-color: #120a0d; }

/* کلاس‌هایی که اسکریپت‌ها استفاده می‌کنند ولی در app.css کامپایل‌شده نیستند */
.bg-blue-50 { background-color: var(--p2-50) !important; }
.dark .dark\:bg-gray-700 { background-color: rgb(55 65 81); }
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* ---------- هدر ---------- */
.p2-navbar { background: var(--p2-grad) !important; box-shadow: 0 12px 30px -16px rgba(61, 13, 27, .7); }
.p2-navbar .menu-item_link { opacity: .92; transition: opacity .2s; }
.p2-navbar .menu-item_link:hover { opacity: 1; }
.p2-navbar .menu-item_link::after { background-color: #fff !important; }
.p2-phone-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); padding: 6px 14px; border-radius: 999px; font-size: 14px; transition: background .2s; }
.p2-phone-pill:hover { background: rgba(255, 255, 255, .22); }
.megamenu { box-shadow: 0 30px 60px -20px rgba(61, 13, 27, .35) !important; border: 1px solid var(--p2-100); }
.megamenu_category-item.active, .megamenu_category-item:hover { color: var(--p2-600) !important; background: var(--p2-50) !important; }
.megamenu_left-title { color: var(--p2-600) !important; }
.megamenu_left-menu li a:hover { color: var(--p2-600); }
.p2-mega-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p2-mega-products a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; font-size: 12px; text-align: center; transition: background .2s; }
.p2-mega-products a:hover { background: var(--p2-50); color: var(--p2-600); }
.p2-mega-products img { width: 72px; height: 72px; object-fit: contain; }
.p2-mobile-cats a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .2s; }
.p2-mobile-cats a:hover { background: var(--p2-50); }
.p2-mobile-cats img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.p2-mobile-cats .sub { padding-right: 56px; font-size: 13px; color: #6b7280; }

/* ---------- کارت محصول ---------- */
.product-card {
  border: 1px solid #f1e6e9 !important;
  box-shadow: var(--p2-card-shadow) !important;
  border-radius: 20px !important;
  transition: transform .25s ease, box-shadow .25s ease !important;
}
.dark .product-card { border-color: rgba(255, 255, 255, .06) !important; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--p2-card-shadow-hover) !important; }
.product-card_img,
.small-card_img {
  object-fit: contain !important;
  -o-object-fit: contain !important;
  background: #fff;
  border-radius: 14px;
  padding: 6px;
}
.product-card_img { width: 100% !important; max-width: 13rem; height: 12rem !important; }
.product-card:hover .product-card_img { transform: scale(1.04); }
.product-card_link { min-height: 2.5rem; line-height: 1.35rem !important; }
.product-card_price p { color: #111827; font-size: 1.05rem; }
.dark .product-card_price p { color: #f3f4f6; }
.product-card_price span { background: var(--p2-600) !important; }
.small-card { border-radius: 18px !important; }
.hottest-slide_img { object-fit: contain; background: #fff; padding: 4px; }
.add-to-cart-btn:not([disabled]):hover, .add-fav-btn:hover { background: var(--p2-600) !important; color: #fff !important; border-color: var(--p2-600) !important; }
.add-to-cart-btn[disabled] { opacity: .35; cursor: not-allowed; }

/* ---------- دسته‌بندی صفحه اصلی ---------- */
.p2-cats { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
@media (max-width: 1100px) { .p2-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .p2-cats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .p2-cats > a { flex: 0 0 96px; scroll-snap-align: start; }
}
.p2-cats > a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 14px; }
.p2-cats .ring {
  width: 104px; height: 104px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px var(--p2-100), 0 10px 24px -14px rgba(110, 24, 48, .45); transition: transform .25s, box-shadow .25s;
}
.p2-cats img { width: 72%; height: 72%; object-fit: contain; }
.p2-cats > a:hover .ring { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--p2-500), 0 16px 30px -14px rgba(110, 24, 48, .55); }
.p2-cats > a:hover { color: var(--p2-600); }
@media (max-width: 640px) { .p2-cats .ring { width: 84px; height: 84px; } }

/* ---------- برندها ---------- */
.brand-card { border: 1px solid #f1e6e9; transition: transform .25s, box-shadow .25s; }
.brand-card:hover { transform: translateY(-3px); box-shadow: var(--p2-card-shadow-hover); }
.brand-card img { max-height: 44px; max-width: 150px; object-fit: contain; }
.dark .brand-card img { filter: invert(1) brightness(1.6); }
.dark .brand-card img.keep-color { filter: none; }

/* ---------- بخش شگفت‌انگیز ---------- */
.AmazingSlider { padding: 2px; }
section .bg-blue-500.rounded-xl.h-80, section .h-80.rounded-xl { background: var(--p2-grad) !important; }

/* ---------- صفحه محصول ---------- */
.p2-perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
@media (max-width: 1024px) { .p2-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.p2-perk { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, var(--p2-50), #fff); border: 1px solid var(--p2-100); }
.dark .p2-perk { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .08); }
.p2-perk .ic { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--p2-600); color: #fff; }
.p2-perk b { display: block; font-family: Dana Medium; font-size: 14px; color: #1f2937; }
.dark .p2-perk b { color: #f3f4f6; }
.p2-perk small { font-size: 12px; color: #6b7280; }
.p2-tabs { display: flex; gap: 8px; padding: 6px; border-radius: 16px; background: var(--p2-50); width: fit-content; max-width: 100%; overflow-x: auto; }
.dark .p2-tabs { background: rgba(255, 255, 255, .05); }
.p2-tabs .tab-btn { padding: 8px 18px; border-radius: 12px; white-space: nowrap; transition: background .2s, color .2s; }
.p2-tabs .tab-btn.text-blue-500 { background: var(--p2-600); color: #fff !important; }
.product-description h3 { color: var(--p2-700); }
.dark .product-description h3 { color: var(--p2-400); }
.product-description strong { color: inherit; }
.p2-spec-row { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 12px 8px; }
.p2-spec-row:nth-child(odd) { background: var(--p2-50); border-radius: 10px; }
.dark .p2-spec-row:nth-child(odd) { background: rgba(255, 255, 255, .03); }
@media (max-width: 640px) { .p2-spec-row { grid-template-columns: 110px 1fr; } }
#pd-main-img { transition: opacity .3s; }
#pd-main-img:not([src]), #pd-main-img[src=""] { opacity: 0; }
.p2-skeleton { background: linear-gradient(90deg, #f3eef0 25%, #fbf7f8 50%, #f3eef0 75%); background-size: 200% 100%; animation: p2sk 1.2s infinite; border-radius: 16px; }
@keyframes p2sk { to { background-position: -200% 0; } }

/* ---------- فوتر ---------- */
footer > div.bg-gray-900 { background: linear-gradient(160deg, #1a0a10 0%, #3d0d1b 100%) !important; }
footer .bg-gray-950 { background: rgba(0, 0, 0, .28) !important; }
footer .bg-gray-900.p-1\.5 { background: rgba(255, 255, 255, .06) !important; }

/* ---------- اسلایدر بالا ---------- */
.p2-md-only { display: none; }
@media (min-width: 768px) { .p2-md-only { display: block; } }
.swiper-pagination-bullet-active, .custom-bullet.swiper-pagination-bullet-active { background: var(--p2-600) !important; }

/* ---------- لوگو ---------- */
.p2-logo { display: inline-flex; align-items: center; gap: .18em; line-height: 1; direction: rtl; }
.p2-logo-word { font-family: "Morabba Medium", "Dana DemiBold", sans-serif; background: linear-gradient(90deg, #3d0d1b, #a42c4c); -webkit-background-clip: text; background-clip: text; color: transparent; padding: .1em 0 .12em; }
.p2-logo-badge {
  font-family: "Dana DemiBold", sans-serif; font-size: .52em; width: 1.75em; height: 1.75em; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; padding-top: .12em;
  background: linear-gradient(135deg, #c24a6a 0%, #861e3a 55%, #3d0d1b 100%);
  box-shadow: 0 .4em .9em -.35em rgba(110, 24, 48, .9), inset 0 .08em .15em rgba(255, 255, 255, .35);
}
.dark .p2-logo-word, .p2-logo-light .p2-logo-word, footer .p2-logo-word { background-image: linear-gradient(90deg, #fff, #f6cdd7); }

/* ---------- اسلایدر و بنرها ---------- */
.p2-hero-img { height: 90%; max-width: 44%; object-fit: contain; filter: drop-shadow(0 28px 36px rgba(0, 0, 0, .45)); transition: transform .5s; }
.header-slider .swiper-slide-active .p2-hero-img { transform: translateY(-4px) scale(1.02); }

/* ---------- برندها ---------- */
.p2-brands { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
@media (max-width: 1024px) { .p2-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .p2-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.p2-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px 16px; border-radius: 20px; background: #fff; border: 1px solid #f1e6e9; box-shadow: var(--p2-card-shadow); transition: transform .25s, box-shadow .25s, border-color .25s; }
.dark .p2-brand { background: #1f1418; border-color: rgba(255, 255, 255, .06); }
.p2-brand:hover { transform: translateY(-4px); box-shadow: var(--p2-card-shadow-hover); border-color: var(--p2-200); }
.p2-brand-logo { height: 56px; width: 100%; display: flex; align-items: center; justify-content: center; }
.p2-brand-logo img { max-height: 44px; max-width: 78%; width: auto; height: auto; object-fit: contain; }
.dark .p2-brand-logo img { filter: brightness(0) invert(1); }
.p2-brand-name { font-family: Dana Medium; color: #1f2937; }
.dark .p2-brand-name { color: #f3f4f6; }
.p2-brand-count { font-size: 12px; color: var(--p2-500); background: var(--p2-50); padding: 2px 10px; border-radius: 999px; }

/* ---------- معرفی محصول ---------- */
.p2-intro { display: grid; grid-template-columns: 1fr; gap: 26px; }
.p2-intro-lead { padding: 22px 24px; border-radius: 20px; background: linear-gradient(135deg, var(--p2-50), #fff 70%); border: 1px solid var(--p2-100); line-height: 2.1; font-size: 15px; color: #374151; }
.dark .p2-intro-lead { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .08); color: #d1d5db; }
.p2-intro-lead p + p { margin-top: 10px; }
.p2-intro-lead strong { color: var(--p2-700); }
.dark .p2-intro-lead strong { color: var(--p2-400); }
.p2-intro-title { display: flex; align-items: center; gap: 10px; font-family: Dana DemiBold; font-size: 17px; color: #111827; margin-bottom: 12px; }
.dark .p2-intro-title { color: #f9fafb; }
.p2-intro-title::before { content: ''; width: 6px; height: 22px; border-radius: 6px; background: var(--p2-grad); }
.p2-spec-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1024px) { .p2-spec-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .p2-spec-tiles { grid-template-columns: 1fr; } }
.p2-spec-tile { padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid #f1e6e9; }
.dark .p2-spec-tile { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .07); }
.p2-spec-tile small { display: block; color: var(--p2-500); font-size: 12px; margin-bottom: 4px; }
.p2-spec-tile b { font-family: Dana Medium; font-weight: normal; font-size: 14px; color: #1f2937; line-height: 1.7; }
.dark .p2-spec-tile b { color: #e5e7eb; }
.p2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p2-chips span { padding: 6px 14px; border-radius: 999px; background: var(--p2-50); color: var(--p2-700); border: 1px solid var(--p2-100); font-size: 13px; }
.dark .p2-chips span { background: rgba(255, 255, 255, .05); color: #f6cdd7; border-color: rgba(255, 255, 255, .08); }
.p2-faq details { border: 1px solid #f1e6e9; border-radius: 14px; padding: 12px 16px; background: #fff; }
.p2-faq details + details { margin-top: 8px; }
.dark .p2-faq details { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .07); }
.p2-faq summary { cursor: pointer; font-family: Dana Medium; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.p2-faq summary::-webkit-details-marker { display: none; }
.p2-faq summary::after { content: '+'; color: var(--p2-500); font-size: 20px; line-height: 1; }
.p2-faq details[open] summary::after { content: '−'; }
.p2-faq details p { margin-top: 10px; color: #4b5563; line-height: 2; }
.dark .p2-faq details p { color: #d1d5db; }
.p2-features-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .p2-features-list { grid-template-columns: 1fr; } }
.p2-features-list span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #f1e6e9; font-size: 14px; }
.dark .p2-features-list span { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .07); }
.p2-features-list span::before { content: '✓'; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--p2-600); color: #fff; font-size: 12px; }

/* ---------- ورود و ثبت‌نام ---------- */
.p2-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: var(--p2-50); margin-bottom: 22px; }
.dark .p2-auth-tabs { background: rgba(255, 255, 255, .05); }
.p2-auth-tabs button { padding: 10px; border-radius: 10px; font-family: "Dana Medium"; color: #6b5c62; transition: background .2s, color .2s; }
.dark .p2-auth-tabs button { color: #d1d5db; }
.p2-auth-tabs button.active { background: var(--p2-grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(110, 24, 48, .8); }
.p2-auth-label { display: block; margin-bottom: 6px; font-size: 13px; color: #6b7280; }
.dark .p2-auth-label { color: #d1d5db; }
.p2-auth-input { display: block; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #eadde2; background: #fbf8f9; color: #1f2937; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.dark .p2-auth-input { background: #111827; border-color: rgba(255, 255, 255, .1); color: #f3f4f6; }
.p2-auth-input:focus { border-color: var(--p2-500); background: #fff; box-shadow: 0 0 0 4px var(--p2-50); }
.p2-auth-hint { margin-top: 6px; font-size: 12px; color: #9ca3af; }
.p2-auth-names[hidden], .p2-auth-confirm[hidden], .p2-auth-hint[hidden], #forgot-note[hidden] { display: none; }
