/* --- SYNC STORE CART & UI --- */

/* Cart Overlay */
#cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Cart Sidebar */
#cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}

#cart-sidebar.open {
  transform: translateX(0);
}

/* Cart Header */
.cart-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-family: 'Syne';
  font-size: 1.5rem;
  color: #fff;
  margin: 0;
}

.cart-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 2rem;
  cursor: pointer;
  transition: 0.2s;
}

.cart-close:hover {
  color: #ff5f56;
}

/* Cart Items Container */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Cart Item */
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.cart-item-info h4 {
  font-family: 'Syne';
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.cart-item-price {
  font-family: 'Space Mono';
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-controls button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.cart-item-controls button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cart-item-controls span {
  font-family: 'Space Mono';
  font-size: 0.9rem;
  color: #fff;
  min-width: 20px;
  text-align: center;
}

/* Cart Footer */
.cart-footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Syne';
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

#cart-total-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit';
}

.btn-checkout {
  width: 100%;
  background: rgba(124, 58, 237, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.2rem;
  border-radius: 100px;
  font-family: 'Outfit';
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.btn-checkout:hover {
  background: rgba(124, 58, 237, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(124, 58, 237, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-checkout:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
/* --- PRODUCT PAGE VIEW --- */
#package-detail-view {
  min-height: 80vh;
  padding: 10rem 3rem 6rem;
  background: var(--bg);
  position: relative;
  z-index: 10;
}

.product-page-container {
  max-width: 1200px;
  margin: 0 auto;
}

.product-header {
  margin-bottom: 3rem;
}

.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: 'Space Mono';
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s;
}

.back-btn:hover {
  transform: translateX(-5px);
}

.breadcrumb {
  font-family: 'Outfit';
  font-size: 0.9rem;
  color: var(--text2);
  opacity: 0.6;
}

.breadcrumb span {
  color: #fff;
  opacity: 1;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.product-visuals {
  position: sticky;
  top: 120px;
}

.product-main-img {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.product-badges {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.badge {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-family: 'Space Mono';
  text-transform: uppercase;
}

.product-info {
  display: flex;
  flex-direction: column;
}

.product-title {
  font-family: 'Syne';
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.product-price {
  font-family: 'Space Mono';
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.product-buy-btn {
  background: rgba(124, 58, 237, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 2.5rem;
  border-radius: 100px;
  font-family: 'Outfit';
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.product-buy-btn:hover {
  background: rgba(124, 58, 237, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(124, 58, 237, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.product-tabs {
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  display: flex;
}

.tab-btn {
  padding: 1rem 0;
  color: #fff;
  font-family: 'Syne';
  font-weight: 700;
  position: relative;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.product-description {
  font-family: 'Outfit';
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text2);
  margin-bottom: 3rem;
}

.product-description p { margin-bottom: 1.5rem; }
.product-description ul { margin-left: 1.5rem; margin-bottom: 1.5rem; }

.product-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text2);
  font-size: 0.9rem;
}

.feature-item span {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 968px) {
  .product-grid { grid-template-columns: 1fr; gap: 3rem; }
  .product-visuals { position: static; }
  .product-title { font-size: 2.5rem; }
  #package-detail-view { padding: 8rem 2rem 4rem; }
}

.price-val {
  font-weight: 700;
}

.price-curr {
  font-size: 0.7em;
  opacity: 0.6;
  margin-left: 0.2rem;
  font-family: 'Outfit', sans-serif;
}
