/* astral shared shop — inherits host site CSS vars */

/* --- cart badge --- */
.shop-cart-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--shop-border, rgba(0,0,0,0.15));
  background: var(--shop-cart-bg, rgba(255,255,255,0.95));
  backdrop-filter: blur(12px);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-cart-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0,0,0,0.15);
}

.shop-cart-btn.has-items { display: flex; }

.shop-cart-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--shop-text, #3a2e26);
  fill: none;
  stroke-width: 1.5;
}

.shop-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--shop-accent, #b87a56);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* --- product grid --- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.shop-item {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: var(--shop-card-bg, #faf7f2);
  border: 1px solid var(--shop-border, rgba(0,0,0,0.06));
  transition: transform 0.3s, box-shadow 0.3s;
}

.shop-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.shop-item-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.shop-item-info {
  padding: 1.2rem 1.4rem;
}

.shop-item-name {
  font-family: var(--shop-heading-font, 'Cormorant Garamond', serif);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--shop-text, #3a2e26);
  margin-bottom: 0.3rem;
}

.shop-item-desc {
  font-size: 0.8rem;
  color: var(--shop-text-light, #8a7e72);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.shop-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-item-price {
  font-family: var(--shop-heading-font, 'Cormorant Garamond', serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--shop-text, #3a2e26);
}

.shop-item-price .currency {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 2px;
}

.shop-add-btn {
  background: none;
  border: 1px solid var(--shop-border, rgba(0,0,0,0.15));
  padding: 0.5rem 1.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  cursor: pointer;
  color: var(--shop-text-light, #8a7e72);
  border-radius: 2px;
  transition: all 0.3s;
  font-family: inherit;
}

.shop-add-btn:hover {
  background: var(--shop-accent, #b87a56);
  color: #fff;
  border-color: var(--shop-accent, #b87a56);
}

.shop-add-btn.added {
  background: var(--shop-accent, #b87a56);
  color: #fff;
  border-color: var(--shop-accent, #b87a56);
  pointer-events: none;
}

/* --- sold out --- */
.shop-item.sold-out .shop-item-img { opacity: 0.5; }
.shop-item.sold-out .shop-add-btn {
  opacity: 0.4;
  pointer-events: none;
  border-color: transparent;
}

.shop-sold-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  padding: 0.3rem 0.8rem;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 2px;
}

/* --- cart drawer --- */
.shop-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.shop-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.shop-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 90vw);
  height: 100%;
  background: var(--shop-drawer-bg, #faf7f2);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
}

.shop-drawer.open { transform: translateX(0); }

.shop-drawer-header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--shop-border, rgba(0,0,0,0.06));
}

.shop-drawer-title {
  font-family: var(--shop-heading-font, 'Cormorant Garamond', serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--shop-text, #3a2e26);
}

.shop-drawer-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--shop-text-light, #8a7e72);
  padding: 0.5rem;
  line-height: 1;
}

.shop-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 2rem;
}

.shop-drawer-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--shop-border, rgba(0,0,0,0.06));
  align-items: center;
}

.shop-drawer-item img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
}

.shop-drawer-item-info { flex: 1; }

.shop-drawer-item-name {
  font-family: var(--shop-heading-font, 'Cormorant Garamond', serif);
  font-size: 1rem;
  color: var(--shop-text, #3a2e26);
}

.shop-drawer-item-price {
  font-size: 0.85rem;
  color: var(--shop-text-light, #8a7e72);
  margin-top: 0.2rem;
}

.shop-drawer-item-qty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.shop-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--shop-border, rgba(0,0,0,0.15));
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--shop-text-light, #8a7e72);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-qty-btn:hover { border-color: var(--shop-accent, #b87a56); color: var(--shop-accent, #b87a56); }

.shop-qty-val {
  font-size: 0.85rem;
  min-width: 20px;
  text-align: center;
  color: var(--shop-text, #3a2e26);
}

.shop-drawer-remove {
  background: none;
  border: none;
  font-size: 0.7rem;
  color: var(--shop-text-light, #8a7e72);
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.6;
  padding: 0;
}

.shop-drawer-remove:hover { opacity: 1; }

.shop-drawer-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--shop-border, rgba(0,0,0,0.06));
}

.shop-drawer-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-family: var(--shop-heading-font, 'Cormorant Garamond', serif);
  font-size: 1.2rem;
  color: var(--shop-text, #3a2e26);
}

.shop-checkout-btn {
  width: 100%;
  padding: 1rem;
  background: var(--shop-accent, #b87a56);
  color: #fff;
  border: none;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
  transition: opacity 0.3s;
}

.shop-checkout-btn:hover { opacity: 0.85; }

.shop-checkout-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.shop-empty-msg {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--shop-text-light, #8a7e72);
  font-size: 0.9rem;
}

/* --- inquiry note --- */
.shop-inquiry-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--shop-text-light, #8a7e72);
}

.shop-inquiry-note a {
  color: var(--shop-accent, #b87a56);
  text-decoration: none;
}

.shop-inquiry-note a:hover { text-decoration: underline; }

/* --- responsive --- */
@media (max-width: 768px) {
  .shop-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .shop-item-info { padding: 0.8rem 1rem; }
  .shop-item-name { font-size: 1rem; }
  .shop-item-desc { display: none; }
  .shop-cart-btn { bottom: 1.5rem; right: 1.5rem; width: 50px; height: 50px; }
}

@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
}
