/**
 * Astra Hook Theme — Single Product Page CSS (BigShopBD Reference Style)
 */

/* ─── উকমার্স ফর্ম লেআউট অপটিমাইজেশন ─────────────────────────────────── */
.single-product div.product form.cart {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 20px !important;
}

.single-product div.product form.cart .quantity {
  margin-right: 0 !important;
  margin-bottom: 5px !important;
}

/* ─── ১. সবুজ বাটন: "ফ্রি ডেলিভারিতে অর্ডার করুন" ────────────────────── */
.ah-buy-now-btn,
.single-product div.product form.cart .ah-buy-now-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100% !important;
  padding: 15px 20px !important;
  background: var(--ah-secondary, #27ae60) !important; /* সবুজ বাটন */
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35) !important;
  transition: all 0.25s ease !important;
  position: relative;
  overflow: hidden;
  order: 1; /* সবার উপরে */
}

/* শিমার ইফেক্ট */
.ah-buy-now-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: ah-shimmer 2.2s infinite;
}

@keyframes ah-shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

.ah-buy-now-btn:hover {
  background: #219653 !important;
  transform: translateY(-2px);
}

/* ─── ২. কমলা বাটন: ডিফল্ট উকমার্স "কার্টে যোগ করুন" ─────────────────── */
.single-product div.product form.cart .single_add_to_cart_button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  padding: 14px 20px !important;
  background: var(--ah-primary, #e8673c) !important; /* কমলা বাটন */
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(232, 103, 60, 0.3) !important;
  order: 2;
}

.single-product div.product form.cart .single_add_to_cart_button:hover {
  background: var(--ah-primary-dark, #d35400) !important;
}

/* ─── ৩. নীল বাটন: "কল করুন : 09638477777" ও ডেলিভারি বক্স ──────────── */
.ah-product-extra-box {
  margin-top: 15px;
  background: #ffffff;
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius);
  overflow: hidden;
}

.ah-hotline-btn {
  display: block;
  background: #0097e6;
  color: #fff !important;
  text-align: center;
  padding: 13px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-radius: var(--ah-radius);
  box-shadow: 0 3px 10px rgba(0, 151, 230, 0.25);
  margin-bottom: 12px;
}

.ah-hotline-btn:hover {
  background: #0081c7;
}

.ah-delivery-table-wrap {
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  padding: 10px 14px;
}

.ah-delivery-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ah-delivery-table td {
  padding: 8px 0;
  border-bottom: 1px solid #f1f2f6;
}

.ah-delivery-table tr:last-child td {
  border-bottom: none;
}

.ah-price-col {
  text-align: right;
  font-weight: 700;
  color: var(--ah-text);
}

.ah-payment-row td {
  color: #2980b9;
  font-weight: 700;
}

/* ─── মোবাইল স্টিকি বার ───────────────────────────────────────────────── */
.ah-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #dcdde1;
  padding: 10px 15px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
  z-index: 9999;
}

.ah-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.ah-sticky-prod {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.ah-sticky-thumb {
  width: 44px !important;
  height: 44px !important;
  object-fit: cover !important;
  border-radius: 6px;
}

.ah-sticky-meta {
  display: flex;
  flex-direction: column;
}

.ah-sticky-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ah-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.ah-sticky-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--ah-primary);
}

.ah-sticky-buy-btn {
  padding: 10px 18px !important;
  font-size: 15px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .ah-mobile-sticky-bar {
    display: block;
  }
}

/* ─── ৪. BD Style Variation Swatches & Pills (Astra Plus) ─────────────────── */
.single-product div.product form.variations_form {
  margin-bottom: 20px !important;
}

table.variations {
  width: 100% !important;
  border: none !important;
  margin-bottom: 12px !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
}

table.variations tbody tr {
  display: flex !important;
  flex-direction: column !important;
  background: #fbfcfd;
  border: 1.5px solid #edf2f7;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

table.variations th.label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100% !important;
  padding: 0 0 6px 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  text-align: left !important;
  border: none !important;
}

table.variations th.label label {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  text-transform: capitalize;
  margin: 0 !important;
}

.ah-selected-val-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--ah-primary, #ff5722);
  background: rgba(255, 87, 34, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
}

table.variations td.value {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  border: none !important;
}

/* নেটিভ ড্রপডাউন ব্যাকগ্রাউন্ডে কিন্তু সক্রিয় রাখা */
table.variations select.ah-swatch-hidden-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Swatches Pills Wrapper */
.ah-swatch-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

/* Individual Swatch Button / Pill */
.ah-swatch-pill {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 16px;
  min-width: 44px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
  user-select: none;
}

.ah-swatch-pill:hover {
  border-color: var(--ah-primary, #ff5722);
  color: var(--ah-primary, #ff5722);
  background: #fff8f6;
  transform: translateY(-1px);
}

/* Active / Selected Swatch */
.ah-swatch-pill.active {
  background: #fff4ee !important;
  border-color: var(--ah-primary, #ff5722) !important;
  color: var(--ah-primary, #ff5722) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(255, 87, 34, 0.25) !important;
}

.ah-swatch-pill.active::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  background: var(--ah-primary, #ff5722);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Disabled / Out of stock */
.ah-swatch-pill.disabled {
  opacity: 0.45;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: line-through;
  pointer-events: none;
}

/* Clear Selection link */
a.reset_variations {
  display: inline-block !important;
  margin-top: 6px !important;
  font-size: 12px !important;
  color: #64748b !important;
  text-decoration: underline !important;
  transition: color 0.15s ease;
}

a.reset_variations:hover {
  color: #ef4444 !important;
}

/* Variation Notice / Alert Box */
.ah-variation-notice {
  background: #fef2f2;
  border: 1.5px solid #f87171;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 12px;
  animation: ah-shake 0.4s ease-in-out;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes ah-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.ah-highlight-required table.variations tbody tr {
  border-color: #f87171 !important;
  background: #fff5f5 !important;
}

/* Single Variation Wrap (Price & Stock) */
.single_variation_wrap {
  margin-bottom: 10px;
}

.woocommerce-variation-price .price {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--ah-primary, #ff5722) !important;
}

